dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

110 Commits

Author SHA1 Message Date
David S. Miller 4ed5d5e429 sparc64: Add some missing __kprobes annotations to kernel fault paths.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-10 18:08:29 -08:00
David S. Miller 135d082171 sparc64: Use kprobes_built_in() to avoid ifdefs in fault_64.c
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-10 18:02:19 -08:00
Linus Torvalds ee1262dbc6 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6:
  sparc: Set UTS_MACHINE correctly.
  sparc,leon: init_leon srmmu cleanup
  sparc32: Remove early interrupt enable.
  sparc, leon: Added Aeroflex Gaisler entry in manufacturer_info structure
  sparc64: Faster early-boot framebuffer console.
  Revert "sparc: Make atomic locks raw"
  sparc: remove unused nfsd #includes
  sparc: Fixup last users of irq_chip->typename
  Added sparc_leon3_snooping_enabled() and converted extern inline to static inline
  No auxio on LEON
  apbuart: Use of_find_node_by_path to find root node.
  sparc: Replace old style lock initializer
  sparc: Make atomic locks raw
  apbuart: Fix build and missing driver unregister.
  apbuart: Kill dependency on deprecated Sparc-only PROM interfaces.
  apbuart: Fix build warning.
  sparc: Support for GRLIB APBUART serial port
  watchdog: Remove BKL from rio watchdog driver
  sparc: Remove BKL from apc
  sparc,leon: Sparc-Leon SMP support
2009-12-08 07:48:23 -08:00
Kristoffer Glembo c803ba9017 sparc,leon: init_leon srmmu cleanup
Removed unused assignment and capitalized srmmu name for sparc_leon

Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02 22:28:50 -08:00
David S. Miller bffbc94a4d sparc64: Fix definition of VMEMMAP_SIZE.
This was the cause of various boot failures on V480, V880, etc.
systems.

Kernel image memory was being overwritten because the vmemmap[]
array was being sized to small.  So if you had physical memory
addresses past a certain point, the early bootup would spam
all over variables in the kernel data section.

The vmemmap mappings map page structs, not page struct pointers.
And that was the key thinko in the macro definition.

This was fixable thanks to the help, reports, and tireless patience
of Hermann Lauer.

Reported-by: Hermann Lauer <Hermann.Lauer@iwr.uni-heidelberg.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-23 16:38:56 -08:00
Konrad Eisele 8401707ff6 sparc,leon: Sparc-Leon SMP support
Support SMP for a Sparc-Leon multiprocessor system.
Add Leon specific SMP code to arch/sparc/kernel/leon_smp.c.

Signed-off-by: Konrad Eisele <konrad@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-02 04:19:42 -08:00
David S. Miller 1a78cedb99 sparc64: Fix D-cache flushing on swapin from SW devices.
Thanks to tip form ARM folks and Russell King.

If flush_dcache_page() occurs on a swapin it will have a mapping
and we'll try to defer the flush by setting the dirty bit.

But when it hits update_dcache_page() we won't flush because the
page won't have a mapping any more.  So remove the mapping
requirement in flush_dcache().

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-12 03:20:57 -07:00
Geert Uytterhoeven cc013a8890 arches: drop superfluous casts in nr_free_pages() callers
Commit 9617729941 ("Drop free_pages()")
modified nr_free_pages() to return 'unsigned long' instead of 'unsigned
int'.  This made the casts to 'unsigned long' in most callers superfluous,
so remove them.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: David Howells <dhowells@redhat.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Chris Zankel <zankel@tensilica.com>
Cc: Michal Simek <monstr@monstr.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-09-22 07:17:34 -07:00
David S. Miller a29889a536 Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ 2009-09-04 02:22:21 -07:00
David S. Miller d8ed1d43e1 sparc64: Validate linear D-TLB misses.
When page alloc debugging is not enabled, we essentially accept any
virtual address for linear kernel TLB misses.  But with kgdb, kernel
address probing, and other facilities we can try to access arbitrary
crap.

So, make sure the address we miss on will translate to physical memory
that actually exists.

In order to make this work we have to embed the valid address bitmap
into the kernel image.  And in order to make that less expensive we
make an adjustment, in that the max physical memory address is
decreased to "1 << 41", even on the chips that support a 42-bit
physical address space.  We can do this because bit 41 indicates
"I/O space" and thus covers non-memory ranges.

The result of this is that:

1) kpte_linear_bitmap shrinks from 2K to 1K in size

2) we need 64K more for the valid address bitmap

