====== spufs-change-llx-to-0x-llx.diff ====== Subject: 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 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 | 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 | 1 include/asm-powerpc/spu_info.h | 54 ++++ 5 files changed, 192 insertions(+), 6 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: 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 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 | 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 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 | 30 ++++++++++++++++++++++-------- hw_ops.c | 12 ------------ 2 files changed, 22 insertions(+), 20 deletions(-) ====== 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-fix-missing-stop-and-signal.diff ====== Subject: spufs: fix missing stop-and-signal From: Masato Noguchi When there is pending signals, current spufs_run_spu() always returns -ERESTARTSYS and it is called again automatically. But, if spe already stopped by stop-and-signal or halt instruction, returning -ERESTARTSYS makes stop-and-signal/halt lost and spu run over the end-point. For your convenience, I attached a sample code to restage this bug. If there is no bug, printed NPC will be 0x4000. Signed-off-by: Masato Noguchi Signed-off-by: Arnd Bergmann --- run.c | 28 ++++++++++++++++++---------- 1 files changed, 18 insertions(+), 10 deletions(-) --- diffstat: run.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) ====== 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(+) ====== idle-hard-irq-disable.diff ====== Subject: [RFC] convert idle_loop to use hard_irq_disable() I got a bug report that I believe might be fixed by this patch. The problem seems to be that with soft-disabled interrupts in power_save, we can still get external exceptions on Cell, even if we are in pause(0) a.k.a. sleep state. When the CPU really wakes up through the 0x100 (system reset) vector, while we have already started processing the 0x500 (external) exception, we get a panic in unrecoverable_exception() because of the lost state. This occurred in Systemsim for Cell, but as far as I can see, it can theoretically occur on any machine that uses the system reset exception to get out of sleep state. Signed-off-by: Arnd Bergmann --- diffstat: idle.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ====== fix-sparse-warning-in-xmon-cell-code.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: Arnd Bergmann --- arch/powerpc/xmon/xmon.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) --- diffstat: xmon.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) ====== show-state-of-spus-as-they-re-stopped-in-cell-xmon-helper.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: 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(-) ====== add-a-sd-command-spu-dump-to-xmon-to-dump-spu-local-store.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 ! -- Updated to only do the setjmp goo around the spu access, and not around prdump because it does its own (via mread). Also the num variable is now common between sf and sd, so you don't have to keep typing the spu number in if you're repeating commands on the same spu. Signed-off-by: Arnd Bergmann --- arch/powerpc/xmon/xmon.c | 60 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 5 deletions(-) --- diffstat: xmon.c | 60 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 5 deletions(-) ====== prepare-for-spu-disassembly-in-xmon.diff ====== Subject: Prepare for spu disassembly in xmon From: Michael Ellerman In order to do disassembly of spu binaries in xmon, we need to abstract the disassembly function from ppc_inst_dump. We do this by making the actual disassembly function a function pointer that we pass to ppc_inst_dump(). To save updating all the callers, we turn ppc_inst_dump() into generic_inst_dump() and make ppc_inst_dump() a wrapper which always uses print_insn_powerpc(). Currently we pass the dialect into print_insn_powerpc(), but we always pass 0 - so just make it a local. Signed-off-by: Arnd Bergmann --- arch/powerpc/xmon/ppc-dis.c | 6 +++--- arch/powerpc/xmon/xmon.c | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) --- diffstat: ppc-dis.c | 6 +++--- xmon.c | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 6 deletions(-) ====== import-spu-disassembly-code-into-xmon.diff ====== Subject: Import spu disassembly code into xmon From: Michael Ellerman This patch imports and munges the spu disassembly code from binutils. All files originated from version 1.1 in binutils cvs. * spu.h, spu-insns.h and spu-opc.c are unchanged except for pathnames. * spu-dis.c has been edited heavily: * use printf instead of info->fprintf_func and similar. * pass the instruction in rather than reading it. * we have no equivalent to symbol_at_address_func, so we just assume there is never a symbol at the address given. --- arch/powerpc/xmon/spu-dis.c | 249 +++++++++++++++++++++++++ arch/powerpc/xmon/spu-insns.h | 410 ++++++++++++++++++++++++++++++++++++++++++ arch/powerpc/xmon/spu-opc.c | 44 ++++ arch/powerpc/xmon/spu.h | 126 ++++++++++++ 4 files changed, 829 insertions(+) --- diffstat: spu-dis.c | 249 ++++++++++++++++++++++++ spu-insns.h | 410 ++++++++++++++++++++++++++++++++++++++++ spu-opc.c | 44 ++++ spu.h | 126 ++++++++++++ 4 files changed, 829 insertions(+) ====== make-64-bit-cpu-features-defined-on-32-bit.diff ====== Subject: Make 64-bit cpu features defined on 32-bit From: Michael Ellerman It saves #ifdef'ing in callers if we at least define the 64-bit cpu features for 32-bit also. Signed-off-by: Arnd Bergmann --- include/asm-powerpc/cputable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- diffstat: cputable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ====== import-updated-version-of-ppc-disassembly-code-for-xmon.diff ====== Subject: Import updated version of ppc disassembly code for xmon From: Michael Ellerman This includes: * version 1.24 of ppc-dis.c * version 1.88 of ppc-opc.c * version 1.23 of ppc.h I can't vouch for the accuracy etc. of these changes, but it brings us into line with binutils - and from a cursory test appears to work fine. --- arch/powerpc/xmon/ppc-dis.c | 20 - arch/powerpc/xmon/ppc-opc.c | 778 ++++++++++++++++++++++++++++++++------------ arch/powerpc/xmon/ppc.h | 39 +- 3 files changed, 618 insertions(+), 219 deletions(-) --- diffstat: ppc-dis.c | 20 - ppc-opc.c | 778 +++++++++++++++++++++++++++++++----------- ppc.h | 39 +- 3 files changed, 618 insertions(+), 219 deletions(-) ====== mm-fix-alloc_bootmem-on-nodes-without-mem.diff ====== Subject: mm: enables booting a NUMA system where some nodes have no memory When booting a NUMA system with nodes that have no memory (eg by limiting memory), bootmem_alloc_core tried to find pages in an uninitialized bootmem_map. This caused a null pointer access. This fix adds a check, so that NULL is returned. That will enable the caller (bootmem_alloc_nopanic) to alloc memory on other without a panic. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: bootmem.c | 4 ++++ 1 file changed, 4 insertions(+) ====== mm-fix-alloc_bootmem-call-after-bootmem-freed.diff ====== Subject: mm: fix call to alloc_bootmem after bootmem has been freed In some cases it might happen, that alloc_bootmem is beeing called after bootmem pages have been freed. This is, because the condition SYSTEM_BOOTING is still true after bootmem has been freed. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 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 Signed-off-by: Arnd Bergmann --- 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 Signed-off-by: Arnd Bergmann --- 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 ====== Subject: spufs: use SPU master control to prevent wild SPU execution When the user changes the runcontrol register, an SPU might be running without a process being attached to it and waiting for events. In order to prevent this, make sure we always disable the priv1 master control when we're not inside of spu_run. Signed-off-by: Arnd Bergmann --- 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(-) ====== spufs-add-runcntrl-read-accessors.diff ====== Subject: spufs: Add runcntrl read accessors From: Jeremy Kerr This change adds a read accessor for the SPE problem-state run control register. This is required for for applying (userspace) changes made to the run control register while the SPE is stopped - simply asserting the master run control bit is not sufficient. My next patch for isolated-mode setup requires this. Signed-off-by: Jeremy Kerr Signed-off-by: Arnd Bergmann arch/powerpc/platforms/cell/spufs/backing_ops.c | 6 ++++++ arch/powerpc/platforms/cell/spufs/hw_ops.c | 6 ++++++ arch/powerpc/platforms/cell/spufs/spufs.h | 1 + 3 files changed, 13 insertions(+) --- diffstat: backing_ops.c | 6 ++++++ hw_ops.c | 6 ++++++ spufs.h | 1 + 3 files changed, 13 insertions(+) ====== spufs-setup-isolated-mode-loader-in-spu_run.diff ====== Subject: spufs: Setup isolated-mode loader in spu_run From: Jeremy Kerr In order to fit with the "don't-run-spus-outside-of-spu_run" model, this patch starts the isolated-mode loader in spu_run, rather than spu_create. If spu_run is passed an isolated-mode context that isn't in isolated mode state, it will run the loader. This fixes potential races with the isolated SPE app doing a stop-and-signal before the PPE has called spu_run: bugzilla #29111. Also (in conjunction with a mambo patch), this addresses #28565, as we always set the runcntrl register when entering spu_run. It is up to libspe to ensure that isolated-mode apps are cleaned up after running to completion - ie, put the app through the "ISOLATE EXIT" state (see Ch11 of the CBEA). Tested on systemsim with isolation mode, with both recycled and non-recycled isolated-mode apps. Vladimir - could you test system calls again, with this patch? Signed-off-by: Jeremy Kerr Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/cell/spufs/inode.c | 104 ------------------------- arch/powerpc/platforms/cell/spufs/run.c | 122 +++++++++++++++++++++++++----- arch/powerpc/platforms/cell/spufs/spufs.h | 3 3 files changed, 105 insertions(+), 124 deletions(-) --- diffstat: inode.c | 104 ------------------------------------- run.c | 122 ++++++++++++++++++++++++++++++++++++-------- spufs.h | 3 - 3 files changed, 105 insertions(+), 124 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 Signed-off-by: Arnd Bergmann --- 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 Signed-off-by: Arnd Bergmann --- 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(-) ====== oprofile-for-cell-prereqs-new-routines-for-managing-pmu-interrupts.diff ====== Subject: cell: add routines for managing PMU interrupts From: Kevin Corry The following routines are added to arch/powerpc/platforms/cell/pmu.c: cbe_clear_pm_interrupts() cbe_enable_pm_interrupts() cbe_disable_pm_interrupts() cbe_query_pm_interrupts() cbe_pm_irq() cbe_init_pm_irq() This also adds a routine in arch/powerpc/platforms/cell/interrupt.c and some macros in cbe_regs.h to manipulate the IIC_IR register: iic_set_interrupt_routing() Signed-off-by: Kevin Corry Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/platforms/cell/cbe_regs.h | 8 + arch/powerpc/platforms/cell/interrupt.c | 16 ++ arch/powerpc/platforms/cell/interrupt.h | 2 arch/powerpc/platforms/cell/pmu.c | 70 ++++++++++++ include/asm-powerpc/cell-pmu.h | 5 5 files changed, 101 insertions(+) ====== oprofile-for-cell-initial-profiling-support-updated-patch.diff ====== Subject: cell: add oprofile support From: Maynard Johnson Add PPU event-based and cycle-based profiling support to Oprofile for Cell. Oprofile is expected to collect data on all CPUs simultaneously. However, there is one set of performance counters per node. There are two hardware threads or virtual CPUs on each node. Hence, OProfile must multiplex in time the performance counter collection on the two virtual CPUs. The multiplexing of the performance counters is done by a virtual counter routine. Initially, the counters are configured to collect data on the even CPUs in the system, one CPU per node. In order to capture the PC for the virtual CPU when the performance counter interrupt occurs (the specified number of events between samples has occurred), the even processors are configured to handle the performance counter interrupts for their node. The virtual counter routine is called via a kernel timer after the virtual sample time. The routine stops the counters, saves the current counts, loads the last counts for the other virtual CPU on the node, sets interrupts to be handled by the other virtual CPU and restarts the counters, the virtual timer routine is scheduled to run again. The virtual sample time is kept relatively small to make sure sampling occurs on both CPUs on the node with a relatively small granularity. Whenever the counters overflow, the performance counter interrupt is called to collect the PC for the CPU where data is being collected. The oprofile driver relies on a firmware RTAS call to setup the debug bus to route the desired signals to the performance counter hardware to be counted. The RTAS call must set the routing registers appropriately in each of the islands to pass the signals down the debug bus as well as routing the signals from a particular island onto the bus. There is a second firmware RTAS call to reset the debug bus to the non pass thru state when the counters are not in use. Signed-off-by: Carl Love Signed-off-by: Maynard Johnson Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/configs/cell_defconfig | 3 arch/powerpc/kernel/cputable.c | 3 arch/powerpc/oprofile/Makefile | 1 arch/powerpc/oprofile/common.c | 15 arch/powerpc/oprofile/op_model_cell.c | 701 +++++++++++++ arch/powerpc/platforms/cell/cbe_regs.c | 12 arch/powerpc/platforms/cell/pmu.c | 23 include/asm-powerpc/cell-pmu.h | 18 include/asm-powerpc/cputable.h | 1 include/asm-powerpc/oprofile_impl.h | 3 10 files changed, 775 insertions(+), 5 deletions(-) ====== coredump-add-spu-elf-notes-to-coredump.diff ====== Subject: coredump: Add SPU elf notes to coredump. From: Dwayne Grant McConnell This patch adds SPU elf notes to the coredump. It creates a separate note for each of /regs, /fpcr, /lslr, /decr, /decr_status, /mem, /signal1, /signal1_type, /signal2, /signal2_type, /event_mask, /event_status, /mbox_info, /ibox_info, /wbox_info, /dma_info, /proxydma_info, /object-id. A new macro, ARCH_HAVE_EXTRA_NOTES, was created for architectures to specify they have extra elf core notes. A new macro, ELF_CORE_EXTRA_NOTES_SIZE, was created so the size of the additional notes could be calculated and added to the notes phdr entry. A new macro, ELF_CORE_WRITE_EXTRA_NOTES, was created so the new notes would be written after the existing notes. The SPU coredump code resides in spufs. Stub functions are provided in the kernel which are hooked into the spufs code which does the actual work via register_arch_coredump_calls(). A new set of __spufs__read/get() functions was provided to allow the coredump code to read from the spufs files without having to lock the SPU context for each file read from. Signed-off-by: Dwayne Grant McConnell Signed-off-by: Arnd Bergmann --- This patch is meant to replace coredump-add-spu-elf-notes.diff coredump-add-spu-elf-notes-fix.diff I have tried to address all previous review comments but I know that the new structure does not use ARRAY_SIZE to calculate the number of elements because the data structure is used across multiple files and I did not switch to test_bit() because I just didn't want to break anything else to debug... I have not addressed the unschedulable contexts either. Is there a quick thing I should do to skip over these so they will not be dumped? Let me know what problems you see that I don't know about and I'll address them. I'm hoping only stop ship problems at this point will need to be addressed. -- Dwayne Grant McConnell Lotus Notes Mail: Dwayne McConnell [Mail]/Austin/IBM@IBMUS Lotus Notes Calendar: Dwayne McConnell [Calendar]/Austin/IBM@IBMUS --- diffstat: arch/powerpc/platforms/cell/Makefile | 1 arch/powerpc/platforms/cell/spu_coredump.c | 74 ++ arch/powerpc/platforms/cell/spufs/Makefile | 2 arch/powerpc/platforms/cell/spufs/coredump.c | 221 ++++++ arch/powerpc/platforms/cell/spufs/file.c | 325 +++++++--- arch/powerpc/platforms/cell/spufs/inode.c | 7 arch/powerpc/platforms/cell/spufs/spufs.h | 21 fs/binfmt_elf.c | 8 include/asm-powerpc/elf.h | 13 include/asm-powerpc/spu.h | 16 include/linux/elf.h | 7 11 files changed, 608 insertions(+), 87 deletions(-) ====== coredump-add-spu-elf-notes-to-coredump-cleanup.diff ====== Subject: clean up spu core dump patch * Use spu_ or spufs_ symbol prefixes where appropriate * Use a mutex around the new calls to protect against module unload * Make some symbols static and get rid of the optimization for builtin spufs * Open-code some macros * Don't attempt to dump unschedulable contexts Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/platforms/cell/spu_coredump.c | 39 ++-- arch/powerpc/platforms/cell/spufs/coredump.c | 94 +++++----- arch/powerpc/platforms/cell/spufs/file.c | 6 arch/powerpc/platforms/cell/spufs/inode.c | 4 arch/powerpc/platforms/cell/spufs/spufs.h | 18 - include/asm-powerpc/spu.h | 16 - 6 files changed, 91 insertions(+), 86 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-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 | 9 include/asm-powerpc/spu.h | 5 include/asm-powerpc/spu_priv1.h | 48 + 8 files changed, 480 insertions(+), 356 deletions(-) ====== ps3-support/ps3-platform.patch ====== Subject: ps3: add basic platform support From: Geoff Levand 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 ====== Subject: ps3: Adds the ps3pf hvcalls. From: Geoff Levand 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 ====== Subject: ps3: add firmware feature bits From: Geoff Levand 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 ====== Subject: ps3: Pagetable management routines From: Geoff Levand 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 ====== Subject: ps3: add repository support From: Geoff Levand 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 ====== Subject: ps3: Adds routines to interface with the ps3pf interrupt services From: Geoff Levand 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 ====== Subject: ps3: use lpar address space From: Geoff Levand 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 ====== Subject: ps3: add OS area support From: Geoff Levand 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 ====== Subject: ps3: add spufs support From: Geoff Levand 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 ====== Subject: ps3: add system bus driver From: Geoff Levand 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(+) ====== cell-defconfig-ps3.diff ====== Subject: cell: update defconfig for ps3 and axon support Signed-off-by: Arnd Bergmann --- diffstat: cell_defconfig | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-)