Commit graph

766 commits

Author SHA1 Message Date
Rusty Russell 2ca1a61583 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	arch/x86/kernel/io_apic.c
2008-12-31 23:05:57 +10:30
Rusty Russell 33edcf133b Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2008-12-30 08:02:35 +10:30
David S. Miller e3c6d4ee54 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
	arch/sparc64/kernel/idprom.c
2008-12-28 20:19:47 -08:00
Linus Torvalds 3c92ec8ae9 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (144 commits)
  powerpc/44x: Support 16K/64K base page sizes on 44x
  powerpc: Force memory size to be a multiple of PAGE_SIZE
  powerpc/32: Wire up the trampoline code for kdump
  powerpc/32: Add the ability for a classic ppc kernel to be loaded at 32M
  powerpc/32: Allow __ioremap on RAM addresses for kdump kernel
  powerpc/32: Setup OF properties for kdump
  powerpc/32/kdump: Implement crash_setup_regs() using ppc_save_regs()
  powerpc: Prepare xmon_save_regs for use with kdump
  powerpc: Remove default kexec/crash_kernel ops assignments
  powerpc: Make default kexec/crash_kernel ops implicit
  powerpc: Setup OF properties for ppc32 kexec
  powerpc/pseries: Fix cpu hotplug
  powerpc: Fix KVM build on ppc440
  powerpc/cell: add QPACE as a separate Cell platform
  powerpc/cell: fix build breakage with CONFIG_SPUFS disabled
  powerpc/mpc5200: fix error paths in PSC UART probe function
  powerpc/mpc5200: add rts/cts handling in PSC UART driver
  powerpc/mpc5200: Make PSC UART driver update serial errors counters
  powerpc/mpc5200: Remove obsolete code from mpc5200 MDIO driver
  powerpc/mpc5200: Add MDMA/UDMA support to MPC5200 ATA driver
  ...

Fix trivial conflict in drivers/char/Makefile as per Paul's directions
2008-12-28 16:54:33 -08:00
Sam Ravnborg 5bc0530893 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>
2008-12-27 00:56:29 -08:00
Sam Ravnborg c4a4a21977 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>
2008-12-27 00:55:45 -08:00
Sam Ravnborg 86ed40bd6f 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>
2008-12-27 00:35:12 -08:00
Sam Ravnborg b74e34dbde 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>
2008-12-27 00:34:41 -08:00
Robert Reif 92d9091f30 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>
2008-12-26 15:39:11 -08:00
Sam Ravnborg e6b04fe0ba 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>
2008-12-26 15:38:17 -08:00
Sam Ravnborg 627bf2f678 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>
2008-12-26 15:37:24 -08:00
Sam Ravnborg c45d1c209f 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>
2008-12-26 15:36:29 -08:00
Sam Ravnborg e1648a8194 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>
2008-12-26 15:35:41 -08:00
Sam Ravnborg fe6875ec5c 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>
2008-12-26 15:35:16 -08:00
Sam Ravnborg 6e6ab2e2f0 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>
2008-12-26 15:33:07 -08:00
Rusty Russell a0ae09b46a cpumask: cpu_coregroup_mask(): sparc
Like cpu_coregroup_map, but returns a (const) pointer.

Compile-tested on sparc64 (defconfig).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
2008-12-26 22:23:42 +10:30
Rusty Russell 96d76a7487 cpumask: sparc: Introduce cpumask_of_{node,pcibus} to replace {node,pcibus}_to_cpumask
Impact: New APIs

The old node_to_cpumask/node_to_pcibus returned a cpumask_t: these
return a pointer to a struct cpumask.  Part of removing cpumasks from
the stack.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: David S. Miller <davem@davemloft.net>
2008-12-26 22:23:38 +10:30
David S. Miller 878a553595 sparc: We need to implement arch_ptrace_stop().
In order to always provide fully synchronized state to the debugger,
we might need to do a synchronize_user_stack().

A pair of hooks, arch_ptrace_stop_needed() and arch_ptrace_stop(),
exist to handle this kind of situation.  It was created for
the sake of IA64.