We can't let the valid address bitmap be dynamically allocated
once we start using it to validate TLB misses, otherwise we have
crazy issues to deal with wrt. recursive TLB misses and such.

If we're in a TLB miss it could be the deepest trap level that's legal
inside of the cpu.  So if we TLB miss referencing the bitmap, the cpu
will be out of trap levels and enter RED state.

To guard against out-of-range accesses to the bitmap, we have to check
to make sure no bits in the physical address above bit 40 are set.  We
could export and use last_valid_pfn for this check, but that's just an
unnecessary extra memory reference.

On the plus side of all this, since we load all of these translations
into the special 4MB mapping TSB, and we check the TSB first for TLB
misses, there should be absolutely no real cost for these new checks
in the TLB miss path.

Reported-by: heyongli@gmail.com
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-25 16:47:46 -07:00
Konrad Eisele 75d9e34698 sparc, leon: sparc-leon specific SRMMU initialization and bootup fixes.
The sparc-leon caches are virtually tagged so a flush is needed on ctx
switch.

Signed-off-by: Konrad Eisele <konrad@gaisler.com>
Reviewed-by:   Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-17 18:32:11 -07:00
Konrad Eisele 0fd7ef1fe0 sparc,leon: Introduce the sparc-leon CPU type.
Add sparc_leon enum, M_LEON|M_LEON3_SOC machine. Add compilation of
leon.c in mm and kernel
if CONFIG_SPARC_LEON is defined. Add sparc_leon dependent
initialization to switch statements + head.S.

Signed-off-by: Konrad Eisele <konrad@gaisler.com>
Reviewed-by:   Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-17 18:32:10 -07:00
Konrad Eisele 5213a78029 sparc,leon: CONFIG_SPARC_LEON option and leon specific files.
The macro CONFIG_SPARC_LEON will shield, if undefined, the sun-sparc
code from LEON specific code. In
particular include/asm/leon.h will get empty through #ifdef and
leon_kernel.c and leon_mm.c will not be compiled.

