aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc (follow)
AgeCommit message (Collapse)AuthorFilesLines
2006-09-13Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpcLinus Torvalds18-232/+695
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] Fix G5 DART (IOMMU) race causing occasional data corruption [POWERPC] Fix MMIO ops to provide expected barrier behaviour [POWERPC] Fix interrupt clearing in kdump shutdown sequence [POWERPC] update prep_defconfig [POWERPC] kdump: Support kernels having 64k page size. [POWERPC] Implement PowerPC futex_atomic_cmpxchg_inatomic(). [POWERPC] Add new, missing argument to of_irq_map_raw() for 86xx. [POWERPC] Update defconfigs
2006-09-13[POWERPC] Fix G5 DART (IOMMU) race causing occasional data corruptionBenjamin Herrenschmidt1-1/+6
It seems that the occasional data corruption observed with the tg3 driver wasn't due to missing barriers after all, but rather seems to be due to the DART (= IOMMU) in the U4 northbridge reading stale IOMMU table entries from memory due to a race. This fixes it by making the CPU read the entry back from memory before using it. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-09-13[POWERPC] Fix MMIO ops to provide expected barrier behaviourPaul Mackerras1-24/+25
This changes the writeX family of functions to have a sync instruction before the MMIO store rather than after, because the generally expected behaviour is that the device receiving the MMIO store can be guaranteed to see the effects of any preceding writes to normal memory. To preserve ordering between writeX and readX, and to preserve ordering between preceding stores and the readX, the readX family of functions have had an sync added before the load. Although writeX followed by spin_unlock is not officially guaranteed to keep the writeX inside the spin-locked region unless an mmiowb() is used, there are currently drivers that depend on the previous behaviour on powerpc, which was that the mmiowb wasn't actually required. Therefore we have a per-cpu flag that is set by writeX, cleared by __raw_spin_lock and mmiowb, and tested by __raw_spin_unlock. If it is set, __raw_spin_unlock does a sync and clears it. This changes both 32-bit and 64-bit readX/writeX. 32-bit already has a sync in __raw_spin_unlock (since lwsync doesn't exist on 32-bit), and thus doesn't need the per-cpu flag. Tested on G5 (PPC970) and POWER5. Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-09-13[POWERPC] Fix interrupt clearing in kdump shutdown sequenceMohan Kumar M1-1/+1
Call chip->eoi(irq) to clear any pending interrupt in case of kdump shutdown sequence. chip->end(irq) does not serve this purpose. Signed-off-by: Mohan Kumar M <mohan@in.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-09-13[POWERPC] Add new, missing argument to of_irq_map_raw() for 86xx.Jon Loeliger1-1/+1
Ben speaks; we follow. Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-09-12[PATCH] syscall class hookup for all normal targetsAl Viro1-0/+4
Take default arch/*/kernel/audit.c to lib/, have those with special needs (== biarch) define AUDIT_ARCH in their Kconfig. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-09-11[PATCH] audit: AUDIT_PERM supportAl Viro2-0/+37
add support for AUDIT_PERM predicate Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-09-11[PATCH] audit: more syscall classes addedAl Viro2-0/+26
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-09-11[PATCH] syscall classes hookup for ppc and s390Al Viro3-0/+43
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-09-10[POWERPC] Update defconfigsPaul Mackerras14-205/+662
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-09-03[PATCH] powerpc: Fix typo in powermac platform functionsBenjamin Herrenschmidt1-1/+1
New sparse caught that typo which could have caused erratic hardware behaviour on some machines if the platform functions are used by the firmware to change bits in some FCR registers. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-09-01[PATCH] powerpc: Fix PowerMac IRQ handling bugBenjamin Herrenschmidt1-3/+3
The port to genirq & the new powerpc interrupt model in 2.6.18 introduced a bug in the legacy PowerMac PIC code (used on older machines) because of a typo potentially causing hangs due to interrupt storms. This fixes it, along with a performance issue causing us to do spurrious retriggers after masking an interrupt. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-08-30Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpcLinus Torvalds25-306/+1083
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: [POWERPC] Fix return value from memcpy [POWERPC] iseries: Define insw et al. so libata/ide will compile [POWERPC] Fix irq enable/disable in smp_generic_take_timebase [POWERPC] Fix problem with time not advancing on 32-bit platforms [POWERPC] Restore copyright notice in arch/powerpc/kernel/fpu.S [POWERPC] Fix up ibm_architecture_vec definition [POWERPC] Make OF irq map code detect more error cases [POWERPC] Support for "weird" MPICs and fixup mpc7448_hpc2 [POWERPC] Fix MPIC sense codes in documentation [POWERPC] Fix performance regression in IRQ radix tree locking [POWERPC] Add mpc7448hpc2 device tree source file [POWERPC] Add MPC8349E MDS device tree source file to arch/powerpc/boot/dts [POWERPC] modify mpc83xx platforms to use new IRQ layer [POWERPC] Adapt ipic driver to new host_ops interface, add set_irq_type to set IRQ sense [POWERPC] back up old school ipic.[hc] to arch/ppc [POWERPC] Use mpc8641hpcn PIC base address from dev tree. [POWERPC] Allow MPC8641 HPCN to build with CONFIG_PCI disabled too. [POWERPC] Fix powerpc 44x_mmu build [POWERPC] Remove flush_dcache_all export
2006-08-30[PATCH] ppc32: fix last_jiffy time comparisonPaul Mackerras1-17/+8
This fixes a hang on ppc32. The problem was that I was comparing a 32-bit quantity with a 64-bit quantity, and consequently time wasn't advancing. This makes us use a 64-bit quantity on all platforms, which ends up simplifying the code since we can now get rid of the tb_last_stamp variable (which actually fixes another bug that Ben H and I noticed while going carefully through the code). This works fine on my G4 tibook. Let me know how it goes on your machines. Acked-by: Olaf Hering <olaf@aepfle.de> Acked-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-08-31[POWERPC] Fix return value from memcpyPaul Mackerras1-4/+7
As pointed out by Herbert Xu <herbert@gondor.apana.org.au>, our memcpy implementation didn't return the destination pointer as its return value, and there is code in the kernel that expects that. This fixes it. Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-30[POWERPC] Fix irq enable/disable in smp_generic_take_timebasePaul Mackerras1-2/+3
Eran Ben-Avi <eranpublic@yahoo.com> pointed out that the arch/ppc version of smp_generic_take_timebase disables interrupts on entry but exits without restoring them. However, both it and the arch/powerpc version have another problem, which is that they use local_irq_disable/enable rather than local_irq_save/restore, and they are called with interrupts disabled. This fixes both problems; it changes a return to a break in the arch/ppc version, and changes both versions to use local_irq_save/restore. Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-30[POWERPC] Fix problem with time not advancing on 32-bit platformsPaul Mackerras1-17/+8
This fixes a problem introduced in 5db9fa9593e2ff69f2b95f9d59229dc4faaa564d. The last_jiffy per-cpu variable is only 32 bits on 32-bit machines, but it was being compared with a 64-bit quantity (tb_next_jiffy), which resulted in time not advancing. This fixes it by changing last_jiffy to be 64 bits on all platforms. With this, we no longer need tb_last_stamp as a 32-bit version of tb_last_jiffy, so this gets rid of tb_last_stamp and we just use tb_last_jiffy instead. This also fixes a bug when the boot cpu is not online, because using tb_last_stamp could have caused the wrong timebase origin value to be used when calculating the time of day. Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-30[POWERPC] Restore copyright notice in arch/powerpc/kernel/fpu.SPaul Mackerras1-0/+5
This code got moved from head.S but the copyright notice on head.S didn't get transferred with it. Noticed by Cort Dougan <cort@fsmlabs.com>. Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-30[POWERPC] Fix up ibm_architecture_vec definitionWill Schmidt1-5/+5
This problem was noticed by one of the Phyp firmware folks. Our ibm,client-architecture-support call was failing. This corrects the vector length parameters being passed in. Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-30[POWERPC] Make OF irq map code detect more error casesBenjamin Herrenschmidt2-6/+22
Device-tree bugs on js20 with some versions of SLOF were causing the interrupt for IDE to not be parsed correctly and fail to boot. This patch adds a bit more sanity checking to the parser to detect some of those errors and fail instead of returning bogus information. The powerpc PCI code can then trigger a fallback that works on those machines. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-30[POWERPC] Support for "weird" MPICs and fixup mpc7448_hpc2Zang Roy-r619114-66/+180
This adds a new hardware information table for mpic. This enables the mpic code to deal with mpic controllers with different register layouts and hardware behaviours. This introduces CONFIG_MPIC_WEIRD. For boards with non standard mpic controllers, select CONFIG_MPIC_WEIRD and add its hardware information in the mpic_infos[] array. TSI108/109 PIC takes the first index of weird hardware information table. :) The table can be extended. The Tsi108/109 PIC looks like standard OpenPIC but, in fact, is different in register mapping and behavior. The patch does not affect the behavior of standard mpic. If CONFIG_MPIC_WEIRD is not defined, the code is essentially identical to the current code. [benh@kernel.crashing.org: This patch is a slightly cleaned up version of Zang Roy's support for the TSI108 MPIC variant. It also fixes up MPC7448_hpc2 to use the new version of the type macros and changes the way MPIC is selected in Kconfig to better match what is done for other system devices. ] Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-30[POWERPC] Fix performance regression in IRQ radix tree lockingBenjamin Herrenschmidt1-18/+66
When reworking the powerpc irq code, I figured out that we were using the radix tree in a racy way. As a temporary fix, I put a spinlock in there. However, this can have a significant impact on performances. This patch reworks that to use a smarter technique based on the fact that what we need is in fact a rwlock with extremely rare writers (thus optimized for the read path). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-30[POWERPC] Add mpc7448hpc2 device tree source fileZang Roy-r619111-0/+190
This patch adds the mpc7448hpc2 device tree source file. Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-30[POWERPC] Add MPC8349E MDS device tree source file to arch/powerpc/boot/dtsKim Phillips1-0/+328
Add MPC8349E MDS device tree source file to arch/powerpc/boot/dts Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-30[POWERPC] modify mpc83xx platforms to use new IRQ layerKim Phillips5-87/+28
This fixes MPC834x MDS (formerly SYS) and ITX platform code to get IRQ data (including PCI) from the device tree, and to use the new IPIC code. renamed defconfig (sys -> mds), left one redundant NULL assignment in mpc83xx_pcibios_fixup to keep the compiler happy. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-30[POWERPC] Adapt ipic driver to new host_ops interface, add set_irq_type to set IRQ senseKim Phillips2-98/+228
This converts ipic code to Benh's IRQ mods. For the IPIC, IRQ sense values in the device tree equal those in include/linux/irq.h; that's 8 for low assertion (most internal IRQs on mpc83xx), and 2 for high-to-low change. spinlocks added to [un]mask, ack operations; default handler and type now set in host_map; and redundant condition check eliminated. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-30[POWERPC] back up old school ipic.[hc] to arch/ppcKim Phillips1-2/+2
Keep from breaking 83xx arch/ppc build. Back up old school arch/powerpc/sysdev/ipic.[hc] to arch/ppc/syslib. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-25[POWERPC] Use mpc8641hpcn PIC base address from dev tree.Jon Loeliger1-10/+9
After going through the trouble of setting up the PIC base address in the pic@40000 device tree node, use it instead of the obsolete hard-coded value. Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-25[POWERPC] Allow MPC8641 HPCN to build with CONFIG_PCI disabled too.Jon Loeliger2-3/+9
Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-25[POWERPC] Fix powerpc 44x_mmu buildMatt Porter1-2/+2
The PIN_SIZE definition name changed, update 44x_mmu.c accordingly. Signed-off-by: Matt Porter <mporter@embeddedalley.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-25[POWERPC] Remove flush_dcache_all exportMatt Porter1-4/+0
Removes the flush_dcache_all export for non coherent platforms. We removed the last in-kernel user of this years ago in arch/ppc so it no longer serves a purpose. Plus, it breaks the build at the moment. Signed-off-by: Matt Porter <mporter@embeddedalley.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-23Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpcGreg Kroah-Hartman19-515/+1451
2006-08-24[POWERPC] hugepage BUG fixAdam Litke1-1/+1
On Tue, 2006-08-15 at 08:22 -0700, Dave Hansen wrote: > kernel BUG in cache_free_debugcheck at mm/slab.c:2748! Alright, this one is only triggered when slab debugging is enabled. The slabs are assumed to be aligned on a HUGEPTE_TABLE_SIZE boundary. The free path makes use of this assumption and uses the lowest nibble to pass around an index into an array of kmem_cache pointers. With slab debugging turned on, the slab is still aligned, but the "working" object pointer is not. This would break the assumption above that a full nibble is available for the PGF_CACHENUM_MASK. The following patch reduces PGF_CACHENUM_MASK to cover only the two least significant bits, which is enough to cover the current number of 4 pgtable cache types. Then use this constant to mask out the appropriate part of the huge pte pointer. Signed-off-by: Adam Litke <agl@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-23[POWERPC] Fix compile problem without CONFIG_PCILi Yang1-6/+7
Compile fails without defining CONFIG_PCI. The patch fix this. [paulus@samba.org: Moved of_irq_pci_swizzle so we only need one #ifdef] Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-23[POWERPC] Correct masks used in emulating some instructionsPaul Mackerras1-4/+4
When we get an illegal instruction exception, we check to see whether the instruction is one that we emulate for the user program. Some of the masks we use in checking whether the offending instruction is one we care about didn't have the top bit set, which is the MSB of the major opcode. Thus some undefined opcodes could get emulated as other (defined but unimplemented) instructions. This corrects the masks. Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-23[POWERPC] Pass UPIO_TSI flag to 8259 serial driverZang Roy-r619111-2/+6
The patch passes the UPIO_TSI flag to general 8259 serial driver Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-23[POWERPC] Update mpc7448hpc2 board irq support using device treeZang Roy-r619113-62/+42
The patch rewrites mpc7448hpc2 board irq support according to the new mpic device tree interface. Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-23[POWERPC] Fix BootX booting with an initrdBenjamin Herrenschmidt1-4/+11
The bootx_init.c trampoline didn't properly add the ramdisk to the "reserve map" (list of reserved areas of memory), thus causing all sorts of failures when using BootX with an initrd. Also fixes a possible problem if the ramdisk is located before the device-tree passed by BootX. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-23[POWERPC] Fix gettimeofday inaccuraciesNathan Lynch1-8/+17
There are two problems in the powerpc gettimeofday code which can cause incorrect results to be returned. The first is that there is a race between do_gettimeofday and the timer interrupt: 1. do_gettimeofday does get_tb() 2. decrementer exception on boot cpu which runs timer_recalc_offset, which also samples the timebase and updates the do_gtod structure with a greater timebase value. 3. do_gettimeofday calls __do_gettimeofday, which leads to the negative result from tb_val - temp_varp->tb_orig_stamp. The second is caused by taking the boot cpu offline, which can cause the value of tb_last_jiffy to be increased past the currently available timebase, causing the same underflow as above. [paulus@samba.org - define and use data_barrier() instead of mb().] Signed-off-by: Nathan Lynch <ntl@pobox.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-23[POWERPC] Fix FEC node in 8540 ADS dtsAndy Fleming1-6/+6
* Fixed the FEC node, and its accompanying PHY * Fixed a spacing issue in the PIC node Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-23[POWERPC] Rewrite the PPC 86xx IRQ handling to use Flat Device TreeJon Loeliger3-198/+188
IRQ setup now comes from the Flat Device Tree and use the new generic IRQ code. Fixed the fsl_soc.c IRQ OF interrupt node parsing. Removed some unused MPC86xx macro definition. Signed-off-by: Zhang Wei <wei.zhang@freescale.com> Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org> (cherry picked from 919fede6edab94cccb3ca8c1c0b32fa62c9369a5 commit)
2006-08-23[POWERPC] Add 85xx DTS files to powerpcAndy Fleming4-0/+1032
Added the mpc85xx family of dts files to the powerpc tree Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-23[POWERPC] Fix CDS IRQ handling and PCI codeAndy Fleming2-123/+88
* Fix IRQ support in the 85xx CDS boards so it uses the new generic stuff * Fix PCI IRQ mapping to use the device tree * Disabled i8259 support to allow the CDS to boot. This will be fixed soon, but the current code doesn't even compile, so this is a vast improvement Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-23[POWERPC] Fix interrupts on 8540 ADS boardAndy Fleming1-107/+55
* Fixed 8540 ADS support for the new irq layer * Fixed 8540 ADS support for mapping PCI interrupts * Updated 8540 ADS to use device tree for interrupt assignment and sense values Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-18Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpcGreg Kroah-Hartman17-127/+688
2006-08-18[POWERPC] Fix the mpc8641_hpcn.dts file.Jon Loeliger1-0/+1
Add 'linux,phandle' entry to i8259@4d0 node. Signed-off-by: Zhang Wei <wei.zhang@freescale.com> Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-18[POWERPC] Offer PCI as a CONFIG choice for PPC_86xx.Jon Loeliger1-3/+4
Also fix 80-column run-over. Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-18[POWERPC] Add MPC8641 HPCN Device Tree Source file.Jon Loeliger1-0/+338
As per list discussion, let's add device tree source files under powerpc/boot/dts. If nothing else, it is a starting point. Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-18[POWERPC] Convert to mac-address for ethernet MAC address data.Jon Loeliger1-2/+10
Also accept "local-mac-address". However the old "address" is now obsolete, but accepted for backwards compatibility. It should be removed after all device trees have been converted to use "mac-address". Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-08-18[POWERPC] powerpc: Clear HID0 attention enable on PPC970 at boot timeOlof Johansson1-0/+2
Clear HID0[en_attn] at CPU init time on PPC970. Closes CVE-2006-4093. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>