Sam Ravnborg [Sat, 27 Dec 2008 08:56:29 +0000 (00:56 -0800)]
sparc: move select of ARCH_SUPPORTS_MSI
It is counter intuitive to have the select listed
as part of the PCI option.
Move the select to the SPARC64 specific part of the config.
PCI_MSI has a dependency on PCI so it does not harm to have
it always selected.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Sat, 27 Dec 2008 08:55:45 +0000 (00:55 -0800)]
sparc: drop SUN_IO
SUN_IO is always 'y' so drop it and thus killing an ifdef/endif pair
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Sat, 27 Dec 2008 08:35:12 +0000 (00:35 -0800)]
sparc: unify sections.h
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 <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Sat, 27 Dec 2008 08:34:41 +0000 (00:34 -0800)]
sparc: use .data.init_task section for init_thread_union
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 <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Robert Reif [Fri, 26 Dec 2008 23:39:11 +0000 (15:39 -0800)]
sparc: fix array overrun check in of_device_64.c
Do the array length check and fixup before copying the array.
Signed-off-by: Robert Reif <reif@earthlink.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 26 Dec 2008 23:38:17 +0000 (15:38 -0800)]
sparc: unify module.c
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 <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 26 Dec 2008 23:37:24 +0000 (15:37 -0800)]
sparc64: prepare module_64.c for unification
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 <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 26 Dec 2008 23:36:29 +0000 (15:36 -0800)]
sparc64: use bit neutral Elf symbols
To prepare for unification use the bit neutral versions of
the Elf types defined by asm/module.h
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 26 Dec 2008 23:35:41 +0000 (15:35 -0800)]
sparc: unify module.h
Use some preprocessor magic in combination with the
newly introduced CONFIG_BITS to unify module.h.
A few additional symbols are added as they are needed in a follow-up patch
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 26 Dec 2008 23:35:16 +0000 (15:35 -0800)]
sparc: introduce CONFIG_BITS
CONFIG_BITS is set to 32 for sparc32
and 64 for sparc64.
This allow us to use this symbol in for example header files
to ease unification of sparc32 and sparc64.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 26 Dec 2008 23:33:07 +0000 (15:33 -0800)]
sparc: fix hardirq.h removal fallout
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 <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Fri, 12 Dec 2008 04:28:59 +0000 (20:28 -0800)]
sparc64: do not export pus_fs_struct
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 <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Robert Reif [Fri, 12 Dec 2008 04:24:58 +0000 (20:24 -0800)]
sparc: use sparc64 version of scatterlist.h
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>
David S. Miller [Tue, 9 Dec 2008 12:09:07 +0000 (04:09 -0800)]
sparc: Commonize memcmp assembler.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 9 Dec 2008 09:07:09 +0000 (01:07 -0800)]
sparc: Unify strlen assembler.
Use the new asm/asm.h header to help commonize the
strlen assembler between 32-bit and 64-bit
While we're here, use proper linux/linkage.h macros
instead of by-hand stuff.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 9 Dec 2008 08:50:13 +0000 (00:50 -0800)]
sparc: Add asm/asm.h
This will contain macros that help share assembler code
between the 32-bit and 64-bit platform.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 9 Dec 2008 00:05:49 +0000 (16:05 -0800)]
sparc: Kill memcmp_32.S code which has been ifdef'd out for centuries.
Signed-off-by: David S. Miller <davem@davemloft.net>
Rusty Russell [Mon, 8 Dec 2008 09:10:08 +0000 (01:10 -0800)]
sparc: replace for_each_cpu_mask_nr with for_each_cpu
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>
Sam Ravnborg [Mon, 8 Dec 2008 09:08:24 +0000 (01:08 -0800)]
sparc: fix sparse warnings in irq_32.c
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>
Sam Ravnborg [Mon, 8 Dec 2008 09:07:47 +0000 (01:07 -0800)]
sparc: add include guards to kernel.h
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Mon, 8 Dec 2008 09:04:59 +0000 (01:04 -0800)]
sparc: fix sparse warnings in traps_32.c
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>
Sam Ravnborg [Mon, 8 Dec 2008 09:02:55 +0000 (01:02 -0800)]
sparc: fix trivial style issues in kernel/pmc.c
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>
Sam Ravnborg [Mon, 8 Dec 2008 09:02:23 +0000 (01:02 -0800)]
sparc: fix sparse warning in kernel/pmc.c
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>
Robert Reif [Mon, 8 Dec 2008 08:59:17 +0000 (00:59 -0800)]
sparc: Use sparc64 version of prom/printf.c
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>
David S. Miller [Mon, 8 Dec 2008 09:00:08 +0000 (01:00 -0800)]
cyber2000fb: Kill the one modular sparc prom_printf call.
Noticed by Robert Reif and Sam Ravnborg.
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Sun, 7 Dec 2008 08:50:29 +0000 (00:50 -0800)]
sparc: unify kernel/idprom.c
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>
Sam Ravnborg [Sun, 7 Dec 2008 08:49:53 +0000 (00:49 -0800)]
sparc: idprom_32.c cleanup
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>
David S. Miller [Sun, 7 Dec 2008 08:46:33 +0000 (00:46 -0800)]
sparc: Restore irq_trans_init() call in prom_create_node().
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>
Sam Ravnborg [Sun, 7 Dec 2008 08:04:30 +0000 (00:04 -0800)]
sparc: unify kernel/cpu
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>
Sam Ravnborg [Sun, 7 Dec 2008 08:03:26 +0000 (00:03 -0800)]
sparc: expand cpu table
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>
Sam Ravnborg [Sun, 7 Dec 2008 08:02:08 +0000 (00:02 -0800)]
sparc: fix sparse warnings in cpu_*.c
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>
David S. Miller [Sat, 6 Dec 2008 06:18:40 +0000 (22:18 -0800)]
sparc: Always set AUDIT_ARCH, not just on sparc64.
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>
Sam Ravnborg [Sat, 6 Dec 2008 03:08:22 +0000 (19:08 -0800)]
sparc: report "Unknown CPU/FPU" for unknown cpu/fpu
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>
Sam Ravnborg [Sat, 6 Dec 2008 03:07:35 +0000 (19:07 -0800)]
sparc: beautify kernel/cpu_32.c
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>
David S. Miller [Fri, 5 Dec 2008 23:20:26 +0000 (15:20 -0800)]
sparc: Move of_console_{device,path,options} info prom_common.c
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 6 Dec 2008 02:16:48 +0000 (18:16 -0800)]
sparc: Move prom_build_devicetree() into prom_common.c
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>
David S. Miller [Fri, 5 Dec 2008 09:21:41 +0000 (01:21 -0800)]
sparc: Move core of OF device tree building code into prom_common.c
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 5 Dec 2008 09:12:32 +0000 (01:12 -0800)]
sparc: Match sparc32's build_tree() up to sparc64's
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>
David S. Miller [Fri, 5 Dec 2008 09:10:18 +0000 (01:10 -0800)]
sparc: Move create_node() and friends into prom_common.c
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 5 Dec 2008 09:06:52 +0000 (01:06 -0800)]
sparc: Make sparc32's create_node() assign parent pointer.
This makes it match what sparc64's version does.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 6 Dec 2008 01:06:47 +0000 (17:06 -0800)]
sparc: Commonize get_one_property() implementations.
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>
David S. Miller [Fri, 5 Dec 2008 09:00:46 +0000 (01:00 -0800)]
sparc: Move property building code into prom_common.c
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>
David S. Miller [Fri, 5 Dec 2008 08:50:22 +0000 (00:50 -0800)]
sparc: Move 'unique_id' into prom_common.c and rename to 'prom_unique_id'
This will be used in a subsequent changeset.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 5 Dec 2008 08:43:03 +0000 (00:43 -0800)]
sparc: Move irq_trans_init() and support code into seperate file.
All sparc64 specific, so only build this file on sparc64.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 5 Dec 2008 08:40:43 +0000 (00:40 -0800)]
sparc: Mark prom_early_alloc non-static.
A subsequent changeset will use this.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 5 Dec 2008 04:28:22 +0000 (20:28 -0800)]
sparc: Create common area for OF device layer code.
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>
David S. Miller [Sat, 6 Dec 2008 00:54:44 +0000 (16:54 -0800)]
sparc: Const'ify prom_*prop*() on sparc32.
This brings things in line with sparc64.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 5 Dec 2008 04:12:20 +0000 (20:12 -0800)]
sparc: Create common header file for prom_{32,64}.c
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>
Sam Ravnborg [Thu, 4 Dec 2008 21:28:09 +0000 (13:28 -0800)]
sparc: unify kernel/init_task
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>
Sam Ravnborg [Thu, 4 Dec 2008 21:26:31 +0000 (13:26 -0800)]
sparc: drop CONFIG_SUN_AUXIO
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>
Nicolas Palix [Thu, 4 Dec 2008 05:10:57 +0000 (21:10 -0800)]
sparc: Add missing of_node_put
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>
Sam Ravnborg [Wed, 3 Dec 2008 11:14:26 +0000 (03:14 -0800)]
sparc,sparc64: unify boot/
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>
Sam Ravnborg [Wed, 3 Dec 2008 11:11:52 +0000 (03:11 -0800)]
sparc,sparc64: unify kernel/
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>
Sam Ravnborg [Wed, 3 Dec 2008 11:08:37 +0000 (03:08 -0800)]
sparc: prepare kernel/ for unification
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>
Sam Ravnborg [Wed, 3 Dec 2008 11:10:25 +0000 (03:10 -0800)]
sparc,sparc64: unify lib/
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>
Sam Ravnborg [Wed, 3 Dec 2008 11:07:00 +0000 (03:07 -0800)]
sparc: prepare lib/ for unification
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>
Sam Ravnborg [Sun, 30 Nov 2008 06:16:52 +0000 (22:16 -0800)]
sparc,sparc64: unify prom/
- 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>
Sam Ravnborg [Sun, 30 Nov 2008 06:15:38 +0000 (22:15 -0800)]
sparc: prepare prom/ for unification
- 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>
Sam Ravnborg [Wed, 3 Dec 2008 07:17:12 +0000 (23:17 -0800)]
sparc,sparc64: unify Makefile
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>
Sam Ravnborg [Sun, 30 Nov 2008 05:54:03 +0000 (21:54 -0800)]
sparc: gitignore a few files
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>
Sam Ravnborg [Sun, 30 Nov 2008 05:53:26 +0000 (21:53 -0800)]
sparc: clean boot/
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>
Sam Ravnborg [Wed, 3 Dec 2008 07:15:42 +0000 (23:15 -0800)]
sparc: refactor Makefile
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>
Sam Ravnborg [Sun, 30 Nov 2008 05:51:05 +0000 (21:51 -0800)]
sparc,sparc64: unify asm-offsets.c
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>
Sam Ravnborg [Sun, 30 Nov 2008 05:45:49 +0000 (21:45 -0800)]
sparc64: use vmlinux.lds.S from sparc
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>
Sam Ravnborg [Sun, 30 Nov 2008 05:44:32 +0000 (21:44 -0800)]
sparc,sparc64: prepare vmlinux.lds.S for unification
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>
David S. Miller [Fri, 28 Nov 2008 10:27:42 +0000 (02:27 -0800)]
sparc64: Provide oprofile pseudo-NMI on Niagara.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 28 Nov 2008 10:26:55 +0000 (02:26 -0800)]
sparc64: Add performance counter hypervisor calls for sun4v.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 28 Nov 2008 09:19:41 +0000 (01:19 -0800)]
sparc64: Add save_stack_trace_tsk().
And this allows us to indicate HAVE_LATENCYTOP_SUPPORT.
Signed-off-by: David S. Miller <davem@davemloft.net>
Al Viro [Wed, 26 Nov 2008 09:07:13 +0000 (01:07 -0800)]
sparc32: pdev_to_pnode() is used from __devinit
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 26 Nov 2008 09:00:58 +0000 (01:00 -0800)]
sparc32: Don't btfixup cache flush ops for viking multiple times.
Just do it once.
Pointed out by Al Viro.
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Rothwell [Wed, 26 Nov 2008 08:51:32 +0000 (00:51 -0800)]
sparc: combine unistd_{32,64}.h
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>
David S. Miller [Wed, 26 Nov 2008 06:29:24 +0000 (22:29 -0800)]
sparc64: Use NMI oprofile profiling on cheetah and derivative cpus.
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>
David S. Miller [Wed, 26 Nov 2008 06:27:50 +0000 (22:27 -0800)]
sparc64: Add write_pic() helper.
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>
David S. Miller [Wed, 26 Nov 2008 06:26:59 +0000 (22:26 -0800)]
sparc64: Block NMIs in critical section of context switch.
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>
David S. Miller [Wed, 26 Nov 2008 06:24:59 +0000 (22:24 -0800)]
sparc64: Make special trap return path for TRAP_NMI().
We don't want the rtrap path to try and run softirqs or
anything like that when returning from a PIL==15 NMI.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 24 Nov 2008 05:55:29 +0000 (21:55 -0800)]
sparc64: Make %pil level 15 a pseudo-NMI.
So that we can profile code even in a local_irq_disable() section,
only write 14 (instead of 15) into the %pil register to disable IRQs.
This allows PIL level 15 to serve as a pseudo NMI.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 24 Nov 2008 05:50:16 +0000 (21:50 -0800)]
sparc: Include drivers/pcmcia/Kconfig
Stephen Rothwell pointed out that pcmcia can't be enabled on sparc64.
There is an empty non-prompt PCMCIA explicit entry in
arch/sparc/Kconfig but that doesn't do anything.
32-bit sparc needs a small hack to make this work, since it doesn't
use the generic IRQ layer yes. We have to provide a dummy definition
of probe_irq_mask(), since this is used by the yenta socket driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 21 Nov 2008 10:06:07 +0000 (02:06 -0800)]
sparc64: Add interface for registering a performance counter IRQ handler.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 17 Nov 2008 07:49:24 +0000 (23:49 -0800)]
sparc64: Add tsb-ratio sysctl.
Add a sysctl to tweak the RSS limit used to decide when to grow
the TSB for an address space.
In order to avoid expensive divides and multiplies only simply
positive and negative powers of two are supported.
The function computed takes the number of TSB translations that will
fit at one time in the TSB of a given size, and either adds or
subtracts a percentage of entries. This final value is the
RSS limit.
See tsb_size_to_rss_limit().
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Mon, 17 Nov 2008 04:08:45 +0000 (20:08 -0800)]
sparc,sparc64: unify mm/
- move all sparc64/mm/ files to arch/sparc/mm/
- commonly named files are named _64.c
- add files to sparc/mm/Makefile preserving link order
- delete now unused sparc64/mm/Makefile
- sparc64 now finds mm/ in sparc
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Mon, 17 Nov 2008 04:08:19 +0000 (20:08 -0800)]
sparc: prepare mm/ for unification
- rename files where sparc64 has similar files to _32.c
- Restructure Makefile
- Sneak in -Werror as we have for sparc64
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Mon, 17 Nov 2008 04:07:42 +0000 (20:07 -0800)]
sparc64: unify arch/sparc64/oprofile/
A simple:
diff arch/sparc64/oprofile/init.c arch/sparc/oprofile/init.c
diff arch/sparc64/oprofile/Makefile arch/sparc/oprofile/Makefile
revealed that the directories were equal.
So let sparc64 point to the sparc version and drop the sparc64 oprofile dir
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Mon, 17 Nov 2008 04:07:11 +0000 (20:07 -0800)]
sparc64: unify math-emu
Move relavent files to sparc/math-emu and
adjust path/include accordingly.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Mon, 17 Nov 2008 04:06:33 +0000 (20:06 -0800)]
sparc: prepare math-emu for unification
Add _32 to filenames to make them 32 bit unique
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Mon, 17 Nov 2008 04:05:44 +0000 (20:05 -0800)]
sparc: cleanup math-emu
- Drop unused assignment from Makefile
- Replace EXTRA_CFLAGS with ccflags-y
- Delete unused file
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Mon, 17 Nov 2008 04:04:20 +0000 (20:04 -0800)]
sparc,sparc64: add BITS to arch Makefile
BITS will be used to simplify unified Makefiles
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Mon, 17 Nov 2008 04:01:17 +0000 (20:01 -0800)]
sparc,sparc64: unify Kconfig files
Merge all of sparc64 Kconfig to sparc Kconfig.
The merge was checked by:
- visual inspection in menuconfig
- result of allnoconfig, allmodconfig, allyesconfig was checked before and after
- result of a number of randconfig was checked before and after
scripts/diffconfig was used to check if the config differed before and after
The validity of the test was checked by on purpose introducing
a few bugs - and they were all caught by first run.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Sat, 15 Nov 2008 21:44:31 +0000 (13:44 -0800)]
sparc: add "Bus options" to Kconfig
To align with sparc64 add a "Bus options" menu
This has the additiona advantage that all
bus options are kept together
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Sat, 15 Nov 2008 21:43:49 +0000 (13:43 -0800)]
sparc: add menu "Executable file formats"
This is what we use in sparc64 - make sparc equal
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Sat, 15 Nov 2008 21:43:13 +0000 (13:43 -0800)]
sparc: use Kconfig.hz
We already has the proper definition in place in param.h.
So use the common Kconfig.hz file
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Sat, 15 Nov 2008 21:42:31 +0000 (13:42 -0800)]
sparc: drop UNIX98_PTYS from arch Kconfig
We have it in drivers/char/Kconfig
There is no need to ask twice
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Sat, 15 Nov 2008 21:41:31 +0000 (13:41 -0800)]
sparc64: added more config options to the menus
moved a few config entries inside a menu so we
do not clutter the first screen up with a lot of detailed
config options.
The structure now remotely resemble the structure for i386
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Sat, 15 Nov 2008 21:40:12 +0000 (13:40 -0800)]
sparc: refactor Kconfig a little
Mode declaration of SPARC up in the top
to match the structure of sparc64 Kconfig
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Sam Ravnborg [Sat, 15 Nov 2008 21:39:18 +0000 (13:39 -0800)]
sparc: unify Kconfig.debug
Let sparc and sparc64 use the same Kconfig.debug
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 15 Nov 2008 21:33:25 +0000 (13:33 -0800)]
sparc64: Stop using memory barriers for atomics and locks.
The kernel always executes in the TSO memory model now,
so none of this stuff is necessary any more.
With helpful feedback from Nick Piggin.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 30 Oct 2008 04:25:00 +0000 (21:25 -0700)]
sparc64: Run the kernel always in the TSO memory model.
The fact of the matter is, all UltraSPARC-III and later chips only
implement TSO. They don't implement PSO and RMO memory models at all.
Only the Ultra-I and Ultra-II family chips implement RMO and they are
only helped marginally by using this setting when executing kernel
code.
The big plus to doing this is that we can eliminate all of the non-Sync
memory barriers in the kernel except for the ones used in the optimized
memcpy/memset code (these use block load and store operations which
have their own memory ordering rules).
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 30 Oct 2008 06:46:09 +0000 (23:46 -0700)]
of: Fix comment, sparc no longer uses of_device objects on special busses.
It only uses of_platform_bus_type.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 30 Oct 2008 06:18:41 +0000 (23:18 -0700)]
sparc64: Rework auxio driver to save some text space.
Use common functions instead of inlining and duplicating logic
over and over to handle the SBUS vs. EBUS cases.
Before:
text data bss dec hex filename
715 568 16 1299 513 arch/sparc64/kernel/auxio.o
After:
text data bss dec hex filename
631 568 16 1215 4bf arch/sparc64/kernel/auxio.o
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 4 Dec 2008 17:16:14 +0000 (09:16 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/sparc-2.6
Hong H. Pham [Thu, 4 Dec 2008 17:12:57 +0000 (09:12 -0800)]
sparc64: Sync FPU state in VIS emulation handler.
Copy the FPU state to the task's thread_info->fpregs for the VIS emulation
functions to access.
Signed-off-by: Hong H. Pham <hong.pham@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>