Signed-off-by: Konrad Eisele <konrad@gaisler.com>
Reviewed-by:   Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-17 18:32:09 -07:00
David S. Miller a923c28fc5 sparc: Use page_fault_out_of_memory() for VM_FAULT_OOM.
As noted by Nick Piggin.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-02 19:17:15 -07:00
Linus Torvalds d06063cc22 Move FAULT_FLAG_xyz into handle_mm_fault() callers
This allows the callers to now pass down the full set of FAULT_FLAG_xyz
flags to handle_mm_fault().  All callers have been (mechanically)
converted to the new calling convention, there's almost certainly room
for architectures to clean up their code and then add FAULT_FLAG_RETRY
when that support is added.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-21 13:08:22 -07:00
David S. Miller b99c6ebe8f sparc64: Fix UP bootup regression.
Commit b696fdc259 ("sparc64: Defer
cpu_data() setup until end of per-cpu data initialization.") broke
bootup for UP builds because the cpu_data() initialization only
occurs in setup_per_cpu_areas() which is never compiled in nor
called in UP builds.

Fix this up by calling the setups directly from init_64.c when
non-SMP.

Reported-by: Alexander Beregalov <a.beregalov@gmail.com>
Tested-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-18 23:50:41 -07:00
Stephen Rothwell 6ac5c61082 sparc: replace uses of CPU_MASK_ALL_PTR
CPU_MASK_ALL is the (deprecated) "all bits set" cpumask, defined as so:

	#define CPU_MASK_ALL (cpumask_t) { { ... } }

Taking the address of such a temporary is questionable at best,
unfortunately 321a8e9d (cpumask: add CPU_MASK_ALL_PTR macro) added
CPU_MASK_ALL_PTR:

	#define CPU_MASK_ALL_PTR (&CPU_MASK_ALL)

Which formalizes this practice.  One day gcc could bite us over this
usage (though we seem to have gotten away with it so far).

[Description by Rusty Russell]
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-16 04:56:55 -07:00
Robert P. J. Day 949e82744b sparc: Simplify code using is_power_of_2() routine.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-16 04:56:51 -07:00
David S. Miller 73fffc037e sparc64: Get rid of real_setup_per_cpu_areas().
Now that we defer the cpu_data() initializations to the end of per-cpu
setup, we can get rid of this local hack we had to setup the per-cpu
areas eary.

This is a necessary step in order to support HAVE_DYNAMIC_PER_CPU_AREA
since the per-cpu setup must run when page structs are available.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-16 04:56:23 -07:00
David S. Miller b696fdc259 sparc64: Defer cpu_data() setup until end of per-cpu data initialization.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-16 04:56:22 -07:00
David S. Miller a2094502dc sparc64: Make mdesc_fill_in_cpu_data take a cpumask_t pointer.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-16 04:56:21 -07:00
David S. Miller 890db403d5 sparc: Call OF and MD cpu scanning explicitly from paging_init()
We need to split up the cpu present mask setup from the cpu_data
initialization, and this is a first step towards that.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-16 04:56:19 -07:00
Rusty Russell ad6561dffa module: trim exception table on init free.
It's theoretically possible that there are exception table entries
which point into the (freed) init text of modules.  These could cause
future problems if other modules get loaded into that memory and cause
an exception as we'd see the wrong fixup.  The only case I know of is
kvm-intel.ko (when CONFIG_CC_OPTIMIZE_FOR_SIZE=n).

Amerigo fixed this long-standing FIXME in the x86 version, but this
patch is more general.

This implements trim_init_extable(); most archs are simple since they
use the standard lib/extable.c sort code.  Alpha and IA64 use relative
addresses in their fixups, so thier trimming is a slight variation.

Sparc32 is unique; it doesn't seem to define ARCH_HAS_SORT_EXTABLE,
yet it defines its own sort_extable() which overrides the one in lib.
It doesn't sort, so we have to mark deleted entries instead of
actually trimming them.

Inspired-by: Amerigo Wang <amwang@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-alpha@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Cc: linux-ia64@vger.kernel.org
2009-06-12 21:47:04 +09:30
David S. Miller 01c4538158 sparc64: add_node_ranges() must be __init
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-08 03:37:35 -07:00
David S. Miller 9a2ed5cc9e sparc64: Fix section mismatch warnings in PCI controller drivers.
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-04-08 03:28:15 -07:00
Akinobu Mita 7ca43e7564 mm: use debug_kmap_atomic
Use debug_kmap_atomic in kmap_atomic, kmap_atomic_pfn, and
iomap_atomic_prot_pfn.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-01 08:59:14 -07:00
David S. Miller ed223129a3 Merge branch 'master' of ssh://master.kernel.org/home/ftp/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask-for-sparc
Conflicts:
	arch/sparc/kernel/smp_64.c
2009-03-29 15:44:22 -07:00
David S. Miller 42cc77c861 sparc64: Reschedule KGDB capture to a software interrupt.
Otherwise it might interrupt switch_to() midstream and use
half-cooked register window state.

Reported-by: Chris Torek <chris.torek@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-18 23:51:57 -07:00
Rusty Russell ec7c14bde8 cpumask: prepare for iterators to only go to nr_cpu_ids/nr_cpumask_bits.: sparc
Impact: cleanup, futureproof

In fact, all cpumask ops will only be valid (in general) for bit
numbers < nr_cpu_ids.  So use that instead of NR_CPUS in various
places.

This is always safe: no cpu number can be >= nr_cpu_ids, and
nr_cpu_ids is initialized to NR_CPUS at boot.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
2009-03-16 14:40:24 +10:30
Rusty Russell e305cb8f09 cpumask: prepare for iterators to only go to nr_cpu_ids/nr_cpumask_bits.: sparc64
Impact: cleanup, futureproof

In fact, all cpumask ops will only be valid (in general) for bit
numbers < nr_cpu_ids.  So use that instead of NR_CPUS in various
places.

This is always safe: no cpu number can be >= nr_cpu_ids, and
nr_cpu_ids is initialized to NR_CPUS at boot.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
2009-03-16 14:40:23 +10:30
David S. Miller 9b02605826 sparc64: Kill bogus TPC/address truncation during 32-bit faults.
This builds upon eeabac7386
("sparc64: Validate kernel generated fault addresses on sparc64.")

Upon further consideration, we actually should never see any
fault addresses for 32-bit tasks with the upper 32-bits set.

If it does every happen, by definition it's a bug.  Whatever
context created that fault would only have that fault satisfied
if we used the full 64-bit address.  If we truncate it, we'll
always fault the wrong address and we'll always loop faulting
forever.

So catch such conditions and mark them as errors always.  Log
the error and fail the fault.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-03 16:28:23 -08:00
David S. Miller eeabac7386 sparc64: Validate kernel generated fault addresses on sparc64.
In order to handle all of the cases of address calculation overflow
properly, we run sparc 32-bit processes in "address masking" mode
when running on a 64-bit kernel.

Address masking mode zeros out the top 32-bits of the address
calculated for every load and store instruction.

However, when we're in privileged mode we have to run with that
address masking mode disabled even when accessing userspace from
the kernel.

To "simulate" the address masking mode we clear the top-bits by
hand for 32-bit processes in the fault handler.

It is the responsibility of code in the compat layer to properly
zero extend addresses used to access userspace.  If this isn't
followed properly we can get into a fault loop.

Say that the user address is 0xf0000000 but for whatever reason
the kernel code sign extends this to 64-bit, and then the kernel
tries to access the result.

In such a case we'll fault on address 0xfffffffff0000000 but the fault
handler will process that fault as if it were to address 0xf0000000.
We'll loop faulting forever because the fault never gets satisfied.

So add a check specifically for this case, when the kernel is faulting
on a user address access and the addresses don't match up.

This code path is sufficiently slow path, and this bug is sufficiently
painful to diagnose, that this kind of bug check is warranted.

Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-02 22:08:15 -08:00
Sam Ravnborg 917c3660d6 sparc64: move EXPORT_SYMBOL to the symbols definition
Move all applicable EXPORT_SYMBOL()s to the file where the respective
symbol is defined.

Removed all the includes that are no longer needed in sparc_ksyms_64.c

Comment all remaining EXPORT_SYMBOL()s in sparc_ksyms_64.c

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

Additions by Julian Calaby:
* Moved EXPORT_SYMBOL()s for prom functions to their rightful places.
* Made some minor cleanups to the includes and comments of sparc_ksyms_64.c
* Updated and tidied commit message.
* Rebased patch over sparc-2.6.git HEAD.
* Ensured that all modified files have the correct includes.

Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08 16:58:20 -08:00
Sam Ravnborg 6943f3da3e sparc: move EXPORT_SYMBOL to the symbols definition
Move all applicable EXPORT_SYMBOL()s to the file where the respective
symbol is defined.

Removed all the includes that are no longer needed in sparc_ksyms_32.c

Comment all remaining EXPORT_SYMBOL()s in sparc_ksyms_32.c

Two symbols are shared with sparc64 thus the exports were removed from
the sparc_ksyms_64.c too, along with the include their ommission made
redundant.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

Additions by Julian Calaby:
* Moved EXPORT_SYMBOL()s for prom functions to their rightful places.
* Made some minor cleanups to the includes and comments of sparc_ksyms_32.c
* Made another subtraction from sparc_ksyms_64.c
* Updated and tidied commit message.
* Rebased patch over sparc-2.6.git HEAD.
* Ensured that all modified files have the correct includes.

Signed-off-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-08 16:58:05 -08:00
Sam Ravnborg 9018113649 sparc64: Use unsigned long long for u64.
Andrew Morton wrote:

    People keep on doing

            printk("%llu", some_u64);

    testing it only on x86_64 and this generates a warning storm on
    powerpc, sparc64, etc.  Because they use `long', not `long long'.

    Quite a few 64-bit architectures are using `long' for their
    s64/u64 types.  We should convert them all to `long long'.

Update types.h so we use unsigned long long for u64 and
fix all warnings in sparc64 code.
Tested with an allnoconfig, defconfig and allmodconfig builds.

This patch introduces additional warnings in several drivers.
These will be dealt with in separate patches.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-06 13:19:28 -08:00
Sam Ravnborg 0157141ae2 sparc: refactor code in fault_32.c
The sparc allmodconfig build broke due to enabling of the
branch_tracer that does some very clever things with
all if conditions. This caused my gcc 3.4.5 to be so confused that
it emitted a warning:

arch/sparc/mm/fault_32.c: In function `do_sparc_fault':
arch/sparc/mm/fault_32.c:176: warning: 'fixup' might be used uninitialized in this function

And with -Werror this broke the build.

Refactor code so it:
1) becomes more readable
2) no longer emit a warning with the branch_tracer enabled

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-06 12:52:41 -08:00
Sam Ravnborg ff9aefbf4d sparc64: refactor code in init_64.c
The sparc64 allmodconfig build broke due to enabling of the
branch_tracer that does some very clever things with
all if conditions. This caused my gcc 3.4.5 to be so confused that
it emitted two warnings:

arch/sparc/mm/init_64.c: In function `update_mmu_cache':
arch/sparc/mm/init_64.c:271: warning: 'pg_flags' might be used uninitialized in this function
arch/sparc/mm/init_64.c:272: warning: 'page' might be used uninitialized in this function

And with -Werror this broke the build.

Refactor code so it:
1) becomes more readable
2) no longer emit a warning with the branch_tracer enabled

The refactoring uses a small helper function (flush_dcache()).

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-01-06 12:51:26 -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
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
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
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
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 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
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
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 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
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