Use them, to flush the kernel side cached register windows
to the user stack, when necessary.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-16 21:55:44 -08:00
Paul Mackerras 1e1c568d6c Merge branch 'merge' into next 2008-12-16 14:38:58 +11:00
Rusty Russell 98a79d6a50 cpumask: centralize cpu_online_map and cpu_possible_map
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 <rusty@rustcorp.com.au>
Reviewed-by: Grant Grundler <grundler@parisc-linux.org>
Tested-by: Tony Luck <tony.luck@intel.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Mike Travis <travis@sgi.com>
Cc: ink@jurassic.park.msu.ru
Cc: rmk@arm.linux.org.uk
Cc: starvik@axis.com
Cc: tony.luck@intel.com
Cc: takata@linux-m32r.org
Cc: ralf@linux-mips.org
Cc: grundler@parisc-linux.org
Cc: paulus@samba.org
Cc: schwidefsky@de.ibm.com
Cc: lethal@linux-sh.org
Cc: wli@holomorphy.com
Cc: davem@davemloft.net
Cc: jdike@addtoit.com
Cc: mingo@redhat.com
2008-12-13 21:19:41 +10:30
Sam Ravnborg 968196a950 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>
2008-12-11 20:28:59 -08:00
Robert Reif aa83a26a19 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>
2008-12-11 20:24:58 -08:00
David S. Miller 18cdae68e7 sparc: Commonize memcmp assembler.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-09 04:09:07 -08:00
David S. Miller ae984d72e0 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>
2008-12-09 01:07:09 -08:00
David S. Miller 5c03d59091 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>
2008-12-09 00:50:13 -08:00
David S. Miller 8bf68e4d90 sparc: Kill memcmp_32.S code which has been ifdef'd out for centuries.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-08 16:05:49 -08:00
Rusty Russell 8e757281de 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>
2008-12-08 01:10:08 -08:00
Sam Ravnborg 81265fd93b 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>
2008-12-08 01:08:24 -08:00
Sam Ravnborg 7105de84f1 sparc: add include guards to kernel.h
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-08 01:07:47 -08:00
Sam Ravnborg 8d74e32a53 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>
2008-12-08 01:04:59 -08:00
Sam Ravnborg 85bfbf44c3 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>
2008-12-08 01:02:55 -08:00
Sam Ravnborg 39f6649b61 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>
2008-12-08 01:02:23 -08:00
Robert Reif efe6c3dd8b 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>
2008-12-08 01:00:14 -08:00
Sam Ravnborg 680e58f809 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>
2008-12-07 00:50:29 -08:00
Sam Ravnborg 7d3a700120 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>
2008-12-07 00:49:53 -08:00
David S. Miller bf944c370a 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>
2008-12-07 00:46:33 -08:00
Sam Ravnborg d34dd82905 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>
2008-12-07 00:04:30 -08:00
Sam Ravnborg 2bf05fa03e 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>
2008-12-07 00:03:26 -08:00
Sam Ravnborg 53ae341926 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>
2008-12-07 00:02:08 -08:00
David S. Miller 7e7e93a228 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>
2008-12-05 22:18:40 -08:00
Sam Ravnborg 6c6bd8b61d 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>
2008-12-05 19:08:22 -08:00
Sam Ravnborg 8a563f0160 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>
2008-12-05 19:07:35 -08:00
David S. Miller ad07aed8ca sparc: Move of_console_{device,path,options} info prom_common.c
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 18:17:08 -08:00
David S. Miller 23dc758e47 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>
2008-12-05 18:16:48 -08:00
David S. Miller 6524036a1e sparc: Move core of OF device tree building code into prom_common.c
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 18:15:03 -08:00
David S. Miller 4aef8c53fe 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>
2008-12-05 17:09:49 -08:00
David S. Miller 7d9439d50b sparc: Move create_node() and friends into prom_common.c
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 17:09:10 -08:00
David S. Miller 06c0db7221 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>
2008-12-05 17:08:23 -08:00
David S. Miller 59966e3b4e 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>
2008-12-05 17:06:47 -08:00
David S. Miller b9e5567cda 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>
2008-12-05 17:04:22 -08:00
David S. Miller e5ff0fe31d 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>
2008-12-05 17:03:30 -08:00
David S. Miller 5fce09c6f6 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>
2008-12-05 17:02:32 -08:00
David S. Miller efeac2f876 sparc: Mark prom_early_alloc non-static.
A subsequent changeset will use this.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 17:01:27 -08:00
David S. Miller dfa76060be 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>
2008-12-05 17:00:13 -08:00
David S. Miller ab04323e5b sparc: Const'ify prom_*prop*() on sparc32.
This brings things in line with sparc64.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-05 16:54:44 -08:00
David S. Miller 657f201df6 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>
2008-12-05 16:44:29 -08:00
Sam Ravnborg b28017f57f 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>
2008-12-04 13:28:09 -08:00
Sam Ravnborg 757498c63e 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>
2008-12-04 13:26:31 -08:00
Nicolas Palix c2e27c359a 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>
2008-12-04 09:17:22 -08:00
Sam Ravnborg a8c601ca21 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>
2008-12-04 09:17:21 -08:00
Sam Ravnborg a88b5ba8bd 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>
2008-12-04 09:17:21 -08:00
Sam Ravnborg d670bd4f80 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>
2008-12-04 09:17:20 -08:00
Sam Ravnborg 478b8fecda 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>
2008-12-04 09:17:19 -08:00
Sam Ravnborg 18269c0fd4 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>
2008-12-04 09:17:18 -08:00
Sam Ravnborg 5de18cde3b 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>
2008-12-04 09:17:17 -08:00
Sam Ravnborg 708d4f0964 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>
2008-12-04 09:17:16 -08:00
Sam Ravnborg 5e53879008 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>
2008-12-04 09:17:16 -08:00
Sam Ravnborg 14ae84c993 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>
2008-12-04 09:17:15 -08:00
Sam Ravnborg c489326939 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>
2008-12-04 09:17:14 -08:00
Sam Ravnborg db5ea21a14 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>
2008-12-04 09:17:13 -08:00
Sam Ravnborg b5db854a91 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>
2008-12-04 09:17:12 -08:00
Sam Ravnborg 1b1fbbcaad 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>
2008-12-04 09:17:11 -08:00
David S. Miller 63ef34827c sparc64: Provide oprofile pseudo-NMI on Niagara.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-04 09:17:10 -08:00
David S. Miller 3178a07c33 sparc64: Add performance counter hypervisor calls for sun4v.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-04 09:17:09 -08:00
David S. Miller 6a5726dd6f sparc64: Add save_stack_trace_tsk().
And this allows us to indicate HAVE_LATENCYTOP_SUPPORT.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-04 09:17:09 -08:00
Al Viro 3a29db3222 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>
2008-12-04 09:17:08 -08:00
David S. Miller 64273d08df 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>
2008-12-04 09:17:07 -08:00
Stephen Rothwell 9acee190c8 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>
2008-12-04 09:17:06 -08:00
David S. Miller 422e23ea08 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>
2008-12-04 09:17:05 -08:00
David S. Miller 456cad8e4e 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>
2008-12-04 09:17:05 -08:00
David S. Miller f9aad60010 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>
2008-12-04 09:17:04 -08:00
David S. Miller 5565736e44 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>
2008-12-04 09:17:03 -08:00
David S. Miller b4f4372f96 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>
2008-12-04 09:17:02 -08:00
David S. Miller c6afec5e4d 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>
2008-12-04 09:17:01 -08:00
David S. Miller 2c2551ab99 sparc64: Add interface for registering a performance counter IRQ handler.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-04 09:17:00 -08:00
David S. Miller 0871420fad 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>
2008-12-04 09:16:59 -08:00
Sam Ravnborg 27137e5285 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>
2008-12-04 09:16:59 -08:00
Sam Ravnborg c37ddd936d 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>
2008-12-04 09:16:58 -08:00
Sam Ravnborg 5115f39c20 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>
2008-12-04 09:16:56 -08:00
Sam Ravnborg 774434bf33 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>
2008-12-04 09:16:56 -08:00
Sam Ravnborg d59b3706a9 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>
2008-12-04 09:16:55 -08:00
Sam Ravnborg b0cdd599db 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>
2008-12-04 09:16:54 -08:00
Sam Ravnborg 26b4c91218 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>
2008-12-04 09:16:53 -08:00
Sam Ravnborg 4b27e0e118 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>
2008-12-04 09:16:52 -08:00
Sam Ravnborg 12e271a84e 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>
2008-12-04 09:16:52 -08:00
Sam Ravnborg 71899704d6 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>
2008-12-04 09:16:51 -08:00
Sam Ravnborg 655ab9940e 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>
2008-12-04 09:16:50 -08:00
Sam Ravnborg 35da3e3914 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>
2008-12-04 09:16:48 -08:00
Sam Ravnborg 5bb28a57a2 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>
2008-12-04 09:16:48 -08:00
David S. Miller 293666b7a1 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>
2008-12-04 09:16:47 -08:00
David S. Miller 64f2dde3f7 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>
2008-12-04 09:16:46 -08:00
Rusty Russell e8e8e80ee0 sparc: asm/bitops.h should define __fls
bitops_64.h includes the generic one; pretty sure 32 should too.

