aboutsummaryrefslogtreecommitdiffstats
path: root/arch
AgeCommit message (Collapse)AuthorFilesLines
2005-05-01[PATCH] ppc32: add rtc hooks in PPC7D platform fileChris Elston1-0/+42
This patch adds the hooks into the PPC7D platforms file to support the DS1337 RTC device as the clock device for the PPC7D board. Signed-off-by: Chris Elston <chris.elston@radstone.co.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01[PATCH] ppc32: fix for misreported SDRAM size on Radstone PPC7D platformChris Elston2-6/+13
This patch fixes the SDRAM output from /proc/cpuinfo. The previous code assumed that there was only one bank of SDRAM, and that the size in the memory configuration register was the total size. Signed-off-by: Chris Elston <chris.elston@radstone.co.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01[PATCH] ppc32: refactor FPU exception handlingPaul Mackerras12-176/+228
Moved common FPU exception handling code out of head.S so it can be used by several of the sub-architectures that might of a full PowerPC FPU. Also, uses new CONFIG_PPC_FPU define to fix alignment exception handling for floating point load/store instructions to only occur if we have a hardware FPU. Signed-off-by: Jason McMullan <jason.mcmullan@timesys.com> Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-05-01[PATCH] ppc32: Fix errata for some G3 CPUsBenjamin Herrenschmidt2-6/+40
Some G3 CPUs can crash in funny way if a store from an FPU register instruction is executed on a register that has never been initialized since power on. This patch fixes it by making sure all FP registers have been properly initialized at kernel boot and when waking from sleep. It also makes the code that decides wether HID0_BTIC and HID0_DPM are allowed on a given CPU smarter (it can actually _clear_ them now if they are not allowed instead of just setting them when they are allowed in case the firmware got them wrong) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-30[PATCH] kbuild/ppc: tell when uimage was not builtSam Ravnborg1-1/+2
Tom Rini said: Note that there is still a trivial'ish change to make. When mkimage doesn't exist on the host we should say "uImage not made" or something similar. So I did like Tom asked. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-30[PATCH] kbuild/i386: re-introduce dependency on vmlinux for install target, ↵Sam Ravnborg1-3/+4
and add kernel_install Removing the dependency on vmlinux for the install target raised a few complaints, so instead a new target i added: kernel_install. kernel_install will install the kernel just like the ordinary install target. The only difference is that install has a dependency on vmlinux, kernel_install does not. Therefore kernel_install is the best choice when accessing the kernel over a NFS mount or as another user. kernel_install is similar to modules_install in the fact that neither does a full kernel compile before performing the install. In this way they are good for root use. Also added back the dependency on vmlinux for the install target so peoples scripts are no longer broken. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-30Merge of master.kernel.org:/home/rmk/linux-2.6-rmk.gitLinus Torvalds1-1/+16
2005-04-30[PATCH] ARM: IntegratorCP: Fix CLCD MUX selection valuesRussell King1-1/+16
The documentation on these values seems to be rather wrong. These values have been determined by mere trial and error. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-30Merge of master.kernel.org:/home/rmk/linux-2.6-rmk.gitLinus Torvalds3-19/+52
2005-04-30[PATCH] ppc64: fix 32-bit signal frame back linkPaul Mackerras1-2/+2
When the kernel creates a signal frame on the user stack, it puts the old stack pointer value at the beginning so that the signal frame is linked into the chain of stack frames like any other frame. Unfortunately, for 32-bit processes we are writing the old stack pointer as a 64-bit value rather than a 32-bit value, and the process sees that as a null pointer, since it only looks at the first 32 bits, which are zero since ppc is bigendian and the stack pointer is below 4GB. This bug is in SLES9 and RHEL4 too, hence the ccs. This patch fixes the bug by making the signal code write the old stack pointer as a u32 instead of an unsigned long. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-30[PATCH] ARM: PXA I2C: add platform deviceRussell King1-0/+25
Add the PXA I2C platform device. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-30[PATCH] ARM: RTC: allow driver methods to return errorRussell King2-19/+27
Allow RTC drivers to return error codes from their read_time or read_alarm methods. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-29Merge of master.kernel.org:/home/rmk/linux-2.6-rmk.gitLinus Torvalds8-29/+434
2005-04-29[PATCH] ARM: 2660/2: fix ixdp2800 boot and pci initLennert Buytenhek2-14/+135
Patch from Lennert Buytenhek The IXDP2800 is an evalution platform for the IXP2800 processor that has two IXP2800s connected to the same PCI bus. This is problematic as both CPUs will try to configure the PCI bus as they boot linux. Contrary to on the other IXP2000 platforms, the boot loader on the IXDP2800 doesn't configure the PCI bus properly, so we do want the linux instance on one of the CPUs to do that. Making one of the CPUs ignore the PCI bus (and thus act like a pure PCI slave device) is not an option because there is a 82559 NIC on the PCI bus for each of the CPUs. The chosen solution is to have the master CPU configure the PCI bus while the slave is kept in a quiescent state, and then to have the slave CPU scan the PCI bus (without assigning resources) while the master is kept in a quiescent state. After this ritual, the master deletes the slave NIC from its PCI device list, the slave deletes the master NIC from its device list, and (almost) all is well. There's still one little problem: each of the CPUs has a 1G SDRAM BAR, but the IXP2000 only has 512M of outbound PCI memory window. We solve this by hand-assigning the master and slave SDRAM BARs to a location outside each of the IXP's outbound PCI windows, and by having the rest of the BARs autoconfigured in the outbound PCI windows, in the range [e0000000..ffffffff], so that there is a 1:1 pci:phys mapping between them. Even with this patch, a number of issues still remain -- just imagine what happens if one of the CPUs is rebooted, by watchdog or by hand, but the other one isn't. But those issues are not easily fixable given the strange PCI layout of this board and the behavior of the boot loader shipped with the platform. Signed-off-by: Lennert Buytenhek Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-04-29[PATCH] ARM: 2656/1: Access permission bits are wrong for kernel XIP ↵George G. Davis1-2/+3
sections on ARMv6 Patch from George G. Davis This patch is required for kernel XIP support on ARMv6 machines. It ensures that the access permission bits for kernel XIP section descriptors are APX=1 and AP[1:0]=01, which is Kernel read-only/User no access permissions. Prior to this change, kernel XIP section descriptor access permissions were set to Kernel no access/User no access on ARMv6 machines and the kernel would therefore hang upon entry to userspace when set_fs(USER_DS) was executed. Signed-off-by: Steve Longerbeam Signed-off-by: George G. Davis Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-04-29[PATCH] ARM: 2651/3: kernel helpers for NPTL supportNicolas Pitre3-9/+276
Patch from Nicolas Pitre This patch entirely reworks the kernel assistance for NPTL on ARM. In particular this provides an efficient way to retrieve the TLS value and perform atomic operations without any instruction emulation nor special system call. This even allows for pre ARMv6 binaries to be forward compatible with SMP systems without any penalty. The problematic and performance critical operations are performed through segment of kernel provided user code reachable from user space at a fixed address in kernel memory. Those fixed entry points are within the vector page so we basically get it for free as no extra memory page is required and nothing else may be mapped at that location anyway. This is different from (but doesn't preclude) a full blown VDSO implementation, however a VDSO would prevent some assembly tricks with constants that allows for efficient branching to those code segments. And since those code segments only use a few cycles before returning to user code, the overhead of a VDSO far call would add a significant overhead to such minimalistic operations. The ARM_NR_set_tls syscall also changed number. This is done for two reasons: 1) this patch changes the way the TLS value was previously meant to be retrieved, therefore we ensure whatever library using the old way gets fixed (they only exist in private tree at the moment since the NPTL work is still progressing). 2) the previous number was allocated in a range causing an undefined instruction trap on kernels not supporting that syscall and it was determined that allocating it in a range returning -ENOSYS would be much nicer for libraries trying to determine if the feature is present or not. Signed-off-by: Nicolas Pitre Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-04-29[PATCH] ARM: 2655/1: ARM1136 SWP instruction abort handler fixGeorge G. Davis1-0/+16
Patch from George G. Davis As noted in http://www.arm.com/linux/patch-2.6.9-arm1.gz, the "Faulty SWP instruction on 1136 doesn't set bit 11 in DFSR." So the v6_early_abort handler does not report the correct rd/wr direction for the SWP instruction which may result in SEGVS or hangs. In order to work around this problem, this patch merely updates the fix contained in the ARM Ltd. patch to use the macroised abort handler fixups. Signed-off-by: George G. Davis Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-04-29[PATCH] ARM: 2659/1: do not assign PCI I/O address zero on IXP2000Lennert Buytenhek1-2/+2
Patch from Lennert Buytenhek Assigning the address zero to a PCI device BAR causes some part of the PCI subsystem to believe that resource allocation for that BAR failed due to resource conflicts, which will make attempts to enable the device fail. Work around this by assigning I/O addresses starting from 00010000. While we're at it, make the PCI I/O resource end at 0001ffff, since we only have 64k of outbound I/O window on the IXP2000, and we don't do bank switching. Signed-off-by: Lennert Buytenhek Signed-off-by: Deepak Saxena Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-04-29[PATCH] ARM: 2658/1: start ixp2000 pci memory resource at 0xe0000000Lennert Buytenhek1-1/+1
Patch from Lennert Buytenhek On the IXDP2800, the bootloader does an awful job of configuring the PCI bus, so we make linux reconfigure everything. Having a 1:1 pci:phys address mapping generally simplifies everything, so try to allocate PCI addresses from the [e0000000..ffffffff] range, which is the physical address range of the outbound PCI window on the IXP2000. This does not affect any of the other IXP2000 platforms since they all use their bootloader's PCI resource assignment. Signed-off-by: Lennert Buytenhek Signed-off-by: Deepak Saxena Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-04-29[PATCH] ARM: 2657/1: export ixp2000_pci_config_addrLennert Buytenhek1-1/+1
Patch from Lennert Buytenhek Export ixp2000_pci_config_addr, to be used by the IXDP2800 platform setup code to coordinate booting the master and slave NPU. Signed-off-by: Lennert Buytenhek Signed-off-by: Deepak Saxena Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2005-04-29x86: make traps on 'iret' be debuggable in user spaceLinus Torvalds2-5/+4
This makes a trap on the 'iret' that returns us to user space cause a nice clean SIGSEGV, instead of just a hard (and silent) exit. That way a debugger can actually try to see what happened, and we also properly notify everybody who might be interested about us being gone. This loses the error code, but tells the debugger what happened with ILL_BADSTK in the siginfo.
2005-04-28[PATCH] x86_64: fix PT_NOTE addition to IA32 vDSORoland McGrath1-0/+2
The addition of the PT_NOTE didn't take in the x86_64 version of the i386 vDSO, because I forgot the linker script bit in that copy. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-27[PATCH] ppc64: Fix return value of some vDSO callsBenjamin Herrenschmidt3-0/+5
The ppc vDSO would not properly clear the return value for some calls, which will be a problem when interfacing those calls with glibc. This should be fixed before 2.6.12 is released (as it is the first kernel with the ppc vDSO) so that we don't have to play with symbol versioning and ugly workarounds. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-27Automatic merge of ↵Linus Torvalds35-479/+2308
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6.git
2005-04-26[PATCH] ppc64: trivial user annotationsAl Viro2-8/+8
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-26Automatic merge of kernel.org:/home/rmk/linux-2.6-rmk.gitLinus Torvalds6-187/+124
2005-04-26[PATCH] amd64 rt_sigframe user annotationAl Viro1-1/+1
->pretcode in struct rt_sigframe is a userland pointer (and already treated as such by code using that field). Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-26[PATCH] ppc-opc NULL noise removalAl Viro1-59/+60
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-26[PATCH] ARM: make entry*.S includes more logicalRussell King4-22/+12
Move common includes to entry-header, and file specific includes to the relevant file. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-26[PATCH] ARM: Remove single-use user save/restore macrosRussell King2-54/+25
Assembly macros are pointless if they're only used once. Move them inline. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-26[PATCH] ARM: remove PT_TRACESYSRussell King1-2/+0
PT_TRACESYS is unused, remove it. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-26[PATCH] ARM: Remove SVC_MODE definitionRussell King2-5/+1
SVC_MODE reflects the MODE_SVC definition in asm/ptrace.h. Use the asm/ptrace.h definition instead, and remove SVC_MODE. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-26[PATCH] ARM: Use __NR_SYSCALL_BASE and __ARM_NR_BASE in asm codeRussell King2-27/+15
Don't define our own local constants, but use those already defined in asm/unistd.h instead. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-26[PATCH] ARM: pt_regs offsetsRussell King3-28/+30
Generate pt_regs S_xx offsets from the structure itself instead of #defining them. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-26[PATCH] ARM: Remove argument for disable_irq/enable_irqRussell King3-20/+16
Since we do not require a register for these operations, we can remove this unnecessary argument. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-26[PATCH] ARM: remove some entry initialisation asm codeRussell King2-31/+27
Convert the trivial vector entry initialisation code to C code. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-25Automated merge of kernel.org:/home/rmk/linux-2.6-rmk.gitLinus Torvalds1-6/+50
2005-04-25[PATCH] ARM: 2650/1: PXA27x sleep - workaround Errata 39 & 50 (Patch 2667)Jeff Lackey1-6/+50
Patch from Jeff Lackey This patch updates arch/arm/mach-pxa/sleep.S to support the PXA270 CPU. It works around Errata 39 & 50 from the Intel(R) PXA27x Processor Family Specification Update. Signed-off-by: Jeff Lackey Signed-off-by: Russell King
2005-04-25From: jbarnes@sgi.comJesse Barnes1-1/+1
[IA64] fix ia64 Kconfig to allow CONFIG_PM on sn2 This probably should have been fixed when I fixed up the generic build for discontig+numa machines, but oh well. CONFIG_PM is allowable for generic builds but not for sn2 builds, which doesn't make much sense, and in fact breaks the build if recent ACPI bits are added to the tree. It looks like the only arch that needs to prevent CONFIG_PM stuff is the ski simulator (though those options could probably use some cleanup as well), so remove the big conditional and replace it with a simple test for IA64_HP_SIM instead. Signed-off-by: Jesse Barnes <jbarnes@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64] iosapic.c: typo ... s/spin_unlock_irq/spin_unlock/Kenji Kaneshige1-1/+1
vector sharing patch had a typo ... mismatched spin_lock() with a spin_unlock_irq(). Fix from Kenji Kaneshige. Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64] print "siblings" before {physical,core,thread} idTony Luck1-1/+1
Rohit and Suresh changed their mind about the order to print things in /proc/cpuinfo, but didn't include the change in the version of the patch they sent to me. Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64] vector sharing (Large I/O system support)Kenji Kaneshige2-89/+285
Current ia64 linux cannot handle greater than 184 interrupt sources because of the lack of vectors. The following patch enables ia64 linux to handle greater than 184 interrupt sources by allowing the same vector number to be shared by multiple IOSAPIC's RTEs. The design of this patch is besed on "Intel(R) Itanium(R) Processor Family Interrupt Architecture Guide". Even if you don't have a large I/O system, you can see the behavior of vector sharing by changing IOSAPIC_LAST_DEVICE_VECTOR to fewer value. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64] multi-core/multi-thread identificationSuresh Siddha2-2/+273
Version 3 - rediffed to apply on top of Ashok's hotplug cpu patch. /proc/cpuinfo output in step with x86. This is an updated MC/MT identification patch based on the previous discussions on list. Add the Multi-core and Multi-threading detection for IPF. - Add new core and threading related fields in /proc/cpuinfo. Physical id Core id Thread id Siblings - setup the cpu_core_map and cpu_sibling_map appropriately - Handles Hot plug CPU Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Gordon Jin <gordon.jin@intel.com> Signed-off-by: Rohit Seth <rohit.seth@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64] __copy_user breaks on unaligned srcKeith Owens1-1/+1
memcpy_mck.S::__copy_user breaks in the prefetch code under these conditions :- * src is unaligned and * dst is near the end of a page and * the page after dst is unmapped. Signed-off-by: Keith Owens <kaos@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64] Need to handle lfetch in "no_context" case.Tony Luck1-3/+6
Thanks to Mark for tracking down this one. Users of __copy_from_user_inatomic() will be sad if we don't handle lfetch faults for the "no_context" case. Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64-SGI] Altix SN add support for slots in geoid_t locatorMark Goodwin1-47/+24
This patch against ia64-test-2.6.12 is needed for forthcoming Altix chipsets. It renames geoid_any_t to geoid_common_t and splits the 8bit 'slab' field into two 4bit fields for 'slab' and 'slot'. Similar changes in the Altix SAL will retain backward compatibility for old kernels. Signed-off-by: Mark Goodwin <markgw@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64] fix syscall-optimization goofDavid Mosberger-Tang1-1/+1
Sadly, I goofed in this syscall-tuning patch: ChangeSet 1.1966.1.40 2005/01/22 13:31:05 davidm@hpl.hp.com [IA64] Improve ia64_leave_syscall() for McKinley-type cores. Optimize ia64_leave_syscall() a bit better for McKinley-type cores. The patch looks big, but that's mostly due to renaming r16/r17 to r2/r3. Good for a 13 cycle improvement. The problem is that the size of the physical stacked registers was loaded into the wrong register (r3 instead of r17). Since r17 by coincidence always had the value 1, this had the effect of turning rse_clear_invalid into a no-op. That poses the risk of leaking kernel state back to user-land and is hence not acceptable. The fix below is simple, but unfortunately it costs us about 28 cycles in syscall overhead. ;-( Unfortunately, there isn't much we can do about that since those registers have to be cleared one way or another. --david Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64-SGI] Shub2 BTE support - BTE recovery codeRuss Anderson2-31/+54
patch 2: Shub2 BTE recovery code will be implemented in SAL. Define the SAL interface. Modify bte_error to call SAL for shub2. Signed-off-by: Russ Anderson <rja@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64-SGI] Add new MMR definitions/Modify BTE initialiation&copy.Russ Anderson1-9/+11
patch 1: Add new MMR definitions. Modify BTE initialiation. Modify BTE copy. Signed-off-by: Russ Anderson <rja@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64-SGI] disable TIOCA GART TLB prefetchingMark Maule1-3/+3
Patch to disable SGI TIOCA GART TLB prefetching due to hw bug. Signed-off-by: Mark Maule <maule@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64] MAX_PGT_FREES_PER_PASS must be 'L' to avoid warningTony Luck1-1/+1
'min' is very picky about types of arguments, make it happy Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64] sba_iommu bug fixesAlex Williamson1-40/+56
This fixes a couple of bugs in the zx1/sx1000 sba_iommu. These are all pretty low likelihood of hitting. The first problem is a simple off by one, deep in the sba_alloc_range() error path. Surrounding that was a lock ordering problem that could have potentially deadlocked with the order the locks are grabbed in sba_unmap_single(). I moved the resource locking into sba_search_bitmap() to prevent this. Finally, there's a potential race between unmapping pdir entries and marking incoming DMA pages clean. If you see any oddities, please let me know, but I've tested it pretty thoroughly here. Tony, please apply. Thanks, BTW, many of the options in this driver not on by default are becoming more and more broken. I'll be working on some patches to clean them out, but I wanted to get this bug fix out first. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64] Percpu quicklist for combined allocator for pgd/pmd/pte.Robin Holt3-29/+51
This patch introduces using the quicklists for pgd, pmd, and pte levels by combining the alloc and free functions into a common set of routines. This greatly simplifies the reading of this header file. This patch is simple but necessary for large numa configurations. It simply ensures that only pages from the local node are added to a cpus quicklist. This prevents the trapping of pages on a remote nodes quicklist by starting a process, touching a large number of pages to fill pmd and pte entries, migrating to another node, and then unmapping or exiting. With those conditions, the pages get trapped and if the machine has more than 100 nodes of the same size, the calculation of the pgtable high water mark will be larger than any single node so page table cache flushing will never occur. I ran lmbench lat_proc fork and lat_proc exec on a zx1 with and without this patch and did not notice any change. On an sn2 machine, there was a slight improvement which is possibly due to pages from other nodes trapped on the test node before starting the run. I did not investigate further. This patch shrinks the quicklist based upon free memory on the node instead of the high/low water marks. I have written it to enable preemption periodically and recalculate the amount to shrink every time we have freed enough pages that the quicklist size should have grown. I rescan the nodes zones each pass because other processess may be draining node memory at the same time as we are adding. Signed-off-by: Robin Holt <holt@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64-SGI]Bruce Losure1-0/+548
Missed the "bk new" for this file in the last commit. Signed-off-by: Bruce Losure <blosure@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64-SGI] Altix: enable poweroffAaron J Young1-0/+9
This patch adds the necessary "hook" to allow SGI/SN machines to perform a system power off upon a 'init 0', 'halt -p', 'poweroff' or 'shutdown -h'. The "hook" is to set the pm_power_off callback to ia64_sn_power_down(). pm_power_off is checked in machine_power_off()/do_poweroff() and, if set, is executed. ia64_sn_power_down() is a function already present (but not used currently) in the sn kernel. ia64_sn_power_down() makes a SAL call to execute the power off. Signed-off-by: Aaron J Young <ayoung@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64-SGI] Bus driver for the CX port of SGI's TIO chip.Bruce Losure2-0/+3
This patch is to provide CX port infrastructure for SGI TIO-based h/w. Also a 'core services' driver for SGI FPGA-based h/w. Signed-off-by: Bruce Losure <blosure@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64] perfmon: make pfm_sysctl a global, and other cleanupStephane Eranian2-42/+30
- make pfm_sysctl a global such that it is possible to enable/disable debug printk in sampling formats using PFM_DEBUG. - remove unused pfm_debug_var variable - fix a bug in pfm_handle_work where an BUG_ON() could be triggered. There is a path where pfm_handle_work() can be called with interrupts enabled, i.e., when TIF_NEED_RESCHED is set. The fix correct the masking and unmasking of interrupts in pfm_handle_work() such that we restore the interrupt mask as it was upon entry. signed-off-by: stephane eranian <eranian@hpl.hp.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64-SGI] Shub2 provides an addition of 2 External Interrupt events.Colin Ngam1-13/+2
Signed-off-by: Colin Ngam <cngam@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64-SGI] Altix SN topology fix potential infinite loopMark Goodwin1-5/+7
Fix infinite loop if sn_hwperf_location_to_bpos() fails. Signed-off-by: Mark Goodwin <markgw@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64-SGI] Altix SN topology support for new chipsets and pci topologyMark Goodwin1-9/+124
please accept this patch to the Altix SN platform topology export interface to support new chipsets and to export PCI topology. This follows on top of Jack Steiner's patch dated March 1st ("New chipset support for SN platform"). Signed-off-by: Mark Goodwin <markgw@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64] speed up syscall path a bit moreDavid Mosberger-Tang1-6/+6
Recently I noticed that clearing ar.ssd/ar.csd right before srlz.d is causing significant stalling in the syscall path. The patch below fixes that by moving the register-writes after srlz.d. On a Madison, this drops break-based getpid() from 241 to 226 cycles (-15 cycles). Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64] Tighten up unw_unwind_to_user checkKeith Owens1-10/+17
Detect user space by the unwind frame with predicate PRED_USER_STACK set, instead of a user space IP. Tighten up the last ditch check for running off the top of the kernel stack. Based on a suggestion by David Mosberger, reworked to fit the current tree. This survives my stress test which used to break 2.6.9 kernels. Unlike 2.6.11, the stress test now unwinds to the correct point, so gdb can get the user space registers. Signed-off-by: Keith Owens <kaos@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64] add missing cpu_relax() in ITC syncing codeDavid Mosberger-Tang1-4/+7
Call cpu_relax() in busy-waiting loops of the ITC-syncing code. Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64-SGI] altix: tioca chip driver (agp)Mark Maule3-1/+671
Provide a driver for the altix TIOCA AGP chipset. An agpgart backend will be provided as a separate patch. Signed-off-by: Mark Maule <maule@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64-SGI] sn2-move-pci-headers.patchMark Maule9-123/+14
Move a couple of headers out of arch/ia64/sn/include/pci and into include/asm-ia64/sn. Signed-off-by: Mark Maule <maule@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[IA64-SGI] sn2-pci-dma-abstraction.patchMark Maule7-79/+173
Provide an abstraction of the altix pci dma runtime layer so that multiple pci-based bridges can be supported. Signed-off-by: Mark Maule <maule@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-25[PATCH] ppc user annotations: debug_setconetext(2)Al Viro1-1/+1
3rd argument of sys_debug_setcontext() is also a userland pointer. Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-25[PATCH] ppc sparse annotations: emulate_string_inst()Al Viro1-1/+1
replaced declaration of EA from u32 to unsigned long - this beast is used only to cast it to (userland) pointer and proper integer type for that is unsigned long. Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-25[PATCH] ppc iomem annotations: pmac_low_i2cAl Viro1-6/+4
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-25[PATCH] ppc iomem annotations: ebony_setup_pcix()Al Viro1-1/+1
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-25[PATCH] ppc iomem annotations: ->io_base_virtAl Viro7-25/+17
* ->io_base_virt in struct pci_controller is iomem pointer. Marked as such. Most of the places that used it are already annotated to expect iomem. * places that did gratitious (and wrong) casts a-la isa_io_base = (unsigned long)ioremap(...); hose->io_base_virt = (void *)isa_io_base; turned into hose->io_base_virt = ioremap(...); isa_io_base = (unsigned long)hose->io_base_virt; * pci_bus_io_base() annotated as returning iomem pointer. Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-25[PATCH] ppc user annotations: sigcontextAl Viro1-1/+1
sigcontext.regs is a userland pointer Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24[SPARC]: dump_stack for sparcTom 'spot' Callaway1-0/+11
Bob Breuer wrote a patch to add dump_stack for sparc. Supposedly, this was applied, but it doesn't exist in 2.6.11. This is the same patch, rediffed against 2.6.11. Signed-off-by: Tom 'spot' Callaway <tcallawa@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-24[SPARC]: More sparc32 ksyms cleanupsTom 'spot' Callaway1-0/+7
The sparc32 ksyms is missing a few more symbols, these are primarily related to SMP, and will be needed as SMP gets beaten back into functionality. Specifically, add __cpu_data (PER_CPU), cpu_online_map, and phys_cpu_present_map. This patch assumes that the earlier "linux-2.6.11-sparc-fixksyms.patch" is applied, otherwise, it will apply with fuzz. Signed-off-by: Tom 'spot' Callaway <tcallawa@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-24[SPARC]: Missing sparc32 ksymsTom 'spot' Callaway1-3/+10
This patch adds some missing sparc32 ksyms that are needed. Specifically, ___rw_read_enter, ___rw_read_exit, ___rw_write_enter, and sys_close. Signed-off-by: Tom 'spot' Callaway <tcallawa@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-24[PATCH] ppc trivial iomem annotations: pmac_smp.cAl Viro1-7/+7
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24[PATCH] ppc trivial iomem annotations: chrpAl Viro2-4/+5
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24[PATCH] ppc trivial iomem annotations: pmac_time.cAl Viro1-4/+3
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24[PATCH] mostek bogus sparse annotations fixedAl Viro1-12/+12
void * __iomem foo is not a pointer to iomem - it's an iomem variable containing void *. A pile of such guys in arch/sparc64/kernel/time.c, drivers/sbus/char/rtc.c and include/asm-sparc64/mostek.h turned into intended void __iomem *. Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-24[PATCH] missing dependency on sparc64Al Viro1-0/+1
CONFIG_HW_CONSOLE selects vt.c; without the stuff pulled by CONFIG_VT it will not build. Normally we get both in drivers/char/Kconfig and there HW_CONSOLE depends on VT. sparc64 does not pull drivers/char/Kconfig and has that sutff in arch/sparc64/Kconfig instead. However, it forgets to add the same dependency. As the result, turning VT off [which is possible] will end up with broken build. For no good reason... Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-22[IA64] Fix build errors for !HOTPLUG case.Ashok Raj1-3/+7
Signed-off-by: Ashok Raj <ashok.raj@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-22[IA64] cpu hotplug: return offlined cpus to SALAshok Raj4-110/+361
This patch is required to support cpu removal for IPF systems. Existing code just fakes the real offline by keeping it run the idle thread, and polling for the bit to re-appear in the cpu_state to get out of the idle loop. For the cpu-offline to work correctly, we need to pass control of this CPU back to SAL so it can continue in the boot-rendez mode. This gives the SAL control to not pick this cpu as the monarch processor for global MCA events, and addition does not wait for this cpu to checkin with SAL for global MCA events as well. The handoff is implemented as documented in SAL specification section 3.2.5.1 "OS_BOOT_RENDEZ to SAL return State" Signed-off-by: Ashok Raj <ashok.raj@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-22[IA64] ia32_signal.c: erroneous use of memset/memcpyArun Sharma1-3/+2
Found by Alexander Nyberg, improved by Bjorn Helgaas. - Fix the incorrect argument to sizeof() - looks like memcpy() code pass was dervived from code that used copy_from_user(). But in this case we are doing to kernel space to kernel space copy, so memcpy is the right routine, but it doesn't return an error code. Signed-off-by: Arun Sharma <arun.sharma@intel.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-04-22[PATCH] x86_64: fix new out of line put_user()Alexander Nyberg1-6/+6
The labels after the last put_user patch were misplaced so exceptions on the real mov instructions would not be handled. Noted by Brian Gerst <bgerst@didntduck.org>
2005-04-21[SPARC]: Provide generic ioctls in Sparc RTC driver.David S. Miller1-16/+21
Provide support for drivers/char/rtc.c ioctls in the Mostek rtc driver as well as the Sparc specific RTCGET and RTCSET. This allows userspace to be much less messy. Currently util-linux and other spots jump through hoops trying various ioctl variants until it hits the right one whatever driver actually being used supports. Eventually all of this should move over to the genrtc.c driver, but not today... While we are here, fix up the register types for sparse. Thanks to Frans Pop for helping point out this issue. Signed-off-by: David S. Miller <davem@davemloft.net>
2005-04-21[PATCH] fix subarch breakage in amd dual core updatesJames Bottomley1-2/+2
The patch to arch/i386/kernel/cpu/amd.c relies on the variable cpu_core_id which is defined in i386/kernel/smpboot.c. This means it is only present if CONFIG_X86_SMP is defined, not CONFIG_SMP (alternative SMP harnesses won't have it, which is why it breaks voyager). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-21[PATCH] alpha: key management syscallsRichard Henderson1-0/+3
Allocate syscall numbers for add_key, request_key, keyctl.
2005-04-21[PATCH] x86_64: Bug in new out of line put_user()Alexander Nyberg2-11/+20
The new out of line put_user() assembly on x86_64 changes %rcx without telling GCC about it causing things like: http://bugme.osdl.org/show_bug.cgi?id=4515 See to it that %rcx is not changed (made it consistent with get_user()). Signed-off-by: Alexander Nyberg <alexn@telia.com> Signed-off-by: ak@suse.de Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-19[PATCH] freepgt: arm26 FIRST_USER_ADDRESS PAGE_SIZEHugh Dickins1-5/+4
ARM26 define FIRST_USER_ADDRESS as PAGE_SIZE (beyond the machine vectors when they are mapped low), and use that definition in place of locally defined MIN_MAP_ADDR. Previously, ARM26 permitted user mappings at 0 if the machine vectors were mapped high; but that's inconsistent with ARM, and FIRST_USER_ADDRESS would then have to be determined at runtime. Let's fix it at PAGE_SIZE throughout the architecture. 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-04-19[PATCH] freepgt: arm FIRST_USER_ADDRESS PAGE_SIZEHugh Dickins1-9/+2
ARM define FIRST_USER_ADDRESS as PAGE_SIZE (beyond the machine vectors when they are mapped low), and use that definition in place of locally defined MIN_MAP_ADDR. 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-04-19[PATCH] freepgt: hugetlb area is cleanHugh Dickins2-46/+2
Once we're strict about clearing away page tables, hugetlb_prefault can assume there are no page tables left within its range. Since the other arches continue if !pte_none here, let i386 do the same. 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-04-19[PATCH] freepgt: hugetlb_free_pgd_rangeHugh Dickins2-16/+23
ia64 and ppc64 had hugetlb_free_pgtables functions which were no longer being called, and it wasn't obvious what to do about them. The ppc64 case turns out to be easy: the associated tables are noted elsewhere and freed later, safe to either skip its hugetlb areas or go through the motions of freeing nothing. Since ia64 does need a special case, restore to ppc64 the special case of skipping them. The ia64 hugetlb case has been broken since pgd_addr_end went in, though it probably appeared to work okay if you just had one such area; in fact it's been broken much longer if you consider a long munmap spanning from another region into the hugetlb region. In the ia64 hugetlb region, more virtual address bits are available than in the other regions, yet the page tables are structured the same way: the page at the bottom is larger. Here we need to scale down each addr before passing it to the standard free_pgd_range. Was about to write a hugely_scaled_down macro, but found htlbpage_to_page already exists for just this purpose. Fixed off-by-one in ia64 is_hugepage_only_range. Uninline free_pgd_range to make it available to ia64. Make sure the vma-gathering loop in free_pgtables cannot join a hugepage_only_range to any other (safe to join huges? probably but don't bother). 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-04-19[PATCH] freepgt: free_pgtables use vma listHugh Dickins2-36/+3
Recent woes with some arches needing their own pgd_addr_end macro; and 4-level clear_page_range regression since 2.6.10's clear_page_tables; and its long-standing well-known inefficiency in searching throughout the higher-level page tables for those few entries to clear and free: all can be blamed on ignoring the list of vmas when we free page tables. Replace exit_mmap's clear_page_range of the total user address space by free_pgtables operating on the mm's vma list; unmap_region use it in the same way, giving floor and ceiling beyond which it may not free tables. This brings lmbench fork/exec/sh numbers back to 2.6.10 (unless preempt is enabled, in which case latency fixes spoil unmap_vmas throughput). Beware: the do_mmap_pgoff driver failure case must now use unmap_region instead of zap_page_range, since a page table might have been allocated, and can only be freed while it is touched by some vma. Move free_pgtables from mmap.c to memory.c, where its lower levels are adapted from the clear_page_range levels. (Most of free_pgtables' old code was actually for a non-existent case, prev not properly set up, dating from before hch gave us split_vma.) Pass mmu_gather** in the public interfaces, since we might want to add latency lockdrops later; but no attempt to do so yet, going by vma should itself reduce latency. But what if is_hugepage_only_range? Those ia64 and ppc64 cases need careful examination: put that off until a later patch of the series. What of x86_64's 32bit vdso page __map_syscall32 maps outside any vma? And the range to sparc64's flush_tlb_pgtables? It's less clear to me now that we need to do more than is done here - every PMD_SIZE ever occupied will be flushed, do we really have to flush every PGDIR_SIZE ever partially occupied? A shame to complicate it unnecessarily. Special thanks to David Miller for time spent repairing my ceilings. 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-04-18Merge with master.kernel.org:/home/rmk/linux-2.6-rmk.gitLinus Torvalds1-0/+33
This adds the missing arch/arm/lib/bitops.h file.
2005-04-18[PATCH] sparc64: Fix statDavid S. Miller2-9/+71
Like Alpha, sparc64's struct stat was defined before we had the nanosecond et al. fields added. So like Alpha I have to cons up a struct stat64 to get this stuff. I'll work on the glibc bits soon. Also, we were forgetting to fill in the nanosecond fields in the sparc compat stat64 syscalls. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-18[PATCH] ARM: Add missing new file for bitops patchRussell King1-0/+33
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-18[PATCH] M68k: Update defconfigs for 2.6.12-rc2Geert Uytterhoeven12-281/+414
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-18[PATCH] M68k: Update defconfigs for 2.6.11Geert Uytterhoeven12-69/+316
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-18[PATCH] x86: fix acpi compile without CONFIG_ACPI_BUSChris Wedgwood1-0/+2
The recent acpi boot patch breaks for me: acpi_fadt needs CONFIG_ACPI_BUS. Signed-off-By: Chris Wedgwood <cw@f00f.org> Acked-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-17[PATCH] sparc64: Fix copy_sigingo_to_user32()Jurij Smakov1-1/+4
The compat routine to copy over this data structure was not handling SI_POLL correctly, breaking various fcntl() variants in compat tasks. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-17[PATCH] sparc64: Reduce ptrace cache flushingDavid S. Miller1-27/+55
We were flushing the D-cache excessively for ptrace() processing and this makes debugging threads so slow as to be totally unusable. All process page accesses via ptrace() go via access_process_vm(). This routine, for each process page, uses get_user_pages(). That in turn does a flush_dcache_page() on the child pages before we copy in/out the ptrace request data. Therefore, all we need to do after the data movement is: 1) Flush the D-cache pages if the kernel maps the page to a different color than userspace does. 2) If we wrote to the page, we need to flush the I-cache on older cpus. Previously we just flushed the entire cache at the end of a ptrace() request, and that was beyond stupid. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-17[PATCH] sparc: Fix PTRACE_CONT bogosityDavid S. Miller2-31/+0
SunOS aparently had this weird PTRACE_CONT semantic which we copied. If the addr argument is something other than 1, it sets the process program counter to whatever that value is. This is different from every other Linux architecture, which don't do anything with the addr and data args. This difference in particular breaks the Linux native GDB support for fork and vfork tracing on sparc and sparc64. There is no interest in running SunOS binaries using this weird PTRACE_CONT behavior, so just delete it so we behave like other platforms do. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-17[PATCH] sparc64: use message queue compat syscallsDavid S. Miller1-1/+1
A couple message queue system call entries for compat tasks were not using the necessary compat_sys_*() functions, causing some glibc test cases to fail. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-17[PATCH] sparc64: Do not flush dcache for ZERO_PAGE.David S. Miller1-4/+15
This case actually can get exercised a lot during an ELF coredump of a process which contains a lot of non-COW'd anonymous pages. GDB has this test case which in partiaular creates near terabyte process full of ZERO_PAGEes. It takes forever to just walk through the page tables because of all of these spurious cache flushes on sparc64. With this change it takes only a second or so. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-17[PATCH] ARM: bitopsRussell King6-68/+12
Convert ARM bitop assembly to a macro. All bitops follow the same format, so it's silly duplicating the code when only one or two instructions are different. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-17[PATCH] ARM: showregsRussell King2-10/+13
Fix show_regs() to provide a backtrace. Provide a new __show_regs() function which implements the common subset of show_regs() and die(). Add prototypes to asm-arm/system.h Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-17[PATCH] ARM: h3600_irda_set_speed argumentsRussell King1-1/+1
h3600_irda_set_speed() had the wrong type for the "speed" argument. Fix this. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-17[PATCH] ARM: footbridge rtc initRussell King1-2/+2
The footbridge ISA RTC was being initialised before we had setup the kernel timer. This caused a divide by zero error when the current time of day is set. Resolve this by initialising the RTC after the kernel timer has been initialised. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
2005-04-16[PATCH] reparent_to_init cleanupCoywolf Qi Hunt1-1/+0
This patch hides reparent_to_init(). reparent_to_init() should only be called by daemonize(). Signed-off-by: Coywolf Qi Hunt <coywolf@lovecn.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] add Big Endian variants of ioread/iowriteJames Bottomley1-0/+68
In the new io infrastructure, all of our operators are expecting the underlying device to be little endian (because the PCI bus, their main consumer, is LE). However, there are a fair few devices and busses in the world that are actually Big Endian. There's even evidence that some of these BE bus and chip types are attached to LE systems. Thus, there's a need for a BE equivalent of our io{read,write}{16,32} operations. The attached patch adds this as io{read,write}{16,32}be. When it's in, I'll add the first consume (the 53c700 SCSI chip driver). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] efi: eliminate bad section referencesmaximilian attems1-2/+2
Randy please double check especially this one. there may be a better solution. Fix efi section references: remove __initdata for struct efi efi_phys and struct efi_memory_map memmap Error: ./arch/i386/kernel/efi.o .text refers to 000000d3 R_386_32 .init.data Error: ./arch/i386/kernel/efi.o .text refers to 000000ff R_386_32 .init.data efi_memmap_walk (which is not __init nor static) accesses both efi_phys and memmap. Signed-off-by: maximilian attems <janitor@sternwelten.at> Acked-by: Randy Dunlap <rddunlap@osdl.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] uml: fix compilation for __CHOOSE_MODE additionPaolo 'Blaisorblade' Giarrusso1-17/+10
I had added the __CHOOSE_MODE syntax to fix some warnings with newer GCC's in the uml-fix-cond-expr-as-lvalues-warning patch. Here is the update from the version I sent to make it work also when only one mode (TT or SKAS) is enabled. Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] fix u32 vs. pm_message_t in rest of the treePavel Machek1-1/+1
This fixes u32 vs. pm_message_t confusion in remaining places. Fortunately there's few of them. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] u32 vs. pm_message_t in ppc and radeonPavel Machek1-1/+1
This fixes pm_message_t vs. u32 confusion in ppc and aty (I *hope* that's basically radeon code...). I was not able to test most of these, but I'm not really changing anything, so it should be okay. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] Fix u32 vs. pm_message_t in x86-64Pavel Machek5-5/+5
I thought I'm done with fixing u32 vs. pm_message_t ... unfortunately that turned out not to be the case... Here are fixes x86-64. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] pm_message_t: more fixes in common and i386Pavel Machek6-6/+6
I thought I'm done with fixing u32 vs. pm_message_t ... unfortunately that turned out not to be the case as Russel King pointed out. Here are fixes for Documentation and common code (mainly system devices). Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] x86, x86_64: dual core proc-cpuinfo and sibling-map fixSiddha, Suresh B3-16/+6
- broken sibling_map setup in x86_64 - grouping all the core and HT related cpuinfo fields. We are reasonably sure that adding new cpuinfo fields after "siblings" field, will not cause any app failure. Thats because today's /proc/cpuinfo format is completely different on x86, x86_64 and we haven't heard of any x86 app breakage because of this issue. Grouping these fields will result in more or less common format on all architectures (ia64, x86 and x86_64) and will cause less confusion. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] x86_64: Switch SMP bootup over to new CPU hotplug state machineAndi Kleen4-365/+363
This will allow hotplug CPU in the future and in general cleans up a lot of crufty code. It also should plug some races that the old hackish way introduces. Remove one old race workaround in NMI watchdog setup that is not needed anymore. I removed the old total sum of bogomips reporting code. The brag value of BogoMips has been greatly devalued in the last years on the open market. Real CPU hotplug will need some more work, but the infrastructure for it is there now. One drawback: the new TSC sync algorithm is less accurate than before. The old way of zeroing TSCs is too intrusive to do later. Instead the TSC of the BP is duplicated now, which is less accurate. akpm: - sync_tsc_bp_init seems to have the sense of `init' inverted. - SPIN_LOCK_UNLOCKED is deprecated - use DEFINE_SPINLOCK. Cc: <rusty@rustcorp.com.au> Cc: <mingo@elte.hu> 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-04-16[PATCH] x86_64: Rename the extended cpuid level fieldAndi Kleen1-7/+6
It was confusingly named. Signed-off-by: Andi Kleen <ak@suse.de> DESC x86_64: Switch SMP bootup over to new CPU hotplug state machine EDESC From: "Andi Kleen" <ak@suse.de> This will allow hotplug CPU in the future and in general cleans up a lot of crufty code. It also should plug some races that the old hackish way introduces. Remove one old race workaround in NMI watchdog setup that is not needed anymore. I removed the old total sum of bogomips reporting code. The brag value of BogoMips has been greatly devalued in the last years on the open market. Real CPU hotplug will need some more work, but the infrastructure for it is there now. One drawback: the new TSC sync algorithm is less accurate than before. The old way of zeroing TSCs is too intrusive to do later. Instead the TSC of the BP is duplicated now, which is less accurate. Cc: <rusty@rustcorp.com.au> Cc: <mingo@elte.hu> 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-04-16[PATCH] x86_64: Add acpi_skip_timer_override optionAndi Kleen1-0/+4
Add acpi_skip_timer_override option. It was missing previously. 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-04-16[PATCH] x86_64: Rewrite exception stack backtracingAndi Kleen1-68/+79
Exceptions and hardware interrupts can, to a certain degree, nest, so when attempting to follow the sequence of stacks used in order to dump their contents this has to be accounted for. Also, IST stacks have their tops stored in the TSS, so there's no need to add the stack size to get to their ends. Minor changes from AK. Signed-off-by: Jan Beulich <jbeulich@novell.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-04-16[PATCH] x86_64: Final support for AMD dual coreAndi Kleen3-44/+53
Clean up the code greatly. Now uses the infrastructure from the Intel dual core patch Should fix a final bug noticed by Tyan of not detecting the nodes correctly in some corner cases. Patch for x86-64 and i386 Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] x86_64: add support for Intel dual-core detection and displayingAndi Kleen7-32/+159
Appended patch adds the support for Intel dual-core detection and displaying the core related information in /proc/cpuinfo. It adds two new fields "core id" and "cpu cores" to x86 /proc/cpuinfo and the "core id" field for x86_64("cpu cores" field is already present in x86_64). Number of processor cores in a die is detected using cpuid(4) and this is documented in IA-32 Intel Architecture Software Developer's Manual (vol 2a) (http://developer.intel.com/design/pentium4/manuals/index_new.htm#sdm_vol2a) This patch also adds cpu_core_map similar to cpu_sibling_map. Slightly hacked by AK. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.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-04-16[PATCH] x86_64: Keep only a single debug notifier chainAndi Kleen1-11/+3
Calling a notifier three times in the debug handler does not make much sense, because a debugger can figure out the various conditions by itself. Remove the additional calls to DIE_DEBUG and DIE_DEBUGSTEP completely. This matches what i386 does now. This also makes sure interrupts are always still disabled when calling a debugger, which prevents: BUG: using smp_processor_id() in preemptible [00000001] code: tpopf/1470 caller is post_kprobe_handler+0x9/0x70 Call Trace:<ffffffff8024f10f>{smp_processor_id+191} <ffffffff80120e69>{post_kpro be_handler+9} <ffffffff80120f7a>{kprobe_exceptions_notify+58} <ffffffff80144fc0>{notifier_call_chain+32} <ffffffff80110daf>{do_debug+335} <ffffffff8010f513>{debug+127} <EOE> on preemptible debug kernels with kprobes when single stepping in user space. This was probably a bug even on non preempt kernels, this function was supposed to be running with interrupts off according to a comment there. Note to third part debugger maintainers: please double check your debugger can still single step. Cc: <prasanna@in.ibm.com> Cc: <jbeulich@novell.com> Cc: <kaos@sgi.com> Cc: <jim.houston@ccur.com> Cc: <jfv@bluesong.net> 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-04-16[PATCH] x86_64: Use the e820 hole to map the IOMMU/AGP apertureAndi Kleen1-11/+30
This might save memory on some Opteron systems without AGP bridge. 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-04-16[PATCH] x86_64: Port over e820 gap detection from i386Andi Kleen2-11/+60
Look for gaps in the e820 memory map to put PCI resources in. This hopefully fixes problems with the PCI code assigning 32bit BARs MMIO resources which are >32bit. 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-04-16[PATCH] x86_64-always-use-cpuid-80000008-to-figure-out-mtrr fixSiddha, Suresh B1-2/+4
We need to use the size_and_mask in set_mtrr_var_ranges(which is called while programming MTRR's for AP's Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] x86_64: Always use CPUID 80000008 to figure out MTRR address space sizeAndi Kleen1-34/+15
It doesn't make sense to only do this only for AMD K8. This would support future CPUs with extended address spaces properly. For i386 and x86-64 Cc: <davej@redhat.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-04-16[PATCH] x86_64: Remove excessive stack allocation in MCE code with large NR_CPUSAndi Kleen1-1/+7
Remove excessive stack allocation in MCE code with large NR_CPUS 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-04-16[PATCH] x86_64: Use the extended RIP MSR for machine check reporting if ↵Andi Kleen1-8/+22
available. They are rumoured to be much more reliable than the RIP in the stack frame on P4s. This is a borderline case because the code is very simple. Please note there are no plans to add support for all the MCE register MSRs. Cc: <venkatesh.pallipadi@intel.com> Cc: <racing.guo@intel.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-04-16[PATCH] x86_64: Don't assume future AMD CPUs have K8 compatible performance ↵Andi Kleen1-1/+1
counters The NMI watchdog code did this incorrectly 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-04-16[PATCH] x86_64: Make kernel math errors a die() nowAndi Kleen1-8/+2
There were no reports about the previous warning for FPU exceptions in the kernel, so make it a die() now. Also improve the error messages slightly. 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-04-16[PATCH] x86_64: Support constantly ticking TSCsAndi Kleen2-3/+7
On Intel Noconas the TSC ticks with a constant frequency. Don't scale the factor used by udelay when cpufreq changes the frequency. This generalizes an earlier patch by Intel for this. Cc: <venkatesh.pallipadi@intel.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-04-16[PATCH] x86_64: Remove unused macro in preempt supportAndi Kleen1-4/+1
Remove unused macro in preempt support 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-04-16[PATCH] x86_64: Fix a small missing schedule raceAndi Kleen1-1/+1
Could lead to a lost reschedule event when the process already rescheduled on exception exit, and needs it again while still being in the kernel. Unlikely case though. Also remove one redundant cli in another entry.S path. 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-04-16[PATCH] x86_64: Regularize exception stack handlingAndi Kleen2-51/+55
This fixes various issues in the return path for "paranoid" handlers (= running on a private exception stack that act like NMIs). Generalize previous hack to switch back to process stack for scheduling/signal handling purposes. 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-04-16[PATCH] x86_64: Call do_notify_resume unconditionally in entry.SAndi Kleen1-18/+8
This removes some unnecessary code in the assembly files. Matches i386 behaviour. In addition don't clear the work check mask after work has been done. This fixes some theoretical signal/other event losses. 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-04-16[PATCH] x86_64: Minor microoptimization in syscall entry slow pathAndi Kleen1-3/+1
Minor microoptimization in syscall entry slow path 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-04-16[PATCH] x86_64: Fix interaction of single stepping with debuggersAndi Kleen1-0/+12
Ported from i386/Linus Fix another TF corner case. Need to do the special TF handling for all signals to make debuggers happy 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-04-16[PATCH] x86_64: Dump stack and prevent recursion on early faultAndi Kleen1-0/+8
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-04-16[PATCH] x86_64: Use a common function to find code segment basesAndi Kleen1-7/+5
To avoid some code duplication. 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-04-16[PATCH] x86_64: Handle programs that set TF in user space using popf while ↵Andi Kleen1-0/+88
single stepping Ported from i386/Linus Still won't handle other TF changing instructions like IRET or LAHF. Prefix handling must be double checked... 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-04-16[PATCH] x86_64: Some fixes for single step handlingAndi Kleen2-16/+12
Ported from i386/Linus Be more careful with TF handling to fix some copy protection codes in Wine 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-04-16[PATCH] x86_64: clean up ptrace single-steppingAndi Kleen1-29/+50
Ported from i386 (originally from Linus) clean up ptrace single-stepping, make PT_DTRACE exact. (This makes the naming of "DTRACE" purely historical, since on x86 it now means "single step in progress"). 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-04-16[PATCH] x86_64: Use a VMA for the 32bit vsyscallAndi Kleen4-73/+61
Use a real VMA to map the 32bit vsyscall page This interacts better with Hugh's upcomming VMA walk optimization Also removes some ugly special cases. Code roughly modelled after the ppc64 vdso version from Ben Herrenschmidt. 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-04-16[PATCH] x86_64 show_stack(): call touch_nmi_watchdogakpm@osdl.org1-0/+2
I had strange NMI watchdog timeouts running sysrq-T across 9600-baud serial. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] x86_64 genapic updateJason Davis2-0/+20
x86_64 genapic mechanism should be aware of machines that use physical APIC mode regardless of how many clusters/processors are detected. ACPI 3.0 FADT makes this determination very simple by providing a feature flag "force_apic_physical_destination_mode" to state whether the machine unconditionally uses physical APIC mode. Unisys' next generation x86_64 ES7000 will need to utilize this FADT feature flag in order to boot the x86_64 kernel in the correct APIC mode. This patch has been tested on both x86_64 commodity and ES7000 boxes. Signed-off-by: Jason Davis <jason.davis@unisys.com> Acked-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] x86_64: disable interrupts during SMP bogomips checkingAndi Kleen1-4/+0
Port over a i386 kludge from rusty to x86-64 I don't think it is a full solution, but the upcomming smp bootup rewrite will solve it. This fixes BUGs at bootup on bigger x86-64 systems. 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-04-16[PATCH] x86-64/i386: Revert cpuinfo siblings behaviour back to 2.6.10Andi Kleen2-4/+11
Only display physical id/siblings when there are siblings or dual core. In 2.6.11 I accidentially broke it and it was always displaying these fields But for compatibility to all these /proc parsers around it is better to do it in the old way again. Noticed by Suresh Siddha Cc: <Suresh.b.siddha@intel.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-04-16[PATCH] x86-64: i386 vDSO: add PT_NOTE segmentRoland McGrath1-0/+3
Use the i386 PT_NOTE segment in x86_64 as well. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] i386 vDSO: add PT_NOTE segmentRoland McGrath3-3/+31
This patch adds an ELF note to the vDSO giving the LINUX_VERSION_CODE value. Having this in the vDSO lets the dynamic linker avoid the `uname' syscall it now always does at startup to ascertain the kernel ABI available. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] i386: Use loaddebug macro consistentlyRoland McGrath2-8/+1
This moves the macro loaddebug from asm-i386/suspend.h to asm-i386/processor.h, which is the place that makes sense for it to be defined, removes the extra copy of the same macro in arch/i386/kernel/process.c, and makes arch/i386/kernel/signal.c use the macro in place of its expansion. This is a purely cosmetic cleanup for the normal i386 kernel. However, it is handy for Xen to be able to just redefine the loaddebug macro once instead of also changing the signal.c code. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] irq and pci_ids: patch for Intel ESB2Jason Gaston1-0/+1
This patch adds the Intel ESB2 DID's to the irq.c and pci_ids.h files. Signed-off-by: Jason Gaston <Jason.d.gaston@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] mips: remove #include <linux/audit.h> two timesYoichi Yuasa1-1/+0
This patch removes #include <linux/audit.h>. Because it includes it two times. Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] mips: update VR41xx CPU-PCI bridge supportYoichi Yuasa3-72/+91
This patch updates NEC VR4100 series CPU-PCI bridge support. Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc64: remove -fno-omit-frame-pointerAnton Blanchard1-4/+0
During some code inspection using gcc 4.0 I noticed a stack frame was being created for a number of functions that didnt require it. For example: c0000000000df944 <._spin_unlock>: c0000000000df944: fb e1 ff f0 std r31,-16(r1) c0000000000df948: f8 21 ff c1 stdu r1,-64(r1) c0000000000df94c: 7c 3f 0b 78 mr r31,r1 c0000000000df950: 7c 20 04 ac lwsync c0000000000df954: e8 21 00 00 ld r1,0(r1) c0000000000df958: 38 00 00 00 li r0,0 c0000000000df95c: 90 03 00 00 stw r0,0(r3) c0000000000df960: eb e1 ff f0 ld r31,-16(r1) c0000000000df964: 4e 80 00 20 blr It turns out we are adding -fno-omit-frame-pointer to ppc64 which is causing the above behaviour. Removing that flag results in much better code: c0000000000d5b30 <._spin_unlock>: c0000000000d5b30: 7c 20 04 ac lwsync c0000000000d5b34: 38 00 00 00 li r0,0 c0000000000d5b38: 90 03 00 00 stw r0,0(r3) c0000000000d5b3c: 4e 80 00 20 blr We dont require a frame pointer to debug on ppc64, so remove it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc64: remove bogus f50 hack in prom.cBenjamin Herrenschmidt1-6/+0
The code that parses the OF device tree contains an old bogus hack which was killed a long time ago on ppc32, but survived in ppc64. It was supposed to help with a problem on the f50 which is ... a 32 bits machine :) Additionally, that hack is causing problems, so let's just get rid of it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc64: Detect altivec via firmware on unknown CPUsBenjamin Herrenschmidt3-3/+20
This patch adds detection of the Altivec capability of the CPU via the firmware in addition to the cpu table. This allows newer CPUs that aren't in the table to still have working altivec support in the kernel. It also fixes a problem where if a CPU isn't recognized as having altivec features, and takes an altivec unavailable exception due to userland issuing altivec instructions, the kernel would happily enable it and context switch the registers ... but not all of them (it would basically forget vrsave). With this patch, the kernel will refuse to enable altivec when the feature isn't detected for the CPU (SIGILL). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc64: Improve mapping of vDSOBenjamin Herrenschmidt1-7/+12
This patch reworks the way the ppc64 is mapped in user memory by the kernel to make it more robust against possible collisions with executable segments. Instead of just whacking a VMA at 1Mb, I now use get_unmapped_area() with a hint, and I moved the mapping of the vDSO to after the mapping of the various ELF segments and of the interpreter, so that conflicts get caught properly (it still has to be before create_elf_tables since the later will fill the AT_SYSINFO_EHDR with the proper address). While I was at it, I also changed the 32 and 64 bits vDSO's to link at their "natural" address of 1Mb instead of 0. This is the address where they are normally mapped in absence of conflict. By doing so, it should be possible to properly prelink one it's been verified to work on glibc. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc64: fix export of wrong symbolPaul Mackerras1-1/+1
In arch/ppc64/kernel/ppc_ksyms.c, we are still exporting flush_icache_range, but that has been changed to be an inline in include/asm-ppc64/cacheflush.h which calls __flush_icache_range (defined in arch/ppc64/kernel/misc.S). This patch changes the export to __flush_icache_range, thus allowing modules to use the inline flush_icache_range. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc64: Fix semantics of __ioremapBenjamin Herrenschmidt4-16/+18
This patch fixes ppc64 __ioremap() so that it stops adding implicitely _PAGE_GUARDED when the cache is not writeback, and instead, let the callers provide the flag they want here. This allows things like framebuffers to explicitely request a non-cacheable and non-guarded mapping which is more efficient for that type of memory without side effects. The patch also fixes all current callers to add _PAGE_GUARDED except btext, which is fine without it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc64: very basic desktop g5 sound supportBenjamin Herrenschmidt2-4/+29
This patch hacks the current PowerMac Alsa driver to add some basic support of analog sound output to some desktop G5s. It has severe limitations though: - Only 44100Khz 16 bits - Only work on G5 models using a TAS3004 analog code, that is early single CPU desktops and all dual CPU desktops at this date, but none of the more recent ones like iMac G5. - It does analog only, no digital/SPDIF support at all, no native AC3 support Better support would require a complete rewrite of the driver (which I am working on, but don't hold your breath), to properly support the diversity of apple sound HW setup, including dual codecs, several i2s busses, all the new codecs used in the new machines, proper clock switching with digital, etc etc etc... This patch applies on top of the other PowerMac sound patches I posted in the past couple of days (new powerbook support and sleep fixes). Note: This is a FAQ entry for PowerMac sound support with TI codecs: They have a feature called "DRC" which is automatically enabled for the internal speaker (at least when auto mute control is enabled) which will cause your sound to fade out to nothing after half a second of playback if you don't set a proper "DRC Range" in the mixer. So if you have a problem like that, check alsamixer and raise your DRC Range to something reasonable. Note2: This patch will also add auto-mute of the speaker when line-out jack is used on some earlier desktop G4s (and on the G5) in addition to the headphone jack. If that behaviour isn't what you want, just disable auto-muting and use the manual mute controls in alsamixer. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc32: fix compilation error in arch/ppc/syslib/open_pic_defs.hBenoit Boissinot1-3/+0
make defconfig give the following error on ppc (gcc-4): arch/ppc/syslib/open_pic.c:36: error: static declaration of ‘OpenPIC’ follows non-static declaration arch/ppc/syslib/open_pic_defs.h:175: error: previous declaration of ‘OpenPIC’ was here Signed-Off-By: Benoit Boissinot <benoit.boissinot@ens-lyon.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc32: fix compilation error in arch/ppc/kernel/time.cBenoit Boissinot1-2/+0
make defconfig give the following error on ppc (gcc-4): arch/ppc/kernel/time.c:92: error: static declaration of ‘time_offset’ follows non-static declaration include/linux/timex.h:236: error: previous declaration of ‘time_offset’ was here The following patch solves it (time_offset is declared in timer.c). Signed-Off-By: Benoit Boissinot <benoit.boissinot@ens-lyon.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc32: Make the Powerstack II Pro4000 boot againLeigh Brown1-2/+7
This patch restores the original behaviour of prep_pcibios_fixup() to only call prep_pib_init() on machines with an openpic. This allows the Powerstack II Pro4000 to boot again. Signed-off-by: Leigh Brown <leigh@solinno.co.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc32: Fix building 32bit kernel for 64bit machinesTom Rini2-0/+7
When building a ppc32 MULTIPLATFORM kernel for a 64bit pmac, we try and build certain files or use certain functions that make no sense in that context. This catches the last of these. Signed-off-by: Tom Rini <trini@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc32: Fix a problem with NTP on !(chrp||gemini)Giovambattista Pulcini3-6/+0
The following problem was found by Giovambattista Pulcini <gpulcini@swintel.it>, who also provided a partial patch, and this has been verified by our time guru Gabriel Paubert <paubert@iram.es>. The problem is that in do_settimeofday() we always set time_state to TIME_ERROR and except on two platforms, never re-set it. This meant that ntp_gettime() and ntp_adjtime() always returned TIME_ERROR, incorrectly. Based on Gabriel's analysis, time_state is used for leap-second processing, and ppc shouldn't be mucking with it. Signed-off-by: Tom Rini <trini@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc32: Fix mpc8xx watchdogTom Rini1-2/+9
The CONFIG_8xx_WDT option got broken in the generic hardirq update as ppc32 had its own different request_irq that worked when other arches used setup_irq. This is the trivial fix for the problem. From: Carsten Juttner <carjay@gmx.net> Signed-off-by: Tom Rini <trini@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc32: Support 36-bit physical addressing on e500Kumar Gala3-45/+92
To add support for 36-bit physical addressing on e500 the following changes have been made. The changes are generalized to support any physical address size larger than 32-bits: * Allow FSL Book-E parts to use a 64-bit PTE, it is 44-bits of pfn, 20-bits of flags. * Introduced new CPU feature (CPU_FTR_BIG_PHYS) to allow runtime handling of updating hardware register (SPRN_MAS7) which holds the upper 32-bits of physical address that will be written into the TLB. This is useful since not all e500 cores support 36-bit physical addressing. * Currently have a pass through implementation of fixup_bigphys_addr * Moved _PAGE_DIRTY in the 64-bit PTE case to free room for three additional storage attributes that may exist in future FSL Book-E cores and updated fault handler to copy these bits into the hardware TLBs. Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc32: make usage of CONFIG_PTE_64BIT & CONFIG_PHYS_64BIT consistentKumar Gala1-5/+5
CONFIG_PTE_64BIT & CONFIG_PHYS_64BIT are not currently consistently used in the code base. Fixed up the usage such that CONFIG_PTE_64BIT is used when we have a 64-bit PTE regardless of physical address width. CONFIG_PHYS_64BIT is used if the physical address width is larger than 32-bits, regardless of PTE size. These changes required a few sub-arch specific ifdef's to be fixed and the introduction of a physical address format string. Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc32: Fix AGP and sleep againBenjamin Herrenschmidt2-0/+109
My previous patch that added sleep support for uninorth-agp and some AGP "off" stuff in radeonfb and aty128fb is breaking some configs. More specifically, it has problems with rage128 setups since the DRI code for these in X doesn't properly re-enable AGP on wakeup or console switch (unlike the radeon DRM). This patch fixes the problem for pmac once for all by using a different approach. The AGP driver "registers" special suspend/resume callbacks with some arch code that the fbdev's can later on call to suspend and resume AGP, making sure it's resumed back in the same state it was when suspended. This is platform specific for now. It would be too complicated to try to do a generic implementation of this at this point due to all sort of weird things going on with AGP on other architectures. We'll re-work that whole problem cleanly once we finally merge fbdev's and DRI. In the meantime, please apply this patch which brings back some r128 based laptops into working condition as far as system sleep is concerned. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc32: Fix cpufreq problemsBenjamin Herrenschmidt3-75/+192
This patch updates the PowerMac cpufreq driver. It depends on the addition of the suspend() method (my previous patch) and on the new flag I defined to silence some warnings that are normal for us. It fixes various issues related to cpufreq on pmac, including some crashes on some models when sleeping the machine while in low speed, proper voltage control on some newer machines, and adds voltage control on 750FX based G3 laptops. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc32: fix single-stepping of emulated instructionsPaul Mackerras1-0/+1
On ppc, we emulate instructions that cause alignment exceptions. If we are single-stepping an instruction and it causes an alignment exception, we will currently do the next instruction as well before taking the single-step exception. This patch fixes that, so we take the single-step exception after emulating the instruction. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc32: oops on kernel altivec assist exceptionsPaul Mackerras1-0/+7
If we should happen to get an altivec assist exception while executing in the kernel, we will currently try to handle it and fail, and end up oopsing with (apparently) a segfault. (An altivec assist exception occurs for floating-point altivec instructions with denormalized inputs or outputs if the altivec unit is in java mode.) This patch checks explicitly if we are in user mode and prints a useful message if not. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc32: improve timebase sync for SMPPaul Mackerras1-24/+54
Currently the procedure in the ppc32 kernel that synchronizes the timebase registers across an SMP powermac system does so by setting both timebases to zero. That is OK at boot but causes problems if done later. So that we can do hotplug CPU on these machines, this patch changes the code so it reads the timebase from one CPU and transfers the value to the other CPU. (Hotplug CPU is needed for sleep (aka suspend to RAM) to work.) Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc32: ppc4xx_pic - add acknowledge when enabling level-sensitive IRQEugene Surovegin1-1/+4
This patch adds interrupt acknowledge to the PPC4xx PIC enable_irq implementation for level-sensitive IRQ sources. This helps in cases when enable/disable_irq is used in interrupt handlers for hardware, which requires IRQ acknowledge to be issued from non-interrupt context (e.g. when actual ACK in device needs an I2C transaction). For such strange hardware, interrupt handler disables IRQ and defers actual ACK to some other context. When this happens, IRQ is enabled again. For level-sensitive sources we get spurious triggering right after IRQ is enabled. This patch fixes this. Suggested by Tolunay Orkun <listmember@orkun.us>. Signed-off-by: Eugene Surovegin <ebs@ebshome.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] ppc32: fix bogosity in process-freezing codePaul Mackerras1-3/+1
The code that went into arch/ppc/kernel/signal.c recently to handle process freezing seems to contain a dubious assumption: that a process that calls do_signal when PF_FREEZE is set will have entered the kernel because of a system call. This patch removes that assumption. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] fix crash in entry.S restore_allStas Sergeev2-1/+14
Fix the access-above-bottom-of-stack crash. 1. Allows to preserve the valueable optimization 2. Works for NMIs 3. Doesn't care whether or not there are more of the like instances where the stack is left empty. 4. Seems to work for me without the crashes:) (akpm: this is still under discussion, although I _think_ it's OK. You might want to hold off) Signed-off-by: Stas Sergeev <stsp@aknet.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] arm: add comment about max_low_pfn/max_pfnakpm@osdl.org1-0/+3
) From: Russell King <rmk+lkml@arm.linux.org.uk> Oddly, max_low_pfn/max_pfn end up being the number of pages in the system, rather than the maximum PFN on ARM. This doesn't seem to cause any problems, so just add a note about it. Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] arm: fix help text for ixdp465akpm@osdl.org1-1/+1
) From: Russell King <rmk+lkml@arm.linux.org.uk> For some reason, this help text was missed when the file was last audited by the documentation referencing folk. Fix this incorrect documentation reference. Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16[PATCH] arm: fix SIGBUS handlingakpm@osdl.org1-44/+36
) From: Russell King <rmk+lkml@arm.linux.org.uk> ARM wasn't raising a SIGBUS with a siginfo structure. Fix __do_user_fault() to allow us to use it for SIGBUS conditions, and arrange for the sigbus path to use this. We need to prevent the siginfo code being called if we do not have a user space context to call it, so consolidate the "user_mode()" tests. Thanks to Ian Campbell who spotted this oversight. Signed-off-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds4627-0/+1305954
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!