aboutsummaryrefslogtreecommitdiffstats
path: root/arch
AgeCommit message (Collapse)AuthorFilesLines
2006-01-04[PATCH] USB: pxa27x OHCI - Separate platform code from main driverRichard Purdie2-0/+27
To allow multiple platforms to use the PXA27x OHCI driver, the platform code needs to be moved into the board specific files in arch/arm/mach-pxa. This patch does this for mainstone and adds preliminary hooks to allow other boards to use the driver. This has been compile tested for mainstone and successfully run on Spitz (Sharp Zaurus SL-C3000) with the addition of an appropriate board support file. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Nicolas Pitre <nico@cam.org> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-12-31[PATCH] x86: teach dump_task_regs() about the -8 offset.Stas Sergeev1-1/+3
This should fix multi-threaded core-files Signed-off-by: stsp@aknet.ru Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-29[PATCH] ppc64: htab_initialize_secondary cannot be marked __initAnton Blanchard1-1/+1
Sonny has noticed hotplug CPU on ppc64 is broken in 2.6.15-*. One of the problems is that htab_initialize_secondary is called when a cpu is being brought up, but it is marked __init. Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-29[PATCH] x86_64: Fix incorrect node_present_pages on NUMARavikiran G Thirumalai1-1/+1
Currently, we do not pass the correct start_pfn to e820_hole_size, to calculate holes. Following patch fixes that. The bug results in incorrect number of node_present_pages for each pgdat and causes ugly output in /sys and probably VM inbalances. Signed-off-by: Alok N Kataria <alokk@calsoftinc.com> Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org> Signed-off-by: Andi Kleen <ak@suse.de> Sighed-off-by: Shair Fultheim <shai@scalex86.org> Sighed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-29[PATCH] uml: fix compilation with CONFIG_MODE_TT disabledPaolo 'Blaisorblade' Giarrusso2-5/+8
Fix UML compilation when SKAS mode is disabled. Indeed, we were compiling SKAS-only object files, which failed due to some SKAS-only headers being excluded from the search path. Thanks to the bug report from Pekka J Enberg. Acked-by: Pekka J Enberg <penberg (at) cs ! helsinki ! fi> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-29[PATCH] Hostfs: update for new glibc - add missing symbol exportsPaolo 'Blaisorblade' Giarrusso1-0/+5
Today, when compiling UML, I got warnings for two used unexported symbols: readdir64 and truncate64. Indeed, my glibc headers are aliasing readdir to readdir64 and truncate to truncate64 (and so on). I'm then adding additional exports. Since I've no idea if the symbols where always provided in the supported glibc's, I've added weak definitions too. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-29[PATCH] uml: fix random segfaults at bootupPaolo 'Blaisorblade' Giarrusso1-10/+12
Don't use printk() where "current_thread_info()" is crap. Until when we switch to running on init_stack, current_thread_info() evaluates to crap. Printk uses "current" at times (in detail, &current is evaluated with CONFIG_DEBUG_SPINLOCK to check the spinlock owner task). And this leads to random segmentation faults. Exactly, what happens is that &current = *(current_thread_info()), i.e. round down $esp and dereference the value. I.e. access the stack below $esp, which causes SIGSEGV on a VM_GROWSDOWN vma (see arch/i386/mm/fault.c). Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-28[SPARC]: Use STABS_DEBUG and DWARF_DEBUG macros in vmlinux.lds.SDavid S. Miller2-28/+8
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-12-22[SPARC]: Kill CHILD_MAX.David S. Miller3-3/+3
It's definition is wrong (-1 means "no limit" not 999), only the Sparc SunOS/Solaris compat code uses it, so let's just kill it off completely from limits.h and all referencing code. Noticed by Ulrich Drepper. Signed-off-by: David S. Miller <davem@davemloft.net>
2005-12-22[SPARC]: introduce a SPARC Kconfig symbolAdrian Bunk2-0/+8
Introduce a Kconfig symbol SPARC that is defined on both the sparc and sparc64 architectures. This symbol makes some dependencies more readable. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-12-22powerpc: Fix i8259 cascade on pSeries with XICS interrupt controllerPaul Mackerras1-18/+3
It turns out that commit f9bd170a87948a9e077149b70fb192c563770fdf broke the cascade from XICS to i8259 on pSeries machines; specifically we ended up not ever doing the EOI on the XICS for the cascade. The result was that interrupts from the serial ports (and presumably any other devices using ISA interrupts) didn't get through. This fixes it and also simplifies the code, by doing the EOI on the XICS in the xics_get_irq routine after reading and acking the interrupt on the i8259. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-20[SPARC64]: Stop putting -finline-limit=XXX into CFLAGSDavid S. Miller1-5/+0
It was a stupid workaround for the "static inline" vs. "extern inline" issues of long ago, and it is what causes schedule() to be inlined like crazy into kernel/sched.c when -Os is specified. MIPS and S390 should probably do the same. Now CC_OPTIMIZE_FOR_SIZE can be safely used on sparc64 once more. Signed-off-by: David S. Miller <davem@davemloft.net>
2005-12-20[PATCH] Fix build with CONFIG_PCI_MMCONFIGAndi Kleen2-2/+2
Now needs to include the type 1 functions ("direct") too. Reported by Pavel Roskin <proski@gnu.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-20Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-mergeLinus Torvalds8-24/+30
2005-12-20powerpc: update defconfigsPaul Mackerras6-21/+26
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-20[PATCH] powerpc: CPM2 interrupt handler failure after 100,000 interruptsEdson Seabra1-1/+2
The CPM2 interrupt handler does not return success to the IRQ subsystem, which causes it to kill the IRQ line after 100,000 interrupts. Signed-off-by: Edson Seabra <Edson.Seabra@cyclades.com> Signed-off-by: Marcelo Tosatti <marcelo.tosatti@cyclades.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-20powerpc: correct register usage in 64-bit syscall exit pathPaul Mackerras1-2/+2
Since we don't restore the volatile registers in the syscall exit path, we need to make sure we don't leak any potentially interesting values from the kernel to userspace. This was already the case for all except r11. This makes it use r11 for an MSR value, so r11 will have an (uninteresting) MSR value in it on return to userspace. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-19Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds3-22/+55
2005-12-19[ARM] 3210/1: add missing memory barrier helper for NPTL supportNicolas Pitre1-0/+49
Patch from Nicolas Pitre Strictly speaking, the NPTL kernel helpers are required for pre ARMv6 only. They are available on ARMv6+ as well for obvious compatibility reasons. However there are cases where extra memory barriers are needed when using an SMP ARMv6 machine but not on pre-ARMv6. This patch adds a memory barrier kernel helper that glibc can use as needed for pre-ARMv6 binaries to be forward compatible with an SMP kernel on ARMv6, as well as the necessary dmb instructions to the cmpxchg helper. Signed-off-by: Nicolas Pitre <nico@cam.org> Acked-by: Daniel Jacobowitz <dan@codesourcery.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-18[PATCH] uml skas0: stop gcc's insanityJeff Dike3-36/+46
With Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> UML skas0 stub has been miscompiling for many people (incidentally not the authors), depending on the used GCC versions. I think (and testing on some GCC versions shows) this patch avoids the fundamental issue which is behind this, namely gcc using the stack when we have just replaced it, behind gcc's back. The remapping and storage of the return value is hidden in a blob of asm, hopefully giving gcc no room for creativity. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-18[PATCH] uml - fix some funkiness in KconfigPaolo 'Blaisorblade' Giarrusso1-0/+2
So you may have seen the miniconfig stuff wander by, which means that my build script exits if there's a .config error, and we have this: fs/Kconfig:1749:warning: 'select' used by config symbol 'CIFS_UPCALL' refer to undefined symbol 'CONNECTOR' This makes it shut up. Signed-off-by: Rob Landley <rob@landley.net> [ Verified it makes sense. ] Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-18[PATCH] uml: fix dynamic linking on some 64-bit distrosRob Landley1-0/+4
With Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> The current UML build assumes that on x86-64 systems, /lib is a symlink to /lib64, but in some distributions (like PLD and CentOS) they are separate directories, so the 64 bit library loader isn't found. This patch inserts /lib64 at the start of the rpath on x86-64 UML builds. Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-18[PATCH] uml: arch/um/scripts/Makefile.rules - remove duplicated codePaolo 'Blaisorblade' Giarrusso1-5/+0
Duplicated code - the patch adding it was probably applied twice without enough care. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-17[ARM] Fix sys_sendto and sys_recvfrom 6-arg syscallsRussell King2-22/+6
Rather than providing more wrappers for 6-arg syscalls, arrange for them to be supported as standard. This just means that we always store the 6th argument on the stack, rather than in the wrappers. This means we eliminate the wrappers for: * sys_futex * sys_arm_fadvise64_64 * sys_mbind * sys_ipc Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-16Merge branch 'release' of ↵Linus Torvalds5-5/+37
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
2005-12-16[PATCH] ppc: ppc4xx_dma DMA_MODE_{READ,WRITE} fixAl Viro1-0/+1
DMA_MODE_{READ,WRITE} are declared in asm-powerpc/dma.h and their declarations there match the definitions. Old declarations in ppc4xx_dma.h are not right anymore (wrong type, to start with). Killed them, added include of asm/dma.h where needed. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-16[PATCH] PCI: Fix dumb bug in mmconfig fixAndi Kleen1-1/+1
Use correct address when referencing mmconfig aperture while checking for broken MCFG. This was a typo when porting the code from 64bit to 32bit. It caused oopses at boot on some ThinkPads. Should definitely go into 2.6.15. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-16[IA64] Add __read_mostly support for IA64Christoph Lameter1-0/+3
sparc64, i386 and x86_64 have support for a special data section dedicated to rarely updated data that is frequently read. The section was created to avoid false sharing of those rarely read data with frequently written kernel data. This patch creates such a data section for ia64 and will group rarely written data into this section. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-16[IA64-SGI] change default_sn2 to NR_CPUS==1024hawkes@sgi.com1-1/+1
Change the NR_CPUS default for ia64/sn up to 1024. Signed-off-by: John Hawkes <hawkes@sgi.com> Signed-off-by: John Hesterberg <jh@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-16[IA64-SGI] Missed TLB flushJack Steiner1-1/+1
I see why the problem exists only on SN. SN uses a different hardware mechanism to purge TLB entries across nodes. It looks like there is a bug in the SN TLB flushing code. During context switch, kernel threads inherit the mm of the task that was previously running on the cpu. This confuses the code in sn2_global_tlb_purge(). The result is a missed TLB purge for the task that owns the "borrowed" mm. (I hit the problem running heavy stress where kswapd was purging code pages of a user task that woke kswapd. The user task took a SIGILL fault trying to execute code in the page that had been ripped out from underneath it). Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-16[IA64] uncached ref count leakJes Sorensen1-3/+3
Use raw_smp_processor_id() instead of get_cpu() as we don't need the extra features of get_cpu(). Signed-off-by: Jes Sorensen <jes@trained-monkey.org> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-16[IA64] disable preemption in udelay()John Hawkes1-0/+29
The udelay() inline for ia64 uses the ITC. If CONFIG_PREEMPT is enabled and the platform has unsynchronized ITCs and the calling task migrates to another CPU while doing the udelay loop, then the effective delay may be too short or very, very long. This patch disables preemption around 100 usec chunks of the overall desired udelay time. This minimizes preemption-holdoffs. udelay() is now too big to be inline, move it out of line and export it. Signed-off-by: John Hawkes <hawkes@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-15[PATCH] arch/powerpc/kernel/syscalls.c __user annotationsAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-15[PATCH] arch/alpha/kernel/machvec_impl.h: C99 struct initializerAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-15[PATCH] ia64 sn __iomem annotationsAl Viro2-30/+30
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-15[PATCH] i386,amd64: ioremap.c __iomem annotationsAl Viro2-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-15[PATCH] i386,amd64: mmconfig __iomem annotationsAl Viro2-8/+8
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-15[PATCH] arch/sparc/kernel/led.c __user annotationsAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-15[PATCH] sun4c_memerr_reg __iomem annotationsAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-15[PATCH] sparc: NULL noise removal (ebus.c)Al Viro1-12/+12
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-15[PATCH] sparc/kernel/time: __iomem annotationsAl Viro1-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-15[PATCH] fix iomem annotations in sparc32 pcic codeAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-14Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2-4/+7
2005-12-14[ARM] 3205/1: Handle new EABI relocations when loading kernel modules.Daniel Jacobowitz1-0/+2
Patch from Daniel Jacobowitz Handle new EABI relocations when loading kernel modules. This is necessary for CONFIG_AEABI kernels, and also for some broken (since fixed) old ABI toolchains. Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-14[IA64] fix for SET_PERSONALITY when CONFIG_IA32_SUPPORT is not set.Robin Holt1-0/+2
Missed this when fixing the SET_PERSONALITY change. Signed-off-by: Robin Holt <holt@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-12[PATCH] x86_64: Bug correction in populate_memnodemap()Eric Dumazet1-1/+3
As reported by Keith Mannthey, there are problems in populate_memnodemap() The bug was that the compute_hash_shift() was returning 31, with incorrect initialization of memnodemap[] To correct the bug, we must use (1UL << shift) instead of (1 << shift) to avoid an integer overflow, and we must check that shift < 64 to avoid an infinite loop. Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12[PATCH] x86_64: Fix collision between pmtimer and pit/hpetjohn stultz1-1/+1
On systems that do not support the HPET legacy functions (basically the IBM x460, but there could be others), in time_init() we accidentally fall into a PM timer conditional and set the vxtime_hz value to the PM timer's frequency. We then use this value with the HPET for timekeeping. This patch (which mimics the behavior in time_init_gtod) corrects the collision. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12[PATCH] x86_64: Fix 32bit thread coredumpsAndi Kleen1-2/+1
When a register set is passed in don't try to fix up the pointer. Noticed by Al Viro Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12[PATCH] i386/x86-64 Correct for broken MCFG tables on K8 systemsAndi Kleen2-5/+76
They report all busses as MMCONFIG capable, but it never works for the internal devices in the CPU's builtin northbridge. It just probes all func 0 devices on bus 0 (the internal northbridge is currently always on bus 0) and if they are not accessible using MCFG they are put into a special fallback bitmap. On systems where it isn't we assume the BIOS vendor supplied correct MCFG. Requires the earlier patch for mmconfig type1 fallback Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12[PATCH] i386/x86-64 Fall back to type 1 access when no entry foundAndi Kleen4-19/+45
When there is no entry for a bus in MCFG fall back to type1. This is especially important on K8 systems where always some devices can't be accessed using mmconfig (in particular the builtin northbridge doesn't support it for its own devices) Cc: <gregkh@suse.de> Cc: <jgarzik@pobox.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12[PATCH] i386/x86-64: Don't call change_page_attr with a spinlock heldAndi Kleen2-14/+60
It's illegal because it can sleep. Use a two step lookup scheme instead. First look up the vm_struct, then change the direct mapping, then finally unmap it. That's ok because nobody can change the particular virtual address range as long as the vm_struct is still in the global list. Also added some LinuxDoc documentation to iounmap. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12[PATCH] i386/x86-64 disable LAPIC completely for offline CPUShaohua Li2-3/+2
Disabling LAPIC timer isn't sufficient. In some situations, such as we enabled NMI watchdog, there is still unexpected interrupt (such as NMI) invoked in offline CPU. This also avoids offline CPU receives spurious interrupt and anything similar. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Andi Kleen <ak@suse.de> Acked-by: "Seth, Rohit" <rohit.seth@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12[PATCH] x86_64: Make sure hpet_address is 0 when any part of HPET ↵Andi Kleen1-1/+3
initialization fails Otherwise TSC->HPET fallback could see incorrect state and crash later. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12Merge branch 'release' of ↵Linus Torvalds9-97/+304
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
2005-12-12Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds2-2/+1
2005-12-12Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds1-0/+9
2005-12-12[SPARC]: block/ needed in final image linkPaul Jackson1-1/+1
With this fix, sparc links vmlinuz again using crosstool. Without this fix, the final link fails missing several dozen dozen symbols, beginning with: kernel/built-in.o(.text+0x6fd0): In function `do_exit': : undefined reference to `exit_io_context' (exit_io_context is defined in block/ll_rw_blk.c). Signed-off-by: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-12-12[SPARC]: atomic_clear_mask build fixPaul Jackson1-1/+0
This fixes one build error introduced in sparc with the patch of Oct 30, resent Nov 4 "[patch 3/5] atomic: atomic_inc_not_zero" I still can't get sparc to build, but at least it gets further after I remove this line. Apparently, this change was agreed to by Andrew and Nick on Nov 14, but everyone thought someone else was doing it. Signed-off-by: Paul Jackson <pj@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-12-12[PATCH] Fix Kconfig of DMA32 for ia64Yasunori Goto1-1/+1
I realized ZONE_DMA32 has a trivial bug at Kconfig for ia64. In include/linux/gfp.h on 2.6.15-rc5-mm1, CONFIG is define like followings. #ifdef CONFIG_DMA_IS_DMA32 #define __GFP_DMA32 ((__force gfp_t)0x01) /* ZONE_DMA is ZONE_DMA32 */ : : So, CONFIG_"ZONE"_DMA_IS_DMA32 is clearly wrong. Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Cc: "Luck, Tony" <tony.luck@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12[PATCH] kprobes: increment kprobe missed count for multiprobesKeshavamurthy Anil S5-5/+5
When multiple probes are registered at the same address and if due to some recursion (probe getting triggered within a probe handler), we skip calling pre_handlers and just increment nmissed field. The below patch make sure it walks the list for multiple probes case. Without the below patch we get incorrect results of nmissed count for multiple probe case. Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12[PATCH] mips: setup_zero_pages count 1Hugh Dickins1-2/+2
Page count should be initialized to 1 on each of the MIPS empty zero pages, to avoid a bad_page warning whenever one of them is freed from all mappings. Signed-off-by: Hugh Dickins <hugh@veritas.com> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12[PATCH] uml: fix compile error for ttPekka J Enberg2-1/+2
arch/um/kernel/tt/uaccess.c: In function `copy_from_user_tt': arch/um/kernel/tt/uaccess.c:11: error: `FIXADDR_USER_START' undeclared (first use in this function) arch/um/kernel/tt/uaccess.c:11: error: (Each undeclared identifier is reported only once arch/um/kernel/tt/uaccess.c:11: error: for each function it appears in.) I get the compile error when I disable CONFIG_MODE_SKAS. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Acked-by: Paolo Giarrusso <blaisorblade@yahoo.it> Cc: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12[PATCH] x86: fix NMI with CPU hotplugShaohua Li1-7/+0
With CPU hotplug enabled, NMI watchdog stoped working. It appears the violation is the cpu_online check in nmi handler. local ACPI based NMI watchdog is initialized before we set CPU online for APs. It's quite possible a NMI is fired before we set CPU online, and that's what happens here. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Acked-by: Zwane Mwaikambo <zwane@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-12-12[ARM] 3201/1: PXA27x: Prevent hangup during resume due to inadvertedly ↵Lothar Wassmann1-4/+5
enabling MBREQ (replaces: 3198/1) Patch from Lothar Wassmann The patch makes sure, that the ouptut functions of pins are restored before restoring the Alternat Function settings, preventing pins from being intermediately configured for undefined or unwanted alternate functions. Here is the original comment: I've got a PXA270 system that uses GPIO80 as nCS4. This system did hang on resume. Digging into the problem I found that the processor stalled immediately when restoring the GAFR2_U register which restored the alternate function for GPIO80. Since the GPDR registers were restored after the GAFR registers, the offending GPIO was configured as input at this point. Thus the alternate function that was in effect after restoring the GAFR was in fact the input function "MBREQ" instead of the output function "nCS4". The "PXA27x Processor Family Developer's Manual" (Footnote in Table 6-1 on page 6-3) states that: "The MBREQ alternate function must not be enabled until the PSSR[RDH] bit field is cleared. For more details, see Table 3-15, "PSSR Bit Definitions" on page 3-71." There is another note in the Developer's Manual (chapter 24.4.2 "GPIO operation as Alternate Function" on page 24-4) stating that: "Configuring a GPIO for an alternate function that is not defined for it causes unpredictable results." Since some GPIOs have no input function defined, and to prevent inadvertedly programming the MBREQ function on some pin, the GAFR registers should be restored after the GPDR registers have been restored. Additional provisions have to be made when the MBREQ function is actually required. The corresponding GAFR bits should not be restored with the regular GAFR restore, but must be set only after the PSSR bits have been cleared. Signed-off-by: Lothar Wassmann <LW@KARO-electronics.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-12[PATCH] ppc32: set smp_tb_synchronized on UP with SMP kernelJohannes Berg1-0/+4
ppc32 kernel, when built with CONFIG_SMP and booted on a single CPU machine, will not properly set smp_tb_synchronized, thus causing gettimeofday() to not use the HW timebase and to be limited to jiffy resolution. This, among others, causes unacceptable pauses when launching X.org. Signed-Off-By: Johannes Berg <johannes@sipsolutions.net> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-12[PATCH] powerpc: Fix clock spreading setting on some powermacsBenjamin Herrenschmidt2-10/+31
The code that sets the clock spreading feature of the Intrepid ASIC must not be run on some machine models or those won't boot. This fixes it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-10[ARM] 3200/1: Singlestep over ARM BX and BLX instructions using ptrace fixNikola Valerjev1-0/+9
Patch from Nikola Valerjev Single stepping an application using ptrace() fails over ARM instructions BX and BLX. Steps to reproduce: Compile and link the following files main.c ----- void foo(); int main() { foo(); return 0; } foo.s ----- .text .globl foo foo: BX LR Using ptrace() functionality, run to main(), and start singlestepping. Singlestep over \"BX LR\" instruction won\'t transfer the control back to main, but run the code to completion. This problems seems to be in the function get_branch_address() in arch/arm/kernel/ptrace.c. The function doesn\'t seem to recognize BX and BLX instructions as branches. BX and BLX instructions can be used to convert from ARM to Thumb mode if the target address has the low bit set. However, they are also perfectly legal in the ARM only mode. Although other things in the kernel seem to indicate that only ARM mode is accepted (and not Thumb), many compilers will generate BX and BLX instructions even when generating ARM only code. Signed-off-by: Nikola Valerjev <nikola@ghs.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-12-09[PATCH] powerpc: Fix SLB flushing path in hugepageDavid Gibson1-16/+41
On ppc64, when opening a new hugepage region, we need to make sure any old normal-page SLBs for the area are flushed on all CPUs. There was a bug in this logic - after putting the new hugepage area masks into the thread structure, we copied it into the paca (read by the SLB miss handler) only on one CPU, not on all. This could cause incorrect SLB entries to be loaded when a multithreaded program was running simultaneously on several CPUs. This patch corrects the error, copying the context information into the PACA on all CPUs using the mm in question before flushing any existing SLB entries. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-09[PATCH] powerpc: Add missing icache flushes for hugepagesDavid Gibson2-2/+35
On most powerpc CPUs, the dcache and icache are not coherent so between writing and executing a page, the caches must be flushed. Userspace programs assume pages given to them by the kernel are icache clean, so we must do this flush between the kernel clearing a page and it being mapped into userspace for execute. We were not doing this for hugepages, this patch corrects the situation. We use the same lazy mechanism as we use for normal pages, delaying the flush until userspace actually attempts to execute from the page in question. Tested on G5. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-09[PATCH] powerpc: Set cache info defaultsOlof Johansson1-1/+9
Cache info is setup by walking the device tree in initialize_cache_info(). However, icache_flush_range might be called before that, in slb_initialize()->patch_slb_encoding, which modifies the load immediate instructions used with SLB fault code. Not only that, but depending on memory layout, we might take SLB faults during unflatten_device_tree. So that fault will load an SLB entry that might not contain the right LLP flags for the segment. Either we can walk the flattened device tree to setup cache info, or we can pick the known defaults that are known to work. Doing it in the flattened device tree is hairier since we need to know the machine type to know what property to look for, etc, etc. For now, it's just easier to go with the defaults. Worst thing that happens from it is that we might waste a few cycles doing too small dcbst/icbi increments. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-08[PATCH] powerpc: Remove debug code in hash pathBenjamin Herrenschmidt1-12/+0
Some debug code wasn't properly removed from the initial 64k pages patch, and while it's harmless, it's also slowing down significantly a very hot code path, thus it should really be removed. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-08[PATCH] powerpc: Fix a huge page bugBenjamin Herrenschmidt1-1/+2
The 64k pages patch changed the meaning of one argument passed to the low level hash functions (from "large" it became "psize" or page size index), but one of the call sites wasn't properly updated, causing potential random weird problems with huge pages. This fixes it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-08[PATCH] powerpc/pseries: boot failures on numa if no memory on nodeMike Kravetz1-1/+1
This bug exists in the current code and prevents machines from booting with numa enabled if there is a node that does not contain memory. Workaround is to boot with 'numa=off'. Looks like a simple typo. Signed-off-by: Mike Kravetz <kravetz@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-12-06[IA64-SGI] Fix SN PTC deadlock recoveryJack Steiner1-2/+6
The patch that added support for a new platform chipset (shub2) broke PTC deadlock recovery on older versions of the chipset. (PTCs are the SN platform-specific method for doing a global TLB purge). This patch fixes deadlock recovery so that it works on both the old & new chipsets. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-06[IA64] Change SET_PERSONALITY to comply with comment in binfmt_elf.c.Robin Holt3-4/+4
We have a customer application which trips a bug. The problem arises when a driver attempts to call do_munmap on an area which is mapped, but because current->thread.task_size has been set to 0xC0000000, the call to do_munmap fails thinking it is an unmap beyond the user's address space. The comment in fs/binfmt_elf.c in load_elf_library() before the call to SET_PERSONALITY() indicates that task_size must not be changed for the running application until flush_thread, but is for ia64 executing ia32 binaries. This patch moves the setting of task_size from SET_PERSONALITY() to flush_thread() as indicated. The customer application no longer is able to trip the bug. Signed-off-by: Robin Holt <holt@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-06[IA64] Limit the maximum NODEDATA_ALIGN() offsetJack Steiner1-1/+3
The per-node data structures are allocated with strided offsets that are a function of the node number. This prevents excessive cache-aliasing from occurring. On systems with a large number of nodes, the strided offset becomes too large. This patch restricts the maximum offset to 32MB. This is far larger than the size of any current L3 cache. Signed-off-by: Jack Steiner <steiner@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-06[IA64-SGI] altix: pci_window fixupJohn Keller1-22/+131
Altix only patch to add fixup code that sets up pci_controller->window. This code is a temporary fix until ACPI support on Altix is added. Also, corrects the usage of pci_dev->sysdata, which had previously been used to reference platform specific device info, to now point to a pci_controller struct. Signed-off-by: John Keller <jpk@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-05[IA64] Allow salinfo_decode to detect signals on readKeith Owens1-1/+1
Return -EINTR instead of -ERESTARTSYS when signals are delivered during a blocked read of /proc/sal/*/event. This allows salinfo_decode to detect signals when it is blocked on a read of those files. Signed-off-by: Keith Owens <kaos@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-05[PATCH] powerpc: remove redundant code in stab initOlof Johansson1-6/+1
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-05ppc: Build in all three of powermac, PREP and CHRP supportPaul Mackerras1-3/+3
This reverts commit da0825fd201a03294dbf7f8f030676d608da122c, 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-05powerpc/pseries: Optimize IOMMU setupPaul Mackerras1-1/+1
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-02[IA64] refresh tiger_defconfig ready for 2.6.15Tony Luck1-24/+50
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-12-02[IA64] Updates to the sn2_defconfig for 2.6.15.Robin Holt1-43/+109
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[PATCH] powerpc: correct the NR_CPUS description textOlaf Hering1-1/+1
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[PATCH] powerpc/pseries: Fix TCE building with 64k pagesizeMichal Ostrowski1-3/+6
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-01Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds4-3/+27
2005-12-01Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds61-3244/+3229
2005-12-01[PATCH] ppc32: fix treeboot image entrypointEugene Surovegin1-2/+2
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[PATCH] ppc32: Fix incorrect PCI frequency valueVitaly Bordug1-1/+2
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[ARM] 3188/1: Add missing i2c dependency for AkitaRichard Purdie2-1/+20
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[ARM] Fix IXDP425 setup bugJeff Hansen1-1/+1
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[MIPS] Update defconfigs to reflect Kconfig changes.Ralf Baechle45-3184/+3160
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01[MIPS] Avoid duplicate do_syscall_trace calls on return from sigreturn.Ralf Baechle3-8/+0
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01[MIPS] Fix register handling in syscalls when debugging.Ralf Baechle4-4/+12
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01[MIPS] Alchemy: Set board type on initialization.Ralf Baechle1-1/+11
From Sergei Shtylylov <sshtylyov@ru.mvista.com>. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01[MIPS] Alchemy: Fix BCSR accesses.Ralf Baechle1-4/+3
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[MIPS] Fix return path of sysmips(MIPS_ATOMIC_SET, ...)Ralf Baechle2-26/+2
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[MIPS] Qemu: Accept kernel command line passed by the Emulator.Ralf Baechle1-1/+12
From Daniel Jacobowitz <dan@debian.org>. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01[MIPS] Generate SIGILL againDaniel Jacobowitz1-2/+3
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[MIPS] Kconfig: Include init/Kconfig after we've set 32BIT / 64BIT.Ralf Baechle1-2/+2
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01[MIPS] Use reset_page_mapcount to initialize empty_zero_page usage counter.Ralf Baechle1-1/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01[MIPS] R10000 and R12000 need to set MIPS_CPU_4K_CACHE ...Ralf Baechle1-2/+2
... because they have R4000-style caches. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01[MIPS] JMR3927: Declare puts function.Ralf Baechle1-0/+2
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2005-12-01[MIPS] JMR3927 fixes.Sergei Shtylylov1-9/+19
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-11-30[ACPI] properly detect pmtimer on ASUS a8v motherboardDavid Shaohua Li1-0/+7
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[ARM SMP] Disable lazy flush_dcache_page for SMPRussell King1-1/+6
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-29Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc-mergeLinus Torvalds2-38/+26
2005-11-29[PATCH] setting irq affinity is broken in ia32 with MSI enabledShaohua Li1-2/+2
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[PATCH] ppc: fix floating point register corruptionPaolo Galtieri1-0/+6
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[PATCH] fix rebooting on HP nc6120 laptopThierry Vignaud1-0/+8
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-30[PATCH] powerpc: prevent stack corruption in call_prom_retOlaf Hering1-1/+1
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-30powerpc: Fix bug causing FP registers corruption on UP + preemptPaul Mackerras1-37/+25
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[PATCH] ppc: fix floating point register corruptionPaolo Galtieri1-0/+6
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-29Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds1-0/+1
2005-11-29Merge branch 'release' of ↵Linus Torvalds3-19/+2
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
2005-11-29[SPARC64]: Fix >8K I/O mappings.David S. Miller1-0/+1
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[IA64] Remove getting break_num by decoding instructionKeshavamurthy Anil S2-19/+1
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[IA64] - Make pfn_valid more precise for SGI Altix systemsDean Roe1-0/+1
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-29powerpc: Export __flush_icache_range for 32-bitPaul Mackerras1-4/+2
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[PATCH] ppc: Export symbol needed by MOLOtavio Salvador1-1/+1
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-28Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds8-1071/+151
2005-11-28[PATCH] m32r: M3A-2170(Mappi-III) IDE supportHirokazu Takata2-26/+48
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[PATCH] m32r: Fix sys_tas() syscallHirokazu Takata1-2/+4
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[PATCH] FRV: Make the FRV arch work againDavid Howells4-6/+6
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[PATCH] sparc: convert IO remapping to VM_PFNMAPDavid S. Miller2-6/+19
Here are the Sparc bits. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-28mm: re-architect the VM_UNPAGED logicLinus Torvalds1-4/+2
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[ARM] 3180/1: Update Zaurus defconfigsRichard Purdie3-1053/+126
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[ARM] 3179/1: Update/correct Zaurus Kconfig entriesRichard Purdie1-2/+2
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-25[ARM] Update mach-typesRussell King1-4/+10
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-25[ARM] Realview core.c does not need mach-types.hRussell King1-1/+0
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-11-25[ARM] Do not call flush_tlb_kernel_range() with IRQs disabled.Russell King1-3/+10
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[ARM] Remove mach-types.h from head.SRussell King1-8/+3
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[PATCH] powerpc: More hugepage boundary case fixesDavid Gibson1-1/+1
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 7d24f0b8a53261709938ffabe3e00f88f6498df9 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-25Merge ../linux-2.6Paul Mackerras12-40/+21
2005-11-25[PATCH] powerpc: remove arch/powerpc/include hack for 64 bitStephen Rothwell1-6/+10
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-23[PATCH] PCI: direct.c: DBGDaniel Marjamäki1-1/+1
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[PATCH] PCI: remove bogus resource collision errorRajesh Shah1-2/+5
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[PATCH] PCI: trivial printk updates in common.cDaniel Marjamäkia1-2/+2
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[PATCH] powerpc: fix for hugepage areas straddling 4GB boundaryDavid Gibson1-3/+3
Commit 7d24f0b8a53261709938ffabe3e00f88f6498df9 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[PATCH] kprobes: Fix return probes on sys_execveJim Keniston4-22/+0
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[PATCH] mm: powerpc init_mm without ptlockHugh Dickins1-4/+0
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[PATCH] mm: powerpc ptlock commentsHugh Dickins4-6/+10
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[PATCH] powerpc: update my email addressOlof Johansson4-5/+5
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-22[PATCH] unpaged: fix sound Bad page statesHugh Dickins2-2/+2
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[PATCH] unpaged: VM_UNPAGEDHugh Dickins3-4/+3
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[PATCH] uml: eliminate use of libc PAGE_SIZEJeff Dike1-4/+9
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[PATCH] uml: properly invoke x86_64 system callsJeff Dike6-17/+39
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[PATCH] uml: eliminate anonymous union and clean up symlink lossageJeff Dike2-17/+20
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[PATCH] uml: eliminate use of local in clone stubJeff Dike1-4/+6
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-21Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds3-3/+4
2005-11-21Merge branch 'release' of ↵Linus Torvalds3-1/+6
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
2005-11-21[IA64-SGI] bte_copy nasid_index fixRuss Anderson1-0/+1
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[IA64] fix bug in sn/ia64 for sparse CPU numberinghawkes@sgi.com1-1/+2
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[IA64] Prevent sn2 ptc code from executing on all ia64 subarchesPrarit Bhargava1-0/+3
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[ARM] Shut up gcc warning in clps7500 core.cRussell King1-1/+1
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[ARM] Shut up gcc warning in assabet.cRussell King1-1/+2
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[ARM] 3170/1: Sharp SL-6000x: platform device conversion fixupDirk Opfer1-1/+1
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-20[PATCH] Register disabled CPUsAshok Raj1-3/+1
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[PATCH] i386: Use bigsmp for > 8 core Opteron systemsAndi Kleen1-2/+3
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-19Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds9-227/+33
2005-11-19powerpc: Fix bug in timebase synchronization on 32-bit SMP powermacPaul Mackerras1-2/+4
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[ARM] 3168/1: Update ARM signal delivery and maskingDaniel Jacobowitz4-201/+14
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-19powerpc: move include/asm-ppc64/ptrace-common.h to arch/powerpc/kernelPaul Mackerras3-2/+168
It's only used by arch/powerpc/kernel/ptrace{,32}.c. Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-19powerpc: Merge pci.hPaul Mackerras2-20/+1
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[PATCH] powerpc: Remove imalloc.hDavid Gibson4-4/+19
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[PATCH] powerpc: Fix setting MPIC priorityBenjamin Herrenschmidt1-5/+8
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-18Merge branch 'master'Kyle McMartin33-6825/+684
2005-11-18Merge branch 'release' of ↵Linus Torvalds1-62/+71
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
2005-11-18Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc-mergeLinus Torvalds30-6761/+611
2005-11-18[ARM] Fix get_user when passed a const pointerRussell King2-12/+0
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-18powerpc: Move defconfig over and remove remaining arch/ppc64 filesPaul Mackerras8-6019/+244
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-18powerpc: Fix a couple of compile warnings for 32-bit compilesPaul Mackerras2-1/+1
Signed-off-by: Paul Mackerras <paulus@samba.org>
2005-11-18powerpc: time-of-day fixes for 32-bit CHRP systemsPaul Mackerras3-6/+14
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-18powerpc: Fix compile error on pSeries arising from delay.h changesPaul Mackerras1-2/+2
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-18powerpc: Move remaining .c files from arch/ppc64 to arch/powerpcPaul Mackerras6-152/+6
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[PATCH] Remove SPAN_OTHER_NODES config definitionMike Kravetz2-14/+0
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[PATCH] powerpc: merge align.cBenjamin Herrenschmidt5-544/+268
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-18powerpc: Fix delay functions for 601 processorsPaul Mackerras2-8/+28
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[PATCH] ppc: Fix warnings related to seq_fileKumar Gala2-2/+2
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[PATCH] ppc: Fix MPC83xx device tableKumar Gala1-2/+26
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[PATCH] powerpc: Maple: request I/O resource.Segher Boessenkool1-1/+10
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[PATCH] ppc boot: replace string labels with numbersOlaf Hering1-12/+11
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-17[PATCH] ppc: Fix warnings related to seq_fileKumar Gala2-2/+2
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[ARM] Fix some corner cases in new mm initialisationRussell King1-11/+13
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[PARISC] Remove unused variable in signal.cGrant Grundler1-1/+0
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[PARISC] remove drm compat ioctls handlersChristoph Hellwig1-541/+0
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[PARISC] move PA perf driver over to ->compat_ioctlChristoph Hellwig2-18/+20
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[PARISC] Fix some compile problems in ptrace.cMatthew Wilcox1-2/+3
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[PARISC] Improve the error message when we get a clashing mod pathMatthew Wilcox1-2/+6
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[PARISC] Return PDC_OK when alloc_pa_dev fails to enumerate all devicesMatthew Wilcox1-1/+1
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[PARISC] Document some register usages in assembly filesCarlos O'Donell2-1/+3
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[PARISC] Make redirecting irq messages less noisyRyan Bradetich1-1/+1
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[PARISC] irq_affinityp[] only available for SMP buildsGrant Grundler1-2/+9
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[PARISC] Add IRQ affinitiesJames Bottomley1-2/+58
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[PARISC] Fix uniprocessor build by dummying smp_send_all_nop()Kyle McMartin1-0/+2
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[PARISC] Fix our interrupts not to use smp_call_functionJames Bottomley2-15/+31
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[PARISC] Disable nesting of interruptsGrant Grundler1-7/+6
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[PARISC] Make sure timer and IPI execute with interrupts disabledJames Bottomley2-0/+6
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-17Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds57-749/+1982
2005-11-17[IA64] polish comments for tlb fault handler in ivt.SChen, Kenneth W1-62/+71
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>