(Found by using __fls in generic code and breaking sparc defconfig build:
 thanks Stephen and linux-next!)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-03 16:04:52 -08:00
Anton Vorontsov 3f3b163202 powerpc and sparc: Introduce dev_archdata node accessors
The name of the device_node field differ across the platforms, so we
have to implement inlined accessors.  This is needed to avoid ugly
#ifdef in the generic code.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-12-03 21:03:54 +11:00
Christoph Hellwig 96b8936a9e remove __ARCH_WANT_COMPAT_SYS_PTRACE
All architectures now use the generic compat_sys_ptrace, as should every
new architecture that needs 32bit compat (if we'll ever get another).

Remove the now superflous __ARCH_WANT_COMPAT_SYS_PTRACE define, and also
kill a comment about __ARCH_SYS_PTRACE that was added after
__ARCH_SYS_PTRACE was already gone.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-30 11:00:15 -08:00
Al Viro 5bac287ea5 fix the section noise in sparc head.S
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-30 10:03:37 -08:00
Al Viro 409832f548 sparc32 cpuinit flase positives
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-30 10:03:35 -08:00
David Miller f8b2256e9c sparc64: wire up accept4()
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-19 18:49:57 -08:00
Robert Reif e64ed0225b sparc: Fix tty compile warnings.
This patch fixes tty compile warnings as sugested by Alan Cox:

CC drivers/char/n_tty.o
drivers/char/n_tty.c: In function ‘normal_poll’:
drivers/char/n_tty.c:1555: warning: array subscript is above array bounds
drivers/char/n_tty.c:1564: warning: array subscript is above array bounds
drivers/char/n_tty.c: In function ‘read_chan’:
drivers/char/n_tty.c:1269: warning: array subscript is above array bounds
CC drivers/char/tty_ioctl.o
drivers/char/tty_ioctl.c: In function ‘set_termios’:
drivers/char/tty_ioctl.c:533: warning: array subscript is above array 
bounds
drivers/char/tty_ioctl.c:537: warning: array subscript is above array 
bounds
drivers/char/tty_ioctl.c: In function ‘tty_mode_ioctl’:
drivers/char/tty_ioctl.c:662: warning: array subscript is above array 
bounds
drivers/char/tty_ioctl.c:892: warning: array subscript is above array 
bounds
drivers/char/tty_ioctl.c:896: warning: array subscript is above array 
bounds
drivers/char/tty_ioctl.c:577: warning: array subscript is above array 
bounds
drivers/char/tty_ioctl.c:928: warning: array subscript is above array 
bounds
drivers/char/tty_ioctl.c:934: warning: array subscript is above array 
bounds

Signed-off-by: Robert Reif <reif@earthlink.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-12 23:51:54 -08:00
Kay Sievers 5acdc1fa2d sparc: struct device - replace bus_id with dev_name(), dev_set_name()
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-12 23:48:40 -08:00
David S. Miller 29b1432816 Revert "sparc: correct section of current_pc()"
This reverts commit 8dd9453737.

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-11-10 12:33:30 -08:00
Linus Torvalds 0bf82cccd1 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Fix PCI resource mapping on sparc64
  sparc64: Kill annoying warning when building compat_binfmt_elf.o
  sparc32: kernel/trace/trace.c wants DIE_OOPS
  sparc64: Fix __copy_{to,from}_user_inatomic defines.
2008-11-02 10:16:44 -08:00
David S. Miller a1995a6599 sparc64: Kill annoying warning when building compat_binfmt_elf.o
GCC warns because some tests against 32-bit values never evaluate to
true due to how TASK_SIZE is defined.

I always wanted to mimick powerpc's definition of TASK_SIZE, which
is simply TASK_SIZE_OF(current) and that also fixes the warning.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-02 00:15:38 -07:00
Al Viro e68f0aee89 sparc32: kernel/trace/trace.c wants DIE_OOPS
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-01 21:44:01 -07:00
Hugh Dickins 145e1c0023 sparc64: Fix __copy_{to,from}_user_inatomic defines.
Alexander Beregalov reports oops in __bzero() called from
copy_from_user_fixup() called from iov_iter_copy_from_user_atomic(),
when running dbench on tmpfs on sparc64: its __copy_from_user_inatomic
and __copy_to_user_inatomic should be avoiding, not calling, the fixups.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-11-01 21:41:40 -07:00
Al Viro c10555faca sparc32: kernel/trace/trace.c wants DIE_OOPS
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-01 12:40:38 -07:00
Linus Torvalds 63b40456a3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  sparc64: Add missing null terminating entry to bq4802_match[].
  sparc: use the new byteorder headers
  rtc-m48t59: shift zero year to 1968 on sparc (rev 2)
  dbri: check dma_alloc_coherent errors
  sparc64: remove byteshifting from out* helpers
2008-10-31 07:52:51 -07:00
Harvey Harrison 398cf93a39 sparc: use the new byteorder headers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-29 15:36:00 -07:00
Krzysztof Helt 12a9ee3cce rtc-m48t59: shift zero year to 1968 on sparc (rev 2)
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-29 15:35:24 -07:00
Linus Torvalds 5579a782ad Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  math-emu: Fix thinko in _FP_DIV
  math-emu: Fix signalling of underflow and inexact while packing result.
  sparc: Add checkstack support
  sparc: correct section of current_pc()
  sparc: correct section of apc_no_idle
  sparc64: Fix race in arch/sparc64/kernel/trampoline.S
2008-10-23 19:19:14 -07:00
Linus Torvalds 92fb83afd6 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile: (21 commits)
  OProfile: Fix buffer synchronization for IBS
  oprofile: hotplug cpu fix
  oprofile: fixing whitespaces in arch/x86/oprofile/*
  oprofile: fixing whitespaces in arch/x86/oprofile/*
  oprofile: fixing whitespaces in drivers/oprofile/*
  x86/oprofile: add the logic for enabling additional IBS bits
  x86/oprofile: reordering functions in nmi_int.c
  x86/oprofile: removing unused function parameter in add_ibs_begin()
  oprofile: more whitespace fixes
  oprofile: whitespace fixes
  OProfile: Rename IBS sysfs dir into "ibs_op"
  OProfile: Rework string handling in setup_ibs_files()
  OProfile: Rework oprofile_add_ibs_sample() function
  oprofile: discover counters for op ppro too
  oprofile: Implement Intel architectural perfmon support
  oprofile: Don't report Nehalem as core_2
  oprofile: drop const in num counters field
  Revert "Oprofile Multiplexing Patch"
  x86, oprofile: BUG: using smp_processor_id() in preemptible code
  x86/oprofile: fix on_each_cpu build error
  ...

Manually fixed trivial conflicts in
	drivers/oprofile/{cpu_buffer.c,event_buffer.h}
2008-10-23 10:05:40 -07:00
Frederic Weisbecker 8dd9453737 sparc: correct section of current_pc()
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-22 21:53:47 -07:00
Frederic Weisbecker a1731e5b9a sparc: correct section of apc_no_idle
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 7e7e2f0356,
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-22 21:53:43 -07:00
Matt Helsley dc52ddc0e6 container freezer: implement freezer cgroup subsystem
This patch implements a new freezer subsystem in the control groups
framework.  It provides a way to stop and resume execution of all tasks in
a cgroup by writing in the cgroup filesystem.

The freezer subsystem in the container filesystem defines a file named
freezer.state.  Writing "FROZEN" to the state file will freeze all tasks
in the cgroup.  Subsequently writing "RUNNING" will unfreeze the tasks in
the cgroup.  Reading will return the current state.

* Examples of usage :

   # mkdir /containers/freezer
   # mount -t cgroup -ofreezer freezer  /containers
   # mkdir /containers/0
   # echo $some_pid > /containers/0/tasks

to get status of the freezer subsystem :

   # cat /containers/0/freezer.state
   RUNNING

to freeze all tasks in the container :

   # echo FROZEN > /containers/0/freezer.state
   # cat /containers/0/freezer.state
   FREEZING
   # cat /containers/0/freezer.state
   FROZEN

to unfreeze all tasks in the container :

   # echo RUNNING > /containers/0/freezer.state
   # cat /containers/0/freezer.state
   RUNNING

This is the basic mechanism which should do the right thing for user space
task in a simple scenario.

It's important to note that freezing can be incomplete.  In that case we
return EBUSY.  This means that some tasks in the cgroup are busy doing
something that prevents us from completely freezing the cgroup at this
time.  After EBUSY, the cgroup will remain partially frozen -- reflected
by freezer.state reporting "FREEZING" when read.  The state will remain
"FREEZING" until one of these things happens:

	1) Userspace cancels the freezing operation by writing "RUNNING" to
		the freezer.state file
	2) Userspace retries the freezing operation by writing "FROZEN" to
		the freezer.state file (writing "FREEZING" is not legal
		and returns EIO)
	3) The tasks that blocked the cgroup from entering the "FROZEN"
		state disappear from the cgroup's set of tasks.

[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: export thaw_process]
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Acked-by: Serge E. Hallyn <serue@us.ibm.com>
Tested-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20 08:52:34 -07:00
Matt Helsley 83224b0837 container freezer: add TIF_FREEZE flag to all architectures
This patch series introduces a cgroup subsystem that utilizes the swsusp
freezer to freeze a group of tasks.  It's immediately useful for batch job
management scripts.  It should also be useful in the future for
implementing container checkpoint/restart.

The freezer subsystem in the container filesystem defines a cgroup file
named freezer.state.  Reading freezer.state will return the current state
of the cgroup.  Writing "FROZEN" to the state file will freeze all tasks
in the cgroup.  Subsequently writing "RUNNING" will unfreeze the tasks in
the cgroup.

* Examples of usage :

   # mkdir /containers/freezer
   # mount -t cgroup -ofreezer freezer  /containers
   # mkdir /containers/0
   # echo $some_pid > /containers/0/tasks

to get status of the freezer subsystem :

   # cat /containers/0/freezer.state
   RUNNING

to freeze all tasks in the container :

   # echo FROZEN > /containers/0/freezer.state
   # cat /containers/0/freezer.state
   FREEZING
   # cat /containers/0/freezer.state
   FROZEN

to unfreeze all tasks in the container :

   # echo RUNNING > /containers/0/freezer.state
   # cat /containers/0/freezer.state
   RUNNING

This patch:

The first step in making the refrigerator() available to all
architectures, even for those without power management.

The purpose of such a change is to be able to use the refrigerator() in a
new control group subsystem which will implement a control group freezer.

[akpm@linux-foundation.org: fix sparc]
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Signed-off-by: Matt Helsley <matthltc@us.ibm.com>
Acked-by: Pavel Machek <pavel@suse.cz>
Acked-by: Serge E. Hallyn <serue@us.ibm.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Nigel Cunningham <nigel@tuxonice.net>
Tested-by: Matt Helsley <matthltc@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-20 08:52:33 -07:00
Martin Schwidefsky 0b59268285 [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY
The SET_PERSONALITY macro is always called with a second argument of 0.
Remove the ibcs argument and the various tests to set the PER_SVR4
personality.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-10-16 15:40:05 +02:00
Robert Richter 25ad2913ca oprofile: more whitespace fixes
Signed-off-by: Robert Richter <robert.richter@amd.com>
2008-10-15 20:55:51 +02:00
Linus Torvalds 5723ff931a Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
  chmc: Mark %ver register inline asm with __volatile__
  sparc64: Add missing notify_cpu_starting() call.
  sparc32: fix build errors
2008-10-13 10:07:53 -07:00
Linus Torvalds 244dc4e54b Merge git://git.infradead.org/users/dwmw2/random-2.6
* git://git.infradead.org/users/dwmw2/random-2.6:
  Fix autoloading of MacBook Pro backlight driver.
  Automatic MODULE_ALIAS() for DMI match tables.
  Remove asm/a.out.h files for all architectures without a.out support.
  Introduce HAVE_AOUT symbol to remove hard-coded arch list for BINFMT_AOUT
  Remove redundant CONFIG_ARCH_SUPPORTS_AOUT
  S390: Update comments about why we don't use <asm-generic/statfs.h>
  SPARC: Use <asm-generic/statfs.h>
  PowerPC: Use <asm-generic/statfs.h>
  PARISC: Use <asm-generic/statfs.h>
  x86_64: Use <asm-generic/statfs.h>
  IA64: Use <asm-generic/statfs.h>
  ARM: Use <asm-generic/statfs.h>
  Make <asm-generic/statfs.h> suitable for 64-bit platforms.
  Define and use PCI_DEVICE_ID_MARVELL_88ALP01_CCIC for CAFÉ camera driver
  [MTD] [NAND] Define and use PCI_DEVICE_ID_MARVELL_88ALP01_NAND for CAFÉ
  Use PCI_DEVICE_ID_88ALP01 for CAFÉ chip, rather than PCI_DEVICE_ID_CAFE.
  EFS: Don't set f_fsid in statfs().
2008-10-13 09:59:14 -07:00
David Miller b70ac77185 serial: allow 8250 to be used on sparc
This requires three changes:

1) Remove !SPARC restriction in Kconfig.

2) Move Sparc specific serial drivers before 8250, so that serial
   console devices don't change names on us, even if 8250 finds
   devices.

3) Since the Sparc specific serial drivers try to use the
   same major/minor device namespace as 8250, some coordination
   is necessary.  Use the sunserial_*() layer routines to allocate
   minor number space within TTY_MAJOR when CONFIG_SPARC.

   This has no effect on other platforms.

Thanks to Josip Rodin for bringing up this issue and testing
plus debugging various revisions of this patch.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-13 09:51:40 -07:00
David Woodhouse e758936e02 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	include/asm-x86/statfs.h
2008-10-13 17:13:56 +01:00
Robert Reif 4245e59d12 sparc32: fix build errors
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-12 23:55:45 -07:00
David S. Miller 56c5d900db Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	sound/core/memalloc.c
2008-10-11 12:39:35 -07:00
Ingo Molnar 990d0f2ced Merge branches 'sched/devel', 'sched/cpu-hotplug', 'sched/cpusets' and 'sched/urgent' into sched/core 2008-10-08 11:31:02 +02:00
Robert Reif 6cf4a9243a sparc32: sun4m interrupt mask cleanup
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-10-07 15:24:02 -07:00
David Brownell a1cd0464c6 sparc: arch/sparc/kernel/pmc.c -- extra #include?
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-21 00:28:26 -07:00
David S. Miller 778b1c65bf sparc32: Add more extensive documentation of sun4m interrupts.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-19 21:18:05 -07:00
David S. Miller e7913de928 sparc32: Kill irq_rcvreg from sun4m_irq.c
Unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-19 21:18:04 -07:00
David S. Miller c7e606a8f8 sparc32: Delete master_l10_limit.
It is only set, never used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-19 21:18:03 -07:00
David S. Miller 8bd8deead7 sparc32: Use PROM device probing for sun4c timers.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-19 21:18:02 -07:00
David S. Miller 45bb5a7cbf sparc32: Use PROM device probing for sun4c interrupt register.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-19 21:18:01 -07:00
David S. Miller 5ff0d55f93 sparc32: Delete claim_ticker14().
No more users.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-19 21:18:01 -07:00
David S. Miller b218fa0e9c sparc32: Stop calling claim_ticker14() from sun4c_irq.c
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-19 21:17:59 -07:00
David S. Miller 76954261ba sparc32: Kill clear_profile_irq btfixup entry.
Unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-19 21:17:59 -07:00
David S. Miller 1de937a536 sparc32: Call sun4m_clear_profile_irq() directly from sun4m_smp.c
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-19 21:17:58 -07:00
David S. Miller a73554aedb sparc32: Remove #if 0'd code from sun4c_irq.c
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-19 21:17:57 -07:00
David S. Miller f8376e933c sparc32: Remove some SMP ifdefs in sun4d_irq.c
Always do the sbus_tid[] handling.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-19 21:17:56 -07:00
David S. Miller f5f1085720 sparc32: Use PROM infrastructure for probing and mapping sun4d timers.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-19 21:17:56 -07:00
David S. Miller 69c010b245 sparc32: Use PROM device probing for sun4m irq registers.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-19 21:17:43 -07:00
David S. Miller 2e57572a50 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Conflicts:

	arch/sparc64/kernel/pci_psycho.c
2008-09-16 14:11:43 -07:00
David S. Miller 9b2e43ae4e sparc32: Use PROM device probing for sun4m timer registers.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-13 21:37:32 -07:00
David S. Miller 7d4ee289d1 sparc: Fix user_regset 'n' field values.
As noticed by Russell King, we were not setting this properly
to the number of entries, but rather the total size.

This results in the core dumping code allocating waayyyy too
much memory.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-12 15:55:44 -07:00
David S. Miller 3c50370103 sparc: Fix user_regset 'n' field values.
As noticed by Russell King, we were not setting this properly
to the number of entries, but rather the total size.

This results in the core dumping code allocating waayyyy too
much memory.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-12 15:01:31 -07:00
David S. Miller b539c46766 sparc64: Fix sparse warnings in fault.c
1) set_brkpt() is referenced by nothing and hasn't been used by anyone
   to my knowledge for many many years.  So just delete it.

2) add extern decl for do_sparc64_fault() in asm/pgtable_64.h

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-12 00:10:32 -07:00
David S. Miller 7e0b1e6186 sparc64: Fix sparse warnings in visemul.c
1) edge8 tables should be static
2) add vis_emul() extern decl. to asm/visasm.h

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-11 23:46:40 -07:00
David S. Miller b0f1e7962f sparc64: Define WANT_PAGE_VIRTUAL
As sparse warns, without this struct page pointer subtraction is
extremely expensive, and this is a pretty common operation in
fast paths.

With this define struct page becomes 64 bytes which makes for a
simple subtract and shift, instead of a costly divide or reciprocol
multiply.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-11 23:36:32 -07:00
David S. Miller 17f04fbb0f sysctl: Use header file for sysctl knob declarations on sparc.
This also takes care of a sparse warning as scons_pwroff's definition
point.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-11 23:33:53 -07:00
David S. Miller 8f20b20de7 sparc64: Fix sparse warnings in global reg snapshotting.
Lots of shadowed local variables and global_reg_snapshot[] needs
an extern declaration in asm/ptrace_64.h.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-11 23:19:22 -07:00
David S. Miller 3fbe36d8da sparc32: Call parse_early_param() in setup_arch().
Mirror sparc64.  This will allow us to use early_param() on
sparc32 too.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-10 23:40:32 -07:00
David S. Miller bdba4d6b77 sparc32: Fix function signature of of_bus_sbus_get_flags().
This doesn't match the function pointer type it gets assigned
to.  Luckily, this was harmless.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-10 23:38:51 -07:00
David S. Miller d3ae4b5bc7 sparc64: Get rid of pci_controller_info.
It is just used as a parent to encapsulate two PBM objects.

But that layout is only really relevant and necessary for
psycho PCI controllers, which unlike all the others share
a single IOMMU instance between sibling PCI busses.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-10 23:07:41 -07:00
David S. Miller ab138c031f sparc32: Need to close openned RTC device just like sparc64.
Otherwise we get refcount problems.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-10 13:36:13 -07:00
Bjoern B. Brandenburg 4944f7e5c9 sparc: remove unused includes
The spinlock code does not use NR_CPUS.
Compile tested using allyesconfig and allnoconfig.

Signed-off-by: Bjoern B. Brandenburg <bbb@cs.unc.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-09 19:43:33 -07:00
David S. Miller 7b1af32f52 sparc32: Move sun4d show_leds() out of asm/obio.h
Put it, as well as cpu_leds[] array, into sun4d_irq.c

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-08 15:40:45 -07:00
David S. Miller 365b50f0f0 sparc32: Fix coding style of sparc_cpu_model setting code.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-08 15:40:31 -07:00
David S. Miller 98d86c0915 Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Conflicts:

	arch/sparc/kernel/of_device.c
2008-09-08 15:39:30 -07:00
Manfred Spraul e545a6140b kernel/cpu.c: create a CPU_STARTING cpu_chain notifier
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>
2008-09-08 19:25:24 +02:00
David Woodhouse 52d90f4dad SPARC: Use <asm-generic/statfs.h>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-09-06 19:30:17 +01:00
Robert Reif 1aa0365f27 sparc32: add init memory poisoning
This patch adds init memory poisoning.  It looks like
totalram_pages was not updated properly in free_initrd_mem
so I fixed that as well.

Signed-off-by: Robert Reif <reif@earthlink.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-03 16:29:42 -07:00
David S. Miller 94d5b5432b sparc: Remove asm/rtc.h
No more users.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-03 16:19:46 -07:00
David S. Miller f6e30ffcf3 sparc32: Kill asm/mostek.h.
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-03 15:57:04 -07:00
David S. Miller 81c4fdb1d6 sparc32: Kill remaining asm/mostek.h inclusions.
No longer needed.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-03 15:56:27 -07:00
David S. Miller c4cbe6f96e sparc32: use RTC subsystem
Use rtc subsystem for sparc32 architecture.
Actually, only one driver is needed: m48t59
as it supports the most common clocks on sparc32
machines: m48t08 and m48t02.

[ Add proper RTC layer calls to set_rtc_mmss() -DaveM ]

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-03 15:52:38 -07:00
David S. Miller 5280267c1d sparc: Fix handling of LANCE and ESP parent nodes in of_device.c
The device nodes that sit above 'esp' and 'le' on SBUS lack a 'ranges'
property, but we should pass the translation up to the parent node so
that the SBUS level ranges get applied.

Based upon a bug report from Robert Reif.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-03 02:05:19 -07:00
David S. Miller 9723f38eb5 sparc32: Fix sun4c build warnings.
Reported by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-02 03:15:44 -07:00
David S. Miller 446139a8f7 sparc64: Implement SSTATE purely using notifiers and initcalls.
Don't clutter up the tree with sstate_blah() scattered all over the
place.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-02 00:49:38 -07:00
David S. Miller cdb3592a20 sparc64: Move reboot handling into seperate file and kill power reg programming.
We should always use prom_power_off().

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-09-02 00:31:11 -07:00
David S. Miller ba4962d7a6 sparc64: Clean up CPU chip type probing code.
Three main things:

1) Make prober an arch initcall instead of using hard-coded invocation
   from paging_init()

2) Shrink table size, the fpu ident stuff was never used.

3) Use named struct initialized in table.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 21:48:12 -07:00
Adrian Bunk 5110bd21b8 sparc: remove CONFIG_SUN4
While doing some easy cleanups on the sparc code I noticed that the
CONFIG_SUN4 code seems to be worse than the rest - there were some
"I don't know how it should work, but the current code definitely cannot
work." places.

And while I have seen people running Linux on machines like a
SPARCstation 5 a few years ago I don't recall having seen sun4
machines, even less ones running Linux.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 20:59:37 -07:00
David S. Miller b69416b51b sparc64: Rewrite central driver.
This driver is now limited to just doing the basic clock board and FHC
chip initialization and registering the platform devices for the
per-board LEDs, which are driven by the new LEDS_STARFIRE driver.

The IRQ register handling is already confined purely to the device
tree code.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 20:56:15 -07:00
David S. Miller 10d29ff907 sparc64: Delete starfire_cpu_setup().
It does nothing.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 01:40:12 -07:00
David S. Miller fd098316ef sparc: Annotate of_device_id arrays with const or __initdata.
As suggested by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-31 01:23:17 -07:00
David S. Miller 933b2a1d8d sparc: Stop setting NO_DMA.
This fixes the build with PCI disabled, we do want the
generic DMA facilities and interfaces even when just SBUS
is enabled.

Based upon a build failure report by Robert Reif.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 12:34:20 -07:00
David S. Miller e0ac612e69 sparc: Kill ebus_bus_type.
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 00:37:36 -07:00
David S. Miller 356d164757 sparc: Kill EBUS driver layer.
All that remains is the EBUS DMA programming library for
sparc64.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-30 00:36:11 -07:00
David S. Miller 3ae627a19e sparc64: Convert EBUS floppy support to pure OF driver.
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 23:26:23 -07:00
David S. Miller aae7fb87ec sparc: Move EBUS DMA interfaces into seperate header file.
These have no dependencies on the EBUS probing layer, the clients
setup the registers and all of those details.  The EBUS DMA layer
just programs and manages the DMA controller found in EBUS.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 23:10:21 -07:00
David S. Miller da86783dda sparc64: Use generic CMOS driver.
Based largely upon a patch by Krzysztof Helt <krzysztof.h1@poczta.fm>

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:48 -07:00
David S. Miller e8b75c4fd6 sparc: asm/mostek.h is now 32-bit only
No need for the 64-bit header version any more.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 14:16:47 -07:00
David S. Miller 7eb1aae555 sparc: Delete asm/sbus*.h
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:24 -07:00
David S. Miller 9dc69230a9 sparc: Kill now spurious includes of sbus.h
In order to make this week I also had to add an include
of linux/dma-mapping.h to asm/pci_32.h because drivers/pci/pci.c
really depends upon getting this header somehow.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:23 -07:00
David S. Miller 0ad626a2a4 sparc32: Kill iounit_map_dma_*().
Unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:23 -07:00
David S. Miller 47a2d72885 sparc: Kill sbus_bus_type.
No longer used.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:22 -07:00
David S. Miller 046e26a8ba sparc: Remove generic SBUS probing layer.
The individual SBUS IOMMU arch code now sets the IOMMU information
directly into the OF device objects.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:21 -07:00
David S. Miller 5059625ed8 sparc: Add OF archdata propagation helper.
Add a helper function that, given a bus of_device node, propagates
all iommu, stc, and host_controller values down to the child nodes.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:20 -07:00
David S. Miller f8e4d32cb5 sparc: Kill sbus_arch_preinit().
32-bit sparc just needed it to register the ioport procfs bits, do this
via an arch_initcall() instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:19 -07:00
David S. Miller d32bcdd7a9 sparc32: Kill sbus_is_slave().
Unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:19 -07:00
David S. Miller c6e5f661ee sparc: Kill OBP property members of sbus_dev and sbus_bus
Unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:18 -07:00
David S. Miller 9b9644c6d9 sparc: Kill sbus_devaddr() and sbus_dev_slot().
Unused.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:14 -07:00
David S. Miller 615deeb27b sparc: Kill sbus_ioremap() and sbus_iounmap().
No more users.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:13 -07:00
David S. Miller 454eeb2dd7 sparc: Convert remaining sbus_ioremap() and sbus_iounmap() users.
Use of_ioremap() and of_iounmap() instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
2008-08-29 02:15:13 -07:00