aboutsummaryrefslogtreecommitdiffstats
path: root/arch
Commit message (Collapse)AuthorAgeFilesLines
* sparc: Use sparc64 version of prom/printf.cRobert Reif2008-12-084-50/+2
| | | | | | | | | | Use sparc64 version of prom/printf.c. The only differences for sparc32 is that prom_printf is no longer exported for modules which should be OK. Signed-off-by: Robert Reif <reif@earthlink.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: unify kernel/idprom.cSam Ravnborg2008-12-073-58/+9
| | | | | | | | o in sparc32 variant removed prom_halt in warning situations o ifdef out sparc32 specific code Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: idprom_32.c cleanupSam Ravnborg2008-12-071-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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Restore irq_trans_init() call in prom_create_node().David S. Miller2008-12-073-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 <davem@davemloft.net>
* sparc: unify kernel/cpuSam Ravnborg2008-12-074-169/+95
| | | | | | | | | | 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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: expand cpu tableSam Ravnborg2008-12-071-124/+195
| | | | | | | | Prepare cputable to include sparc64 versions Declare it __initconst so it can be dropped after init Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: fix sparse warnings in cpu_*.cSam Ravnborg2008-12-076-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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Always set AUDIT_ARCH, not just on sparc64.David S. Miller2008-12-051-1/+1
| | | | | | | | | | | | | Without fancy makefile rules it's not straightforward to prevent both arch/sparc/kernel/audit.o and lib/audit.o from both being used on sparc32. Since arch/sparc/kernel/audit.c is identical to lib/audit.c except some CONFIG_COMPAT protected sections of code, just use it on sparc32 too as that's the simplest way to fix this. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: report "Unknown CPU/FPU" for unknown cpu/fpuSam Ravnborg2008-12-052-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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: beautify kernel/cpu_32.cSam Ravnborg2008-12-051-100/+104
| | | | | | | | | Fixed style issues Use C99 struct assignments Use KERN_DEBUG for printk Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Move of_console_{device,path,options} info prom_common.cDavid S. Miller2008-12-053-18/+9
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Move prom_build_devicetree() into prom_common.cDavid S. Miller2008-12-054-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 <davem@davemloft.net>
* sparc: Move core of OF device tree building code into prom_common.cDavid S. Miller2008-12-054-132/+80
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Match sparc32's build_tree() up to sparc64'sDavid S. Miller2008-12-051-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 <davem@davemloft.net>
* sparc: Move create_node() and friends into prom_common.cDavid S. Miller2008-12-054-78/+42
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Make sparc32's create_node() assign parent pointer.David S. Miller2008-12-051-3/+4
| | | | | | This makes it match what sparc64's version does. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Commonize get_one_property() implementations.David S. Miller2008-12-052-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 <davem@davemloft.net>
* sparc: Move property building code into prom_common.cDavid S. Miller2008-12-054-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 <davem@davemloft.net>
* sparc: Move 'unique_id' into prom_common.c and rename to 'prom_unique_id'David S. Miller2008-12-054-8/+7
| | | | | | This will be used in a subsequent changeset. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Move irq_trans_init() and support code into seperate file.David S. Miller2008-12-054-830/+847
| | | | | | All sparc64 specific, so only build this file on sparc64. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Mark prom_early_alloc non-static.David S. Miller2008-12-053-2/+4
| | | | | | A subsequent changeset will use this. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Create common area for OF device layer code.David S. Miller2008-12-054-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 <davem@davemloft.net>
* sparc: Const'ify prom_*prop*() on sparc32.David S. Miller2008-12-053-9/+9
| | | | | | This brings things in line with sparc64. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Create common header file for prom_{32,64}.cDavid S. Miller2008-12-053-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 <davem@davemloft.net>
* sparc: unify kernel/init_taskSam Ravnborg2008-12-044-37/+2
| | | | | | | | | | 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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: drop CONFIG_SUN_AUXIOSam Ravnborg2008-12-047-16/+0
| | | | | | | It is always equals y so no need to test for it Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: Add missing of_node_putNicolas Palix2008-12-043-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 <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc,sparc64: unify boot/Sam Ravnborg2008-12-047-45/+37
| | | | | | | | | | | Simple unification: o renamed piggyback to *_32.c/*_64.c o copied content of Makefile from sparc64 to sparc and guard it o updated sparc/boot/.gitignore o deleted remaining files in sparc64/boot Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc,sparc64: unify kernel/Sam Ravnborg2008-12-0494-47/+45
| | | | | | | | | | | | | | | | 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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: prepare kernel/ for unificationSam Ravnborg2008-12-0428-24/+77
| | | | | | | | | | | | | | | 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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc,sparc64: unify lib/Sam Ravnborg2008-12-0452-73/+23
| | | | | | | | | | o Renamed files in sparc64 to <name>_64.S when identical to sparc32 files. o iomap.c were equal for sparc32 and sparc64 o adjusted sparc/Makefile now we have only one lib/ Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: prepare lib/ for unificationSam Ravnborg2008-12-0410-8/+17
| | | | | | | | | | | Identical named files renamed to <name>_32.S Refactored Makefile to prepare for unification. Linking order was altered slightly - but this is a lib.a file so it should not matter. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc,sparc64: unify prom/Sam Ravnborg2008-12-0412-11/+5
| | | | | | | | | | | | | | | | | | | | - all files with identical names copied and renamed to *_64.c - the remaning files copied as is - added sparc64 specific files to sparc/prom/Makefile - teach sparc64 Makefile to look into sparc/prom/ - delete unused Makefile from sparc64/prom/ linking order was not kept for sparc64 with this change. It was not possible to keep linking order for both sparc and sparc64 and as sparc64 see more testing than sparc it was natural to break linking order on sparc64. Should it have any effect it would be detected sooner this way. printf_32.c and printf_64.c are obvious candidates to be merged but they are not 100% equal so that was left for later Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: prepare prom/ for unificationSam Ravnborg2008-12-048-2/+13
| | | | | | | | - rename files where sparc64 uses identical names to *_32.c - refactor Makefile (but keep linking order) Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc,sparc64: unify MakefileSam Ravnborg2008-12-046-62/+76
| | | | | | | | | | | | | | | | | | | | | | | To unify Makefile for sparc and sparc64 a few other steps was needed: 1) separate defconfig files for sparc and sparc64 is required, so locate these in arch/sparc/configs 2) removoval of hack in toplevel Makefile to deal with that headers was in a separate directory compared to the rest The unification of the Makefile required usage of several foo-$(CONFIG_SPARCnn) += due to a few directories pending unification. This will be cleaned up when we unify the remaining directories. Included in this patch are the deletion of a few files in sparc64 as they are no longer needed: Makefile + Kconfig. arch/sparc64/ will after this patch is applied only have four directories (prom, lib, kernel, boot) Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: gitignore a few filesSam Ravnborg2008-12-042-0/+6
| | | | | | | | With this 'git status' no longer reports any new files At least not for a sparc allnoconfig build Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: clean boot/Sam Ravnborg2008-12-042-3/+2
| | | | | | | | Leave all cleaning to boot/Makefile and delete zImage too when we do a 'make clean' Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: refactor MakefileSam Ravnborg2008-12-042-16/+8
| | | | | | | | | The btfixup step needs knowledge of all the .o files, but there is no need to pass them in independent variables. Simplify it to use only two variables. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc,sparc64: unify asm-offsets.cSam Ravnborg2008-12-042-4/+17
| | | | | | | | | 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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc64: use vmlinux.lds.S from sparcSam Ravnborg2008-12-042-177/+2
| | | | | | | Previous commit made them identical so use the sparc version Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc,sparc64: prepare vmlinux.lds.S for unificationSam Ravnborg2008-12-042-28/+116
| | | | | | | | | | | | | 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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc64: Provide oprofile pseudo-NMI on Niagara.David S. Miller2008-12-041-16/+135
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc64: Add performance counter hypervisor calls for sun4v.David S. Miller2008-12-043-0/+62
| | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc64: Add save_stack_trace_tsk().David S. Miller2008-12-042-9/+27
| | | | | | And this allows us to indicate HAVE_LATENCYTOP_SUPPORT. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: pdev_to_pnode() is used from __devinitAl Viro2008-12-041-1/+1
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: Don't btfixup cache flush ops for viking multiple times.David S. Miller2008-12-041-12/+11
| | | | | | | | Just do it once. Pointed out by Al Viro. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: combine unistd_{32,64}.hStephen Rothwell2008-12-045-773/+443
| | | | | | | | This is complicated a little because compat_audit.c wants to see only the 32bit syscall numbers, but is being built in a 64bit compile. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc64: Use NMI oprofile profiling on cheetah and derivative cpus.David S. Miller2008-12-041-1/+109
| | | | | | | | | | We use clock cycle counter, adjusted to HZ. This can be extended to sun4v based processors as well, as they also have a proper overflow interrupt facility for the performance counters. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc64: Add write_pic() helper.David S. Miller2008-12-041-4/+5
| | | | | | | | It writes the %pic register, keeping mind of processor bugs. Implement reset_pic() in terms of it. Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc64: Block NMIs in critical section of context switch.David S. Miller2008-12-041-0/+2
| | | | | | | | | | In these instructions we load the new thread register, switch the register window, and setup the new frame pointer. All of these must appear atomic, and things will explode if we take a PIL=15 NMI interrupt in the middle of this sequence. Signed-off-by: David S. Miller <davem@davemloft.net>