Commit graph

15073 commits

Author SHA1 Message Date
Linus Torvalds ad501bce57 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4569/1: ep93xx_gpio_irq_type(): fix spurious enumeration offset for FGPIO handling
  [ARM] 4568/1: fix l2x0 cache invalidate handling of unaligned addresses
2007-09-21 14:05:45 -07:00
Linus Torvalds da8f153e51 Revert "x86_64: Quicklist support for x86_64"
This reverts commit 34feb2c83b.

Suresh Siddha points out that this one breaks the fundamental
requirement that you cannot free page table pages before the TLB caches
are flushed.  The quicklists do not give the same kinds of guarantees
that the mmu_gather structure does, at least not in NUMA configurations.

Requested-by: Suresh Siddha <suresh.b.siddha@intel.com>
Acked-by: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Asit Mallick <asit.k.mallick@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-21 12:09:41 -07:00
Linus Torvalds 077a6c2669 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] BCM1480: include <linux/init.h>.
  [MIPS] BCM1480: Export zbbus_mhz.
2007-09-21 10:00:52 -07:00
Ralf Baechle da51f9e10c [MIPS] BCM1480: include <linux/init.h>.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-21 17:54:12 +01:00
Ralf Baechle 339c3a6a12 [MIPS] BCM1480: Export zbbus_mhz.
Symbol is required by the ZBus profiler.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-21 17:54:12 +01:00
Andi Kleen 176df2457e x86_64: Zero extend all registers after ptrace in 32bit entry path.
Strictly it's only needed for eax.

It actually does a little more than strictly needed -- the other registers
are already zero extended.

Also remove the now unnecessary and non functional compat task check
in ptrace.

This is CVE-2007-4573

Found by Wojciech Purczynski

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-21 09:52:07 -07:00
Paul Bolle bbc15f46fe [x86 setup] Fix typo in arch/i386/boot/header.S
There's an obvious typo in arch/i386/boot/header.S (in your
linux-2.6-x86setup.git) that I noticed by just studying the code.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-09-20 11:06:59 -07:00
H. Peter Anvin 91c4b8cb5a [acpi] Correct the decoding of video mode numbers in wakeup.S
wakeup.S looks at the video mode number from the setup header and
looks to see if it is a VESA mode.  Unfortunately, the decoding is
done incorrectly and it will attempt to frob the VESA BIOS for any
mode number 0x0200 or larger.  Correct this, and remove a bunch of #if
0'd code.

Massive thanks to Jeff Chua for reporting the bug, and suffering
though a large number of experiments in order to track this problem
down.

Cc: Pavel Machek <pavel@ucw.cz>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-09-20 11:06:58 -07:00
H. Peter Anvin 3f662b3f6e [x86 setup] Present the canonical video mode number to the kernel
Canonicalize the video mode number as presented to the kernel.  The
video mode number may be user-entered (e.g. ASK_VGA), an alias
(e.g. NORMAL_VGA), or a size specification, and that confuses the
suspend wakeup code.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-09-20 11:06:58 -07:00
Herbert Valerio Riedel 8742bc92c3 [ARM] 4569/1: ep93xx_gpio_irq_type(): fix spurious enumeration offset for FGPIO handling
The EP93XX_GPIO_LINE_F() macro is supposed to be called with a line
number between 0 and 7, but the current code causes it to get called
with an spuriously offset number range {16..23}.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: Lennert Buytenhek <kernel@wantstofly.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-09-20 09:21:10 +01:00
Linus Torvalds a88a8eff1e Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] cpu-bugs64.c: GCC 3.3 constraint workaround
  [MIPS] DEC: Initialise ioasic_ssr_lock
2007-09-19 11:45:32 -07:00
Linus Torvalds f15f41383d Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Fix timekeeping on PowerPC 601
  [POWERPC] Don't expose clock vDSO functions when CPU has no timebase
  [POWERPC] spusched: Fix null pointer dereference in find_victim
2007-09-19 11:38:25 -07:00
Linus Torvalds dbe3ed1c07 x86-64: page faults from user mode are always user faults
Randy Dunlap noticed an interesting "crashme" behaviour on his dual
Prescott Xeon setup, where he gets page faults with the error code
having a zero "user" bit, but the register state points back to user
mode.

This may be a CPU microcode buglet triggered by some strange instruction
pattern that crashme generates, and loading a microcode update seems to
possibly have fixed it.

Regardless, we really should trust the register state more than the
error code, since it's really the register state that determines whether
we can actually send a signal, or whether we're in kernel mode and need
to oops/kill the process in the case of a page fault.

Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-19 11:37:14 -07:00
Maciej W. Rozycki 09abbcffb3 [MIPS] cpu-bugs64.c: GCC 3.3 constraint workaround
Add a workaround to address warnings generated on the "n" constraint by
GCC 3.3 and below.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-19 19:33:14 +01:00
Maciej W. Rozycki 6883599943 [MIPS] DEC: Initialise ioasic_ssr_lock
Fix the definition of the ioasic_ssr_lock spinlock to include a proper 
initialisation.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-19 19:33:14 +01:00
Jeff Dike 508a92741a uml: fix irqstack crash
This patch fixes a crash caused by an interrupt coming in when an IRQ stack
is being torn down.  When this happens, handle_signal will loop, setting up
the IRQ stack again because the tearing down had finished, and handling
whatever signals had come in.

However, to_irq_stack returns a mask of pending signals to be handled, plus
bit zero is set if the IRQ stack was already active, and thus shouldn't be
torn down.  This causes a problem because when handle_signal goes around
the loop, sig will be zero, and to_irq_stack will duly set bit zero in the
returned mask, faking handle_signal into believing that it shouldn't tear
down the IRQ stack and return thread_info pointers back to their original
values.

This will eventually cause a crash, as the IRQ stack thread_info will
continue pointing to the original task_struct and an interrupt will look
into it after it has been freed.

The fix is to stop passing a signal number into to_irq_stack.  Rather, the
pending signals mask is initialized beforehand with the bit for sig already
set.  References to sig in to_irq_stack can be replaced with references to
the mask.

[akpm@linux-foundation.org: use UL]
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-19 11:24:18 -07:00
Jeremy Fitzhardinge 389a3c0249 xen: don't bother trying to set cr4
Xen ignores all updates to cr4, and some versions will kill the domain if
you try to change its value.  Just ignore all changes.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-19 11:24:18 -07:00
Nicolas George 2c392a4f47 uml: use correct type in BLKGETSIZE ioctl
I found a type mismatch in UML that makes host block devices unusable as ubd
devices on x86_64 and other 64 bits systems (segfault of the mm subsystem):

In block/ioctl.c, the following lines show that the BLKGETSIZE ioctl expects
a pointer to a long:

	case BLKGETSIZE:
		if ((bdev->bd_inode->i_size >> 9) > ~0UL)
			return -EFBIG;
		return put_ulong(arg, bdev->bd_inode->i_size >> 9);

In arch/um/os-Linux/file.c, os_file_size calls it with an int.

The ioctl_list man page should be fixed as well.

Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-19 11:24:17 -07:00
Benjamin Herrenschmidt c27da33969 [POWERPC] Fix timekeeping on PowerPC 601
Recent changes to the timekeeping code broke support for the PowerPC 601
processor which doesn't have the usual timebase facility but a slightly
different thing called (yuck) the RTC.

This fixes it, boot tested on an old 601 based PowerMac 7200.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-19 15:26:34 +10:00
Benjamin Herrenschmidt 7b5acbaac3 [POWERPC] Don't expose clock vDSO functions when CPU has no timebase
We forgot to remove the clock_gettime, clock_getres and get_tbfreq vDSO
calls on CPUs that have no timebase such as 601 or 403 (old CPUs that have
different mechanisms and for which the vDSO code will not work properly).
This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-19 15:26:34 +10:00
Christoph Hellwig c0e7b4aa1c [POWERPC] spusched: Fix null pointer dereference in find_victim
find_victim can dereference a NULL pointer when iterating over the list
of victim spus because list_mutex only guarantees spu->ct to be stable,
but of course not to be non-NULL.

Also fix find_victim to not call spu_unbind_context without list_mutex
because that violates the above guarantee.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-19 15:26:29 +10:00
Rui Sousa 4f6627ac3b [ARM] 4568/1: fix l2x0 cache invalidate handling of unaligned addresses
The l2x0_inv_range() function doesn't handle unaligned addresses
correctly. It's necessary to clean the cache lines that are at the
start and end of the invalidate range, if the addresses are not aligned,
to prevent corruption of other data sharing the same cache line.

Signed-off-by: Rui Sousa <rui.p.m.sousa@gmail.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-09-17 14:56:39 +01:00
David S. Miller 8a177c4f17 [SPARC64]: Warn user if cpu is ignored.
When NR_CPUS is smaller than the cpu probed, let the user
know that the cpu won't be used.

Suggested by Al Viro.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-09-16 14:45:06 -07:00
David S. Miller 301feb6524 [SPARC64]: Fix lockdep, particularly on SMP.
As noted by Al Viro, when we try to call prom_set_trap_table()
in the SMP trampoline code we try to take the PROM call spinlock
which doesn't work because the current thread pointer isn't
valid yet and lockdep depends upon that being correct.

Furthermore, we cannot set the current thread pointer register
because it can't be properly dereferenced until we return from
prom_set_trap_table().  Kernel TLB misses only work after that
call.

So do the PROM call to set the trap table directly instead of
going through the OBP library C code, and thus avoid the lock
altogether.

These calls are guarenteed to be serialized fully.

Since there are now no calls to the prom_set_trap_table{_sun4v}()
library functions, they can be deleted.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-09-16 11:51:15 -07:00
David S. Miller 58ea1aa07e [SPARC64]: Update defconfig.
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-09-16 09:52:36 -07:00
Linus Torvalds 2605a103ca Merge git://git.linux-xtensa.org/kernel/xtensa-feed
* git://git.linux-xtensa.org/kernel/xtensa-feed:
  [patch 1/2] Xtensa: enable arbitary tty speed setting ioctls
  [patch 2/2] xtensa console.c: remove duplicate #include
  [XTENSA] Add support for cache-aliasing
  [XTENSA] Add kernel module support
  [XTENSA] Add support for executable/non-executable feature in the mmu
  [XTENSA] Use the generic version of get_order
  [XTENSA] Initialize semaphore_wake_lock
  [XTENSA] Add typecast macro for constants
  [XTENSA] Fix timer instabilities.
  [XTENSA] Fix fadvise64_64
  [XTENSA] Remove extraneous include statement
  [XTENSA] Move string-io functions to io.c from pci.c
  [XTENSA] Move pre-initialized structures to init_task.c
  [XTENSA] Add freestanding option to CFLAGS
  [XTENSA] Add getpgrp system-call to unistd.h
  [XTENSA] add missing system calls
  [XTENSA] fix wrong usage of __init and __initdata in traps.c
2007-09-14 17:07:33 -07:00
Linus Torvalds 53a3f3087b Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/cooloney/blackfin-2.6:
  Blackfin arch: fix some bugs in lib/string.h functions found by our string testing modules
  Blackfin arch: fix the aliased write macros
  Blackfin arch: Update/Fix PM support add new pm_ops valid
2007-09-14 14:04:13 -07:00
Linus Torvalds 6455c66a87 Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 4567/1: Fix 'Oops - undefined instruction' when CONFIG_VFP=y on non VFP device
  [ARM] realview: disable second GIC on RevB MPCore platforms
2007-09-14 14:02:04 -07:00
Ralf Baechle 50da469a79 [MIPS] 20Kc: Disable use of WAIT instruction.
Another issue with 20Kc's WAIT, waiting for more details.  With the
2.6.23 release immindent simply disable the use of WAIT instead of a
more fancy workaround.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-14 19:08:43 +01:00
Maciej W. Rozycki 8df5beac2a [MIPS] Workaround for 4Kc machine check exception
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-14 19:08:43 +01:00
Ralf Baechle 48d480b0bd [MIPS] Malta: Fix off by one bug in interrupt handler.
Fairly cosmetic as it would only affect VSMP / SMTC kernels that don't
use vectored interrupts.

Found by Beth.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-14 19:08:43 +01:00
Yoichi Yuasa b1043cc7d9 [MIPS] Add #include <linux/profile.h> to arch/mips/kernel/time.c
It refer to CPU_PROFILING.

arch/mips/kernel/time.c: In function 'local_timer_interrupt':
arch/mips/kernel/time.c:142: error: implicit declaration of function 'profile_tick'
arch/mips/kernel/time.c:142: error: 'CPU_PROFILING' undeclared (first use in this function)
arch/mips/kernel/time.c:142: error: (Each undeclared identifier is reported only once
arch/mips/kernel/time.c:142: error: for each function it appears in.)

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-14 19:08:42 +01:00
Johannes Dickgreber 82411390a2 [MIPS] N32 needs to use compat_sys_futimesat
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-14 19:08:42 +01:00
Ralf Baechle 4d24c8f955 [MIPS] rtlx: Fix build error.
CC      arch/mips/kernel/rtlx.o
cc1: warnings being treated as errors
arch/mips/kernel/rtlx.c:59: warning: 'irq' defined but not used
arch/mips/kernel/rtlx.c:60: warning: 'irq_num' defined but not used

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-14 19:08:42 +01:00
Ralf Baechle e606c109c4 [MIPS] rtlx: fix int vs. long bug.
CC      arch/mips/kernel/rtlx.o
arch/mips/kernel/rtlx.c: In function 'rtlx_init':
arch/mips/kernel/rtlx.c:114: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'long unsigned int'

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-14 19:08:42 +01:00
Tzachi Perelstein b9338a78fc [ARM] 4567/1: Fix 'Oops - undefined instruction' when CONFIG_VFP=y on non VFP device
vfp_init() takes care of the condition when CONFIG_VFP=y but no real VFP
device exists. However, when this condition is true, a compiler might
misplace code lines in a way that will break this support. (To be more
specific - fmrx(FPSID) might be executed before vfp_testing_entry
assignment, which will end up with Oops - undefined instruction).
This patch adds a barrier() to guarantee the right execution ordering.

Signed-off-by: Assaf Hoffman
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-09-13 15:10:27 +01:00
Russell King a53d6fb83e [ARM] realview: disable second GIC on RevB MPCore platforms
The second GIC asserts a permanent interrupt on Rev.B MPCore platforms.
Disable initialisation of this GIC to avoid unbootable systems.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-09-13 15:10:25 +01:00
Linus Torvalds c87ce65868 Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
  [POWERPC] Move serial_dev_init to device_initcall()
  [POWERPC] Enable GENERIC_ISA_DMA if FSL_ULI1575 to fix compile issue
  [POWERPC] cpm2: Fix off-by-one error in setbrg().
  [PPC] 8xx: Fix r3 trashing due to 8MB TLB page instantiation
  [POWERPC] 8{5,6}xx: Fix build issue with !CONFIG_PCI
2007-09-12 12:23:51 -07:00
Olof Johansson ee56c47440 [POWERPC] Move serial_dev_init to device_initcall()
With the I/O space rewrite by BenH, the legacy_serial serial_dev_init()
initcall is now called before I/O space is setup, but it's dependent on
it being available.

Since there's no way to make dependencies between initcalls, we'll just
have to move it to device_initcall(). Yes, it's suboptimal but I'm not
aware of any better solution at this time, and it fixes a regression
from 2.6.22.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-13 04:09:14 +10:00
Andi Kleen 9863b78a1a i386: Fix leak of ../kernel from top level
Fix a compile error when the directory above the kernel source contains
a file named "kernel".  Originally from Ben LaHaise, modified based on
feedback from Sam Ravnborg

Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Ben LaHaise <bcrl@kvack.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-12 09:28:06 -07:00
Andi Kleen 2966c6a03e x86_64: Prevent doing anything from cache_remove_dev() when info setup failed.
AK: Removed the unlikelies because gcc heuristics default to unlikely
AK: for test == NULL and for negative returns.

Cc: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-12 09:28:06 -07:00
Andi Kleen 95b0867996 x86_64: Add missing mask operation to vdso
vdso vgetns() didn't mask the time source offset calculation, which
could lead to time problems with 32bit HPET.  Add the masking.

Thanks to Chuck Ebbert for tracking this down.

Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-12 09:28:06 -07:00
Kumar Gala fb4f0e8832 [POWERPC] Enable GENERIC_ISA_DMA if FSL_ULI1575 to fix compile issue
Since the ULI1575 has a ISA bus we need to enable the generic ISA dma
support for drivers that might expect it.  Without this we get compile
errors like the following:

ound/built-in.o: In function `claim_dma_lock':
/home/galak/git/linux-8572/include/asm/dma.h:189: undefined reference to `dma_spin_lock'
/home/galak/git/linux-8572/include/asm/dma.h:189: undefined reference to `dma_spin_lock'
sound/built-in.o: In function `release_dma_lock':
/home/galak/git/linux-8572/include/asm/dma.h:195: undefined reference to `dma_spin_lock'
sound/built-in.o: In function `claim_dma_lock':
/home/galak/git/linux-8572/include/asm/dma.h:189: undefined reference to `dma_spin_lock'
/home/galak/git/linux-8572/include/asm/dma.h:189: undefined reference to `dma_spin_lock'
sound/built-in.o:/home/galak/git/linux-8572/include/asm/dma.h:195: more undefined references to `dma_spin_lock' follow
make: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-12 10:41:10 -05:00
David S. Miller 2cc7345ff7 [SPARC64]: Fix booting on V100 systems.
On the root PCI bus, the OBP device tree lists device 3 twice.
Once as 'pm' and once as 'lomp'.

Everything goes downhill from there.

Ignore the second instance to workaround this.

Thanks to Kövedi_Krisztián for the bug report and
testing the fix.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-09-12 10:15:59 +02:00
Andrew Morton 4150d3f549 revert "highmem: catch illegal nesting"
Revert

	commit 656dad312f
	Author: Ingo Molnar <mingo@elte.hu>
	Date:   Sat Feb 10 01:46:36 2007 -0800

	[PATCH] highmem: catch illegal nesting

	Catch illegally nested kmap_atomic()s even if the page that is mapped by
	the 'inner' instance is from lowmem.

	This avoids spuriously zapped kmap-atomic ptes and turns hard to find
	crashes into clear asserts at the bug site.

Problem is, a get_zeroed_page(GFP_KERNEL) from interrupt context will trigger
this check if non-irq code on this CPU holds a KM_USER0 mapping.  But that
get_zeroed_page() will never be altering the kmap slot anyway due to the
GFP_KERNEL.

Cc: Christoph Lameter <clameter@sgi.com>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-11 17:21:27 -07:00
Geert Uytterhoeven e845498e4c m68k(nommu): add missing syscalls
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-11 17:21:20 -07:00
Robert P. J. Day 693c10e6c1 H8/300: Fix misnamed "CONFIG_BLKDEV_RESERVE_ADDRESS" Kconfig variable
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Acked-by: Satyam Sharma <satyam@infradead.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-11 17:21:20 -07:00
Linus Torvalds af7b83f932 Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Fix aliasing bug in copy_user_highpage.
  [MIPS] IP22: fix wrong argument order
  [MIPS] IP22: Fix wrong check for second HPC
  [MIPS] Ocelot: remove remaining bits
  [MIPS] TLB: Fix instruction bitmasks
  [MIPS] R10000: Fix wrong test in dma-default.c
  [MIPS] Provide empty irq_enable_hazard definition for legacy and R1 cores.
  [MIPS] Sibyte: Remove broken dependency on EXPERIMENTAL from SIBYTE_SB1xxx_SOC.
  [MIPS] Kconfig: whitespace cleanup.
  [MIPS] PCI: Set need_domain_info if controller domain index is non-zero.
  [MIPS] BCM1480: Fix computation of interrupt mask address register.
  [MIPS] i8259: Add disable method.
  [MIPS] tty: add the new ioctls and definitions.
2007-09-11 14:47:53 -07:00
Ralf Baechle b868868ae0 [MIPS] Fix aliasing bug in copy_user_highpage.
Copy_user_highpage was written assuming it was only being called for
breaking COW pages in which case the source page isn't cached as in
marked cachable under it kernel virtual address.  If it is called anyway
the aliasing avoidance strategy implemented by kmap_coherent will fail.
Avoid the use of kmap_coherent for pages marked dirty and to avoid
another instance of this sort of bug, place a BUG_ON in kmap_coherent.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-11 19:03:26 +01:00
Thomas Bogendoerfer 01e9943c79 [MIPS] IP22: fix wrong argument order
Fix wrong argument order; this is just a minimal fix for the half baked
redadb/writeb() conversion.

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-11 19:03:26 +01:00
Thomas Bogendoerfer 0ba8bc60ca [MIPS] IP22: Fix wrong check for second HPC
Wrong check for the second hpc on fullhouse machines, caused DBEs on
SGI Indys

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-11 19:03:26 +01:00
Yoichi Yuasa 98f9085405 [MIPS] Ocelot: remove remaining bits
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-11 19:03:26 +01:00
Thiemo Seufer d6698a2cd6 [MIPS] TLB: Fix instruction bitmasks
Signed-Off-By: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-11 19:03:26 +01:00
Maxime Bizon 8bce4e9de1 [MIPS] R10000: Fix wrong test in dma-default.c
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-11 19:03:25 +01:00
Ralf Baechle 76e7f79950 [MIPS] Sibyte: Remove broken dependency on EXPERIMENTAL from SIBYTE_SB1xxx_SOC.
Otherwise Kconfig will produce a nonsenical .config for a kernel that is
neither 32-bit nor 64-bit.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-11 19:03:25 +01:00
Ralf Baechle ad015f41e1 [MIPS] Kconfig: whitespace cleanup.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-11 19:03:25 +01:00
Ralf Baechle 41f9c78c2e [MIPS] PCI: Set need_domain_info if controller domain index is non-zero.
This fixes this little funny:

bigsur:/proc/bus/pci# ls -l
total 0
dr-xr-xr-x    2 root     root            0 Aug 28 19:31 00
dr-xr-xr-x    2 root     root            0 Aug 28 19:31 00
dr-xr-xr-x    2 root     root            0 Aug 28 19:31 01
dr-xr-xr-x    2 root     root            0 Aug 28 19:31 03
-r--r--r--    1 root     root            0 Aug 28 19:31 devices

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-11 19:03:25 +01:00
Ralf Baechle 28e18a0f69 [MIPS] BCM1480: Fix computation of interrupt mask address register.
CC      arch/mips/sibyte/bcm1480/irq.o
arch/mips/sibyte/bcm1480/irq.c: In function 'bcm1480_mask_irq':
arch/mips/sibyte/bcm1480/irq.c:112: warning: cast to pointer from integer of different size
arch/mips/sibyte/bcm1480/irq.c:114: warning: cast to pointer from integer of different size
arch/mips/sibyte/bcm1480/irq.c: In function 'bcm1480_unmask_irq':
arch/mips/sibyte/bcm1480/irq.c:130: warning: cast to pointer from integer of different size
arch/mips/sibyte/bcm1480/irq.c:132: warning: cast to pointer from integer of different size

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-11 19:03:25 +01:00
Kyungmin Park 045e4bb2ba [MIPS] i8259: Add disable method.
After 76d2160147, the qemu NE2000 was
frequently producing WATCHDOG timeouts.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-11 19:03:25 +01:00
Jason Gaston 99fa9844f0 PCI: irq and pci_ids patch for Intel Tolapai
This patch adds the Intel Tolapai LPC and SMBus Controller DID's.

Signed-off-by: Jason Gaston <jason.d.gaston@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-09-11 04:22:17 -07:00
Ralf Baechle 4dd5bb9873 PCI: Remove __devinit from pcibios_get_irq_routing_table
pcibios_get_irq_routing_table is an exported symbol.  This results in a
modpost warning:

WARNING: vmlinux.o(.text+0xdca51): Section mismatch: reference to .init.text:pcibios_fixup_bus (between 'pci_scan_child_bus' and 'pci_scan_bus_parented')

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-09-11 04:22:16 -07:00
Daniel Walker d95865480d i386: fix a hang on stuck nmi watchdog
In the case when an nmi gets stucks the endflag stays equal to zero.
This causes the busy looping on other cpus to continue, even though the
nmi test is done.

On my machine with out the change below the system would hang right
after check_nmi_watchdog().  The change below just sets endflag prior to
checking if the test was successful or not.

Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-10 18:57:47 -07:00
Andi Kleen a534b67918 x86_64: Remove CLFLUSH in text_poke()
The CLFLUSH for the modified code line in text_poke was supposed
to speed up CPU recovery. Unfortunately it seems to cause hangs
on some VIA C3s (at least on VIA Esther Model 10 Stepping 9)
Remove it.

Thanks to Stefan Becker for reporting/testing.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-10 18:57:47 -07:00
Stephane Eranian 23d5ea5d3e i386: Fix perfctr watchdog on core duo
Fix the NMI watchdog on Intel CoreDuo processor where the kernel would
get stuck during boot.  The issue is related to errata AE49, where the
PERFEVTSEL1 counter does not have a working enable bit.  Thus it is not
possible to use it for NMI.

The patch creates a dedicated wd_ops for CoreDuo which falls back to
using PERFEVTSEL0.  The other Intel processors supporting the
architectural PMU will keep on using PERFEVTSEL1 as this allows other
subsystems, such as perfmon, to use PERFEVTSEL0 for PEBS monitoring in
particular.  Bug initially reported by Daniel Walker.

AK: Added comments

Signed-off-by: Stephane Eranian <eranian@hpl.hp.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-10 18:57:47 -07:00
Roland McGrath 7d94143291 Fix spurious syscall tracing after PTRACE_DETACH + PTRACE_ATTACH
When PTRACE_SYSCALL was used and then PTRACE_DETACH is used, the
TIF_SYSCALL_TRACE flag is left set on the formerly-traced task.  This
means that when a new tracer comes along and does PTRACE_ATTACH, it's
possible he gets a syscall tracing stop even though he's never used
PTRACE_SYSCALL.  This happens if the task was in the middle of a system
call when the second PTRACE_ATTACH was done.  The symptom is an
unexpected SIGTRAP when the tracer thinks that only SIGSTOP should have
been provoked by his ptrace calls so far.

A few machines already fixed this in ptrace_disable (i386, ia64, m68k).
But all other machines do not, and still have this bug.  On x86_64, this
constitutes a regression in IA32 compatibility support.

Since all machines now use TIF_SYSCALL_TRACE for this, I put the
clearing of TIF_SYSCALL_TRACE in the generic ptrace_detach code rather
than adding it to every other machine's ptrace_disable.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-09-10 18:57:47 -07:00
Linus Torvalds 897ee77bfb Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Ocelot: remove remaining bits
  [MIPS] TLB: Fix instruction bitmasks
  [MIPS] R10000: Fix wrong test in dma-default.c
  [MIPS] Provide empty irq_enable_hazard definition for legacy and R1 cores.
  [MIPS] Sibyte: Remove broken dependency on EXPERIMENTAL from SIBYTE_SB1xxx_SOC.
  [MIPS] Kconfig: whitespace cleanup.
  [MIPS] PCI: Set need_domain_info if controller domain index is non-zero.
  [MIPS] BCM1480: Fix computation of interrupt mask address register.
  [MIPS] i8259: Add disable method.
  [MIPS] tty: add the new ioctls and definitions.
2007-09-10 14:43:37 -07:00
Linus Torvalds b1a8d700e7 Merge branch 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev
* 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev:
  m32r: Rename STI/CLI macros
  m32r: build fix of entry.S
  m32r: Separate syscall table from entry.S
  m32r: Cosmetic updates of arch/m32r/kernel/entry.S
  m32r: Exit ei_handler directly for no IRQ case or IPI operations
  m32r: Simplify ei_handler code
  m32r: Define symbols to unify platform-dependent ICU checks
  m32r: Move dot.gdbinit files
  m32r: Rearrange platform-dependent codes
  m32r: Add defconfig file for the usrv platform.
  m32r: Update defconfig files for 2.6.23-rc1
  m32r: Move defconfig files to arch/m32r/configs/
2007-09-10 14:37:20 -07:00
Linus Torvalds 83dc3d43ce Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup:
  [x86 setup] Work around bug in Xen HVM
2007-09-10 14:35:55 -07:00
Scott Wood 83fcdb4b35 [POWERPC] cpm2: Fix off-by-one error in setbrg().
The hardware adds one to the BRG value to get the divider, so it must
be subtracted by software.  Without this patch, characters will occasionally
be corrupted.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-10 16:02:09 -05:00
Jochen Friedrich 36c50f729b [PPC] 8xx: Fix r3 trashing due to 8MB TLB page instantiation
Instantiation of 8MB pages on the TLB cache for the kernel static
mapping trashes r3 register on !CONFIG_8xx_CPU6 configurations.
This ensures r3 gets saved and restored.

This has been posted to linuxppc-embedded by Marcelo Tosatti
<marcelo@kvack.org>, but only an incomplete version of the patch
has been applied in c51e078f82.
This patch adds the rest of the fix.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-10 16:01:22 -05:00
Kumar Gala 2af8569dc9 [POWERPC] 8{5,6}xx: Fix build issue with !CONFIG_PCI
We needed some ifdef CONFIG_PCI protection for pcibios_fixup so we
can build !CONFIG_PCI.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-09-10 16:00:09 -05:00
Yoichi Yuasa 4386307465 [MIPS] Ocelot: remove remaining bits
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-10 21:25:28 +01:00
Thiemo Seufer 603c338bdd [MIPS] TLB: Fix instruction bitmasks
Signed-Off-By: Thiemo Seufer <ths@networkno.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-10 21:25:28 +01:00
Maxime Bizon d344dd52e5 [MIPS] R10000: Fix wrong test in dma-default.c
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-10 21:25:28 +01:00
Ralf Baechle 2e4dafd5d1 [MIPS] Sibyte: Remove broken dependency on EXPERIMENTAL from SIBYTE_SB1xxx_SOC.
Otherwise Kconfig will produce a nonsenical .config for a kernel that is
neither 32-bit nor 64-bit.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-10 21:25:28 +01:00
Ralf Baechle 9308816c9f [MIPS] Kconfig: whitespace cleanup.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-10 21:25:28 +01:00
Ralf Baechle d4ef9dd33d [MIPS] PCI: Set need_domain_info if controller domain index is non-zero.
This fixes this little funny:

bigsur:/proc/bus/pci# ls -l
total 0
dr-xr-xr-x    2 root     root            0 Aug 28 19:31 00
dr-xr-xr-x    2 root     root            0 Aug 28 19:31 00
dr-xr-xr-x    2 root     root            0 Aug 28 19:31 01
dr-xr-xr-x    2 root     root            0 Aug 28 19:31 03
-r--r--r--    1 root     root            0 Aug 28 19:31 devices

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-10 21:25:28 +01:00
Ralf Baechle fbd0ed37c8 [MIPS] BCM1480: Fix computation of interrupt mask address register.
CC      arch/mips/sibyte/bcm1480/irq.o
arch/mips/sibyte/bcm1480/irq.c: In function 'bcm1480_mask_irq':
arch/mips/sibyte/bcm1480/irq.c:112: warning: cast to pointer from integer of different size
arch/mips/sibyte/bcm1480/irq.c:114: warning: cast to pointer from integer of different size
arch/mips/sibyte/bcm1480/irq.c: In function 'bcm1480_unmask_irq':
arch/mips/sibyte/bcm1480/irq.c:130: warning: cast to pointer from integer of different size
arch/mips/sibyte/bcm1480/irq.c:132: warning: cast to pointer from integer of different size

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-10 21:25:27 +01:00
Kyungmin Park d77a283d9b [MIPS] i8259: Add disable method.
After 76d2160147, the qemu NE2000 was
frequently producing WATCHDOG timeouts.

Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-09-10 21:25:27 +01:00
Joachim Fenkes d8612417b2 [POWERPC] ibmebus: Prevent bus_id collisions
Previously, ibmebus derived a device's bus_id from its location code.
The location code is not guaranteed to be unique, so we might get bus_id
collisions if two devices share the same location code.  The OFDT
full_name, however, is unique, so we use that instead (truncating it
on the left if it is too long).

Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-11 04:30:37 +10:00
Geert Uytterhoeven d51dd3de87 [POWERPC] cell/PS3: Ignore storage devices that are still being probed
On PS3, A storage device may show up in the repository before the hypervisor
has finished probing:
  - If its type is not yet known, it shows up as PS3_DEV_TYPE_STOR_DUMMY,
  - If its regions are being probed, it shows up as having zero regions.
If any of these happen, consider the device not yet present.  The storage
probe thread will retry later.

This fixes the timing-dependent problem where a kernel booted from FLASH ROM
sometimes cannot find the hard disk.

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-11 04:30:37 +10:00
Jeremy Kerr ef8034d01a [POWERPC] cell/PS3: Always set master run control bit in mfc_sr1_set
At present, running any SPE program on the ps3 will trigger a BUG_ON
when spufs_run_spu tries to clear the master run control bit, as lv1
does not make the master run control available to Linux.

This change makes SPE apps work again by disabling changes to the
master run control on PS3.  Although we don't have the facility to
disable a SPE with supervisor-level privileges, it's better than
hitting the BUG_ON unconditionally.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Acked-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-11 04:30:36 +10:00
Masato Noguchi b7f90a406f [POWERPC] cell/PS3: Fix a bug that causes the PS3 to hang on the SPU Class 0 interrupt.
The Cell BE Architecture spec states that the SPU MFC Class 0 interrupt
is edge-triggered.  The current spu interrupt handler assumes this
behavior and does not clear the interrupt status.

The PS3 hypervisor visualizes all SPU interrupts as level, and on return
from the interrupt handler the hypervisor will deliver a new virtual
interrupt for any unmasked interrupts which for which the status has not
been cleared.  This fix clears the interrupt status in the interrupt
handler.

Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-09-11 04:30:36 +10:00
Hirokazu Takata 7071b2914a m32r: Rename STI/CLI macros
The names of STI and CLI macros were derived from i386 arch historically,
but their name are incomprehensible.
So, for easy to understand, rename these macros to ENABLE_INTERRUPTS
and DISABLE_INTERRUPTS, respectively.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2007-09-06 11:10:56 +09:00
Hirokazu Takata 33205613cd m32r: build fix of entry.S
This patch fixes the following compile error:
<--  snip  -->
 ...
  AS      arch/m32r/kernel/entry.o
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc3-mm1/arch/m32r/kernel/entry.S: Assembler messages:
/home/bunk/linux/kernel-2.6/linux-2.6.23-rc3-mm1/arch/m32r/kernel/entry.S:358: Error: bad instruction `addi r0,#(((((0)+(64))+(32))+(32)))'
make[2]: *** [arch/m32r/kernel/entry.o] Error 1
<--  snip  -->

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: Adrian Bunk <bunk@kernel.org>
2007-09-06 11:09:20 +09:00
Christian Ehrhardt ce29a1f8bd [x86 setup] Work around bug in Xen HVM
Apparently XEN does not keep the contents of the 48-bit gdt_48 data
structure that is passed to lgdt in the XEN machine state. Instead it
appears to save the _address_ of the 48-bit descriptor
somewhere. Unfortunately this data happens to reside on the stack and
is probably no longer availiable at the time of the actual protected
mode jump.

This is Xen bug but given that there is a one-line patch to work
around this problem, the linux kernel should probably do this.  My fix
is to make the gdt_48 description in setup_gdt static (in setup_idt
this is already the case). This allows the kernel to boot under
Xen HVM again.

Signed-off-by: Christian Ehrhardt <lk@c--e.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-09-05 02:37:57 +01:00
Linus Torvalds ea3c4b126a Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2007-09-04 00:43:57 -07:00
Hirokazu Takata 9990b48a40 m32r: Separate syscall table from entry.S
- Separate sys_call_table from arch/m32r/kernel/entry.S and
  move it to arch/m32r/kernel/system_call.S.
- Change sys_call_table section from .data to .rodata.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2007-09-03 11:30:19 +09:00
Hirokazu Takata de2232edb8 m32r: Cosmetic updates of arch/m32r/kernel/entry.S
- Remove unused symbols *_MASK
- Change indentation of comments, etc.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2007-09-03 11:30:19 +09:00
Hirokazu Takata abd0a78235 m32r: Exit ei_handler directly for no IRQ case or IPI operations
If no IRQ request is found in the IRQ check of ei_handler,
we can exit directly by jumping "restore_all", instead of via
"ret_from_intr".

This modification is also likely effective for IPI operations,
because scheduler call never happen at the exit of IPIs.

Signed-off-by: Hitoshi Yamamoto <hitoshiy@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2007-09-03 11:30:18 +09:00
Hirokazu Takata 5171b10051 m32r: Simplify ei_handler code
Simplify and clean up messy ei_handler code in arch/m32r/kernel/entry.S.
- Remove ifdef's for CONFIG_CHIP_* configulations.
- Rearrange the M32700 workaround code.
- Remove the messy platform-dependent interrupt check routines and
  consolidate them to common INT0/INT1/INT2 check routines for all
  platforms with cascaded interrupt controllers.

Signed-off-by: Hitoshi Yamamoto <hitoshiy@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2007-09-03 11:30:18 +09:00
Hirokazu Takata e070fb743d m32r: Define symbols to unify platform-dependent ICU checks
On some m32r platforms, cascaded ICUs are used.
This patch is required to simplify ei_handler and consolidate platform-
dependent ICU check routines.

  platform       ICU/INT1  ICU/INT0  ICU/INT2
 --------------  --------  --------  --------
  m32104ut        o         -         -
  m32700ut        o         o         o
  opsput          o         o         o
  usrv            o         -         -
  (others)        -         -         -

Signed-off-by: Hitoshi Yamamoto <hitoshiy@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2007-09-03 11:30:18 +09:00
Hirokazu Takata ef64cf605d m32r: Move dot.gdbinit files
Move dot.gdbinit files from arch/m32r/{platforms}/dot.gdbinit*
to arch/m32r/platforms/{platform}/.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2007-09-03 11:30:18 +09:00
Hirokazu Takata 3264f976d3 m32r: Rearrange platform-dependent codes
Rearrange platform-dependent codes from arch/m32r/kernel/*.c
to arch/m32r/platforms/{platform}/.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2007-09-03 11:30:18 +09:00
Hirokazu Takata e6a7ba7efd m32r: Add defconfig file for the usrv platform.
Add usrv_defcofig file for the usrv (M32R MicroServer) platform.

  platform    defconfig                 Note
 ----------  ----------------------    ---------------------------
  usrv        usrv_defconfig            SMP

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2007-09-03 11:30:18 +09:00
Hirokazu Takata 9716e886aa m32r: Update defconfig files for 2.6.23-rc1
Update defconfig files for 2.6.23-rc1 in arch/m32r/configs/.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2007-09-03 11:30:18 +09:00
Hirokazu Takata 8ff262df2c m32r: Move defconfig files to arch/m32r/configs/
Change defconfig file's location from arch/m32r/{platform}/defconfig*
to arch/m32r/configs/{platform}_defconfig.

Applying this patch, we can use defconfig file for each m32r platform
easily, like other architectures.

  ex. Setup defconfig for cross-building
    $ make ARCH=m32r CROSS_COMPILE=m32r-linux-gnu- {platform}_defconfig.

  platform    defconfig                 Note
 ----------  ----------------------    ---------------------------
  m32104ut    m32104ut_defconfig        MMU-less
  m32700ut    m32700ut.smp_defconfig    SMP
  m32700ut    m32700ut.up_defconfig     UP
  mappi       mappi.smp_defconfig       SMP
  mappi       mappi.up_defconfig        UP
  mappi       mappi.nommu_defconfig     MMU-less
  mappi2      mappi2.opsp_defconfig     FPGA env. (CPU Core: OPSP)
  mappi2      mappi2.vdec2_defconfig    FPGA env. (CPU Core: VDEC2)
  mappi3      imappi3.smp_defconfig     SMP
  oaks32r     oaks32r_defconfig         MMU-less
  opsput      opsput_defconfig          UP

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
2007-09-03 11:30:18 +09:00
Peter Chubb 7b3166dbc3 [IA64] Cleanup HPSIM code (was: Re: Enable early console for Ski simulator)
After my last patch we have a new header file for HP simulator use.
Here's code to use it for stuff that used to have `extern' statements
inline in the code.  Functionality should not change with this patch.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-09-01 02:52:25 -07:00
Peter Chubb 8b713c67bc [IA64] Enable early console for Ski simulator
This patch cleans up the `enable early console for SKI' patch
(471e7a4484), and
1. potentially allows the gensparse_defconfig to work again.
   (there are other problems running a generic kernel on Ski)
2. fixes the `console registered twice' problem.
3. Cleans up the code by moving the `extern hpsim_cons' declaration to
   a new asm/hpsim.h file.

Thanks to Jes for comments.

Signed-off-by: Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-09-01 02:50:39 -07:00
Prarit Bhargava 99a19cf1c0 [IA64] Stop bogus NMI & softlockup warnings in ia64 show_mem
When dumping memory via sysrq-m it is possible to take a bogus NMI watchdog
or softlockup watchdog because the dump can take a long time on big memory
systems.

Occasionally tickle the watchdog when doing the dump.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-09-01 02:50:21 -07:00