summaryrefslogtreecommitdiff
path: root/arch/sparc/kernel
AgeCommit message (Collapse)AuthorFilesLines
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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-06sparc: 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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-06sparc: 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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-06sparc: Move of_console_{device,path,options} info prom_common.cDavid S. Miller3-18/+9
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-06sparc: 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 <davem@davemloft.net>
2008-12-06sparc: Move core of OF device tree building code into prom_common.cDavid S. Miller4-132/+80
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-06sparc: 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 <davem@davemloft.net>
2008-12-06sparc: Move create_node() and friends into prom_common.cDavid S. Miller4-78/+42
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-06sparc: 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 <davem@davemloft.net>
2008-12-06sparc: 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 <davem@davemloft.net>
2008-12-06sparc: 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 <davem@davemloft.net>
2008-12-06sparc: 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 <davem@davemloft.net>
2008-12-06sparc: 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 <davem@davemloft.net>
2008-12-06sparc: Mark prom_early_alloc non-static.David S. Miller3-2/+4
A subsequent changeset will use this. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-06sparc: 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 <davem@davemloft.net>
2008-12-06sparc: 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 <davem@davemloft.net>
2008-12-05sparc: 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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05sparc: drop CONFIG_SUN_AUXIOSam Ravnborg4-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>
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 <npalix@diku.dk> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
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 <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-04sparc32: pdev_to_pnode() is used from __devinitAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-30fix the section noise in sparc head.SAl Viro2-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>
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 <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-20sparc64: wire up accept4()David Miller1-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>
2008-11-13sparc: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers1-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>
2008-11-10Revert "sparc: correct section of current_pc()"David S. Miller1-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.
2008-10-30rtc-m48t59: shift zero year to 1968 on sparc (rev 2)Krzysztof Helt1-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>
2008-10-23sparc: correct section of current_pc()Frederic Weisbecker1-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>
2008-10-23sparc: correct section of apc_no_idleFrederic Weisbecker1-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>
2008-10-13sparc32: fix build errorsRobert Reif2-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>
2008-10-11Merge branch 'master' of ↵David S. Miller2-0/+3
master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: sound/core/memalloc.c
2008-10-08Merge branches 'sched/devel', 'sched/cpu-hotplug', 'sched/cpusets' and ↵Ingo Molnar2-0/+3
'sched/urgent' into sched/core
2008-10-08sparc32: sun4m interrupt mask cleanupRobert Reif2-71/+91
Here is an updated version of a patch I wrote 6 years ago http://marc.info/?l=linux-sparc&m=103939103607617&w=2 that simplifies interrupt mask lookup. It's main purpose is to add VME bus support but it's really a cleanup of the mask code. Signed-off-by: Robert Reif <reif@earthlink.net> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-21sparc: arch/sparc/kernel/pmc.c -- extra #include?David Brownell1-2/+0
I have no SPARC compiler handy to verify, but it looks like this is another file that doesn't need <linux/miscdevices.h> ... Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-20sparc32: Add more extensive documentation of sun4m interrupts.David S. Miller1-0/+53
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-20sparc32: Kill irq_rcvreg from sun4m_irq.cDavid S. Miller1-6/+2
Unused. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-20sparc32: Delete master_l10_limit.David S. Miller4-4/+0
It is only set, never used. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-20sparc32: Use PROM device probing for sun4c timers.David S. Miller1-20/+39
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-20sparc32: Use PROM device probing for sun4c interrupt register.David S. Miller1-26/+21
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-20sparc32: Delete claim_ticker14().David S. Miller1-46/+0
No more users. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-20sparc32: Stop calling claim_ticker14() from sun4c_irq.cDavid S. Miller1-1/+1
Since the first argument is always NULL, the only side effect is to disable the PROFILE_IRQ, so just do that directly. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-20sparc32: Kill clear_profile_irq btfixup entry.David S. Miller5-25/+0
Unused. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-20sparc32: Call sun4m_clear_profile_irq() directly from sun4m_smp.cDavid S. Miller2-2/+5
This is the only use of the clear_profile_irq() btfixup entry, which just eats up lots of dead space on other platform types. A subsequent commit will delete the other implementations and the btfixup entry as well. Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-20sparc32: Remove #if 0'd code from sun4c_irq.cDavid S. Miller1-9/+0
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-20sparc32: Remove some SMP ifdefs in sun4d_irq.cDavid S. Miller1-26/+16
Always do the sbus_tid[] handling. Signed-off-by: David S. Miller <davem@davemloft.net>