summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
Commit message (Collapse)AuthorAgeFilesLines
...
* | sparc: use sparc64 version of scatterlist.hRobert Reif2008-12-111-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 <reif@earthlink.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sparc: Commonize memcmp assembler.David S. Miller2008-12-092-4/+0
| | | | | | | | Signed-off-by: David S. Miller <davem@davemloft.net>
* | sparc: replace for_each_cpu_mask_nr with for_each_cpuRusty Russell2008-12-081-1/+1
| | | | | | | | | | | | | | | | Simple replacement, now the _nr is redundant. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sparc: fix sparse warnings in irq_32.cSam Ravnborg2008-12-084-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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sparc: add include guards to kernel.hSam Ravnborg2008-12-081-1/+4
| | | | | | | | | | Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sparc: fix sparse warnings in traps_32.cSam Ravnborg2008-12-084-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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sparc: fix trivial style issues in kernel/pmc.cSam Ravnborg2008-12-081-8/+8
| | | | | | | | | | | | | | | | o drop trailing whitespaces o align a fix things properly Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sparc: fix sparse warning in kernel/pmc.cSam Ravnborg2008-12-081-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 <sam@ravnborg.org> 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-073-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 <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: 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: 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-043-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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sparc: drop CONFIG_SUN_AUXIOSam Ravnborg2008-12-044-8/+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 kernel/Sam Ravnborg2008-12-0490-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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sparc: prepare kernel/ for unificationSam Ravnborg2008-12-0426-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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sparc: gitignore a few filesSam Ravnborg2008-12-041-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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sparc,sparc64: unify asm-offsets.cSam Ravnborg2008-12-041-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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* | sparc,sparc64: prepare vmlinux.lds.S for unificationSam Ravnborg2008-12-041-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 <sam@ravnborg.org> 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>
* fix the section noise in sparc head.SAl Viro2008-11-302-1/+2
| | | | | | | usual .text.head trick Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sparc32 cpuinit flase positivesAl Viro2008-11-305-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 <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sparc64: wire up accept4()David Miller2008-11-191-1/+1
| | | | | | | | | | This adds the sparc syscall hookups. Signed-off-by: David S. Miller <davem@davemloft.net> Cc: Ulrich Drepper <drepper@redhat.com> Cc: Michael Kerrisk <mtk.manpages@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* sparc: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers2008-11-121-2/+2
| | | | | | Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* Revert "sparc: correct section of current_pc()"David S. Miller2008-11-101-1/+0
| | | | | | | | | This reverts commit 8dd9453737822469837d48d5da3785ce70fb2118. This fixes a boot failure reported by Robert Reif. The code above the section change expects to fallthrough, so we can't make such a section change here.
* rtc-m48t59: shift zero year to 1968 on sparc (rev 2)Krzysztof Helt2008-10-291-23/+4
| | | | | | | | | | | Shift the first year to 1968 for Sun SPARC machines. Move this logic from platform specific files to rtc driver as this fixes problems with calculating a century bit. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Tested-by: Alexander Beregalov Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: correct section of current_pc()Frederic Weisbecker2008-10-221-0/+1
| | | | | | | | | | | | | | | Latest mainline gives this section mismatch on sparc: The function current_pc() references the variable __init no_sun4u_here. This is often because current_pc lacks a __init annotation or the annotation of no_sun4u_here is wrong. Since current_pc() is used only in early time, it is correct to put it in .init section. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc: correct section of apc_no_idleFrederic Weisbecker2008-10-221-1/+1
| | | | | | | | | | | | | | | | The latest mainline gives this section mismatch on sparc: The function __devinit apc_probe() references a variable __initdata apc_no_idle. If apc_no_idle is only used by apc_probe then annotate apc_no_idle with a matching annotation. Since the commit 7e7e2f035663c5ceb029bfb9d91e75099b0a5625, apc_probe() is on __devinit so we have to correct apc_no_idle which is referenced by this function. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sparc32: fix build errorsRobert Reif2008-10-122-0/+2
| | | | | | | | | | arch/sparc/kernel/sun4d_smp.c: In function ‘smp4d_callin’: arch/sparc/kernel/sun4d_smp.c:101: error: implicit declaration of function ‘notify_cpu_starting’ arch/sparc/kernel/sun4m_smp.c: In function ‘smp4m_callin’: arch/sparc/kernel/sun4m_smp.c:74: error: implicit declaration of function ‘notify_cpu_starting’ Signed-off-by: Robert Reif <reif@earthlink.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2008-10-112-0/+3
|\ | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: sound/core/memalloc.c
| * Merge branches 'sched/devel', 'sched/cpu-hotplug', 'sched/cpusets' and ↵Ingo Molnar2008-10-082-0/+3
| |\ | | | | | | | | | 'sched/urgent' into sched/core
| | * kernel/cpu.c: create a CPU_STARTING cpu_chain notifierManfred Spraul2008-09-082-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, there is no notifier that is called on a new cpu, before the new cpu begins processing interrupts/softirqs. Various kernel function would need that notification, e.g. kvm works around by calling smp_call_function_single(), rcu polls cpu_online_map. The patch adds a CPU_STARTING notification. It also adds a helper function that sends the message to all cpu_chain handlers. Tested on x86-64. All other archs are untested. Especially on sparc, I'm not sure if I got it right. Signed-off-by: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
OpenPOWER on IntegriCloud