summaryrefslogtreecommitdiffstats
path: root/include/asm-powerpc
Commit message (Collapse)AuthorAgeFilesLines
* [POWERPC] Add mpc52xx/lite5200 PCI supportGrant Likely2007-02-081-0/+2
| | | | | | Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Sylvain Munaut <tnt@246tNt.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* Merge branch 'for_paulus' of ↵Paul Mackerras2007-02-084-7/+25
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into for-2.6.21
| * [POWERPC] Added kprobes support to ppc32Kumar Gala2007-02-072-1/+7
| | | | | | | | | | | | | | | | Added kprobes to ppc32 platforms that have use single_step_exception. This excludes 4xx and anything Book-E since their debug mechanisms for single stepping are completely different. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
| * Merge branch 'linux-2.6'Paul Mackerras2007-02-072-6/+18
| |\
| | * [PATCH] dma-mapping.h stubs fixAl Viro2007-01-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | do { } while(0) is not a good imitation of function returning void; use ((void)0) instead. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| | * Fix Maple PATA IRQ assignment.David Woodhouse2007-01-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the Maple board, the AMD8111 IDE is in legacy mode... except that it appears on IRQ 20 instead of IRQ 15. For drivers/ide this was handled by the architecture's "pci_get_legacy_ide_irq()" function, but in libata we just hard-code the numbers 14 and 15. This patch provides asm-powerpc/libata-portmap.h which maps the IRQ as appropriate, having added a pci_dev argument to the ATA_{PRIM,SECOND}ARY_IRQ macros. There's probably a better way to do this -- especially if we observe that the _only_ case in which this seemingly-generic "pci_get_legacy_ide_irq()" function returns anything other than 14 and 15 for primary and secondary respectively is the case of the AMD8111 on the Maple board -- couldn't we handle that with a special case in the pata_amd driver, or perhaps with a PCI quirk for Maple to switch it into native mode during early boot and assign resources properly? Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | | [POWERPC] Only use H_BULK_REMOVE if the firmware supports itPaul Mackerras2007-02-081-0/+1
|/ / | | | | | | | | | | | | | | The previous patch changing pSeries to use H_BULK_REMOVE broke the JS20 blade, where the firmware doesn't support H_BULK_REMOVE. This adds a firmware check so that on machines that don't have H_BULK_REMOVE, we just use the H_REMOVE call as before. Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Make pSeries use the H_BULK_REMOVE hypervisor callPaul Mackerras2007-02-071-0/+1
| | | | | | | | | | | | | | | | H_BULK_REMOVE lets us remove 4 entries from the MMU hash table with one hypervisor call. This uses it in pSeries_lpar_hpte_invalidate so we can tear down mappings with fewer hypervisor calls. Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Compile fixes for arch/powerpc dcr codeDavid Gibson2007-02-071-0/+1
| | | | | | | | | | | | | | | | The new dcr code does not currently compile when configured for native DCR access on ARCH=powerpc. This patch fixes the problems. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] pasemi: iommu supportOlof Johansson2007-02-071-0/+1
| | | | | | | | | | | | | | I/O TLB support for PA6T-1682M. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] pasemi: SMP timebase syncOlof Johansson2007-02-071-0/+6
| | | | | | | | | | | | | | | | Timebase update is simple on PA6T, since global updates can be done from one core by writing to an SPR. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] pasemi: Idle loopsOlof Johansson2007-02-071-0/+1
| | | | | | | | | | | | | | | | | | Powersave support on PA6T. Right now it only uses 'doze' mode, and will default to no savings (spin). Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] pasemi: UART udbg supportOlof Johansson2007-02-071-0/+1
| | | | | | | | | | | | | | Early debug output for PA Semi UART. Uses the 2.05 CI real mode ops. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Celleb: basic supportIshizaki Kou2007-02-072-0/+10
| | | | | | | | | | | | | | | | | | This patch adds base support for Celleb platform. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Celleb: consolidate spu management opsIshizaki Kou2007-02-072-0/+15
| | | | | | | | | | | | | | | | | | | | Spu management ops in arch/platforms/cell/spu_priv1_mmio.h can be used commonly in of based platform. This patch separates spu management ops from native cell code and uses on celleb platform. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Celleb: support udbgIshizaki Kou2007-02-071-0/+1
| | | | | | | | | | | | | | | | This patch adds udbg support for Celleb platform. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Celleb: htab routinesIshizaki Kou2007-02-071-0/+1
| | | | | | | | | | | | | | | | Adds htab routines for Celleb platform. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Fix kernel build errors for mpc8272ads and mpc8560adsVitaly Bordug2007-02-072-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent update of asm-powerpc/io.h caused cpm-related stuff to break in the current kernel. Current patch fixes it, as well as other inconsistencies expressed, that do not permit targets from working properly: - Updated dts with a chosen node with interrupt controller, - fixed messed device IDs among CPM2 SoC devices, - corrected odd header name and fixed type in defines, - Added 82xx subdir to the powerpc/platforms Makefile, missed during initial commit, - new solely-powerpc header file for 8260 family (was using one from arch/ppc, this one cleaned up from the extra stuff), in fact for now a placeholder to get the board-specific includes for stuff not yet capable to live with devicetree peeks only - Fixed couple of misprints in reference mpc8272 dts. Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] cpm2: CPM2 interrupt controller fixVitaly Bordug2007-02-071-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | This contains important fixes for the CPM2 PIC code. Eliminated CPM_IRQ_OFFSET, pulling the respective interrupt numbers from the interrupt mapping. Updated devicetree files to reflect that. Changed direct IC-related IO accesses to the IO accessors. Fixed all the sense values to keep coherency with ipic. In the current code, CPM2 stuff will have no IRQs and hence could be hardly usable. Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] PS3: Move vuart declarations to ps3.hGeoff Levand2007-02-071-0/+35
| | | | | | | | | | | | | | | | | | Move the structures and routines needed for PS3 vuart port device registration to asm-powerpc/ps3.h. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] PS3: Move system bus to platform directoryGeoff Levand2007-02-071-150/+0Star
| | | | | | | | | | | | | | | | | | | | Move the PS3 system bus routines from drivers/ps3 to arch/powerpc/platforms/ps3. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] MPIC: support more than 256 sourcesOlof Johansson2007-02-071-15/+9Star
| | | | | | | | | | | | | | | | | | | | | | | | | | Allow more than the default 256 MPIC sources. Allocates a new flag (MPIC_LARGE_VECTORS) to be used by platform code when instantiating the mpic. I picked 11 bits worth right now since it would cover the number of sources on any hardware I have seen. It can always be increased later if needed. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] PA6T PMC supportOlof Johansson2007-02-071-0/+7
| | | | | | | | | | | | | | | | | | | | Support for PA6T-style PMC registers. PMCs are completely implementation-dependent on PPC, and PA6T numbers them differently from the IBM model. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Add PMC type to cputableOlof Johansson2007-02-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add cputable entries for which type of PMC implementation the processor has. I've only filled in the current 64-bit processors, the unfilled default value will have same behaviour as before so it can be done over time as needed. Also tidy up the dummy_perf implementation a bit, aggregating it into one function with ifdefs instead of several. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Oprofile cleanupOlof Johansson2007-02-071-87/+2Star
| | | | | | | | | | | | | | | | | | | | Clean up the ctr_read/write a bit. It's currently defined in the include but only used in one C file each. The only exception is the classic version, so keep that in the include and define in the C file as appropriate. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] ps3: remove unneeded header includeGeoff Levand2007-02-071-1/+0Star
| | | | | | | | | | | | | | | | Remove an unneeded header include from ps3.h. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] ps3: get av_multi_out paramsGeert Uytterhoeven2007-02-071-0/+11
| | | | | | | | | | | | | | | | | | | | Allow the PS3 AV settings driver to access the default video mode stored in the OS area. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] ps3: get firmware versionGeoff Levand2007-02-071-0/+12
| | | | | | | | | | | | | | | | | | Add a new routine ps3_get_firmware_version() and use it to output the firmware version to dmesg. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] ps3: add interrupt alloc for outletsGeert Uytterhoeven2007-02-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | PS3 interrupt core update: - Add ps3_alloc_irq() and ps3_free_irq(), to allocate a virtual interrupt number for an interrupt outlet, which is needed by the PS3 GPU frame buffer device and audio drivers Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] ps3: bind interrupt to cpuGeoff Levand2007-02-071-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | Change the PS3 irq allocation routines to take an argument indicating which cpu (processor thread) the interrupt should be serviced on. The current system configuration favors device interrupts that are serviced on cpu0, so that is used as the default. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] ps3: repository storage supportGeert Uytterhoeven2007-02-071-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Handle storage-related repository data: - Add missing implementations of ps3_repository_read_stor_*() repository accessors. - Dump storage properties in debug mode - Add PS3_DEV_TYPE_STOR_{DISK,ROM,FLASH} device types (which are identical to the corresponding SCSI device types) to enum ps3_dev_type Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] ps3: repository misc fixesGeoff Levand2007-02-071-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various fixes for the PS3 repository code: - Sync signatures of function prototypes and implementations (enum vs. unsigned int) - Correct references to `regions' as `registers': o Correct enum ps3_region_type as enum ps3_reg_type, o Correct PS3_REGION_TYPE_* as PS3_REG_TYPE_*, o Correct ps3_repository_find_region() as ps3_repository_find_reg(). - Correct function name in pr_debug() call - Minor error condition improvements. Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Add mpc866ads board-specific bits to arch/powerpcVitaly Bordug2007-02-071-0/+4
| | | | | | | | | | | | | | | | | | This add support of the Freescale mpc86xads reference board to arch/powerpc. Supported SMC1 and SMC2 (UART and serial console), FEC 100Mbps Ethernet, SCC1 Ethernet (10Mbps hdx) Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] 8xx: powerpc port of core CPM PICVitaly Bordug2007-02-073-10/+61
| | | | | | | | | | | | | | | | | | | | This covers common CPM access functions, CPM interrupt controller code, micropatch and a few compatibility things to kee the same driver base working with arch/ppc. This version is refined with all the comments (mostly PIC-related) addressed. Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] remove unused CPU_FTRS_POWER6XMichael Neuling2007-02-071-6/+0Star
| | | | | | | | | | | | | | | | CPU_FTRS_POWER6X is unused, hence remove it. Signed-off-by Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] 83xx: Return a point to the struct ipic from ipic_init()Kumar Gala2007-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It's useful to have access to struct ipic handle that just got created in ipic_init(). For example, if we want to setup an external IRQ with out a device node we need access ipic->irqhost to create the virtual to HW IRQ mapping and to set the IRQ sense. With this we can mimic the old sense array concept that existed in arch/ppc. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* | [POWERPC] Add IRQ remapping hookIshizaki Kou2007-01-241-0/+3
| | | | | | | | | | | | | | | | | | | | This patch adds irq remapping hook. On interrupt mechanism on Beat, when an irq outlet which has an id which is formerly used is created, remapping the irq is required. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Add a field for each specific bus to struct pci_controllerIshizaki Kou2007-01-241-0/+2
| | | | | | | | | | | | | | | | | | Struct pci_controller doesn't prepare for the dependent data of each specific bus. This patch adds private member to struct pci_controller. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* | [POWERPC] Move ELF_ET_DYN_BASE up to 512MB pointAnton Blanchard2007-01-241-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I often test new versions of glibc by doing: LD_LIBRARY_PATH=/XXX/lib /XXX/lib/ld.so.1 <binary> One test case ended up SEGV'ing. Upon closer inspection ld.so was loaded at 0x8000000 (128MB) with the heap right after it. Since we normally link binaries at 0x10000000 (256MB) we only had about 128MB of space for the heap: 00100000-00103000 r-xp 00100000 00:00 0 [vdso] 08000000-0801e000 r-xp 00000000 00:01 33079 /lib/ld-2.5.so 0802d000-0802f000 rwxp 0001d000 00:01 33079 /lib/ld-2.5.so 0802f000-08050000 rwxp 0802f000 00:00 0 [heap] 0fe91000-0ffd9000 r-xp 00000000 00:01 33082 /lib/libc-2.5.so 0ffd9000-0ffe8000 ---p 00148000 00:01 33082 /lib/libc-2.5.so 0ffe8000-0ffea000 r--p 00147000 00:01 33082 /lib/libc-2.5.so 0ffea000-0ffed000 rwxp 00149000 00:01 33082 /lib/libc-2.5.so 10000000-10004000 r-xp 00000000 00:01 76 /bin/sleep 10013000-10014000 rwxp 00003000 00:01 76 /bin/sleep ffb41000-ffb56000 rw-p ffb41000 00:00 0 [stack] One way to fix this is move ELF_ET_DYN_BASE from 0x08000000 to 0x20000000. This allows 128MB for the binary (hopefully enough for even the most crazy c++ apps), and with our current layout we will grow the heap up and the stack down, allowing potentially gigabytes of heap: 00100000-00103000 r-xp 00100000 00:00 0 [vdso] 0fe8a000-0ffd3000 r-xp 00000000 00:01 3350 /lib/tls/libc-2.3.6.so 0ffd3000-0ffe3000 ---p 00149000 00:01 3350 /lib/tls/libc-2.3.6.so 0ffe3000-0ffea000 r--p 00149000 00:01 3350 /lib/tls/libc-2.3.6.so 0ffea000-0ffee000 rwxp 00150000 00:01 3350 /lib/tls/libc-2.3.6.so 10000000-10004000 r-xp 00000000 00:01 76 /bin/sleep 10013000-10014000 rwxp 00003000 00:01 76 /bin/sleep 20000000-20018000 r-xp 00000000 00:01 3478 /lib/ld-2.3.6.so 20028000-20029000 r--p 00018000 00:01 3478 /lib/ld-2.3.6.so 20029000-2002a000 rwxp 00019000 00:01 3478 /lib/ld-2.3.6.so 2002a000-2004b000 rwxp 2002a000 00:00 0 [heap] ffd67000-ffd7c000 rw-p ffd67000 00:00 0 [stack] Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] atomic_dec_if_positive sign extension fixRobert Jennings2007-01-221-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | On 64-bit machines, if an atomic counter is explicitly set to a negative value, the atomic_dec_if_positive function will decrement and store the next smallest value in the atomic counter, contrary to its intended operation. The comparison to determine if the decrement will make the result negative was done by the "addic." instruction, which operates on a 64-bit value, namely the zero-extended word loaded from the atomic variable. This patch uses an explicit word compare (cmpwi) and changes the addic. to an addi (also changing "=&r" to "=&b" so that r0 isn't used, and addi doesn't become li). This also fixes a bug for both 32-bit and 64-bit in that previously 0x80000000 was considered positive, since the result after decrementing is positive. Now it is considered negative. Also, I clarify the return value in the comments just to make it clear that the value returned is always the decremented value, even if that value is not stored back to the atomic counter. Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] FD_ZERO build fixAndrew Morton2007-01-121-1/+1
| | | | | | | | | | | | | | | | | | unionfs managed to hit this on s390. Some architectures use __ptr_t in their FD_ZERO implementation. We don't have a __ptr_t. Switch them over to plain old void*. Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [POWERPC] Fix bugs in the hypervisor call stats codeAnton Blanchard2007-01-091-2/+0Star
| | | | | | | | | | | | | | | | There were a few issues with the HCALL_STATS code: - PURR cpu feature checks were backwards - We iterated one entry off the end of the hcall_stats array - Remove dead update_hcall_stats() function prototype I noticed one thing while debugging, and that is we call H_ENTER (to set up the MMU hashtable in early init) before we have done the cpu fixups. This means we will execute the PURR SPR reads even on a CPU that isnt capable of it. I wonder if we can move the CPU feature fixups earlier. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] 52xx: Don't use device_initcall to probe of_platform_busSylvain Munaut2007-01-091-0/+1
| | | | | | | | | | | | | | | Using device_initcall makes it happen for every platform that compiles this file in. This is really bad, for obvious reasons. Instead, we use the .init field of the machine description. If the platform needs the hook to do something specific it can provides its own function and call mpc52xx_declare_of_platform_devices from there. If not, the mpc52xx_declare_of_platform_devices function can directly be used as the init hook. Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Fix manual assembly WARN_ON() in enter_rtas().David Woodhouse2007-01-091-3/+24
| | | | | | | | | | | | | | | | | | When we switched over to the generic BUG mechanism we forgot to change the assembly code which open-codes a WARN_ON() in enter_rtas(), so the bug table got corrupted. This patch provides an EMIT_BUG_ENTRY macro for use in assembly code, and uses it in entry_64.S. Tested with CONFIG_DEBUG_BUGVERBOSE on ppc64 but not without -- I tried to turn it off but it wouldn't go away; I suspect Aunt Tillie probably needed it. This version gets __FILE__ and __LINE__ right in the assembly version -- rather than saying include/asm-powerpc/bug.h line 21 every time which is a little suboptimal. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] cell: add forward struct declarations to spu.hArnd Bergmann2006-12-191-0/+2
| | | | | | | Needed to be able to include spu.h independant from other headers. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
* [PATCH] Optimize D-cache alias handling on forkRalf Baechle2006-12-131-0/+1
| | | | | | | | | | | Virtually index, physically tagged cache architectures can get away without cache flushing when forking. This patch adds a new cache flushing function flush_cache_dup_mm(struct mm_struct *) which for the moment I've implemented to do the same thing on all architectures except on MIPS where it's a no-op. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] PM: Fix SMP races in the freezerRafael J. Wysocki2006-12-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, to tell a task that it should go to the refrigerator, we set the PF_FREEZE flag for it and send a fake signal to it. Unfortunately there are two SMP-related problems with this approach. First, a task running on another CPU may be updating its flags while the freezer attempts to set PF_FREEZE for it and this may leave the task's flags in an inconsistent state. Second, there is a potential race between freeze_process() and refrigerator() in which freeze_process() running on one CPU is reading a task's PF_FREEZE flag while refrigerator() running on another CPU has just set PF_FROZEN for the same task and attempts to reset PF_FREEZE for it. If the refrigerator wins the race, freeze_process() will state that PF_FREEZE hasn't been set for the task and will set it unnecessarily, so the task will go to the refrigerator once again after it's been thawed. To solve first of these problems we need to stop using PF_FREEZE to tell tasks that they should go to the refrigerator. Instead, we can introduce a special TIF_*** flag and use it for this purpose, since it is allowed to change the other tasks' TIF_*** flags and there are special calls for it. To avoid the freeze_process()-refrigerator() race we can make freeze_process() to always check the task's PF_FROZEN flag after it's read its "freeze" flag. We should also make sure that refrigerator() will always reset the task's "freeze" flag after it's set PF_FROZEN for it. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Russell King <rmk@arm.linux.org.uk> Cc: David Howells <dhowells@redhat.com> Cc: Andi Kleen <ak@muc.de> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpcLinus Torvalds2006-12-1211-83/+117
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (36 commits) [POWERPC] Generic BUG for powerpc [PPC] Fix compile failure do to introduction of PHY_POLL [POWERPC] Only export __mtdcr/__mfdcr if CONFIG_PPC_DCR is set [POWERPC] Remove old dcr.S [POWERPC] Fix SPU coredump code for max_fdset removal [POWERPC] Fix irq routing on some 32-bit PowerMacs [POWERPC] ps3: Add vuart support [POWERPC] Support ibm,dynamic-reconfiguration-memory nodes [POWERPC] dont allow pSeries_probe to succeed without initialising MMU [POWERPC] micro optimise pSeries_probe [POWERPC] Add SPURR SPR to sysfs [POWERPC] Add DSCR SPR to sysfs [POWERPC] Fix 440SPe CPU table entry [POWERPC] Add support for FP emulation for the e300c2 core [POWERPC] of_device_register: propagate device_create_file return code [POWERPC] Fix mmap of PCI resource with hack for X [POWERPC] iSeries: head_64.o needs to depend on lparmap.s [POWERPC] cbe_thermal: Fix initialization of sysfs attribute_group [POWERPC] Remove QE header files from lite5200.c [POWERPC] of_platform_make_bus_id(): make `magic' int ...
| * [POWERPC] Generic BUG for powerpcJeremy Fitzhardinge2006-12-112-42/+40Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes powerpc use the generic BUG machinery. The biggest reports the function name, since it is redundant with kallsyms, and not needed in general. There is an overall reduction of code, since module_32/64 duplicated several functions. Unfortunately there's no way to tell gcc that BUG won't return, so the BUG macro includes a goto loop. This will generate a real jmp instruction, which is never used. [akpm@osdl.org: build fix] [paulus@samba.org: remove infinite loop in BUG_ON] Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org> Cc: Andi Kleen <ak@muc.de> Cc: Hugh Dickens <hugh@veritas.com> Cc: Michael Ellerman <michael@ellerman.id.au> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
| * Merge branch 'for_paulus' of ↵Paul Mackerras2006-12-113-4/+45
| |\ | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc