1
0
Fork 0
Commit Graph

3861 Commits (de59cf9ed44f64991e52a9de6094729537f0420c)

Author SHA1 Message Date
Olof Johansson ca507eaf32 [PATCH] powerpc: remove redundant code in stab init
There's never been a hardware platform that has both pSeries/RPA LPAR
hypervisor and stab (pre-POWER4 segment management). This removes
the redundant code in stab_initalize().

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-05 15:41:35 +11:00
Paul Mackerras b6d78157ad ppc: Build in all three of powermac, PREP and CHRP support
This reverts commit da0825fd20, making
it so that if you select CONFIG_PPC_MULTIPLATFORM you get support
for PMAC, PREP and CHRP built in.

The reason for not allowing PMAC, PREP and CHRP to be selected
individually for ARCH=ppc is that there is too much interdependency
between them in the platform support code.  For example, CHRP uses
the PMAC nvram code.

Configuring with ARCH=powerpc does allow you to select support for
PMAC and CHRP separately.  Support for PREP is not there yet but
should be there soon.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-05 14:39:53 +11:00
Paul Mackerras 6fbb618f5d powerpc/pseries: Optimize IOMMU setup
The previous commit will use the page-at-a-time hypervisor call for
setting up IOMMU entries when we are using 64k pages and setting up
one 64k page, even though that means 16 calls to the hypervisor, since
the hypervisor still works on 4k pages.  This optimizes this case by
using the multi-page IOMMU setup hypervisor call instead.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-05 14:19:10 +11:00
Tony Luck 885da19e80 [IA64] refresh tiger_defconfig ready for 2.6.15
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-02 16:18:42 -08:00
Robin Holt 1448652a54 [IA64] Updates to the sn2_defconfig for 2.6.15.
This updates the sn2_defconfig file for the Altix 330 hardware, enables
the AGP graphics for the SGI Prism, and removes prompts for the remainder
of the new features.  Greg Edwards reviewed the changes.

Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Greg Edwards <edwardsg@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-02 13:32:44 -08:00
Olaf Hering e8a167accb [PATCH] powerpc: correct the NR_CPUS description text
Update the help text to match the allowed range.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-02 14:51:35 +11:00
Michal Ostrowski cc8b5c96a7 [PATCH] powerpc/pseries: Fix TCE building with 64k pagesize
Must adjust tcenum and npages by TCE_PAGE_FACTOR to convert between
64KB pages and TCE (4K) pages.  (This is done in other places, except
for this one location.)

Signed-off-by: Michal Ostrowski <mostrows at watson ibm com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-02 14:51:22 +11:00
Linus Torvalds ca98f825ea Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-12-01 15:53:33 -08:00
Linus Torvalds b67c26e4fc Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2005-12-01 15:52:58 -08:00
Eugene Surovegin 5c72c34371 [PATCH] ppc32: fix treeboot image entrypoint
Correctly specify treeboot based image entrypoint.  Currently makefile uses
$(ENTRYPOINT) which isn't defined anywhere.  Each board port sets
entrypoint-$(CONFIG_BOARD_NAME) instead.

Without this patch I cannot boot Ocotea (PPC440GX eval board) anymore.  I
was getting random "OS panic" errors from OpenBIOS for a while, but with
current kernel I get them all the time (probably because image became
bigger).

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
Acked-by: Tom Rini <trini@kernel.crashing.org>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-01 15:48:56 -08:00
Vitaly Bordug 42ea0d0378 [PATCH] ppc32: Fix incorrect PCI frequency value
The time to wait after deasserting PCI_RST has been counted with incorrect
value - this patch fixes the issue.

Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-01 15:48:56 -08:00
Richard Purdie 08af295ba4 [ARM] 3188/1: Add missing i2c dependency for Akita
Patch from Richard Purdie

Akita requires inbuilt kernel i2c support for its GPIOs. Add this
requirement to Kconfig and update the defconfig to match.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-01 15:52:47 +00:00
Jeff Hansen a35d6c91b8 [ARM] Fix IXDP425 setup bug
There is a typo in the ARM IXDP425 setup definition that mistakenly tries
to use UART1's IRQ for UART2's traffic.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-01 15:50:35 +00:00
Ralf Baechle 80b42598ee [MIPS] Update defconfigs to reflect Kconfig changes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01 11:05:19 +00:00
Ralf Baechle 85b0549602 [MIPS] Avoid duplicate do_syscall_trace calls on return from sigreturn.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01 11:05:18 +00:00
Ralf Baechle 04a7052c83 [MIPS] Fix register handling in syscalls when debugging.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01 11:05:17 +00:00
Ralf Baechle ecd5a73904 [MIPS] Alchemy: Set board type on initialization.
From Sergei Shtylylov <sshtylyov@ru.mvista.com>.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01 11:05:16 +00:00
Ralf Baechle dea91002d4 [MIPS] Alchemy: Fix BCSR accesses.
Fixes BCSR accesses in the board setup/reset code.  The registers are
actually 16-bit, and their addresses are different between DBAu1550 and
other DBAu1xx0 boards.
    
From Sergei Shtylylov <sshtylyov@ru.mvista.com>.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01 11:05:16 +00:00
Ralf Baechle edcb98d1db [MIPS] Fix return path of sysmips(MIPS_ATOMIC_SET, ...)
The way we were doing things does no longer work on 2.6.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01 11:05:15 +00:00
Ralf Baechle fe3d72858c [MIPS] Qemu: Accept kernel command line passed by the Emulator.
From Daniel Jacobowitz <dan@debian.org>.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01 11:05:15 +00:00
Daniel Jacobowitz 56ebd51bae [MIPS] Generate SIGILL again
The rdhwr emulation accidentally swallowed the SIGILL from most other
illegal instructions.  Make sure to return -EFAULT by default.
    
Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01 11:05:14 +00:00
Ralf Baechle b6c3539bdd [MIPS] Kconfig: Include init/Kconfig after we've set 32BIT / 64BIT.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01 11:05:14 +00:00
Ralf Baechle d981733aaf [MIPS] Use reset_page_mapcount to initialize empty_zero_page usage counter.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01 11:05:13 +00:00
Ralf Baechle 8b36612a23 [MIPS] R10000 and R12000 need to set MIPS_CPU_4K_CACHE ...
... because they have R4000-style caches.
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01 11:05:12 +00:00
Ralf Baechle 380b92537c [MIPS] JMR3927: Declare puts function.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01 11:05:11 +00:00
Sergei Shtylylov 702a96a62b [MIPS] JMR3927 fixes.
o Check if IRQ is disabled or in progress before reenabling interrupts
   in jmr3927_irq_end..
 o s/spinlock_irqsave/spin_lock_irqsave/
 o s/spinlock_irqrestore/spin_unlock_irqrestore/
 o Flush write buffer after setting IRQ mask
 o In 2.6 jmr3927_ioc_interrupt interrupt handlers return irqreturn_t
    
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01 11:05:10 +00:00
Gabriel A. Devenyi d4921914de [PATCH] cpufreq-nforce2.c fix u32<0 test
Thanks to LinuxICC (http://linuxicc.sf.net), a comparison of a u32 less
than 0 was found, this patch changes the variable to a signed int so that
comparison is meaningful.

Signed-off-by: Gabriel A. Devenyi <ace@staticwave.ca>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2005-12-01 01:23:24 -08:00
David Shaohua Li e6e87b4bfe [ACPI] properly detect pmtimer on ASUS a8v motherboard
Handle FADT 2.0 xpmtmr address 0 case.

http://bugzilla.kernel.org/show_bug.cgi?id=5283

Signed-off-by: Shaohua Li<shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-11-30 22:27:16 -05:00
Dave Jones 6df8900676 [CPUFREQ] Fix indentation in powernow-k8
Signed-off-by: Dave Jones <davej@redhat.com>
2005-11-30 13:33:30 -08:00
Russell King df2f5e721e [ARM SMP] Disable lazy flush_dcache_page for SMP
Lazy flush_dcache_page() causes userspace instability on SMP
platforms, so disable it for now.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-30 16:02:54 +00:00
Linus Torvalds d2ef5ebb4c Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc-merge 2005-11-29 20:17:08 -08:00
Shaohua Li fe655d3a06 [PATCH] setting irq affinity is broken in ia32 with MSI enabled
Setting irq affinity stops working when MSI is enabled.  With MSI, move_irq
is empty, so we can't change irq affinity.  It appears a typo in Ashok's
original commit for this issue.  X86_64 actually is using move_native_irq.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-29 19:47:04 -08:00
Paolo Galtieri 9f232a125b [PATCH] ppc: fix floating point register corruption
I recently discovered a bug on PPC which causes the floating point
registers to get corrupted when CONFIG_PREEMPT=y.

The problem occurred while running a multi threaded Java application that
does floating point.  The problem could be reproduced in anywhere from 2 to
6 hours.  With the patch I have included below it ran for over a week
without failure.

Signed-off-by: Paolo Galtieri <pgaltieri@mvista.com>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Tom Rini <trini@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-29 19:47:03 -08:00
Thierry Vignaud d91b14c463 [PATCH] fix rebooting on HP nc6120 laptop
Anne NICOLAS <anne.nicolas@mandriva.com> and Andres Kaaber
<andres.kaaber@rescue.ee> reported their HP laptop didn't reboot smoothly.

Signed-off-by: Thierry Vignaud <tvignaud@mandriva.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-29 19:47:03 -08:00
Olaf Hering ed1189b7e8 [PATCH] powerpc: prevent stack corruption in call_prom_ret
Use the correct pointer to clear the memory of the return values,
to prevent stack corruption in the callers stackframe.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-30 13:55:59 +11:00
Paul Mackerras 48abec07cf powerpc: Fix bug causing FP registers corruption on UP + preempt
This fixes a bug noticed by Paolo Galtieri and fixed for ARCH=ppc in
the previous commit (ppc: fix floating point register corruption).
This fixes the arch/powerpc code by adding preempt_disable/enable,
and also cleans it up a bit by pulling out the code that discards
any lazily-switched CPU register state into a new function, rather
than having that code repeated in three places.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-30 13:20:54 +11:00
Paolo Galtieri 8117ce76c2 [PATCH] ppc: fix floating point register corruption
I recently discovered a bug on PPC which causes the floating point
registers to get corrupted when CONFIG_PREEMPT=y.

The problem occurred while running a multi threaded Java application that
does floating point.  The problem could be reproduced in anywhere from 2 to
6 hours.  With the patch I have included below it ran for over a week
without failure.

Signed-off-by: Paolo Galtieri <pgaltieri@mvista.com>
Cc: Kumar Gala <galak@gate.crashing.org>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Tom Rini <trini@kernel.crashing.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-30 13:17:05 +11:00
Linus Torvalds 2f12c74f0c Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2005-11-29 14:23:38 -08:00
Linus Torvalds 92af254a1b Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2005-11-29 14:23:21 -08:00
David S. Miller cab3f16feb [SPARC64]: Fix >8K I/O mappings.
Increment the PFN field of the PTE so that the tests
on vm_pfn in mm/memory.c match up.  The TLB ignores these
lower bits for larger page sizes, so it's OK to set things
like this.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-29 13:59:03 -08:00
Dave Jones be37bdbce7 Merge ../linus 2005-11-29 12:48:34 -08:00
Langsdorf, Mark 019a61b993 [PATCH] Support 100 MHz frequency transitions
Future versions of the Opteron processor may support
frequency transitions of 100 MHz, instead of the=20
current 200 MHz.  This patch enables the powernow-k8
driver to transition to an odd FID code, indicating
a multiple of 100 MHz frequency.

Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2005-11-29 12:46:07 -08:00
Keshavamurthy Anil S 5a94bcfd2a [IA64] Remove getting break_num by decoding instruction
break.b always sets cr.iim to 0 and the current code tries to
get the break_num by decoding instruction. However, their
seems to be a race condition while reading the regs->cr_iip,
as on other cpu the break.b at regs->cr_iip might have been
replaced with the original instruction as a result of
unregister_kprobe() and hence decoding instruction to
obtain break_num will result in wrong value in this case.

Also includes changes to kprobes.c which now has to handle
break number zero.

Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-29 09:24:39 -08:00
Dean Roe b77dae5293 [IA64] - Make pfn_valid more precise for SGI Altix systems
A single SGI Altix system can be divided into multiple partitions,
each running their own instance of the Linux kernel.  pfn_valid()
is currently not optimal for any but the first partition, since it
does not compare the pfn with min_low_pfn before calling the more
costly ia64_pfn_valid().

Signed-off-by: Dean Roe <roe@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-29 09:24:10 -08:00
Paul Mackerras 666acb94d1 powerpc: Export __flush_icache_range for 32-bit
Both 32-bit and 64-bit use the same inline flush_icache_range definition
now, so both need to export __flush_icache_range, not just 64-bit.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-29 15:50:58 +11:00
Otavio Salvador 0e2d94f6a0 [PATCH] ppc: Export symbol needed by MOL
Export symbol needed to allow MOL to run. This was changed to be inline
in past and forgot to be change here.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-29 13:23:28 +11:00
Linus Torvalds 89a1623df6 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-11-28 15:02:30 -08:00
Hirokazu Takata ad09d58310 [PATCH] m32r: M3A-2170(Mappi-III) IDE support
This patch is for supporting IDE interface for M3A-2170(Mappi-III) board.

Signed-off-by: Mamoru Sakugawa <sakugawa@linux-m32r.org>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-28 14:42:24 -08:00
Hirokazu Takata 91f4ab056d [PATCH] m32r: Fix sys_tas() syscall
This patch fixes a deadlock problem of the m32r SMP kernel.

In the m32r kernel, sys_tas() system call is provided as a test-and-set
function for userspace, for backward compatibility.

In some multi-threading application program, deadlocks were rarely caused
at sys_tas() funcion.  Such a deadlock was caused due to a collision of
__pthread_lock() and __pthread_unlock() operations.

The "tas" syscall is repeatedly called by pthread_mutex_lock() to get a
lock, while a lock variable's value is not 0.  On the other hand,
pthead_mutex_unlock() sets the lock variable to 0 for unlocking.

In the previous implementation of sys_tas() routine, there was a
possibility that a unlock operation was ignored in the following case:

- Assume a lock variable (*addr) was equal to 1 before sys_tas() execution.
- __pthread_unlock() operation is executed by the other processor
  and the lock variable (*addr) is set to 0, between a read operation
  ("oldval = *addr;") and the following write operation ("*addr = 1;")
  during a execution of sys_tas().

In this case, the following write operation ("*addr = 1;") overwrites the
__pthread_unlock() result, and sys_tas() fails to get a lock in the next
turn and after that.

According to the attatched patch, sys_tas() returns 0 value in the next
turn and deadlocks never happen.

Signed-off-by: Hitoshi Yamamoto <Yamamoto.Hitoshi@ap.MitsubishiElectric.co.jp>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-28 14:42:24 -08:00
David Howells 8080f23122 [PATCH] FRV: Make the FRV arch work again
The attached patch implements a bunch of small changes to the FRV arch to
make it work again.

It deals with the following problems:

 (1) SEM_DEBUG should be SEMAPHORE_DEBUG.

 (2) The argument list to pcibios_penalize_isa_irq() has changed.

 (3) CONFIG_HIGHMEM can't be used directly in #if as it may not be defined.

 (4) page->private is no longer directly accessible.

 (5) linux/hardirq.h assumes asm/hardirq.h will include linux/irq.h

 (6) The IDE MMIO access functions are given pointers, not integers, and so
     get type casting errors.

 (7) __pa() is passed an explicit u64 type in drivers/char/mem.c, but that
     can't be cast directly to a pointer on a 32-bit platform.

 (8) SEMAPHORE_DEBUG should not be contingent on WAITQUEUE_DEBUG as that no
     longer exists.

 (9) PREEMPT_ACTIVE is too low a value.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-28 14:42:23 -08:00
David S. Miller 5cd9194a1b [PATCH] sparc: convert IO remapping to VM_PFNMAP
Here are the Sparc bits.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-28 14:35:36 -08:00
Linus Torvalds 6aab341e0a mm: re-architect the VM_UNPAGED logic
This replaces the (in my opinion horrible) VM_UNMAPPED logic with very
explicit support for a "remapped page range" aka VM_PFNMAP.  It allows a
VM area to contain an arbitrary range of page table entries that the VM
never touches, and never considers to be normal pages.

Any user of "remap_pfn_range()" automatically gets this new
functionality, and doesn't even have to mark the pages reserved or
indeed mark them any other way.  It just works.  As a side effect, doing
mmap() on /dev/mem works for arbitrary ranges.

Sparc update from David in the next commit.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-28 14:34:23 -08:00
Richard Purdie 0e1637420e [ARM] 3180/1: Update Zaurus defconfigs
Patch from Richard Purdie

This updates the Zaurus defconfigs. Poodle gets merged into
corgi_defconfig and support for tosa and akita is enabled.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-28 18:08:45 +00:00
Richard Purdie 243077f58f [ARM] 3179/1: Update/correct Zaurus Kconfig entries
Patch from Richard Purdie

Add iWMMX Extentions for the pxa27x based Zaurus models and
fix a couple of minor mistakes in the PXA Kconfig file.

Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-28 18:08:44 +00:00
Russell King 79a558ffba [ARM] Update mach-types
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-25 15:59:01 +00:00
Russell King 9f22090780 [ARM] Realview core.c does not need mach-types.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-25 15:57:21 +00:00
Russell King 5edf71ae12 [ARM] Do not call flush_tlb_kernel_range() with IRQs disabled.
We must not call TLB maintainence operations with interrupts disabled,
otherwise we risk a lockup in the SMP IPI code.

This means that consistent_free() can not be called from a context with
IRQs disabled.  In addition, we must not hold the lock in consistent_free
when we call flush_tlb_kernel_range().  However, we must continue to
prevent consistent_alloc() from re-using the memory region until we've
finished tearing down the mapping and dealing with the TLB.

Therefore, leave the vm_region entry in the list, but mark it inactive
before dropping the lock and starting the tear-down process.  After the
mapping has been torn down, re-acquire the lock and remove the entry
from the list.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-25 15:52:51 +00:00
Russell King 3c0bdac387 [ARM] Remove mach-types.h from head.S
We don't really need to check whether the machine type is Netwinder
or CATS before setting up the PCI IO mapping for debugging.  This
allows us to eliminate asm/mach-types.h from head.S

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-25 15:43:22 +00:00
David Gibson 9a94c5793a [PATCH] powerpc: More hugepage boundary case fixes
Blah.  The patch [0] I recently sent fixing errors with
in_hugepage_area() and prepare_hugepage_range() for powerpc itself has
an off-by-one bug.  Furthermore, the related functions
touches_hugepage_*_range() and within_hugepage_*_range() are also
buggy.  Some of the bugs, like those addressed in [0] originated with
commit 7d24f0b8a5 where we tweaked the
semantics of where hugepages are allowed.  Other bugs have been there
essentially forever, and are due to the undefined behaviour of '<<'
with shift counts greater than the type width (LOW_ESID_MASK could
return non-zero for high ranges with the right congruences).

The good news is that I now have a testsuite which should pick up
things like this if they creep in again.

[0] "powerpc-fix-for-hugepage-areas-straddling-4gb-boundary"

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-25 22:12:45 +11:00
Paul Mackerras 26925c5910 Merge ../linux-2.6 2005-11-25 22:12:01 +11:00
Stephen Rothwell 55bb239e54 [PATCH] powerpc: remove arch/powerpc/include hack for 64 bit
With the removal of include/asm-powerpc, we no longer need
arch/powerpc/include/asm for the 64 bit build.  We also do not need
-Iarch/powerpc for the 64 bit build either.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-25 22:11:23 +11:00
Daniel Marjamäki cac1a29346 [PATCH] PCI: direct.c: DBG
The DBG() call where updated with the appropriate KERN_* symbol.

Signed-off-by: Daniel Marjamäki <daniel.marjamaki@comhem.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 23:04:27 -08:00
Rajesh Shah ed6d14f976 [PATCH] PCI: remove bogus resource collision error
When attempting to hotadd a PCI card with a bridge on it, I saw
the kernel reporting resource collision errors even when there were
really no collisions. The problem is that the code doesn't skip
over "invalid" resources with their resource type flag not set.
Others have reported similar problems at boot time and for
non-bridge PCI card hotplug too, where the code flags a
resource collision for disabled ROMs. This patch fixes both
problems.

Signed-off-by: Rajesh Shah <rajesh.shah@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 23:04:27 -08:00
Daniel Marjamäkia dcb890749b [PATCH] PCI: trivial printk updates in common.c
Modified common.c so it's using the appropriate KERN_* in printk() calls.

Signed-off-by: Daniel Marjamäkia <daniel.marjamaki@comhem.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 23:04:27 -08:00
David Gibson 5e391dc9e3 [PATCH] powerpc: fix for hugepage areas straddling 4GB boundary
Commit 7d24f0b8a5 fixed bugs in the ppc64 SLB
miss handler with respect to hugepage handling, and in the process tweaked
the semantics of the hugepage address masks in mm_context_t.

Unfortunately, it left out a couple of necessary changes to go with that
change.  First, the in_hugepage_area() macro was not updated to match,
second prepare_hugepage_range() was not updated to correctly handle
hugepages regions which straddled the 4GB point.

The latter appears only to cause process-hangs when attempting to map such
a region, but the former can cause oopses if a get_user_pages() is
triggered at the wrong point.  This patch addresses both bugs.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 16:08:39 -08:00
Jim Keniston 8bf1101bd5 [PATCH] kprobes: Fix return probes on sys_execve
Fix a bug in kprobes that can cause an Oops or even a crash when a return
probe is installed on one of the following functions: sys_execve,
do_execve, load_*_binary, flush_old_exec, or flush_thread.  The fix is to
remove the call to kprobe_flush_task() in flush_thread().  This fix has
been tested on all architectures for which the return-probes feature has
been implemented (i386, x86_64, ppc64, ia64).  Please apply.

BACKGROUND

Up to now, we have called kprobe_flush_task() under two situations: when a
task exits, and when it execs.  Flushing kretprobe_instances on exit is
correct because (a) do_exit() doesn't return, and (b) one or more
return-probed functions may be active when a task calls do_exit().  Neither
is the case for sys_execve() and its callees.

Initially, the mistaken call to kprobe_flush_task() on exec was harmless
because we put the "real" return address of each active probed function
back in the stack, just to be safe, when we recycled its
kretprobe_instance.  When support for ppc64 and ia64 was added, this safety
measure couldn't be employed, and was eventually dropped even for i386 and
x86_64.  sys_execve() and its callees were informally blacklisted for
return probes until this fix was developed.

Acked-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Signed-off-by: Jim Keniston <jkenisto@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 16:08:39 -08:00
Hugh Dickins 7ce774b480 [PATCH] mm: powerpc init_mm without ptlock
Restore an earlier mod which went missing in the powerpc reshuffle: the 4xx
mmu_mapin_ram does not need to take init_mm.page_table_lock.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 16:08:38 -08:00
Hugh Dickins 01edcd891c [PATCH] mm: powerpc ptlock comments
Update comments (only) on page_table_lock and mmap_sem in arch/powerpc.
Removed the comment on page_table_lock from hash_huge_page: since it's no
longer taking page_table_lock itself, it's irrelevant whether others are; but
how it is safe (even against huge file truncation?) I can't say.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-23 16:08:38 -08:00
Olof Johansson 91f14480a5 [PATCH] powerpc: update my email address
Email address update, changing old work address to personal (permanent)
one.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-23 21:23:20 +11:00
Hugh Dickins f3d48f0373 [PATCH] unpaged: fix sound Bad page states
Earlier I unifdefed PageCompound, so that snd_pcm_mmap_control_nopage and
others can give out a 0-order component of a higher-order page, which won't
be mistakenly freed when zap_pte_range unmaps it.  But many Bad page states
reported a PG_reserved was freed after all: I had missed that we need to
say __GFP_COMP to get compound page behaviour.

Some of these higher-order pages are allocated by snd_malloc_pages, some by
snd_malloc_dev_pages; or if SBUS, by sbus_alloc_consistent - but that has
no gfp arg, so add __GFP_COMP into its sparc32/64 implementations.

I'm still rather puzzled that DRM seems not to need a similar change.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:43 -08:00
Hugh Dickins 0b14c179a4 [PATCH] unpaged: VM_UNPAGED
Although we tend to associate VM_RESERVED with remap_pfn_range, quite a few
drivers set VM_RESERVED on areas which are then populated by nopage.  The
PageReserved removal in 2.6.15-rc1 changed VM_RESERVED not to free pages in
zap_pte_range, without changing those drivers not to set it: so their pages
just leak away.

Let's not change miscellaneous drivers now: introduce VM_UNPAGED at the core,
to flag the special areas where the ptes may have no struct page, or if they
have then it's not to be touched.  Replace most instances of VM_RESERVED in
core mm by VM_UNPAGED.  Force it on in remap_pfn_range, and the sparc and
sparc64 io_remap_pfn_range.

Revert addition of VM_RESERVED to powerpc vdso, it's not needed there.  Is it
needed anywhere?  It still governs the mm->reserved_vm statistic, and special
vmas not to be merged, and areas not to be core dumped; but could probably be
eliminated later (the drivers are probably specifying it because in 2.4 it
kept swapout off the vma, but in 2.6 we work from the LRU, which these pages
don't get on).

Use the VM_SHM slot for VM_UNPAGED, and define VM_SHM to 0: it serves no
purpose whatsoever, and should be removed from drivers when we clean up.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: William Irwin <wli@holomorphy.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:42 -08:00
Jeff Dike aa1a64ee12 [PATCH] uml: eliminate use of libc PAGE_SIZE
On some systems, libc PAGE_SIZE calls getpagesize, which can't happen from a
stub.  So, I use UM_KERN_PAGE_SIZE, which is less variable in its definition,
instead.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:41 -08:00
Jeff Dike 17d469715c [PATCH] uml: properly invoke x86_64 system calls
This patch makes stub_segv use the stub_syscall macros.  This was needed
anyway, but the bug that prompted this was the discovery that gcc was storing
stuff in RCX, which is trashed across a system call.  This is exactly the sort
of problem that the new macros fix.

There is a stub_syscall0 for getpid.  stub_segv was changed to be a libc file,
and that caused some include changes.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:41 -08:00
Jeff Dike e23181deec [PATCH] uml: eliminate anonymous union and clean up symlink lossage
This gives a name to the anonymous union introduced in skas-hold-own-ldt,
allowing to build on a wider range of gccs.

It also removes ldt.h, which somehow became real, and replaces it with a
symlink, and creates ldt-x86_64.h as a copy of ldt-i386.h for now.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:41 -08:00
Jeff Dike 39d730ab87 [PATCH] uml: eliminate use of local in clone stub
We have a bug in the i386 stub_syscall6 which pushes ebp before the system
call and pops it afterwards.  Because we use syscall6 to remap the stack, the
old contents of the stack (and the former value of ebp) are no longer
available.  Some versions of gcc make from a real local, accessed through ebp,
despite my efforts to make it obvious that references to from are really
constants.  This patch attempts to make it even more obvious by eliminating
from and using a macro to access the stub's data explicitly with constants.

My original thinking on this was to replace syscall6 with a remap_stack
interface which saved ebp someplace and restored it afterwards.  The problem
is that there are no registers to put it in, except for esp.  That could work,
since we can store a constant in esp after the mmap because we just replaced
the stack.  However, this approach seems a tad cleaner.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-22 09:13:41 -08:00
Linus Torvalds 66b5920f61 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-11-21 19:00:05 -08:00
Linus Torvalds 49bd96c2ca Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2005-11-21 17:44:56 -08:00
Russ Anderson ab2ff46a2d [IA64-SGI] bte_copy nasid_index fix
The nasid_index was not being incremented if the
pointer was null, causing an infinite loop.

Signed-off-by: Russ Anderson (rja@sgi.com)
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-21 14:19:36 -08:00
hawkes@sgi.com 090de0b77c [IA64] fix bug in sn/ia64 for sparse CPU numbering
The kernel's use of the for_each_*cpu(i) macros has allowed for sparse CPU
numbering.  When I hacked the kernel to test sparse cpu_present_map[] and
cpu_possible_map[] cpumasks, I discovered one remaining spot, in
sn_hwperf_ioctl() during sn initialization, that needs to be fixed.

Signed-off-by: John Hawkes <hawkes@sgi.com>
Signed-off-by: Dean Roe <roe@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-21 14:15:42 -08:00
Prarit Bhargava 9ad4f924ec [IA64] Prevent sn2 ptc code from executing on all ia64 subarches
Patch to prevent sn2_ptc_init code from attempting to load on non-sn2 systems
when sn2_smp.c is built-in to generic kernel.

Signed-off-by: Prarit Bhargava <prarit@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-21 14:13:31 -08:00
Russell King 9b73fcf85f [ARM] Shut up gcc warning in clps7500 core.c
core.c:263: warning: initialization makes integer from pointer without a cast

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-21 17:03:15 +00:00
Russell King 2f3eca8b4f [ARM] Shut up gcc warning in assabet.c
assabet.c:291: warning: 'scr' may be used uninitialized in this function

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-21 17:01:13 +00:00
Jacob Shin 8aae8284fe [CPUFREQ] Improve Error reporting in powernow-k8
This patch cleans up some error messages in the
powernow-k8 driver and makes them more understandable.

Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2005-11-21 07:23:08 -08:00
Dirk Opfer 067c90481a [ARM] 3170/1: Sharp SL-6000x: platform device conversion fixup
Patch from Dirk Opfer

Fix an error in tosa.c after the platform device conversion.

Signed-off-by: Dirk Opfer <Dirk@Opfer-Online.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-21 15:17:06 +00:00
Ashok Raj fbe83e209a [PATCH] Register disabled CPUs
Needed to make the earlier use disabled CPUs for CPU hotplug patch
actually work.

Need to register disabled processors as well, so we can count them
towards cpu_possible_map as hot pluggable cpus.

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-20 11:52:59 -08:00
Andi Kleen d7169160bb [PATCH] i386: Use bigsmp for > 8 core Opteron systems
bigsmp is reported to work on large Opteron systems on 32bit too.
Enable it by default there.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-20 11:52:59 -08:00
Linus Torvalds 29ac878a71 Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-11-19 15:21:51 -08:00
Paul Mackerras 54c4e6b5fe powerpc: Fix bug in timebase synchronization on 32-bit SMP powermac
We were using udelay in the loop on the primary cpu waiting for the
secondary cpu to take the timebase value.  Unfortunately now that
udelay uses the timebase, and the timebase is stopped at this point,
the udelay never terminated.  This fixes it by not using udelay, and
increases the number of loops before we time out to compensate.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19 21:24:55 +11:00
Daniel Jacobowitz a6c61e9dfd [ARM] 3168/1: Update ARM signal delivery and masking
Patch from Daniel Jacobowitz

After delivering a signal (creating its stack frame) we must check for
additional pending unblocked signals before returning to userspace.
Otherwise signals may be delayed past the next syscall or reschedule.

Once that was fixed it became obvious that the ARM signal mask manipulation
was broken.  It was a little bit broken before the recent SA_NODEFER
changes, and then very broken after them.  We must block the requested
signals before starting the handler or the same signal can be delivered
again before the handler even gets a chance to run.

Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-19 10:01:07 +00:00
Paul Mackerras 21a6290220 powerpc: move include/asm-ppc64/ptrace-common.h to arch/powerpc/kernel
It's only used by arch/powerpc/kernel/ptrace{,32}.c.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19 20:47:22 +11:00
Paul Mackerras f8ef270596 powerpc: Merge pci.h
This involves some minor changes: a few unused functions that the
ppc32 pci.c provides are no longer declared here or exported;
pcibios_assign_all_busses now just refers to the pci_assign_all_buses
variable on both 32-bit and 64-bit; pcibios_scan_all_fns is now
just 0 instead of a function that always returns 0 on 64-bit.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19 20:46:04 +11:00
David Gibson 800fc3eeb0 [PATCH] powerpc: Remove imalloc.h
asm-ppc64/imalloc.h is only included from files in arch/powerpc/mm.
We already have a header for mm local definitions,
arch/powerpc/mm/mmu_decl.h.  Thus, this patch moves the contents of
imalloc.h into mmu_decl.h.  The only exception are the definitions of
PHBS_IO_BASE, IMALLOC_BASE and IMALLOC_END.  Those are moved into
pgtable.h, next to similar definitions of VMALLOC_START and
VMALLOC_SIZE.

Built for multiplatform 32bit and 64bit (ARCH=powerpc).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19 14:46:02 +11:00
Benjamin Herrenschmidt e53566409c [PATCH] powerpc: Fix setting MPIC priority
Trying to set the priority would just disable the interrupt due to an
incorrect mask used. We rarely use that call, in fact, I think only in
the powermac code for the cmd-power key combo that triggers xmon. So it
got unnoticed for a while.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19 14:19:13 +11:00
Kyle McMartin 2161558fa5 Merge branch 'master' 2005-11-18 16:39:20 -05:00
Linus Torvalds cdf2c465f0 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2005-11-18 09:27:05 -08:00
Linus Torvalds 2656c076e3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge 2005-11-18 07:22:51 -08:00
Russell King d2c5b69099 [ARM] Fix get_user when passed a const pointer
Unfortunately, later gcc versions error out when our get_user is passed
a const pointer, since we write to a temporary variable declared as
typeof(*(p)) which propagates the const-ness.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-18 14:22:03 +00:00
Paul Mackerras 8a5abdf80e powerpc: Move defconfig over and remove remaining arch/ppc64 files
make defconfig will now use arch/powerpc/configs/ppc64_defconfig
if running on a ppc64 system.  I need to add an
arch/powerpc/configs/ppc_defconfig sometime.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18 16:39:08 +11:00
Paul Mackerras 44aedfe7de powerpc: Fix a couple of compile warnings for 32-bit compiles
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18 15:54:12 +11:00
Paul Mackerras 49e16b7bec powerpc: time-of-day fixes for 32-bit CHRP systems
This makes 32-bit CHRP systems use the RTAS time-of-day routines if
available.  It fixes a bug in the RTAS time-of-day routines where they
were storing a 64-bit timebase value in an unsigned long by making
those variables u64.  Also, the direct-access time-of-day routines
had the wrong convention for the month and year in the struct rtc_time.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18 15:52:38 +11:00
Paul Mackerras 6146eed1e9 powerpc: Fix compile error on pSeries arising from delay.h changes
pseries_dedicated_idle() was using __get_tb which used to be defined
in asm/delay.h.  Change it to use get_tb from asm/time.h, which is
in fact exactly the same thing.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18 15:47:18 +11:00
Paul Mackerras 437a58db57 powerpc: Move remaining .c files from arch/ppc64 to arch/powerpc
This also deletes the now-unused Makefiles under arch/ppc64.

Both of the files moved over could use some merging, but for now I
have moved them as-is and arranged for them to be used only in 64-bit
kernels.  For 32-bit kernels we still use arch/ppc/kernel/idle.c and
drivers/char/generic_nvram.c as before.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18 15:43:34 +11:00
Mike Kravetz f62859bb68 [PATCH] Remove SPAN_OTHER_NODES config definition
The config option SPAN_OTHER_NODES was created so that we could
make pSeries numa layouts work within the DISCONTIG memory model.
Now that DISCONTIG has been replaced by SPARSEMEM, we can eliminate
this option.

I'll be sending a separate patch to Andrew to remove the arch
independent code as pSeries was the only arch that needed this.

Signed-off-by: Mike Kravetz <kravetz@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18 14:45:54 +11:00
Benjamin Herrenschmidt 5daf9071b5 [PATCH] powerpc: merge align.c
This patch merges align.c, the result isn't quite what was in ppc64 nor
what was in ppc32 :) It should implement all the functionalities of both
though. Kumar, since you played with that in the past, I suppose you
have some test cases for verifying that it works properly before I dig
out the 601 machine ? :)

Since it's likely that I won't be able to test all scenario, code
inspection is much welcome.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18 14:39:23 +11:00
Paul Mackerras 6defa38b37 powerpc: Fix delay functions for 601 processors
My earlier merge of delay.h introduced a timebase-based udelay for
32-bit machines but also broke the 601, which doesn't have the
timebase register.  This fixes it by using the 601's RTC register on
the 601, and also moves __delay() and udelay() to be out-of-line in
arch/powerpc/kernel/time.c.  These functions aren't really performance
critical, after all.

Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18 14:08:12 +11:00
Kumar Gala fe7bce5ef7 [PATCH] ppc: Fix warnings related to seq_file
When we moved things around in irq.h seq_file became an issue.  Fix
warnings related to its usage.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18 13:31:46 +11:00
Kumar Gala 6760a1bdf5 [PATCH] ppc: Fix MPC83xx device table
The SVRs for MPC8343/E were incorrect and really the SVRs
for MPC8347/E.

Signed-off-by: David Updegraff <dave@cray.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18 13:31:37 +11:00
Segher Boessenkool a097a35c9a [PATCH] powerpc: Maple: request I/O resource.
Reserve the Maple RTC I/O resource.  Needed now we use genrtc.

Signed-off-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18 13:31:20 +11:00
Olaf Hering 68643cfb87 [PATCH] ppc boot: replace string labels with numbers
Replacing the string labels with numbers saves 117 bytes in the final zImage.
These local labels are not discared.

Signed-off-by: Olaf Hering <olh@suse.de>

 arch/powerpc/boot/crt0.S |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18 13:18:16 +11:00
Kumar Gala 976164497d [PATCH] ppc: Fix warnings related to seq_file
When we moved things around in irq.h seq_file became an issue.  Fix
warnings related to its usage.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-17 17:26:09 -08:00
Russell King 02b3083922 [ARM] Fix some corner cases in new mm initialisation
Document that the VMALLOC_END address must be aligned to 2MB since
it must align with a PGD boundary.

Allocate the vectors page early so that the flush_cache_all() later
will cause any dirty cache lines in the direct mapping will be safely
written back.

Move the flush_cache_all() to the second local_flush_cache_tlb() and
remove the now redundant first local_flush_cache_tlb().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-17 22:43:30 +00:00
Grant Grundler 9d7d57567c [PARISC] Remove unused variable in signal.c
Remove unused variable "struct siginfo si" in signal.c

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:43:52 -05:00
Christoph Hellwig 784412f74c [PARISC] remove drm compat ioctls handlers
Remove drm compat_ioctl handlers. The drm drivers have proper
compat_ioctl methods these days.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:41:26 -05:00
Christoph Hellwig ad7dd338fb [PARISC] move PA perf driver over to ->compat_ioctl
Move PA perf driver over to ->compat_ioctl.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Randolph Chung <tausq@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:40:31 -05:00
Matthew Wilcox 83aceb5b6a [PARISC] Fix some compile problems in ptrace.c
Fix some compile problems:
- ret wasn't being initialised in all code paths
- I'm pretty sure 'goto out' should have been 'goto out_tsk'

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:37:24 -05:00
Matthew Wilcox 4269b0d371 [PARISC] Improve the error message when we get a clashing mod path
Improve the error message when we get a clashing mod path, and
actually display the IODC data and path for the conflicting device.

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:33:56 -05:00
Matthew Wilcox ba5c4f1bae [PARISC] Return PDC_OK when alloc_pa_dev fails to enumerate all devices
Return PDC_OK when device registration fails so that we enumerate all
subsequent devices, even when we get two devices with the same hardware
path (which should never happen, but does with at least one revision of
rp8400 firmware).

