====== netdev-fix.diff ====== Subject: [PATCH] spidernet: Use pci_dma_mapping_error() From: Olof Johansson A driver shouldn't compare to DMA_ERROR_CODE directly, use pci_dma_mapping_error() instead. Signed-off-by: Olof Johansson --- diffstat: spider_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ====== netdev-submitted.diff ====== commit f23f79743e1c17a0c2f3fbb28fae67d47ac6812f Author: Linas Vepstas Date: Tue Oct 10 16:23:24 2006 -0500 [PATCH] powerpc/cell spidernet DMA coalescing The current driver code performs 512 DMA mappns of a bunch of 32-byte structures. This is silly, as they are all in contiguous memory. Ths patch changes the code to DMA map the entie area with just one call. Signed-off-by: Linas Vepstas Cc: James K Lewis Cc: Arnd Bergmann commit 16f8395a8d7f648a5d0ffbf31d7bb59e81394b3b Author: Linas Vepstas Date: Tue Oct 10 16:22:29 2006 -0500 [PATCH] powerpc/cell spidernet release all descrs Bugfix: rx descriptor release function fails to visit the last entry while walking receive descriptor ring. Signed-off-by: Linas Vepstas Cc: James K Lewis Cc: Arnd Bergmann commit e7a3db262e0ab92c5275bead26999df49bb71ee3 Author: Linas Vepstas Date: Tue Oct 10 16:21:10 2006 -0500 [PATCH] powerpc/cell spidernet DMA direction fix The ring buffer descriptors are DMA-accessed bidirectionally, but are not declared in this way. Fix this. Signed-off-by: Linas Vepstas Cc: James K Lewis Cc: Arnd Bergmann commit d7e20cb5f150a7e7ec0b94d813ffbec4e9370be6 Author: Linas Vepstas Date: Tue Oct 10 16:19:34 2006 -0500 [PATCH] powerpc/cell spidernet variable name change Cosmetic patch: give the variable holding the numer of descriptors a more descriptive name, so to avoid confusion. Signed-off-by: Linas Vepstas Cc: James K Lewis Cc: Arnd Bergmann commit ec4f536d1bc0e8b0d64c476e253e1d617635cb0e Author: Linas Vepstas Date: Tue Oct 10 16:18:18 2006 -0500 [PATCH] powerpc/cell spidernet reduce DMA kicking The current code attempts to start the TX dma every time a packet is queued. This is too conservative, and wastes CPU time. This patch changes behaviour to call the kick-dma function less often, only when the tx queue is at risk of emptying. This reduces cpu usage, improves performance. Signed-off-by: Linas Vepstas Cc: James K Lewis Cc: Arnd Bergmann commit f90c0e7350dd400bbe3b66cb53f39a881bfcf566 Author: Linas Vepstas Date: Tue Oct 10 16:15:29 2006 -0500 [PATCH] powerpc/cell spidernet Remove a dummy register read that is not needed. This reduces CPU usage notably during transmit. Signed-off-by: Linas Vepstas Cc: Arnd Bergmann Cc: James K Lewis commit 92d08871db0490fc46608ecd292597e3d59fb1ec Author: Linas Vepstas Date: Tue Oct 10 16:14:29 2006 -0500 [PATCH] powerpc/cell spidernet refine locking The transmit side of the spider ethernet driver currently places locks around some very large chunks of code. This results in a fair amount of lock contention is some cases. This patch makes the locks much more fine-grained, protecting only the cirtical sections. One lock is used to protect three locations: the queue head and tail pointers, and the queue low-watermark location. Signed-off-by: Linas Vepstas Cc: Arnd Bergmann Cc: James K Lewis commit cad0b544d64af4190ff23bbc54cee14b1d2e2c6b Author: Linas Vepstas Date: Tue Oct 10 16:13:05 2006 -0500 [PATCH] powerpc/cell spidernet NAPI polling info. This patch moves transmit queue cleanup code out of the interrupt context, and into the NAPI polling routine. Signed-off-by: Linas Vepstas Acked-by: Arnd Bergmann Cc: James K Lewis commit ae74e1a9cc8d156e6c64e9bcee977652e756bb51 Author: Linas Vepstas Date: Tue Oct 10 16:11:33 2006 -0500 [PATCH] powerpc/cell spidernet low watermark patch. Implement basic low-watermark support for the transmit queue. Hardware low-watermarks allow a properly configured kernel to continously stream data to a device and not have to handle any interrupts at all in doing so. Correct zero-interrupt operation can be actually observed for this driver, when the socket buffer is made large enough. The basic idea of a low-watermark interrupt is as follows. The device driver queues up a bunch of packets for the hardware to transmit, and then kicks the hardware to get it started. As the hardware drains the queue of pending, untransmitted packets, the device driver will want to know when the queue is almost empty, so that it can queue some more packets. If the queue drains down to the low waterark, then an interrupt will be generated. However, if the kernel/driver continues to add enough packets to keep the queue partially filled, no interrupt will actually be generated, and the hardware can continue streaming packets indefinitely in this mode. The impelmentation is done by setting the DESCR_TXDESFLG flag in one of the packets. When the hardware sees this flag, it will interrupt the device driver. Because this flag is on a fixed packet, rather than at fixed location in the queue, the code below needs to move the flag as more packets are queued up. This implementation attempts to keep the flag at about 1/4 from "empty". Signed-off-by: Linas Vepstas Signed-off-by: James K Lewis Acked-by: Arnd Bergmann commit b3ed7a4267558ae6dbc5d28ccf2c739a13cf5aa9 Author: Linas Vepstas Date: Tue Oct 10 16:09:40 2006 -0500 [PATCH] powerpc/cell spidernet incorrect offset Bugfix -- the rx chain is in memory after the tx chain -- the offset being used was wrong, resulting in memory corruption when the size of the rx and tx rings weren't exactly the same. Signed-off-by: Linas Vepstas Cc: James K Lewis Cc: Arnd Bergmann commit b5b4229b4f43d9e728e89bee6ffc4b96e35605fa Author: Linas Vepstas Date: Tue Oct 10 16:08:42 2006 -0500 [PATCH] powerpc/cell spidernet stop error printing patch. Turn off mis-interpretation of the queue-empty interrupt status bit as an error. Signed-off-by: Linas Vepstas Signed-off-by: James K Lewis Acked-by: Arnd Bergmann commit 5a8a66516f49a3a242cb93ccb2b09485f2968a46 Author: Linas Vepstas Date: Tue Oct 10 16:06:53 2006 -0500 [PATCH] powerpc/cell spidernet fix error interrupt print The print message associated with the descriptor chain end interrupt prints a bogs value. Fix that. Signed-off-by: Linas Vepstas Cc: James K Lewis Cc: Arnd Bergmann commit 2304fb9616bab2476be4409cfc6e3142e96e3f27 Author: Linas Vepstas Date: Tue Oct 10 16:05:00 2006 -0500 [PATCH] powerpc/cell spidernet bogus rx interrupt bit The current receive interrupt mask sets a bogus bit that doesn't even belong to the definition of this register. Remove it. Signed-off-by: Linas Vepstas Cc: James K Lewis Cc: Arnd Bergmann commit 6bd5a191596137706466ad7d06acfbf3ca8223ab Author: Linas Vepstas Date: Tue Oct 10 16:04:00 2006 -0500 [PATCH] Spidernet stop queue when queue is full. This patch adds a call to netif_stop_queue() when there is no more room for more packets on the transmit queue. Signed-off-by: Linas Vepstas Cc: James K Lewis Cc: Arnd Bergmann commit 02afe79b99b591f66cc88e9f864ff685b5841e0b Author: Linas Vepstas Date: Tue Oct 10 16:02:54 2006 -0500 [PATCH] Spidernet fix register field definitions This patch fixes the names of a few fields in the DMA control register. There is no functional change. Signed-off-by: Linas Vepstas Cc: James K Lewis Cc: Arnd Bergmann commit 45927c686a6fc6b1be8cf99eff990f654b292445 Author: Linas Vepstas Date: Tue Oct 10 16:01:51 2006 -0500 [PATCH] powerpc/cell spidernet add missing netdev watchdog Set the netdev watchdog timer. Signed-off-by: Linas Vepstas Cc: James K Lewis Cc: Arnd Bergmann commit ac0ce6becb7325e8e870460efdec781f0ca95482 Author: Linas Vepstas Date: Tue Oct 10 16:01:00 2006 -0500 [PATCH] powerpc/cell spidernet zlen min packet length Polite device drivers pad short packets to 60 bytes, so that mean-spirited users don't accidentally DOS some other OS that can't handle short packets. Signed-off-by: Linas Vepstas Cc: James K Lewis Cc: Arnd Bergmann commit 2863834f264750d09231b1d7876a3d223b1f99df Author: Linas Vepstas Date: Tue Oct 10 16:00:04 2006 -0500 [PATCH] powerpc/cell spidernet force-end fix Bugfix: when cleaning up the transmit queue upon device close, be sure to walk the entire queue. Signed-off-by: Linas Vepstas Cc: James K Lewis Cc: Arnd Bergmann commit 089b448d6fbabf3ed773b9be0499bcb63dd5fd5f Author: Linas Vepstas Date: Tue Oct 10 15:59:02 2006 -0500 [PATCH] Spidernet module parm permissions The module param permsissions should bw read-only, not writable. From: James K Lewis Signed-off-by: James K Lewis Signed-off-by: Linas Vepstas Cc: Arnd Bergmann commit 525e127457e4601fc4a86be9045338b64433c286 Author: Linas Vepstas Date: Tue Oct 10 15:57:26 2006 -0500 [PATCH] powerpc/cell spidernet burst alignment patch. This patch increases the Burst Address alignment from 64 to 1024 in the Spidernet driver. This improves transmit performance for large packets. From: James K Lewis Signed-off-by: James K Lewis Signed-off-by: Linas Vepstas Acked-by: Arnd Bergmann commit c6ac95967906c22fa3eac4e5e46b9013fbdccb86 Author: Linas Vepstas Date: Tue Oct 10 15:56:04 2006 -0500 [PATCH] powerpc/cell spidernet ethtool -i version number info. This patch adds version information as reported by ethtool -i to the Spidernet driver. From: James K Lewis Signed-off-by: James K Lewis Signed-off-by: Linas Vepstas Acked-by: Arnd Bergmann --- diffstat: spider_net.c | 341 +++++++++++++++++-------------- spider_net.h | 49 ++-- spider_net_ethtool.c | 6 3 files changed, 224 insertions(+), 172 deletions(-) ====== cell-defconfig-2.6.19.diff ====== --- diffstat: cell_defconfig | 61 ++++++------------------------------- 1 file changed, 11 insertions(+), 50 deletions(-) ====== cell-defconfig-4k-pages.diff ====== Subject: cell: revert to 4k pages Fedora Core 5 user space has a few bugs regarding 64k pages, so we go back to 4k in order to run on legacy systems. Signed-off-by: Arnd Bergmann --- diffstat: cell_defconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ====== spufs-change-llx-to-0x-llx.diff ====== Subject: [PATCH 2.6.18] spufs: Change %llx to 0x%llx. From: Dwayne Grant McConnell This patches changes /npc, /decr, /decr_status, /spu_tag_mask, /event_mask, /event_status, and /srr0 files to provide output according to the format string "0x%llx" instead of "%llx". Before this patch some files used "0x%llx" and other used "%llx" which is inconsistent and potentially confusing. A user might assume "%llx" numbers were decimal if they happened to not contain any a-f digits. This change will break any code cannot tolerate a leading 0x in the file contents. The only known users of these files are the libspe but there might also be some scripts which access these files. This risk is deemed acceptable for future consistency. Signed-off-by: Dwayne Grant McConnell -- Dwayne Grant McConnell Lotus Notes Mail: Dwayne McConnell [Mail]/Austin/IBM@IBMUS Lotus Notes Calendar: Dwayne McConnell [Calendar]/Austin/IBM@IBMUS --- diffstat: file.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) ====== spufs-gdb-interfaces-addon-5.diff ====== Subject: spufs: add /lslr, /dma_info and /proxydma files From: Dwayne Grant McConnell The /lslr file gives read access to the SPU_LSLR register in hex; 0x3fff for example The /dma_info file provides read access to the SPU Command Queue in a binary format. The /proxydma_info files provides read access access to the Proxy Command Queue in a binary format. The spu_info.h file provides data structures for interpreting the binary format of /dma_info and /proxydma_info. Signed-off-by: Dwayne Grant McConnell Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/platforms/cell/spufs/backing_ops.c | 1 arch/powerpc/platforms/cell/spufs/file.c | 133 +++++++++- arch/powerpc/platforms/cell/spufs/spufs.h | 9 include/asm-powerpc/Kbuild | 4 include/asm-powerpc/spu_info.h | 54 ++++ 5 files changed, 193 insertions(+), 8 deletions(-) ====== spufs-remove-spu_tag_mask.diff ====== Subject: [PATCH 2.6.18] spufs: Remove /spu_tag_mask file From: Dwayne Grant McConnell This patch removes the /spu_tag_mask file from spufs. The data provided by this file is also available from the /dma_info file in the dma_info_mask of the spu_dma_info struct. The file was intended to be used by gdb, but that never used it, and now it has been replaced with the more verbose dma_info file. Signed-off-by: Dwayne Grant McConnell Signed-off-by: Arnd Bergmann --- diffstat: file.c | 23 ----------------------- 1 file changed, 23 deletions(-) ====== spufs-mbox-info.diff ====== Subject: [PATCH 2.6.18] spufs: implement /mbox_info, /ibox_info, and /wbox_info. From: Dwayne Grant McConnell This patch implements read only access to /mbox_info - SPU Write Outbound Mailbox /ibox_info - SPU Write Outbound Interrupt Mailbox /wbox_info - SPU Read Inbound Mailbox These files are used by gdb in order to look into the current mailbox queues without changing the contents at the same time. They are not meant for general programming use, since the access requires a context save and is therefore rather slow. It would be good to complement this patch with one that adds write support as well. Signed-off-by: Dwayne Grant McConnell -- Dwayne Grant McConnell Lotus Notes Mail: Dwayne McConnell [Mail]/Austin/IBM@IBMUS Lotus Notes Calendar: Dwayne McConnell [Calendar]/Austin/IBM@IBMUS --- diffstat: file.c | 90 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) ====== spufs-require-context-save-for-signal-read-2.diff ====== Subject: spufs: read from signal files only if data is there From: Dwayne Grant McConnell We need to check the channel count of the signal notification registers before reading them, because it can be undefined when the count is zero. In order to read count and data atomically, we read from the saved context. This patch uses spu_acquire_saved() to force a context save before a /signal1 or /signal2 read. Because of this it is no longer necessary to have backing_ops and hw_ops versions of this function so they have been removed. Regular applications should not rely on reading this register to be fast, as it's conceptually a write-only file from the PPE perspective. Signed-off-by: Dwayne Grant McConnell -- Dwayne Grant McConnell Lotus Notes Mail: Dwayne McConnell [Mail]/Austin/IBM@IBMUS Lotus Notes Calendar: Dwayne McConnell [Calendar]/Austin/IBM@IBMUS --- diffstat: file.c | 30 ++++++++++++++++++++++-------- hw_ops.c | 12 ------------ 2 files changed, 22 insertions(+), 20 deletions(-) ====== spufs-fix-message-count-for-wbox_info.diff ====== Subject: spufs: fix message count for wbox_info From: Dwayne Grant McConnell The stat register holds the number of empty slots for wbox, not the number of elements present. Signed-off-by: Dwayne Grant McConnell Signed-off-by: Arnd Bergmann --- Dwayne Grant McConnell Lotus Notes Mail: Dwayne McConnell [Mail]/Austin/IBM@IBMUS Lotus Notes Calendar: Dwayne McConnell [Calendar]/Austin/IBM@IBMUS --- diffstat: file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ====== cell-replace-spu-nid-with-spu-node.diff ====== Subject: cell: replace spu.nid with spu.node From: Geoff Levand Replace the use of the platform specific variable spu.nid with the platform independednt variable spu.node. Signed-off-by: Geoff Levand Signed-off-by: Arnd Bergmann --- --- diffstat: spu_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ====== spufs-dma-storage-error-return.diff ====== Subject: spufs: return correct event for data storage interrupt When we attempt an MFC DMA to an unmapped address, the event returned from spu_run should be SPE_EVENT_SPE_DATA_STORAGE, not SPE_EVENT_INVALID_DMA. Signed-off-by: Arnd Bergmann --- diffstat: spu_base.c | 2 +- spufs/run.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) ====== spufs-vm-io-mappings.diff ====== Subject: spufs: avoid user-triggered oops in ptrace From: Christoph Hellwig When one of the spufs files is mapped into a process address space, regular users can use ptrace to attempt accessing them with access_process_vm(). With the way that the mappings currently work, this likely causes an oops. Setting the vm_flags to VM_IO makes sure that ptrace can not access them but returns an error code. This is not the perfect solution in case of the local store mapping, but it fixes the oops in a well-defined way. Also remove leftover VM_RESERVED flags in spufs. The VM_RESERVED flag is on it's way out and not checked by the memory managment code anymore. Signed-off-by: Arnd Bergmann Signed-off-by: Christoph Hellwig --- diffstat: file.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) ====== spufs-map-nonguarded.diff ====== Subject: spufs: always map local store non-guarded When fixing spufs to map the 'mem' file backing store cacheable, I incorrectly set the physical mapping to use both cache-inhibited and guarded mapping, which resulted in a serious performance degradation. Debugged-by: Michael Ellerman Signed-off-by: Arnd Bergmann --- diffstat: file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ====== spufs-fixme.diff ====== Subject: spufs: add a FIXME SetPageReserved should probably not be called on vmalloc memory. Need to investigate further. Signed-off-by: Arnd Bergmann --- --- diffstat: switch.c | 1 + 1 file changed, 1 insertion(+) ====== cell-fix-sparse-warning-in-xmon.diff ====== Subject: Fix sparse warning in xmon Cell code From: Michael Ellerman My patch to add spu helpers to xmon (a898497088f46252e6750405504064e2dce53117) introduced a few sparse warnings, because I was dereferencing an __iomem pointer. I think the best way to handle it is to actually use the appropriate in_beXX functions. Need to rejigger the DUMP macro a little to accomodate that. Signed-off-by: Michael Ellerman Signed-off-by: Arnd Bergmann --- Arnd, it might be nice to merge this for SDK 2.0 if that's still an option, just so that it matches upstream as much as possible. arch/powerpc/xmon/xmon.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) --- diffstat: xmon.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) ====== cell-xmon-show-spu-state.diff ====== Subject: Show state of spus as they're stopped in Cell xmon helper From: Michael Ellerman After stopping spus in xmon I often find myself trawling through the field dumps to find out which spus were running. The spu stopping code actually knows what's running, so let's print it out to save the user some futzing. Signed-off-by: Michael Ellerman Signed-off-by: Arnd Bergmann --- arch/powerpc/xmon/xmon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- diffstat: xmon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ====== cell-xmon-sd-command.diff ====== Subject: Add a 'sd' command (spu dump) to xmon to dump spu local store From: Michael Ellerman Add a command to xmon to dump the memory of a spu's local store. This mimics the 'd' command which dumps regular memory, but does a little hand holding by taking the user supplied address and finding that offset in the local store for the specified spu. This makes it easy for example to look at what was executing on a spu: 1:mon> ss ... Stopped spu 04 (was running) ... 1:mon> sf 4 Dumping spu fields at address c0000000019e0a00: ... problem->spu_npc_RW = 0x228 ... 1:mon> sd 4 0x228 d000080080318228 01a00c021cffc408 4020007f217ff488 |........@ ..!...| Aha, 01a00c02, which is of course rdch $2,$ch24 ! Signed-off-by: Michael Ellerman Signed-off-by: Arnd Bergmann --- arch/powerpc/xmon/xmon.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) --- diffstat: xmon.c | 52 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) ====== spider-fix-eth_zlen.patch ====== Subject: spidernet: Revert 808999c9a4749dc67c39bf52f712d0c27aa00e67 This one caused bugs during testing, not yet clear why. The original commit message was: | Author: Linas Vepstas | Date: Tue Oct 10 16:01:00 2006 -0500 | | [PATCH] powerpc/cell spidernet zlen min packet length | | Polite device drivers pad short packets to 60 bytes, | so that mean-spirited users don't accidentally DOS | some other OS that can't handle short packets. | | Signed-off-by: Linas Vepstas | Cc: James K Lewis | Cc: Arnd Bergmann | Signed-off-by: Jeff Garzik --- drivers/net/spider_net.c | 17 ++++------------- drivers/net/spider_net.h | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) --- diffstat: spider_net.c | 17 ++++------------- spider_net.h | 2 +- 2 files changed, 5 insertions(+), 14 deletions(-) ====== spidernet-add-net_ratelimit.diff ====== Subject: Spidernet - add net_ratelimit to suppress long output From: James K Lewis This patch adds net_ratelimit to many of the printks in order to limit extraneous warning messages (created in response to Bug 28554). This has been tested, please apply. Signed-off-by: James K Lewis --- drivers/net/spider_net.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- diffstat: spider_net.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ====== spufs-master-control.diff ====== --- diffstat: backing_ops.c | 24 +++++++++++++++++++--- context.c | 40 +++++++++++++++++++------------------- hw_ops.c | 28 +++++++++++++++++++------- inode.c | 15 +++++++++++--- run.c | 3 +- spufs.h | 3 +- 6 files changed, 78 insertions(+), 35 deletions(-) ====== spufs-autorecycle-isolated.diff ====== Subject: spufs: replace recycle file with automated method It seems we don't need to use an explicit 'recycle' file if we simply rely on the initial secure application to exit secure mode correctly before loading the new kernel. This makes the interface much simpler and more consistant. The code may get even simpler if we move the initial isolated load into the spu_run instead of doing it behind the back of spu_create. Right now, this patch is completely untested, due to lack of the right simulator version for the isolation feature. The patch needs spufs-master-control.diff to be applied first. Please test this and report back on the success with it. Signed-off-by: Arnd Bergmann --- diffstat: file.c | 32 -------------------------------- inode.c | 7 +------ run.c | 29 +++++++++++++++++++++++++---- spufs.h | 2 +- 4 files changed, 27 insertions(+), 43 deletions(-) ====== cell-pmu-exports.diff ====== From: Kevin Corry Subject: cell: Oprofile prereqs: Add symbol exports Add symbol-exports for the new routines in arch/powerpc/platforms/cell/pmu.c. They are needed for Oprofile, which can be built as a module. Patch is against 2.6.18-arnd5. Signed-Off-By: Kevin Corry --- diffstat: pmu.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) ====== cell-pmu-register-macros.diff ====== Subject: cell: PMU register macros From: Kevin Corry More macros for manipulating bits in the Cell PMU control registers. Signed-Off-By: Kevin Corry Signed-Off-By: Carl Love --- diffstat: cbe_regs.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) ====== cell-oprofile-export-hrtimer_forward.diff ====== Subject: Oprofile-on-Cell prereqs: Export hrtimer_forward From: Kevin Corry Add a symbol-export for kernel/hrtimer.c::hrtimer_forward(). This routine is needed by the upcoming Oprofile-for-Cell patches, since Oprofile can be built as a module. Cc: Thomas Gleixner Signed-off-by: Kevin Corry Signed-off-by: Arnd Bergmann --- diffstat: hrtimer.c | 1 + 1 file changed, 1 insertion(+) ====== cell-move-PMU-related-stuff-to-include_asm-powerpc_cell-pmu-h.diff ====== Subject: cell: Move PMU-related stuff to include/asm-powerpc/cell-pmu.h From: Kevin Corry Move some PMU-related macros and function prototypes from cbe_regs.h and pmu.h in arch/powerpc/platforms/cell/ to a new header at include/asm-powerpc/cell-pmu.h This applies to the 2.6.18-arnd5 tree + cbe_pmu_exports.diff + cbe_pmu_macros.diff + export_hrtimer_forward.diff (all of which Arnd has accepted in his tree this week). Signed-off-by: Kevin Corry Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/platforms/cell/pmu.h | 57 ------ linux-2.6/arch/powerpc/platforms/cell/cbe_regs.h | 31 --- linux-2.6/arch/powerpc/platforms/cell/pmu.c | 1 linux-2.6/include/asm-powerpc/cell-pmu.h | 90 ++++++++++ 4 files changed, 92 insertions(+), 87 deletions(-) ====== systemsim-2.6.18.diff ====== commit 4ec3ba5c24b1d7de452d410f0c339bacb99a7858 Author: Eric Van Hensbergen Date: Wed Sep 20 10:21:45 2006 -0400 Subject: [FYI] cell: systemsim defconfig This is an update to the default configuration from an earlier binary release on http://bsc.es/. Since the other systemsim patches are still under discussion, this is provided on a purely informational basis. Signed-off-by: Arnd Bergmann Signed-off-by: Eric Van Hensbergen commit bffe5c838cbc132bba12a98311ae56103c369126 Author: Eric Van Hensbergen Date: Wed Sep 20 10:20:17 2006 -0400 Subject: Don't use hvc_fss if hvc_rtas is available The latest version of Systemsim does come with HVC_RTAS support enabled. Use that one instead, since it brings us one step closer to using no special device drivers for systemsim. Signed-off-by: Arnd Bergmann Signed-off-by: Eric Van Hensbergen commit d4fad433bb1d0386cffdf037e101355a9140dd6e Author: Eric Van Hensbergen Date: Wed Sep 20 10:19:18 2006 -0400 Subject: systemsim: don't load systemsim_bd when running on real HW If we don't do this, we crash during bootup Signed-off-by: Arnd Bergmann Signed-off-by: Eric Van Hensbergen commit d7f9a20a51d510fbe8c0438345b695e1b62422c5 Author: Eric Van Hensbergen Date: Wed Sep 20 10:18:30 2006 -0400 Subject: cell: correctly detect systemsim host Systemsim uses a different compatible property in the device tree. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann Signed-off-by: Eric Van Hensbergen commit a310086776d9d3c163a6a46f3c8cfa5da07e4796 Merge: e478bec... fce8c25... Author: Eric Van Hensbergen Date: Wed Sep 20 08:50:08 2006 -0400 Merge ../systemsim-2.6.18-rc4/ into systemsim-2.6.18 commit fce8c2554d430f7ba998884cabf3929c28e26f23 Merge: 9f73763... 64b8767... Author: Eric Van Hensbergen Date: Wed Aug 9 20:24:01 2006 -0500 Merge to tip commit 64b8767f39d329d290a286996401bc754bbd7ee2 Merge: 82d6897... c7c2d69... Author: Eric Van Hensbergen Date: Thu Jul 27 12:36:06 2006 -0500 Merge systemsim patch to tip Conflicts: arch/powerpc/platforms/pseries/setup.c include/asm-powerpc/udbg.h commit c7c2d69e9ec0af0f1b62628a9859e56e729f219b Author: Eric Van Hensbergen Date: Tue Jul 25 22:17:21 2006 -0500 Remove devfs code from Systemsim Block driver Signed-off-by: Eric Van Hensbergen commit 2aefbc181b39847365a5c9cb1cd1793b097f3694 Merge: 427abfa... 1310a6e... Author: Eric Van Hensbergen Date: Tue Jul 25 21:31:25 2006 -0500 Merge systemsim patch to 2.6.17 Conflicts: arch/powerpc/kernel/Makefile arch/powerpc/kernel/setup_64.c drivers/char/Kconfig drivers/char/Makefile drivers/char/hvc_console.c drivers/char/hvc_rtas.c include/asm-powerpc/machdep.h Signed-off-by: Eric Van Hensbergen commit 1310a6e478b04589dd256100a38c8bcc1e1084d0 Author: Eric Van Hensbergen Date: Mon Mar 20 13:02:56 2006 -0600 Updated systemsim default config to include new options. Signed-off-by: Wesley Reiley Signed-off-by: Eric Van Hensbergen commit b5262afff1203891e355726e597493f68f7d00cd Merge: 7705a87... 7f0292c... Author: Eric Van Hensbergen Date: Mon Mar 20 17:55:25 2006 +0000 Merge systemsim patches to v2.6.16 commit 7f0292c5c9dd99d4ed5d2469d4488e993dfb8317 Merge: 5357448... 83ef584... Author: Eric Van Hensbergen Date: Mon Mar 13 17:21:43 2006 +0000 merge to v2.6.16-rc6 commit 83ef5848bcf6bf4a4e7a820a7b4f7375a71ca769 Merge: d040699... 4b1b109... Author: Eric Van Hensbergen Date: Mon Feb 27 16:56:40 2006 -0600 Merge ssh://master.kernel.org/pub/scm/linux/kernel/git/ericvh/systemsim commit d04069941633adbf6f525ecb53d7bc9a12b30d85 Author: Eric Van Hensbergen Date: Mon Feb 27 16:55:57 2006 -0600 systemsim: fix merge problem I screwed up the last merge and for some reason can't revert it. This replaces the screwed up hvc_console.c with the last version from the systemsim branch prior to the merge. Signed-off-by: Eric Van Hensbergen commit 4b1b1097c0ff8683deda1d524ac7af0e3408776f Author: Eric Van Hensbergen Date: Mon Feb 27 22:01:37 2006 +0000 systemsim: fix broken merge This will probably bite me later, but apparently I massively screwed up the previous merge. This fix puts the old hvc_console.c in place and lets you build systemsim again. Signed-off-by: Eric Van Hensbergen commit b3dc101a8a904396a440fa966c681c22cbb5f129 Merge: b4e4add... de5f503... Author: Eric Van Hensbergen Date: Mon Feb 27 20:50:57 2006 +0000 Merge branch 'master' Conflicts: drivers/char/hvc_console.c commit b4e4add5d57f130a422e68787626f96f311658a0 Author: Eric Van Hensbergen Date: Fri Feb 24 16:47:36 2006 -0600 [PATCH] systemsim: add early debug option when using systemsim console This patch adds udbg hooks for early-printk debug when using the IBM Full System Simulator console support. Signed-off-by: Eric Van Hensbergen commit 6f27df783005ca87d1a27370837070b98798fbeb Author: Eric Van Hensbergen Date: Fri Feb 24 16:46:07 2006 -0600 [PATCH] systemsim: add boot hacks for non-standard platforms When booting on some "experimental platforms" under the IBM Full System Simulator - a certain set of boot hacks are required which differentiate the hardware from standard pSeries systems. This patch adds a config flag which allows you to use these hacks. Signed-off-by: Eric Van Hensbergen commit aacd155ef15d97f7ccc2c43922293abef3d7381f Merge: 72e13e7... bd71c2b... Author: Eric Van Hensbergen Date: Sun Feb 19 19:10:39 2006 +0000 Merge branch 'master' commit 72e13e73b5998b853a9bd20e8c425486818ed09a Author: Eric Van Hensbergen Date: Thu Feb 2 09:28:47 2006 -0600 [PATCH] systemsim: clean up default configuration Signed-off-by: Eric Van Hensbergen commit ea40711c3a573b917cade94c1bdca659e4f3f905 Author: Eric Van Hensbergen Date: Thu Feb 2 09:27:48 2006 -0600 [PATCH] systemsim: clean up systemsim block driver Clean-up the systemsim block driver and integrate some of the suggestions from LKML. Signed-off-by: Eric Van Hensbergen commit 79e30c5718a29c6de20e45f00bc1b458b359c29c Author: Eric Van Hensbergen Date: Thu Feb 2 09:26:01 2006 -0600 systemsim: clean-up systemsim network patch Incorporate some of the LKML feedback, clean-up naming conventions and fix a bug. Signed-off-by: Eric Van Hensbergen commit 5468f5b2fb461b7a2af879ad314194c54c70847e Author: Eric Van Hensbergen Date: Thu Feb 2 09:13:32 2006 -0600 [PATCH] powerpc: rtas console Current Cell hardware is using the console through a set of rtas calls. This driver is needed to get console output on those boards. Signed-off-by: Arnd Bergmann commit d07920310527c12c13bd85f1dbc679d85006448d Author: Eric Van Hensbergen Date: Thu Feb 2 09:13:20 2006 -0600 [PATCH] systemsim: hvc based console The IBM full system simulator for PowerPC has its own set of calls used for console interaction, when not simulating actual serial port hardware. This is needed to run the simulator for Cell and can also be used for the PowerPC 970 simulator. It also adds the generic asm/systemsim.h header file that is also used by other device drivers for the system simulator, i.e. the block and network drivers. Signed-off-by: "Ryan S. Arnold" Signed-off-by: Arnd Bergmann commit b03419a54e848087269b885b6668a1f2d2ade61e Author: Eric Van Hensbergen Date: Thu Feb 2 09:13:07 2006 -0600 [PATCH] powerpc: console rework These are some updates from both Ryan and Arnd for the hvc_console driver: The main point is to enable the inclusion of a console driver for rtas and for systemsim, which are needed for the cell platform. Also shuffle around some data-type declarations and moves some functions out of include/asm-ppc64/hvconsole.h and into a new drivers/char/hvc_console.h file. From: "Ryan S. Arnold" Signed-off-by: "Ryan S. Arnold" Signed-off-by: Arnd Bergmann commit 679de1715f7718a25eb813b48855983ec2fac261 Author: Eric Van Hensbergen Date: Thu Feb 2 09:12:48 2006 -0600 [PATCH] systemsim: default configuration This default configuration is supposed to work with both the powerpc970 as well as the cell systemsim. From: Eric Van Hensbergen Signed-off-by: Arnd Bergmann commit 498f943bb2fd8b1766f5fce1ed24a54131726c5a Author: Eric Van Hensbergen Date: Thu Feb 2 09:12:32 2006 -0600 [PATCH] systemsim: network driver support This adds a simple network driver for virtual networking on the IBM Full System Simulator. From: Eric Van Hensbergen Signed-off-by: Arnd Bergmann commit 65b2e6d3cff3e75c9c7cd1ce624dda68dbbb0fba Author: Eric Van Hensbergen Date: Thu Feb 2 09:11:51 2006 -0600 [PATCH] systemsim: bogus idle support The original cpu_idle hack from the systemsim git tree is a bit strange, because it unconditionally changes the native_idle function. This one instead introduces a new idle implementation that is only used on systemsim. Signed-off-by: Arnd Bergmann commit ea136813c9ac655a69693af5aa0473f2ea7e6401 Author: Eric Van Hensbergen Date: Thu Feb 2 09:11:37 2006 -0600 [PATCH] systemsim: block driver support The block device driver for systemsim is currently required for running on the Cell systemsim port, which does not simulate any other block devices. From: Eric Van Hensbergen Signed-off-by: Arnd Bergmann commit 71a1e68425691411ccea71025f6dae8355607ea9 Author: Eric Van Hensbergen Date: Thu Feb 2 09:11:23 2006 -0600 [PATCH] systemsim: basic systemsim support Add some support and doc files for the IBM Full System Simulator and a configuration option that acts as a control for the patches based on this one. No code is changed in this patch, but it is required for the systemsim network, block, hvc_console and cpu_idle patches that are based on the infrastructure in here. From: Eric Van Hensbergen Signed-off-by: Arnd Bergmann --- diffstat: Documentation/systemsim/maple.tcl | 1145 +++++++++++ Documentation/systemsim/systemsim.txt | 92 arch/powerpc/Kconfig | 28 arch/powerpc/configs/cbesim_defconfig | 868 ++++++++ arch/powerpc/configs/systemsim_defconfig | 1127 ++++++++++ arch/powerpc/kernel/Makefile | 1 arch/powerpc/kernel/idle_systemsim.c | 35 arch/powerpc/kernel/setup_64.c | 20 arch/powerpc/kernel/udbg.c | 3 arch/powerpc/platforms/cell/setup.c | 3 arch/powerpc/platforms/pseries/setup.c | 7 drivers/block/Kconfig | 7 drivers/block/Makefile | 2 drivers/block/systemsim_bd.c | 319 +++ drivers/char/Kconfig | 32 drivers/char/Makefile | 1 drivers/char/hvc_fss.c | 134 + drivers/net/Kconfig | 8 drivers/net/Makefile | 1 drivers/net/systemsim_net.c | 393 +++ include/asm-powerpc/machdep.h | 1 include/asm-powerpc/systemsim.h | 132 + include/asm-powerpc/udbg.h | 1 23 files changed, 4341 insertions(+), 19 deletions(-) ====== systemsim-cell_defconfig.diff ====== Subject: [FYI] cell: enable systemsim in cell_defconfig This is a patch against the cell_defconfig to enable systemsim. Signed-off-by: Jens Osterkamp --- --- diffstat: cell_defconfig | 7 +++++++ 1 file changed, 7 insertions(+) ====== dd2-performance-2.diff ====== Subject: [FYI] Performance hacks for broken Cell CPU revisions The currently used CPUs of the Cell BE DD2.0 release have a few glitches that may result in bad performance, these workarounds are suggested in the Errata: - When a decrementer or external exception occurs, wake up the other SMT thread from pause(0) state. - When a system reset exception occurs (i.e. the CPU wakes up from pause(0) state), do a quick check if we were meant to wake up, otherwise go back to pause(0) state. - change the default floating point exception mode to zero. It is rather unlikely that we find a way to create a patch that won't be harmful to any other platform, so this is definitely not meant for inclusion in the mainline kernel, but only provided for those people that build a special kernel for Cell BE DD2.0. Note that the functionality provided by this patch is now disabled by default, so you need to rebuild the kernel to get it back. From: Jens Osterkamp Signed-off-by: Arnd Bergmann --- --- diffstat: configs/cell_defconfig | 1 kernel/head_64.S | 62 +++++++++++++++++++++++++++++ platforms/cell/Kconfig | 10 ++++ 3 files changed, 73 insertions(+) ====== ib-max_rbc_rrs.diff ====== Subject: backport an infiniband fix From: Erez Cohen Add control of PCIX max read byte count and PCI Express max read request size parameters. This is due to the fact that some chipsets may not work or may not work optimally with the default parametrs. logic as follows: If the user sets a valid value to a paramter this value wins. Otherwise the value read from the device is compared to the default value defined by the spec. If value read does not equal default it is assumed the BIOS configured it and the BIOS value is retained. Signed-off-by: Arnd Bergmann --- diffstat: mthca_main.c | 67 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 2 deletions(-) ====== ibmveth-remove-ibmveth-liobn-field.diff ====== Subject: ibmveth: Remove ibmveth "liobn" field From: Benjamin Herrenschmidt Remove the now unused "liobn" field in ibmveth which also avoids having insider knowledge of the iommu table in that driver. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Santiago Leon Signed-off-by: Paul Mackerras Signed-off-by: Arnd Bergmann --- Already in Jeff's queue. drivers/net/ibmveth.c | 4 ---- drivers/net/ibmveth.h | 1 - 2 files changed, 5 deletions(-) --- diffstat: ibmveth.c | 4 ---- ibmveth.h | 1 - 2 files changed, 5 deletions(-) ====== call-platform_notify_remove-later.diff ====== Subject: Call platform_notify_remove later From: Benjamin Herrenschmidt Move the call to platform_notify_remove() to after the call to bus_remove_device(), where it belongs. It's bogus to notify the platform of removal while drivers are still attached to the device and possibly still operating since the platform might use this callback to tear down some resources used by the driver (ACPI bits, iommu table, ...) Signed-off-by: Benjamin Herrenschmidt Cc: "Brown, Len" Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Arnd Bergmann --- This patch is already in -mm under the name call-platform_notify_remove-later.patch drivers/base/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- diffstat: core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ====== driver-core-add-notification-of-bus-events.diff ====== Subject: Driver core: add notification of bus events From: Benjamin Herrenschmidt I finally did as you suggested and added the notifier to the struct bus_type itself. There are still problems to be expected is something attaches to a bus type where the code can hook in different struct device sub-classes (which is imho a big bogosity but I won't even try to argue that case now) but it will solve nicely a number of issues I've had so far. That also means that clients interested in registering for such notifications have to do it before devices are added and after bus types are registered. Fortunately, most bus types that matter for the various usage scenarios I have in mind are registerd at postcore_initcall time, which means I have a really nice spot at arch_initcall time to add my notifiers. There are 4 notifications provided. Device being added (before hooked to the bus) and removed (failure of previous case or after being unhooked from the bus), along with driver being bound to a device and about to be unbound. The usage I have for these are: - The 2 first ones are used to maintain the DMA operations for various bus types via the new dev_sysdata addition to struct device (added by a separate patch). - The other two ones have a completely different usage scenario. I have cases where multiple devices and their drivers depend on each other. For example, the IBM EMAC network driver needs to attach to a MAL DMA engine which is a separate device, and a PHY interface which is also a separate device. They are all of_platform_device's (well, about to be with my upcoming patches) but there is no say in what precise order the core will "probe" them and instanciate the various modules. The solution I found for that is to have the drivers for emac to use multithread_probe, and wait for a driver to be bound to the target MAL and PHY control devices (the device-tree contains reference to the MAL and PHY interface nodes, which I can then match to of_platform_devices). Right now, I've been polling, but with that notifier, I can more cleanly wait (with a timeout of course). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- This patch is already in Greg KH tree under the name driver-core-add-notification-of-bus-events.patch drivers/base/bus.c | 15 +++++++++++++++ drivers/base/core.c | 12 ++++++++++++ drivers/base/dd.c | 10 ++++++++++ include/linux/device.h | 25 ++++++++++++++++++++++++- 4 files changed, 61 insertions(+), 1 deletion(-) --- diffstat: drivers/base/bus.c | 15 +++++++++++++++ drivers/base/core.c | 12 ++++++++++++ drivers/base/dd.c | 10 ++++++++++ include/linux/device.h | 25 ++++++++++++++++++++++++- 4 files changed, 61 insertions(+), 1 deletion(-) ====== arch-provides-generic-iomap-missing-accessors.diff ====== Subject: arch provides generic iomap missing accessors From: Benjamin Herrenschmidt From: Linus Torvalds Allow architectures to provide their own implementation of the big endian MMIO accessors and "repeat" MMIO accessors for use by the generic iomap. Signed-off-by: Linus Torvalds Signed-off-by: Arnd Bergmann More-or-less-tested-by: Benjamin Herrenschmidt --- lib/iomap.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) --- diffstat: iomap.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) ====== add-arch-specific-dev_sysdata-to-struct-device.diff ====== Subject: Add arch specific dev_sysdata to struct device From: Benjamin Herrenschmidt Adds an arch specific struct dev_sysdata to struct device. This enables architecture to add specific fields to every device in the system, like DMA operation pointers, NUMA node ID, firmware specific data, etc... Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann include/asm-alpha/device.h | 14 ++++++++++++++ include/asm-arm/device.h | 14 ++++++++++++++ include/asm-arm26/device.h | 14 ++++++++++++++ include/asm-avr32/device.h | 14 ++++++++++++++ include/asm-cris/device.h | 14 ++++++++++++++ include/asm-frv/device.h | 14 ++++++++++++++ include/asm-generic/device.h | 14 ++++++++++++++ include/asm-h8300/device.h | 14 ++++++++++++++ include/asm-i386/device.h | 14 ++++++++++++++ include/asm-ia64/device.h | 14 ++++++++++++++ include/asm-m32r/device.h | 14 ++++++++++++++ include/asm-m68k/device.h | 14 ++++++++++++++ include/asm-m68knommu/device.h | 14 ++++++++++++++ include/asm-mips/device.h | 14 ++++++++++++++ include/asm-parisc/device.h | 14 ++++++++++++++ include/asm-powerpc/device.h | 14 ++++++++++++++ include/asm-ppc/device.h | 14 ++++++++++++++ include/asm-s390/device.h | 14 ++++++++++++++ include/asm-sh/device.h | 14 ++++++++++++++ include/asm-sh64/device.h | 14 ++++++++++++++ include/asm-sparc/device.h | 14 ++++++++++++++ include/asm-sparc64/device.h | 14 ++++++++++++++ include/asm-um/device.h | 14 ++++++++++++++ include/asm-v850/device.h | 14 ++++++++++++++ include/asm-x86_64/device.h | 14 ++++++++++++++ include/asm-xtensa/device.h | 14 ++++++++++++++ include/linux/device.h | 3 +++ 27 files changed, 367 insertions(+) --- diffstat: asm-alpha/device.h | 14 ++++++++++++++ asm-arm/device.h | 14 ++++++++++++++ asm-arm26/device.h | 14 ++++++++++++++ asm-avr32/device.h | 14 ++++++++++++++ asm-cris/device.h | 14 ++++++++++++++ asm-frv/device.h | 14 ++++++++++++++ asm-generic/device.h | 14 ++++++++++++++ asm-h8300/device.h | 14 ++++++++++++++ asm-i386/device.h | 14 ++++++++++++++ asm-ia64/device.h | 14 ++++++++++++++ asm-m32r/device.h | 14 ++++++++++++++ asm-m68k/device.h | 14 ++++++++++++++ asm-m68knommu/device.h | 14 ++++++++++++++ asm-mips/device.h | 14 ++++++++++++++ asm-parisc/device.h | 14 ++++++++++++++ asm-powerpc/device.h | 14 ++++++++++++++ asm-ppc/device.h | 14 ++++++++++++++ asm-s390/device.h | 14 ++++++++++++++ asm-sh/device.h | 14 ++++++++++++++ asm-sh64/device.h | 14 ++++++++++++++ asm-sparc/device.h | 14 ++++++++++++++ asm-sparc64/device.h | 14 ++++++++++++++ asm-um/device.h | 14 ++++++++++++++ asm-v850/device.h | 14 ++++++++++++++ asm-x86_64/device.h | 14 ++++++++++++++ asm-xtensa/device.h | 14 ++++++++++++++ linux/device.h | 3 +++ 27 files changed, 367 insertions(+) ====== change-acpi-to-use-dev_sysdata-instead-of-firmware_data.diff ====== Subject: Change ACPI to use dev_sysdata instead of firmware_data From: Benjamin Herrenschmidt This patch changes ACPI to use the new dev_sysdata on i386, x86_64 and amd64 (is there any other arch using ACPI ?) to store it's acpi_handle. It also removes the firmware_data field from struct device as this was the only user. Only build-tested on x86 Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann drivers/acpi/glue.c | 20 +++++++++++--------- include/acpi/acpi_bus.h | 2 +- include/asm-i386/device.h | 3 +++ include/asm-ia64/device.h | 3 +++ include/asm-x86_64/device.h | 3 +++ include/linux/device.h | 2 -- 6 files changed, 21 insertions(+), 12 deletions(-) --- diffstat: drivers/acpi/glue.c | 20 +++++++++++--------- include/acpi/acpi_bus.h | 2 +- include/asm-i386/device.h | 3 +++ include/asm-ia64/device.h | 3 +++ include/asm-x86_64/device.h | 3 +++ include/linux/device.h | 2 -- 6 files changed, 21 insertions(+), 12 deletions(-) ====== powerpc-make-pci_read_irq_line-the-default.diff ====== Subject: powerpc: Make pci_read_irq_line the default From: Benjamin Herrenschmidt This patch reworks the way IRQs are fixed up on PCI for arch powerpc. It makes pci_read_irq_line() called by default in the PCI code for devices that are probed, and add an optional per-device fixup in ppc_md for platforms that really need to correct what they obtain from pci_read_irq_line(). It also removes ppc_md.irq_bus_setup which was only used by pSeries and should not be needed anymore. I've also removed the pSeries s7a workaround as it can't work with the current interrupt code anyway. I'm trying to get one of these machines working so I can test a proper fix for that problem. I also haven't updated the old-style fixup code from 85xx_cds.c because it's actually buggy :) It assigns pci_dev->irq hard coded numbers which is no good with the new IRQ mapping code. It should at least use irq_create_mapping(NULL, hard_coded_number); and possibly also set_irq_type() to set them as level low. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann arch/powerpc/kernel/pci_32.c | 10 ++++ arch/powerpc/kernel/pci_64.c | 8 ++- arch/powerpc/platforms/82xx/mpc82xx_ads.c | 13 ------ arch/powerpc/platforms/83xx/mpc834x_itx.c | 3 - arch/powerpc/platforms/83xx/mpc834x_sys.c | 3 - arch/powerpc/platforms/83xx/mpc83xx.h | 1 arch/powerpc/platforms/83xx/pci.c | 9 ---- arch/powerpc/platforms/85xx/mpc85xx_ads.c | 11 ----- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 10 ---- arch/powerpc/platforms/cell/setup.c | 9 ---- arch/powerpc/platforms/chrp/chrp.h | 1 arch/powerpc/platforms/chrp/pci.c | 9 ---- arch/powerpc/platforms/chrp/setup.c | 1 arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | 16 ++----- arch/powerpc/platforms/maple/maple.h | 2 arch/powerpc/platforms/maple/pci.c | 45 ++++++++-------------- arch/powerpc/platforms/maple/setup.c | 2 arch/powerpc/platforms/pasemi/pasemi.h | 1 arch/powerpc/platforms/pasemi/pci.c | 8 --- arch/powerpc/platforms/pasemi/setup.c | 1 arch/powerpc/platforms/powermac/pci.c | 35 ++++++----------- arch/powerpc/platforms/powermac/pmac.h | 2 arch/powerpc/platforms/powermac/setup.c | 2 arch/powerpc/platforms/pseries/pci.c | 35 ----------------- arch/powerpc/platforms/pseries/setup.c | 1 include/asm-powerpc/machdep.h | 2 include/asm-powerpc/ppc-pci.h | 1 27 files changed, 58 insertions(+), 183 deletions(-) --- diffstat: arch/powerpc/kernel/pci_32.c | 10 ++ arch/powerpc/kernel/pci_64.c | 8 + arch/powerpc/platforms/82xx/mpc82xx_ads.c | 13 -- arch/powerpc/platforms/83xx/mpc834x_itx.c | 3 arch/powerpc/platforms/83xx/mpc834x_sys.c | 3 arch/powerpc/platforms/83xx/mpc83xx.h | 1 arch/powerpc/platforms/83xx/pci.c | 9 -- arch/powerpc/platforms/85xx/mpc85xx_ads.c | 11 -- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 10 -- arch/powerpc/platforms/cell/setup.c | 9 -- arch/powerpc/platforms/chrp/chrp.h | 1 arch/powerpc/platforms/chrp/pci.c | 9 -- arch/powerpc/platforms/chrp/setup.c | 1 arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c | 16 +-- arch/powerpc/platforms/maple/maple.h | 2 arch/powerpc/platforms/maple/pci.c | 45 ++++------ arch/powerpc/platforms/maple/setup.c | 2 arch/powerpc/platforms/pasemi/pasemi.h | 1 arch/powerpc/platforms/pasemi/pci.c | 8 - arch/powerpc/platforms/pasemi/setup.c | 1 arch/powerpc/platforms/powermac/pci.c | 35 +++---- arch/powerpc/platforms/powermac/pmac.h | 2 arch/powerpc/platforms/powermac/setup.c | 2 arch/powerpc/platforms/pseries/pci.c | 35 ------- arch/powerpc/platforms/pseries/setup.c | 1 include/asm-powerpc/machdep.h | 2 include/asm-powerpc/ppc-pci.h | 1 27 files changed, 58 insertions(+), 183 deletions(-) ====== powerpc-remove-ppc_md-pci_map_irq-ppc_swizzle-for-arch-powerpc.diff ====== Subject: powerpc: Remove ppc_md.pci_map_irq & ppc_swizzle for ARCH=powerpc From: Benjamin Herrenschmidt These were inherited from ARCH=ppc, but are not needed since parsing of interrupts should be done via the of_* functions (who can do swizzling). If we ever need to do non-standard swizzling on bridges without a device-node, then we might add back a slightly different version of ppc_md.pci_swizzle but for now, that is not the case. I removed the couple of calls for these in 83xx. If that breaks something, then there is a problem with the device-tree on these. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/kernel/pci_32.c | 23 ----------------------- arch/powerpc/platforms/83xx/mpc832x_mds.c | 2 -- arch/powerpc/platforms/83xx/mpc8360e_pb.c | 2 -- include/asm-powerpc/machdep.h | 4 ---- 4 files changed, 31 deletions(-) --- diffstat: arch/powerpc/kernel/pci_32.c | 23 ---------- arch/powerpc/platforms/83xx/mpc832x_mds.c | 2 arch/powerpc/platforms/83xx/mpc8360e_pb.c | 2 include/asm-powerpc/machdep.h | 4 - 4 files changed, 31 deletions(-) ====== powerpc-generic-dcr-infrastructure.diff ====== Subject: powerpc: Generic DCR infrastructure From: Benjamin Herrenschmidt This patch adds new dcr_map/dcr_read/dcr_write accessors for DCRs that can be used by drivers to transparently address either native DCRs or memory mapped DCRs. The implementation for memory mapped DCRs is done after the binding being currently worked on for SLOF and the Axon chipset. This patch enables it for the cell native platform Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/Kconfig | 16 ++++ arch/powerpc/kernel/Makefile | 1 arch/powerpc/sysdev/Makefile | 3 arch/powerpc/sysdev/dcr-low.S | 39 +++++++++++ arch/powerpc/sysdev/dcr.c | 137 +++++++++++++++++++++++++++++++++++++++ arch/ppc/Kconfig | 11 +++ include/asm-powerpc/dcr-mmio.h | 51 ++++++++++++++ include/asm-powerpc/dcr-native.h | 39 +++++++++++ include/asm-powerpc/dcr.h | 42 +++++++++++ 9 files changed, 337 insertions(+), 2 deletions(-) --- diffstat: arch/powerpc/Kconfig | 16 ++ arch/powerpc/kernel/Makefile | 1 arch/powerpc/sysdev/Makefile | 3 arch/powerpc/sysdev/dcr-low.S | 39 +++++ arch/powerpc/sysdev/dcr.c | 137 +++++++++++++++++++ arch/ppc/Kconfig | 11 + include/asm-powerpc/dcr-mmio.h | 51 +++++++ include/asm-powerpc/dcr-native.h | 39 +++++ include/asm-powerpc/dcr.h | 42 +++++ 9 files changed, 337 insertions(+), 2 deletions(-) ====== powerpc-make-emac-use-generic-dcr-access-methods.diff ====== Subject: powerpc: Make EMAC use generic DCR access methods From: Benjamin Herrenschmidt This patch makes the EMAC driver use the new DCR access methods. It doesn't yet uses dcr_map() and thus still only work with real DCRs. This will be fixed in a later patch Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- drivers/net/ibm_emac/ibm_emac_mal.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- diffstat: ibm_emac_mal.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ====== powerpc-support-for-dcr-based-mpic.diff ====== Subject: powerpc: Support for DCR based MPIC From: Benjamin Herrenschmidt This patch implements support for DCR based MPIC implementations. Such implementations have the MPIC_USES_DCR flag set and don't use the phys_addr argument of mpic_alloc (they require a valid dcr mapping in the device node) This version of the patch can use a little bif of cleanup still (I can probably consolidate rb->dbase/doff, at least once I'm sure on how the hardware is actually supposed to work vs. possible simulator issues) and it should be possible to build a DCR-only version of the driver. I need to cleanup a bit the CONFIG_* handling for that and probably introduce CONFIG_MPIC_MMIO and CONFIG_MPIC_DCR. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/sysdev/mpic.c | 138 ++++++++++++++++++++++++++++++++------------- include/asm-powerpc/mpic.h | 35 ++++++++++- 2 files changed, 132 insertions(+), 41 deletions(-) --- diffstat: arch/powerpc/sysdev/mpic.c | 138 ++++++++++++++++++------- include/asm-powerpc/mpic.h | 35 +++++- 2 files changed, 132 insertions(+), 41 deletions(-) ====== powerpc-improve-mpic-driver-auto-configuration-from-dt.diff ====== Subject: powerpc: Improve MPIC driver auto-configuration from DT From: Benjamin Herrenschmidt This patch applies on top of the MPIC DCR support. It makes the MPIC driver capable of a lot more auto-configuration based on the device-tree, for example, it can retreive it's own physical address if not passed as an argument, find out if it's DCR or MMIO mapped, and set the BIG_ENDIAN flag automatically in the presence of a "big-endian" property in the device-tree node. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/sysdev/mpic.c | 50 +++++++++++++++++++++++++++++++++------------ include/asm-powerpc/mpic.h | 4 +-- 2 files changed, 39 insertions(+), 15 deletions(-) --- diffstat: arch/powerpc/sysdev/mpic.c | 50 ++++++++++++++++++------- include/asm-powerpc/mpic.h | 4 +- 2 files changed, 39 insertions(+), 15 deletions(-) ====== powerpc-native-cell-support-for-mpic-in-southbridge.diff ====== Subject: powerpc: Native cell support for MPIC in southbridge From: Benjamin Herrenschmidt Add support for southbridges using the MPIC interrupt controller to the native cell platforms. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/Kconfig | 1 arch/powerpc/platforms/cell/setup.c | 44 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) --- diffstat: Kconfig | 1 platforms/cell/setup.c | 44 +++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) ====== powerpc-souped-up-of_platform_device-support.diff ====== Subject: powerpc: Souped-up of_platform_device support From: Benjamin Herrenschmidt This patch first splits of_device.c and of_platform.c, the later containing the bits relative to of_platform_device's. On the "breaks" side of things, drivers uisng of_platform_device(s) need to include asm/of_platform.h now and of_(un)register_driver is now of_(un)register_platform_driver. In addition to a few utility functions to locate of_platform_device(s), the main new addition is of_platform_bus_probe() which allows the platform code to trigger an automatic creation of of_platform_devices for a whole tree of devices. The function acts based on the type of the various "parent" devices encountered from a provided root, using either a default known list of bus types that can be "probed" or a passed-in list. It will only register devices on busses matching that list, which mean that typically, it will not register PCI devices, as expected (since they will be picked up by the PCI layer). This will be used by Cell platforms using 4xx-type IOs in the Axon bridge and can be used by any embedded-type device as well. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/kernel/Makefile | 2 arch/powerpc/kernel/of_device.c | 172 ++------------ arch/powerpc/kernel/of_platform.c | 372 ++++++++++++++++++++++++++++++++ arch/powerpc/platforms/powermac/setup.c | 1 drivers/macintosh/smu.c | 3 drivers/macintosh/therm_adt746x.c | 2 drivers/macintosh/therm_pm72.c | 5 drivers/macintosh/therm_windtunnel.c | 7 drivers/video/platinumfb.c | 5 include/asm-powerpc/of_device.h | 34 -- include/asm-powerpc/of_platform.h | 60 +++++ 11 files changed, 476 insertions(+), 187 deletions(-) --- diffstat: arch/powerpc/kernel/Makefile | 2 arch/powerpc/kernel/of_device.c | 172 ----- arch/powerpc/kernel/of_platform.c | 372 ++++++++++++ arch/powerpc/platforms/powermac/setup.c | 1 drivers/macintosh/smu.c | 3 drivers/macintosh/therm_adt746x.c | 2 drivers/macintosh/therm_pm72.c | 5 drivers/macintosh/therm_windtunnel.c | 7 drivers/video/platinumfb.c | 5 include/asm-powerpc/of_device.h | 34 - include/asm-powerpc/of_platform.h | 60 + 11 files changed, 476 insertions(+), 187 deletions(-) ====== powerpc-hook-of_platform_bus_probe-with-cell.diff ====== Subject: powerpc: Hook of_platform_bus_probe with cell From: Benjamin Herrenschmidt Hook up of_platform_bus_probe with the cell platform in order to publish the non-PCI devices in the device-tree of cell blades as of_platform_device(s) Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/cell/setup.c | 9 +++++++++ 1 file changed, 9 insertions(+) --- diffstat: setup.c | 9 +++++++++ 1 file changed, 9 insertions(+) ====== powerpc-refactor-64-bits-dma-operations.diff ====== Subject: powerpc: Refactor 64 bits DMA operations From: Benjamin Herrenschmidt This patch completely refactors DMA operations for 64 bits powerpc. 32 bits is untouched for now. We use the new dev_sysdata structure to add the dma operations pointer and associated data to struct device. While at it, we also add the OF node pointer and numa node. In the future, we might want to look into merging that with pci_dn as well. The old vio, pci-iommu and pci-direct DMA ops are gone. They are now replaced by a set of generic iommu and direct DMA ops (non PCI specific) that can be used by bus types. The toplevel implementation is now inline. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/kernel/Makefile | 3 arch/powerpc/kernel/dma_64.c | 238 ++++++++++++++++------------- arch/powerpc/kernel/ibmebus.c | 6 arch/powerpc/kernel/iommu.c | 6 arch/powerpc/kernel/of_platform.c | 9 - arch/powerpc/kernel/pci_64.c | 26 ++- arch/powerpc/kernel/pci_direct_iommu.c | 98 ----------- arch/powerpc/kernel/pci_iommu.c | 164 ------------------- arch/powerpc/kernel/setup_64.c | 1 arch/powerpc/kernel/vio.c | 94 ++--------- arch/powerpc/platforms/cell/iommu.c | 21 -- arch/powerpc/platforms/iseries/iommu.c | 12 - arch/powerpc/platforms/iseries/pci.c | 2 arch/powerpc/platforms/pseries/iommu.c | 90 +++++----- arch/powerpc/platforms/pseries/pci_dlpar.c | 4 arch/powerpc/sysdev/dart_iommu.c | 31 +-- include/asm-powerpc/device.h | 12 + include/asm-powerpc/dma-mapping.h | 180 +++++++++++++++++---- include/asm-powerpc/ibmebus.h | 1 include/asm-powerpc/iommu.h | 20 +- include/asm-powerpc/iseries/iommu.h | 4 include/asm-powerpc/machdep.h | 4 include/asm-powerpc/of_device.h | 2 include/asm-powerpc/pci.h | 8 include/asm-powerpc/vio.h | 1 25 files changed, 440 insertions(+), 597 deletions(-) --- diffstat: arch/powerpc/kernel/pci_direct_iommu.c | 98 ---- arch/powerpc/kernel/pci_iommu.c | 164 ------ linux-2.6/arch/powerpc/kernel/Makefile | 3 linux-2.6/arch/powerpc/kernel/dma_64.c | 238 +++++----- linux-2.6/arch/powerpc/kernel/ibmebus.c | 6 linux-2.6/arch/powerpc/kernel/iommu.c | 6 linux-2.6/arch/powerpc/kernel/of_platform.c | 9 linux-2.6/arch/powerpc/kernel/pci_64.c | 26 - linux-2.6/arch/powerpc/kernel/setup_64.c | 1 linux-2.6/arch/powerpc/kernel/vio.c | 94 --- linux-2.6/arch/powerpc/platforms/cell/iommu.c | 21 linux-2.6/arch/powerpc/platforms/iseries/iommu.c | 12 linux-2.6/arch/powerpc/platforms/iseries/pci.c | 2 linux-2.6/arch/powerpc/platforms/pseries/iommu.c | 90 +-- linux-2.6/arch/powerpc/platforms/pseries/pci_dlpar.c | 4 linux-2.6/arch/powerpc/sysdev/dart_iommu.c | 31 - linux-2.6/include/asm-powerpc/device.h | 12 linux-2.6/include/asm-powerpc/dma-mapping.h | 180 +++++-- linux-2.6/include/asm-powerpc/ibmebus.h | 1 linux-2.6/include/asm-powerpc/iommu.h | 20 linux-2.6/include/asm-powerpc/iseries/iommu.h | 4 linux-2.6/include/asm-powerpc/machdep.h | 4 linux-2.6/include/asm-powerpc/of_device.h | 2 linux-2.6/include/asm-powerpc/pci.h | 8 linux-2.6/include/asm-powerpc/vio.h | 1 25 files changed, 440 insertions(+), 597 deletions(-) ====== powerpc-add-dma-ops-support-for-of_plaform_device-to-cell.diff ====== Subject: powerpc: Add DMA ops support for of_plaform_device to Cell From: Benjamin Herrenschmidt This patch adds a bus device notifier to the of_platform bus type on cell to setup the DMA operations for of_platform_devices. We currently use the PCI operations as Cell use a special version of them that happens to be suitable for our needs. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/cell/setup.c | 37 +++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) --- diffstat: setup.c | 37 ++++++++++++++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 3 deletions(-) ====== powerpc-resolve-the-parent-address-of-a-pci-bus-range.diff ====== Subject: powerpc: Resolve the parent address of a PCI bus range From: Benjamin Herrenschmidt When parsing the OF "ranges" properties of PCI host busses to determine the mapping of a PCI bus, we need to translate the "parent" address using the prom_parse.c routines in order to obtain a CPU physical address. This wasn't necessary while PCI busses were always at the root of the device-tree but this is no longer the case on Cell where they can be anywhere in the tree. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/kernel/pci_64.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) --- diffstat: pci_64.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) ====== powerpc-resolve-the-buid-fir-rtas-pci-config-space-accesses.diff ====== Subject: powerpc: Resolve the BUID fir RTAS PCI config space accesses From: Benjamin Herrenschmidt The BUID is the first entry of a PCI host bridge "reg" property. Now that PCI busses can be anywhere in the device-tree, we need to fully translate the value there to a CPU physical address before we can use it with RTAS. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/kernel/rtas_pci.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) --- diffstat: rtas_pci.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) ====== powerpc-add-parent-struct-device-for-pci-host-bridges.diff ====== Subject: powerpc: Add "parent" struct device for PCI host bridges From: Benjamin Herrenschmidt Add a "parent" struct device to our PCI host bridge data structure so that PCI can be rooted off another device in sysfs. Note that arch/ppc doesn't use it, only arch/powerpc, though it's available for both 32 and 64 bits. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/kernel/pci_32.c | 5 ++++- arch/powerpc/kernel/pci_64.c | 2 +- include/asm-powerpc/pci-bridge.h | 1 + include/asm-ppc/pci-bridge.h | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) --- diffstat: arch/powerpc/kernel/pci_32.c | 5 ++++- arch/powerpc/kernel/pci_64.c | 2 +- include/asm-powerpc/pci-bridge.h | 1 + include/asm-ppc/pci-bridge.h | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) ====== powerpc-generic-of-platform-driver-for-pci-host-bridges.diff ====== Subject: powerpc: Generic OF platform driver for PCI host bridges. From: Benjamin Herrenschmidt When enabled in Kconfig, it will pick up any of_platform_device matching it's match list (currently type "pci", "pcix", "pcie", or "ht" and setup a PHB for it. Platform must provide a ppc_md.pci_setup_phb() for it to work (for doing the necessary initialisations specific to a given PHB like setting up the config space ops). It's currently only available on 64 bits as the 32 bits PCI code can't quite cope with it in it's current form. I will fix that later. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/Kconfig | 6 + arch/powerpc/kernel/of_platform.c | 103 +++++++++++++++++++++++++++++ arch/powerpc/kernel/pci_64.c | 9 ++ arch/powerpc/kernel/rtas_pci.c | 7 + arch/powerpc/platforms/cell/setup.c | 1 arch/powerpc/platforms/pseries/pci_dlpar.c | 2 include/asm-powerpc/machdep.h | 4 + include/asm-powerpc/ppc-pci.h | 12 +-- 8 files changed, 134 insertions(+), 10 deletions(-) --- diffstat: arch/powerpc/Kconfig | 6 arch/powerpc/kernel/of_platform.c | 100 ++++++++++ arch/powerpc/kernel/pci_64.c | 9 arch/powerpc/kernel/rtas_pci.c | 7 arch/powerpc/platforms/cell/setup.c | 1 arch/powerpc/platforms/pseries/pci_dlpar.c | 2 include/asm-powerpc/machdep.h | 4 include/asm-powerpc/ppc-pci.h | 12 - 8 files changed, 131 insertions(+), 10 deletions(-) ====== powerpc-cell-fixup-dma-offset-for-new-southbridge.diff ====== Subject: powerpc: Cell fixup DMA offset for new southbridge From: Benjamin Herrenschmidt This patch makes the Cell DMA code work on both the Spider and the Axon south bridges by turning cell_dma_valid into a variable instead of a constant. This is a temporary patch until we have full iommu support. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/cell/iommu.c | 14 +++++++++++--- arch/powerpc/platforms/cell/iommu.h | 8 +++++--- 2 files changed, 16 insertions(+), 6 deletions(-) --- diffstat: iommu.c | 14 +++++++++++--- iommu.h | 8 +++++--- 2 files changed, 16 insertions(+), 6 deletions(-) ====== powerpc-allow-hooking-of-pci-mmio-pio-accessors-on-64-bits.diff ====== Subject: powerpc: Allow hooking of PCI MMIO & PIO accessors on 64 bits From: Benjamin Herrenschmidt This patch reworks the way iSeries hooks on PCI IO operations (both MMIO and PIO) and provides a generic way for other platforms to do so (we have need to do that for various other platforms). While reworking the IO ops, I ended up doing some spring cleaning in io.h and eeh.h which I might want to split into 2 or 3 patches (among others, eeh.h had a lot of useless stuff in it). A side effect is that EEH for PIO should work now (it used to pass IO ports down to the eeh address check functions which is bogus). Also, new are MMIO "repeat" ops, which other archs like ARM already had, and that we have too now: readsb, readsw, readsl, writesb, writesw, writesl. In the long run, I might also make EEH use the hooks instead of wrapping at the toplevel, which would make things even cleaner and relegate EEH completely in platforms/iseries, but we have to measure the performance impact there (though it's really only on MMIO reads) Since I also need to hook on ioremap, I shuffled the functions a bit there. I introduced ioremap_flags() to use by drivers who want to pass explicit flags to ioremap (and it can be hooked). The old __ioremap() is still there as a low level and cannot be hooked, thus drivers who use it should migrate unless they know they want the low level version. The patch "arch provides generic iomap missing accessors" (should be number 4 in this series) is a pre-requisite to provide full iomap API support with this patch. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/Kconfig | 10 arch/powerpc/kernel/Makefile | 6 arch/powerpc/kernel/io.c | 18 arch/powerpc/kernel/pci_64.c | 2 arch/powerpc/kernel/setup_64.c | 7 arch/powerpc/mm/pgtable_64.c | 46 +- arch/powerpc/platforms/iseries/pci.c | 370 +++++++----------- arch/powerpc/platforms/iseries/setup.c | 12 include/asm-powerpc/eeh.h | 118 +----- include/asm-powerpc/ide.h | 7 include/asm-powerpc/io-defs.h | 56 ++ include/asm-powerpc/io.h | 645 +++++++++++++++++++-------------- include/asm-powerpc/machdep.h | 4 include/asm-ppc/io.h | 12 14 files changed, 703 insertions(+), 610 deletions(-) --- diffstat: arch/powerpc/Kconfig | 10 arch/powerpc/kernel/Makefile | 6 arch/powerpc/kernel/io.c | 18 arch/powerpc/kernel/pci_64.c | 2 arch/powerpc/kernel/setup_64.c | 7 arch/powerpc/mm/pgtable_64.c | 46 arch/powerpc/platforms/iseries/pci.c | 370 +++---- arch/powerpc/platforms/iseries/setup.c | 12 include/asm-powerpc/eeh.h | 118 -- include/asm-powerpc/ide.h | 7 include/asm-powerpc/io-defs.h | 56 + include/asm-powerpc/io.h | 635 +++++++------ include/asm-powerpc/machdep.h | 4 include/asm-ppc/io.h | 12 14 files changed, 698 insertions(+), 605 deletions(-) ====== powerpc-cell-spider-mmio-workarounds.diff ====== Subject: powerpc: Cell "Spider" MMIO workarounds From: Benjamin Herrenschmidt This is totally untested, I just put it together quickly, but gives an example of how the hooks can be used which is why I introduced it in this serie. Hopefully, I'll test & fix it up properly this week. This patch implements a workaround for a Spider PCI host bridge bug where it doesn't enforce some of the PCI ordering rules unless some manual manipulation of a special register is done. In order to be fully compliant with the PCI spec, I do this on every MMIO read operation. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/Kconfig | 1 arch/powerpc/platforms/cell/Makefile | 3 arch/powerpc/platforms/cell/io-workarounds.c | 346 +++++++++++++++++++++++++++ 3 files changed, 349 insertions(+), 1 deletion(-) --- diffstat: Kconfig | 1 platforms/cell/Makefile | 4 platforms/cell/io-workarounds.c | 346 ++++++++++++++++++++ 3 files changed, 349 insertions(+), 2 deletions(-) ====== powerpc-spider-uses-low-level-be-mmio-accessors.diff ====== Subject: powerpc: spider uses low level BE MMIO accessors From: Benjamin Herrenschmidt We use the powerpc specific low level MMIO accessor variants instead of readl() or readl_be() because we know spidernet is not a real PCI device and we can thus avoid the performance hit caused by the PCI workarounds. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- drivers/net/spider_net.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) --- diffstat: spider_net.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) ====== powerpc-add-an-optional-offset-to-direct-dma-on-64-bits.diff ====== Subject: powerpc: Add an optional offset to direct DMA on 64 bits From: Benjamin Herrenschmidt This patch adds an optional global offset that can be added to DMA addresses when using the direct DMA operations. That brings it a step closer to the 32 bits direct DMA operations, and makes it useable on Cell when the MMU is disabled and we are using a spider southbridge. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/kernel/dma_64.c | 11 ++++++++--- include/asm-powerpc/dma-mapping.h | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) --- diffstat: arch/powerpc/kernel/dma_64.c | 11 ++++++++--- include/asm-powerpc/dma-mapping.h | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) ====== powerpc-make-direct-dma-use-node-local-allocations.diff ====== Subject: powerpc: Make direct DMA use node local allocations From: Benjamin Herrenschmidt This patch makes dma_alloc_coherent() use node local allocation when using the direct DMA ops. The node is obtained from the new device extension. If no such extension is present, the current node is used. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/kernel/dma_64.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) --- diffstat: dma_64.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) ====== powerpc-make-cell-use-direct-dma-ops.diff ====== Subject: powerpc: Make cell use direct DMA ops From: Benjamin Herrenschmidt Now that the direct DMA ops supports an offset, we use that instead of defining our own. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/cell/iommu.c | 79 ++---------------------------------- 1 file changed, 6 insertions(+), 73 deletions(-) --- diffstat: iommu.c | 79 +++----------------------------------------- 1 file changed, 6 insertions(+), 73 deletions(-) ====== powerpc-cell-iommu-support.diff ====== Subject: powerpc: Cell iommu support From: Benjamin Herrenschmidt From: Jeremy Kerr This patch adds full cell iommu support (and iommu diabled mode). It implements mapping/unmapping of iommu pages on demand using the standard powerpc iommu framework. It also supports running with iommu disabled for machines with less than 2Gb of memory. (The default is off in that case, though it can be forced on with the kernel command line option iommu=force). Signed-off-by: Jeremy Kerr Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/kernel/prom_init.c | 14 arch/powerpc/kernel/setup_64.c | 3 arch/powerpc/platforms/cell/iommu.c | 995 +++++++++++++++++++++++------------- arch/powerpc/platforms/cell/iommu.h | 67 -- arch/powerpc/platforms/cell/setup.c | 43 - arch/powerpc/sysdev/dart_iommu.c | 3 include/asm-powerpc/iommu.h | 6 7 files changed, 660 insertions(+), 471 deletions(-) --- diffstat: arch/powerpc/platforms/cell/iommu.h | 67 linux-2.6/arch/powerpc/kernel/prom_init.c | 14 linux-2.6/arch/powerpc/kernel/setup_64.c | 3 linux-2.6/arch/powerpc/platforms/cell/iommu.c | 995 ++++++---- linux-2.6/arch/powerpc/platforms/cell/setup.c | 49 linux-2.6/arch/powerpc/sysdev/dart_iommu.c | 3 linux-2.6/include/asm-powerpc/iommu.h | 6 7 files changed, 663 insertions(+), 474 deletions(-) ====== powerpc-remove-ioremap64-and-fixup_bigphys_addr.diff ====== Subject: powerpc: remove ioremap64 and fixup_bigphys_addr From: Benjamin Herrenschmidt In order to suppose platforms with devices above 4Gb on 32 bits platforms with a >32 bits physical address space, we used to have a special ioremap64 along with a fixup routine fixup_bigphys_addr. This shouldn't be necessary anymore as struct resource now supports 64 bits addresses even on 32 bits archs. This patch enables that option when CONFIG_PHYS_64BIT is set and removes ioremap64 and fixup_bigphys_addr. This is a preliminary work for the upcoming merge of 32 and 64 bits io.h Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/Kconfig | 1 + arch/powerpc/mm/pgtable_32.c | 17 ----------------- arch/powerpc/platforms/85xx/misc.c | 8 -------- 3 files changed, 1 insertion(+), 25 deletions(-) --- diffstat: Kconfig | 1 + mm/pgtable_32.c | 17 ----------------- platforms/85xx/misc.c | 8 -------- 3 files changed, 1 insertion(+), 25 deletions(-) ====== powerpc-merge-32-and-64-bits-asm-powerpc-io-h.diff ====== Subject: powerpc: Merge 32 and 64 bits asm-powerpc/io.h From: Benjamin Herrenschmidt The rework on io.h done for the new hookable accessors made it easier, so I just finished the work and merged 32 and 64 bits io.h for arch/powerpc. arch/ppc still uses the old version in asm-ppc, there is just too much gunk in there that I really can't be bothered trying to cleanup. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- arch/powerpc/kernel/Makefile | 2 arch/powerpc/kernel/io.c | 87 +++++++++ arch/powerpc/kernel/iomap.c | 2 arch/powerpc/kernel/pci_32.c | 34 --- arch/powerpc/kernel/rtas_pci.c | 1 arch/powerpc/kernel/traps.c | 8 arch/powerpc/mm/pgtable_32.c | 22 -- arch/powerpc/mm/pgtable_64.c | 16 - arch/powerpc/platforms/chrp/setup.c | 1 arch/powerpc/platforms/iseries/setup.c | 4 arch/powerpc/platforms/powermac/setup.c | 2 include/asm-powerpc/eeh.h | 95 ---------- include/asm-powerpc/ide.h | 7 include/asm-powerpc/io-defs.h | 9 - include/asm-powerpc/io.h | 284 +++++++++++++++++++++++++++----- include/asm-powerpc/machdep.h | 4 16 files changed, 366 insertions(+), 212 deletions(-) --- diffstat: arch/powerpc/kernel/Makefile | 2 arch/powerpc/kernel/io.c | 87 +++ arch/powerpc/kernel/iomap.c | 2 arch/powerpc/kernel/pci_32.c | 34 - arch/powerpc/kernel/rtas_pci.c | 1 arch/powerpc/kernel/traps.c | 8 arch/powerpc/mm/pgtable_32.c | 22 arch/powerpc/mm/pgtable_64.c | 16 arch/powerpc/platforms/chrp/setup.c | 1 arch/powerpc/platforms/iseries/setup.c | 4 arch/powerpc/platforms/powermac/setup.c | 2 include/asm-powerpc/eeh.h | 95 ---- include/asm-powerpc/ide.h | 7 include/asm-powerpc/io-defs.h | 9 include/asm-powerpc/io.h | 284 ++++++++++-- include/asm-powerpc/machdep.h | 4 16 files changed, 366 insertions(+), 212 deletions(-) ====== powerpc-fix-a-typo-in-new-style-spe-mapping-code.diff ====== Subject: powerpc: Fix a typo in new style SPE mapping code From: Benjamin Herrenschmidt This patch fixes a typo in the "new style" code for mapping SPE resources, which causes it to try to map 4 times the same resource. It also adds some pr_debug's that are useful to track down issues with the firmware when bringinh up new machines. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- --- The bug is in 2.6.19 so we should merge that asap. arch/powerpc/platforms/cell/spu_base.c | 41 ++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 8 deletions(-) --- diffstat: spu_base.c | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) ====== powerpc-virq-add-virq-to-hw-2.diff ====== Subject: powerpc: add virq_to_hw accessor routine From: Geoff Levand This adds an accessor routine virq_to_hw() to the virq routines which hides the implementation details of the virq to hwirq map. Signed-off-by: Geoff Levand Signed-off-by: Arnd Bergmann --- include/asm-powerpc/irq.h | 4 ++++ 1 file changed, 4 insertions(+) --- diffstat: irq.h | 4 ++++ 1 file changed, 4 insertions(+) ====== spufs-fix-weak-symbols-3.diff ====== Subject: powerpc: change ppc_rtas declaration to weak From: Geoff Levand Change the definition of powerpc's cond_syscall() to use the standard gcc weak attribute specifier which provides proper support for C linkage as needed by spu_syscall_table[]. Fixes this powerpc build error with CONFIG_SPU_FS=y, CONFIG_PPC_RTAS=n: arch/powerpc/platforms/built-in.o: undefined reference to `ppc_rtas' Signed-off-by: Geoff Levand Signed-off-by: Arnd Bergmann --- include/asm-powerpc/unistd.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) --- diffstat: unistd.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) ====== cell-set-sparsemem-as-default.diff ====== Subject: cell: set ARCH_SPARSEMEM_DEFAULT in Kconfig From: Geoff Levand The current cell processor support needs sparsemem, so set it as the default memory model. Signed-off-by: Geoff Levand Signed-off-by: Arnd Bergmann --- As noted by Benjamin Herrenschmidt. --- diffstat: Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ====== cell-split-spu-platform-code-2.diff ====== Subject: powerpc: abstract spu management routines From: Geoff Levand This adds a platform specific spu management abstraction and the coresponding routines to support the IBM Cell Blade. It also removes the hypervisor only resources that were included in struct spu. Three new platform specific routines are introduced, spu_enumerate_spus(), spu_create_spu() and spu_destroy_spu(). The underlining design uses a new type, struct spu_management_ops, to hold function pointers that the platform setup code is expected to initialize to instances appropriate to that platform. For the IBM Cell Blade support, I put the hypervisor only resources that were in struct spu into a platform specific data structure struct spu_pdata. Signed-off-by: Geoff Levand Signed-off-by: Arnd Bergmann --- Michael, Unfortunately, for your xmon spu support, your DUMP_FIELD is setup in such a way that it is not easy to change to use from inside spu_priv1_mmio.c, so I left of_dump_pdata_fields() empty. We'll need to work on something usable there, or make some other way to abstract those platform specific spu variables. arch/powerpc/platforms/cell/cbe_thermal.c | 5 arch/powerpc/platforms/cell/setup.c | 3 arch/powerpc/platforms/cell/spu_base.c | 308 +------------------- arch/powerpc/platforms/cell/spu_priv1_mmio.c | 406 +++++++++++++++++++++++++-- arch/powerpc/platforms/cell/spu_priv1_mmio.h | 26 + arch/powerpc/xmon/xmon.c | 8 include/asm-powerpc/spu.h | 5 include/asm-powerpc/spu_priv1.h | 48 ++- 8 files changed, 481 insertions(+), 328 deletions(-) --- diffstat: arch/powerpc/platforms/cell/cbe_thermal.c | 5 arch/powerpc/platforms/cell/setup.c | 3 arch/powerpc/platforms/cell/spu_base.c | 334 -------- arch/powerpc/platforms/cell/spu_priv1_mmio.c | 406 +++++++++- arch/powerpc/platforms/cell/spu_priv1_mmio.h | 26 arch/powerpc/xmon/xmon.c | 10 include/asm-powerpc/spu.h | 5 include/asm-powerpc/spu_priv1.h | 48 + 8 files changed, 481 insertions(+), 356 deletions(-) ====== ps3-support/ps3-platform.patch ====== This adds the core platform support for the PS3 game console and other platforms using the PS3 Platform hypervisor. Signed-off-by: Geoff Levand Signed-off-by: Arnd Bergmann --- MAINTAINERS | 7 arch/powerpc/Kconfig | 11 arch/powerpc/platforms/Makefile | 1 arch/powerpc/platforms/ps3pf/Kconfig | 32 + arch/powerpc/platforms/ps3pf/Makefile | 2 arch/powerpc/platforms/ps3pf/mm.c | 872 ++++++++++++++++++++++++++++++++ arch/powerpc/platforms/ps3pf/platform.h | 59 ++ arch/powerpc/platforms/ps3pf/setup.c | 177 ++++++ arch/powerpc/platforms/ps3pf/smp.c | 164 ++++++ arch/powerpc/platforms/ps3pf/time.c | 105 +++ include/asm-powerpc/ps3pf.h | 240 ++++++++ 11 files changed, 1669 insertions(+), 1 deletion(-) --- diffstat: MAINTAINERS | 7 arch/powerpc/Kconfig | 11 arch/powerpc/platforms/Makefile | 1 arch/powerpc/platforms/ps3pf/Kconfig | 32 arch/powerpc/platforms/ps3pf/Makefile | 2 arch/powerpc/platforms/ps3pf/mm.c | 872 ++++++++++++ arch/powerpc/platforms/ps3pf/platform.h | 59 arch/powerpc/platforms/ps3pf/setup.c | 177 ++ arch/powerpc/platforms/ps3pf/smp.c | 164 ++ arch/powerpc/platforms/ps3pf/time.c | 105 + include/asm-powerpc/ps3pf.h | 240 +++ 11 files changed, 1669 insertions(+), 1 deletion(-) ====== ps3-support/ps3-hvcall.patch ====== Adds the ps3pf hvcalls. Signed-off-by: Geoff Levand Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/ps3pf/exports.c | 27 + arch/powerpc/platforms/ps3pf/hvcall.S | 804 +++++++++++++++++++++++++++++++++ include/asm-powerpc/lv1call.h | 345 ++++++++++++++ 3 files changed, 1176 insertions(+) --- diffstat: arch/powerpc/platforms/ps3pf/exports.c | 27 arch/powerpc/platforms/ps3pf/hvcall.S | 804 +++++++++++++ include/asm-powerpc/lv1call.h | 345 +++++ 3 files changed, 1176 insertions(+) ====== ps3-support/ps3-feature-bits.patch ====== Adds the needed firmware feature bits for ps3pf. Signed-off-by: Geoff Levand Signed-off-by: Arnd Bergmann --- include/asm-powerpc/firmware.h | 8 ++++++++ 1 file changed, 8 insertions(+) --- diffstat: firmware.h | 8 ++++++++ 1 file changed, 8 insertions(+) ====== ps3-support/ps3-htab.patch ====== Pagetable management routines for ps3pf. Signed-off-by: Geoff Levand Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/ps3pf/htab.c | 288 ++++++++++++++++++++++++++++++++++++ 1 file changed, 288 insertions(+) --- diffstat: htab.c | 288 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 288 insertions(+) ====== ps3-support/ps3-repository.patch ====== This adds support for the PS3 Platform repository. Signed-off-by: Geoff Levand Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/ps3pf/repository.c | 842 ++++++++++++++++++++++++++++++ include/asm-powerpc/ps3pf.h | 139 ++++ 2 files changed, 981 insertions(+) --- diffstat: arch/powerpc/platforms/ps3pf/repository.c | 842 ++++++++++ include/asm-powerpc/ps3pf.h | 139 + 2 files changed, 981 insertions(+) ====== ps3-support/ps3-interrupt.patch ====== Adds routines to interface with the ps3pf interrupt services. Signed-off-by: Geoff Levand Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/ps3pf/interrupt.c | 583 +++++++++++++++++++++++++++++++ 1 file changed, 583 insertions(+) --- diffstat: interrupt.c | 583 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 583 insertions(+) ====== ps3-support/ps3-use-lpar-addr.patch ====== Adds some needed bits for a config option PS3PF_USE_LPAR_ADDR that disables the ps3pf lpar address translation mechanism. This is a currently needed workaround for limitations in the design of the spu support. Signed-off-by: Geoff Levand Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/ps3pf/Kconfig | 11 +++++++++++ include/asm-powerpc/sparsemem.h | 6 ++++++ 2 files changed, 17 insertions(+) --- diffstat: arch/powerpc/platforms/ps3pf/Kconfig | 11 +++++++++++ include/asm-powerpc/sparsemem.h | 6 ++++++ 2 files changed, 17 insertions(+) ====== ps3-support/ps3-os-area.patch ====== Add support to access the parameter data from the ps3pf other OS area of flash memory. The parameter data mainly holds user preferences like static ip address, etc. Signed-off-by: Geoff Levand Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/ps3pf/Makefile | 2 arch/powerpc/platforms/ps3pf/os-area.c | 245 +++++++++++++++++++++++++++++++++ arch/powerpc/platforms/ps3pf/setup.c | 1 3 files changed, 247 insertions(+), 1 deletion(-) --- diffstat: Makefile | 2 os-area.c | 245 ++++++++++++++++++++++++++++++++++++++++++ setup.c | 1 3 files changed, 247 insertions(+), 1 deletion(-) ====== ps3-support/ps3-spufs.patch ====== Adds spu support for the PS3 Platform. Signed-off-by: Geoff Levand Signed-off-by: Arnd Bergmann --- This patch requires my previous patch which split the existing spu support into platform specific and platform independent parts. arch/powerpc/platforms/ps3pf/Makefile | 3 arch/powerpc/platforms/ps3pf/platform.h | 8 arch/powerpc/platforms/ps3pf/setup.c | 2 arch/powerpc/platforms/ps3pf/spu.c | 625 ++++++++++++++++++++++++++++++++ 4 files changed, 638 insertions(+) --- diffstat: Makefile | 3 platform.h | 8 setup.c | 3 spu.c | 625 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 639 insertions(+) ====== ps3-support/ps3-system-bus.patch ====== Adds a PS3 Platform system bus driver. This system bus is a virtual bus used to present the ps3pf system devices in the LDM. Signed-off-by: Geoff Levand Signed-off-by: Arnd Bergmann --- arch/powerpc/kernel/dma_64.c | 9 + drivers/Makefile | 1 drivers/ps3pf/Makefile | 1 drivers/ps3pf/system-bus.c | 356 +++++++++++++++++++++++++++++++++++++++++++ include/asm-powerpc/ps3pf.h | 75 +++++++++ 5 files changed, 442 insertions(+) --- diffstat: drivers/Makefile | 1 drivers/ps3pf/Makefile | 1 drivers/ps3pf/system-bus.c | 360 ++++++++++++++++++++++++ include/asm-powerpc/ps3pf.h | 74 ++++ 4 files changed, 436 insertions(+)