aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/kernel
AgeCommit message (Collapse)AuthorFilesLines
2008-12-27sparc: unify sections.hSam Ravnborg2-4/+1
While doing this use standard names for start/end so we could use definitions straight from asm-generic for all the typical symbols. This also allowed us to drop the use of PROVIDE in the linker script so sprc is less non-standard on this area. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-27sparc: use .data.init_task section for init_thread_unionSam Ravnborg2-2/+10
Use a dedicated aligned section for the init_thread_union variable and declare this section in vmlinux.lds. This align sparc with most other architectures. Eventually this allow the init_task bits to be unified across all architectures. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-26sparc: fix array overrun check in of_device_64.cRobert Reif1-9/+9
Do the array length check and fixup before copying the array. Signed-off-by: Robert Reif <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-26sparc: unify module.cSam Ravnborg3-164/+25
o Copy module_64.c to module.c o Add all sparc specific bits to module.c o delete module_32.c o update Makefile Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-26sparc64: prepare module_64.c for unificationSam Ravnborg1-22/+40
o Introduce a helper function o Combine sparc64 specific case values o add ifdef's around sparc64 code snippets Note: The ifdef around the BUG_ON is highly questionable but for now the safe approach was taken Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-26sparc64: use bit neutral Elf symbolsSam Ravnborg1-17/+17
To prepare for unification use the bit neutral versions of the Elf types defined by asm/module.h Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-26sparc: fix hardirq.h removal falloutSam Ravnborg2-0/+2
When hardirq.h are removed from asm-generic/local.h a few bits fails to build. Fix these upfront. Reported by Alexey Dobriyan. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-13cpumask: centralize cpu_online_map and cpu_possible_mapRusty Russell2-8/+2
Impact: cleanup Each SMP arch defines these themselves. Move them to a central location. Twists: 1) Some archs (m32, parisc, s390) set possible_map to all 1, so we add a CONFIG_INIT_ALL_POSSIBLE for this rather than break them. 2) mips and sparc32 '#define cpu_possible_map phys_cpu_present_map'. Those archs simply have phys_cpu_present_map replaced everywhere. 3) Alpha defined cpu_possible_map to cpu_present_map; this is tricky so I just manipulate them both in sync. 4) IA64, cris and m32r have gratuitous 'extern cpumask_t cpu_possible_map' declarations. Signed-off-by: Rusty Russell <[email protected]> Reviewed-by: Grant Grundler <[email protected]> Tested-by: Tony Luck <[email protected]> Acked-by: Ingo Molnar <[email protected]> Cc: Mike Travis <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected]
2008-12-11sparc64: do not export pus_fs_structSam Ravnborg1-1/+0
Al asked: BTW, why does sparc64 export put_fs_struct? Grepping the kernel tree did not show any users of an exported put_fs_struct - so drop the export. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-11sparc: use sparc64 version of scatterlist.hRobert Reif1-2/+2
Use sparc64 version of scatterlist.h. There are three main differences: dma_addr_t replaces __u32 dma_address replaces dvma_address dma_length replaces dvma_length dma_addr_t is a u32 on sparc32. Boot tested on sparc32. Signed-off-by: Robert Reif <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-09sparc: Commonize memcmp assembler.David S. Miller2-4/+0
Signed-off-by: David S. Miller <[email protected]>
2008-12-08sparc: replace for_each_cpu_mask_nr with for_each_cpuRusty Russell1-1/+1
Simple replacement, now the _nr is redundant. Signed-off-by: Rusty Russell <[email protected]> Signed-off-by: Mike Travis <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-08sparc: fix sparse warnings in irq_32.cSam Ravnborg4-5/+19
Fix following sparse warnings: symbol 'static_irqaction' was not declared. Should it be static? symbol 'static_irq_count' was not declared. Should it be static? symbol 'irq_action_lock' was not declared. Should it be static? symbol 'unexpected_irq' was not declared. Should it be static? symbol 'handler_irq' was not declared. Should it be static? returning void-valued expression returning void-valued expression returning void-valued expression symbol 'init_IRQ' was not declared. Should it be static? Warnings were fixed by addding proper declarations and fixing return path of a few functions. There remains several warnings all related to the floppy driver. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-08sparc: add include guards to kernel.hSam Ravnborg1-1/+4
Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-08sparc: fix sparse warnings in traps_32.cSam Ravnborg4-34/+49
o add decalrations to entry.h for functions only used from assembler o add declaratiosn to kernel.h for functions only used from .c o removed unused functions/extern declarations Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-08sparc: fix trivial style issues in kernel/pmc.cSam Ravnborg1-8/+8
o drop trailing whitespaces o align a fix things properly Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-08sparc: fix sparse warning in kernel/pmc.cSam Ravnborg1-1/+1
Fix following warning: arch/sparc/kernel/pmc.c:41:6: warning: symbol 'pmc_swift_idle' was not declared. Should it be static? It was not used outside this file - make it static Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-07sparc: unify kernel/idprom.cSam Ravnborg3-58/+9
o in sparc32 variant removed prom_halt in warning situations o ifdef out sparc32 specific code Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-07sparc: idprom_32.c cleanupSam Ravnborg1-24/+26
o Use C99 initializer for struct members o fix code style issues o Add KERN_WARNING to all printk o Update prints to match sparc64 Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-07sparc: Restore irq_trans_init() call in prom_create_node().David S. Miller3-5/+6
This broke sparc64 in various ways. Add an empty dummy hook in sparc32's prom_32.c so that we can potentially handle things on that side similarly, and in particular avoid a prom_common.c ifdef :-) Signed-off-by: David S. Miller <[email protected]>
2008-12-07sparc: unify kernel/cpuSam Ravnborg3-168/+92
o use cpu_32.c as base o move all sparc64 definitions to the common cpu.c o use ifdef for the parts that differs and use cpu_32 as base o spitfire.h required a CONFIG_SPARC64 guard to fix build on 32 bit Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-07sparc: expand cpu tableSam Ravnborg1-124/+195
Prepare cputable to include sparc64 versions Declare it __initconst so it can be dropped after init Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-07sparc: fix sparse warnings in cpu_*.cSam Ravnborg6-8/+16
o declare variables from cpu_*.c o declare function from cpu_32.c To do this introduce a new header "kernel.h" which is local to kernel/ Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-05sparc: report "Unknown CPU/FPU" for unknown cpu/fpuSam Ravnborg2-5/+8
If we cannot determine the CPU or FPU report "Unknown CPU" or "Unknown FPU" like sparc64 does. And report with KERN_ERR that we cannot determine the CPU. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-05sparc: beautify kernel/cpu_32.cSam Ravnborg1-100/+104
Fixed style issues Use C99 struct assignments Use KERN_DEBUG for printk Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-05sparc: Move of_console_{device,path,options} info prom_common.cDavid S. Miller3-18/+9
Signed-off-by: David S. Miller <[email protected]>
2008-12-05sparc: Move prom_build_devicetree() into prom_common.cDavid S. Miller4-54/+39
To make this work we provide a dummy nop implementation of of_fill_in_cpu_data() for sparc32. Signed-off-by: David S. Miller <[email protected]>
2008-12-05sparc: Move core of OF device tree building code into prom_common.cDavid S. Miller4-132/+80
Signed-off-by: David S. Miller <[email protected]>
2008-12-05sparc: Match sparc32's build_tree() up to sparc64'sDavid S. Miller1-5/+15
Sparc64 uses a non-recursive sibling traversal algorithm that never got propagated into the sparc32 copy of this code. Sync them up. Signed-off-by: David S. Miller <[email protected]>
2008-12-05sparc: Move create_node() and friends into prom_common.cDavid S. Miller4-78/+42
Signed-off-by: David S. Miller <[email protected]>
2008-12-05sparc: Make sparc32's create_node() assign parent pointer.David S. Miller1-3/+4
This makes it match what sparc64's version does. Signed-off-by: David S. Miller <[email protected]>
2008-12-05sparc: Commonize get_one_property() implementations.David S. Miller2-2/+2
Add final len assignment in sparc64's get_one_property() (it's necessary to avoid unchecked return value warnings on the sparc32 side), and mark name argument const on sparc32's copy. Signed-off-by: David S. Miller <[email protected]>
2008-12-05sparc: Move property building code into prom_common.cDavid S. Miller4-126/+83
Unfortunately there is some sparc32/sparc64 ifdef'ery in here due to the difference in how the prom_firstprop() and prom_nextprop() routines work. This will be eliminated eventually. Signed-off-by: David S. Miller <[email protected]>
2008-12-05sparc: Move 'unique_id' into prom_common.c and rename to 'prom_unique_id'David S. Miller4-8/+7
This will be used in a subsequent changeset. Signed-off-by: David S. Miller <[email protected]>
2008-12-05sparc: Move irq_trans_init() and support code into seperate file.David S. Miller4-830/+847
All sparc64 specific, so only build this file on sparc64. Signed-off-by: David S. Miller <[email protected]>
2008-12-05sparc: Mark prom_early_alloc non-static.David S. Miller3-2/+4
A subsequent changeset will use this. Signed-off-by: David S. Miller <[email protected]>
2008-12-05sparc: Create common area for OF device layer code.David S. Miller4-188/+122
This is where common code implementations will go as we unify 32-bit and 64-bit OF device tree code. Signed-off-by: David S. Miller <[email protected]>
2008-12-05sparc: Create common header file for prom_{32,64}.cDavid S. Miller3-6/+12
This is where common declarations will go as we unify these files as much as possible into common code. Signed-off-by: David S. Miller <[email protected]>
2008-12-04sparc: unify kernel/init_taskSam Ravnborg3-36/+1
A closer inspection revealed that these two files had identical functionality - but the implementation of it differed slightly. Base it on the sparc version as it was the best. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-04sparc: drop CONFIG_SUN_AUXIOSam Ravnborg4-8/+0
It is always equals y so no need to test for it Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-04sparc: Add missing of_node_putNicolas Palix3-0/+5
of_node_put is needed before discarding a value received from of_find_node_by_name, eg in error handling code or when the device node is no longer used. The semantic match that catches the bug is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression struct device_node *n; position p1, p2; struct device_node *n1; statement S; identifier f; expression E; expression *ptr != NULL; @@ n@p1 = of_find_node_by_name(...) ... if (!n) S ... when != of_node_put(n) when != n1 = f(n,...) when != E = n when any when strict ( return \(0\|<+...n...+>\|ptr\); | return@p2 ...; | of_node_put(n); | n1 = f(n,...) | E = n ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s of_find_node_by_name %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // </smpl> Signed-off-by: Nicolas Palix <[email protected]> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-04sparc,sparc64: unify kernel/Sam Ravnborg90-0/+43306
o Move all files from sparc64/kernel/ to sparc/kernel - rename as appropriate o Update sparc/Makefile to the changes o Update sparc/kernel/Makefile to include the sparc64 files NOTE: This commit changes link order on sparc64! Link order had to change for either of sparc32 and sparc64. And assuming sparc64 see more testing than sparc32 change link order on sparc64 where issues will be caught faster. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-04sparc: prepare kernel/ for unificationSam Ravnborg26-22/+54
o sparc32 files with identical names to sparc64 renamed to <name>_32.S o introduced a few Kconfig helpers to simplify Makefile logic o refactored Makefile to prepare for unification - use obj-$(CONFIG_SPARC32) for sparc32 specific files - use <name>_$(BITS) for files where sparc64 has a _64 variant - sparc64 directly include a few files where sparc32 builds them, refer to these files directly (no BITS) - sneaked in -Werror as used by sparc64 o modified sparc/Makefile to use the new names for head/init_task Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-04sparc: gitignore a few filesSam Ravnborg1-0/+1
With this 'git status' no longer reports any new files At least not for a sparc allnoconfig build Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-04sparc,sparc64: unify asm-offsets.cSam Ravnborg1-3/+16
sparc64 does not use constants generated from asm-offsets but to prepare it to do so the parts that could be shared do now generate constants for sparc64 too. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-04sparc,sparc64: prepare vmlinux.lds.S for unificationSam Ravnborg1-20/+79
This patch makes the two vmlinux.lds.S files identical and serve as documentation for the changes in each file. This mainly add stuffs to sparc32 that is otherwise only used by sparc64 and thus it should have no effect. Build tested only. Signed-off-by: Sam Ravnborg <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-12-04sparc32: pdev_to_pnode() is used from __devinitAl Viro1-1/+1
Signed-off-by: Al Viro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2008-11-30fix the section noise in sparc head.SAl Viro2-1/+2
usual .text.head trick Signed-off-by: Al Viro <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-11-30sparc32 cpuinit flase positivesAl Viro5-8/+8
All noise since we don't have CPU hotplug there. However, they did expose something very odd-looking in there - poke_viking() does a bunch of identical btfixup each time it's called (i.e. for each CPU). That one is left alone for now; just the trivial misannotation fixes. Signed-off-by: Al Viro <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-11-19sparc64: wire up accept4()David Miller1-1/+1
This adds the sparc syscall hookups. Signed-off-by: David S. Miller <[email protected]> Cc: Ulrich Drepper <[email protected]> Cc: Michael Kerrisk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>