Signed-off-by: Matthew Wilcox <willy@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:33:29 -05:00
Carlos O'Donell aa0eecb07f [PARISC] Document some register usages in assembly files
Document clobbers and args in entry.S and syscall.S.

entry.S: Add comment to indicate that cr27 may recycle and EDEADLOCK
detection is not 100% correct. Since this is only enabled when using
ENABLE_LWS_DEBUG, the user is warned by the comment.

Signed-off-by: Carlos O'Donell <carlos@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:32:46 -05:00
Ryan Bradetich 75be99a8c5 [PARISC] Make redirecting irq messages less noisy
Make the "redirecting irq" message to not display on the console by
setting the severity to KERN_DEBUG.  The console was basically unusable.

Signed-off-by: Ryan Bradetich <rbrad@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:29:50 -05:00
Grant Grundler 03afe22f07 [PARISC] irq_affinityp[] only available for SMP builds
irq_affinityp[] only available for SMP builds, make code that uses
it conditional on CONFIG_SMP.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:29:16 -05:00
James Bottomley c2ab64d098 [PARISC] Add IRQ affinities
This really only adds them for the machines I can check SMP on, which
is CPU interrupts and IOSAPIC (so not any of the GSC based machines).

With this patch, irqbalanced can be used to maintain irq balancing.
Unfortunately, irqbalanced is a bit x86 centric, so it doesn't do an
incredibly good job, but it does work.

Signed-off-by: James Bottomley <jejb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:28:37 -05:00
Kyle McMartin 1d4c452a85 [PARISC] Fix uniprocessor build by dummying smp_send_all_nop()
Since irq.c uses smp_send_all_nop, we must define it for UP builds
as well. Make it a static inline so it gets optimized away. This forces
irq.c to include <asm/smp.h> though.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:27:44 -05:00
James Bottomley d911aed8ad [PARISC] Fix our interrupts not to use smp_call_function
Fix our interrupts not to use smp_call_function

On K and D class smp, the generic code calls this under an irq
spinlock, which causes the WARN_ON() message in smp_call_function()
(and is also illegal because it could deadlock).

The fix is to use a new scheme based on the IPI_NOP.

Signed-off-by: James Bottomley <jejb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:27:02 -05:00
Grant Grundler 3f902886a8 [PARISC] Disable nesting of interrupts
Disable nesting of interrupts - still has holes

The offending sequence starts out like this:
1) take external interrupt
2) set_eiem() to only allow TIMER_IRQ; local interrupts still disabled
3) read the EIRR to get a "list" of pending interrupts
4) clear EIRR of pending interrupts we intend to handle
5) call __do_IRQ() to handle IRQ.
6) handle_IRQ_event() enables local interrupts (I-Bit)
7) take a timer interrupt
8) read EIRR to get a new list of pending interrupts
9) clear EIRR of pending interrupts we just read
10) handle pending interrupts found in (8)
11) set_eiem(cpu_eiem) and return
        [ TROUBLE! all enabled CPU IRQs are unmasked. }
12) handle remaining interrupts pending from (3)
        e.g. call __do_IRQ() -> handle_IRQ_event()..etc
        [ TROUBLE! call to handle_IRQ_event() can now enable *any* IRQ. }
13) set_eiem(cpu_eiem) and return

The problem is we now get into ugly race conditions with Timer and IPI
interrupts at this point.  I'm not exactly sure what happens when
things go wrong (perhaps nest calls to IPI or timer interrupt?).
But I'm certain it's not good.

This sequence will break sooner if (10) would accidentally leave
interrupts enabled.

I'm pretty sure the right answer is now to make cpu_eiem
a per CPU variable since all external interrupts on parisc
are per CPU. This means we will NOT need to send an IPI to
every CPU in the system when enabling or disabling an IRQ
since only one CPU needs to change it's EIEM.

Thanks to James Bottomley for (once again) pointing out the problem.

Signed-off-by: Grant Grundler <grundler@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:26:20 -05:00
James Bottomley 9a8b458406 [PARISC] Make sure timer and IPI execute with interrupts disabled
Fix a longstanding smp bug

The problem is that both the timer and ipi interrupts are being called
with interrupts enabled, which isn't what anyone is expecting.

The IPI issue has just started to show up by causing a BUG_ON in the
slab debugging code.  The timer issue never shows up because there's an
eiem work around in our irq.c

The fix is to label both these as SA_INTERRUPT which causes the generic
irq code not to enable interrupts.

I also suspect the smp_call_function timeouts we're seeing might be
connected with the fact that we disable IPIs when handling any other
type of interrupt.  I've put a WARN_ON in the code for executing
smp_call_function() with IPIs disabled.

Signed-off-by: James Bottomley <jejb@parisc-linux.org>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2005-11-17 16:24:52 -05:00
Linus Torvalds 7652aab77f Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2005-11-17 10:56:34 -08:00
Chen, Kenneth W e8aabc4716 [IA64] polish comments for tlb fault handler in ivt.S
Polish the comments specifically in vhpt_miss and nested_dtlb_miss
handlers.  I think it's better to explicitly name each page table
level with its name instead of numerically name them.  i.e., use
pgd, pud, pmd, and pte instead of referring as L1, L2, L3 etc.
Along the line, remove some magic number in the comments like:
"PTA + (((IFA(61,63) << 7) | IFA(33,39))*8)".  No code change at
all, pure comment update.  Feel free to shoot anything you have,
darts or tomahawk cruise missile.  I will duck behind a bunker ;-)

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Acked-by: Robin Holt <holt@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-17 09:48:15 -08:00
Chen, Kenneth W fedb25fae7 [IA64] 4 level page table bug fix in vhpt_miss
From source code inspection, I think there is a bug with 4 level
page table with vhpt_miss handler.  In the code path of rechecking
page table entry against previously read value after tlb insertion,
*pte value in register r18 was overwritten with value newly read
from pud pointer, render the check of new *pte against previous
*pte completely wrong.  Though the bug is none fatal and the penalty
is to purge the entry and retry.  For functional correctness, it
should be fixed.  The fix is to use a different register so new
*pud don't trash *pte.  (btw, the comments in the cmp statement is
wrong as well, which I will address in the next patch).

Signed-off-by: Ken Chen <kenneth.w.chen@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-11-17 09:47:18 -08:00
Russell King 67a1901ff4 [ARM] __ioremap doesn't use 4th argument
The "align" argument in ARMs __ioremap is unused and provides a
misleading expectation that it might do something.  It doesn't.
Remove it.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-17 16:48:00 +00:00
Linus Torvalds d0fa7e9f8e Merge master.kernel.org:/home/rmk/linux-2.6-arm 2005-11-17 08:45:42 -08:00
Russell King 728f5c076a [ARM] Improve comment about ASSERT()s in vmlinux.lds.S
Provide folk with an idea what to do if the ASSERT statements fail
with their linker.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-17 16:43:14 +00:00
Ralf Baechle aec8b7557c [MIPS] Update defconfigs
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:58 +00:00
Ralf Baechle 1a6ea3ec67 [MIPS] SEAD: More build fixes.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:57 +00:00
Ralf Baechle 09b696efd9 [MIPS] TX3927: Try to glue the PCI code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:56 +00:00
Ralf Baechle 3d5d440176 [MIPS] Ocelot G: Use CPU_MASK_NONE instead of 0 to initialize cpu mask.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:55 +00:00
Ralf Baechle c32cf78c02 [MIPS] JMR3927: Fix compilation by including <linux/ds1742rtc.h>.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:53 +00:00
Ralf Baechle 5135b0cdb2 [MIPS] JMR3927: need include/asm-mips/mach-jmr3927 in it's include path.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:52 +00:00
Ralf Baechle 8bf4057bdd [MIPS] JMR3927: It's ops-tx3927.o not ops-jmr3927.o
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:51 +00:00
Pantelis Antoniou b60ccd575c [MIPS] Alchemy: Console output fixup
This is needed to make console output appear with the new driver...
    
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:50 +00:00
Arnaud Giersch 59f145d28c [MIPS] IP32: Fix sparse warnings.
Add __iomem qualifier to crime and mace pointers.
    
Signed-off-by: Arnaud Giersch <arnaud.giersch@free.fr>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:48 +00:00
Arnaud Giersch 19ce1cfb2d [MIPS] IP32: Export mace symbol.
Export mace symbol so that it can be used in modules.
    
Signed-off-by: Arnaud Giersch <arnaud.giersch@free.fr>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:47 +00:00
Ralf Baechle 70ad7d1840 [MIPS] JMR3927: Fix syntax error.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:46 +00:00
Ralf Baechle efd9412d85 [MIPS] JMR3927: Undo accidental rename.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:45 +00:00
Ralf Baechle d93efab838 [MIPS] DDB5477: Fix unused variable warning.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-11-17 16:23:45 +00:00
David Woodhouse 1e28a7ddd3 [PATCH] Avoid use of uninitialised spinlock in EEH.
If the kernel supports both G5 and pSeries, and CONFIG_EEH is enabled,
eeh_init() is (quite reasonably) never called when we boot on a G5. Yet
eeh_check_failure() still gets called. We should avoid doing that if
!eeh_subsystem_enabled.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-17 16:53:38 +11:00
Russell King 45e109d072 [ARM] sa1111.c needs asm/sizes.h
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 18:29:51 +00:00
Russell King 1b12050f17 [ARM] Move zone adjustment for SA1111 on SA11x0 platforms
Unfortunately, using PAGE_SHIFT in asm/arch/memory.h is unsafe, and we
can't include asm/page.h into this file because then we have a circular
dependency.  Move the offending code to arch/arm/common/sa1111.c
instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 17:38:40 +00:00
Linus Torvalds d58a75ef75 Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-merge 2005-11-16 07:58:48 -08:00
Ben Dooks 994e128053 [ARM] 3162/1: S3C2410 - updated defconfig
Patch from Ben Dooks

Minor changes, including add SysRq, selecting the DM9000
as a built-in driver, not as a module, and selecting the
framebuffer.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 15:05:13 +00:00
Ben Dooks b526bf23fd [ARM] 3161/1: BAST - fix commas on end of structs
Patch from Ben Dooks

Make the use of , on the lsat entry structs consistenent
through arch/arm/mach-s3c2410/mach-bast.c

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-16 15:05:12 +00:00