====== fw-feature-fixup-revert.diff ====== Subject: powerpc: revert 'do firmware feature fixups after features are initialised' From: Arnd Bergmann This broke booting on the QS20 blade, so revert it for now. Signed-off-by: Arnd Bergmann --- diffstat: setup_64.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) ====== re-cell-oprofile-spu-profiling-updated-patch-4.diff ====== Subject: Add support to OProfile for profiling Cell BE SPUs From: Maynard Johnson This patch updates the existing arch/powerpc/oprofile/op_model_cell.c to add in the SPU profiling capabilities. In addition, a 'cell' subdirectory was added to arch/powerpc/oprofile to hold Cell-specific SPU profiling code. 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/time.c | 1 arch/powerpc/oprofile/Kconfig | 7 arch/powerpc/oprofile/Makefile | 4 arch/powerpc/oprofile/cell/pr_util.h | 90 + arch/powerpc/oprofile/cell/spu_profiler.c | 220 +++ arch/powerpc/oprofile/cell/spu_task_sync.c | 464 +++++++ arch/powerpc/oprofile/cell/vma_map.c | 279 ++++ arch/powerpc/oprofile/common.c | 51 arch/powerpc/oprofile/op_model_cell.c | 603 ++++++++-- arch/powerpc/oprofile/op_model_power4.c | 11 arch/powerpc/oprofile/op_model_rs64.c | 10 arch/powerpc/platforms/cell/spufs/context.c | 20 arch/powerpc/platforms/cell/spufs/sched.c | 4 arch/powerpc/platforms/cell/spufs/spufs.h | 2 drivers/oprofile/buffer_sync.c | 3 drivers/oprofile/event_buffer.h | 20 drivers/oprofile/oprof.c | 26 include/asm-powerpc/oprofile_impl.h | 10 include/asm-powerpc/spu.h | 15 include/linux/dcookies.h | 1 include/linux/elf-em.h | 3 include/linux/oprofile.h | 35 23 files changed, 1759 insertions(+), 123 deletions(-) ====== re-add-support-to-oprofile-for-profiling-cell-be-spus-update-2.diff ====== Subject: Enable SPU switch notification to detect currently active SPU tasks. From: Maynard Johnson This patch adds to the capability of spu_switch_event_register so that the caller is also notified of currently active SPU tasks. It also exports spu_switch_event_register and spu_switch_event_unregister. Signed-off-by: Maynard Johnson Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: run.c | 16 ++++++++++++++-- sched.c | 30 ++++++++++++++++++++++++++++-- spufs.h | 6 ++++++ 3 files changed, 48 insertions(+), 4 deletions(-) ====== oprofile-fix-parameter-types-in-function-defs.diff ====== Subject: OProfile: fix parameter types in function defs From: Bob Nelson A 64-bit unsigned long parameter is being demoted to 32-bit unsigned int as it is being passed along by several functions and eventually being promoted back to unsigned long in the CBE module spu_task_sync.c. Signed-off-by: Bob Nelson Signed-off-by: Arnd Bergmann --- diffstat: spu_task_sync.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ====== oprofile-fix-call-to-kzalloc.diff ====== Subject: OProfile fix call to kzalloc From: Bob Nelson Fix OProfile kernel module to check pointer returned from kzalloc for success/failure. Eliminated unnecessary cast. Added some better error handling and cleanup in the related area of the code. Signed-off-by: Bob Nelson Signed-off-by: Arnd Bergmann --- diffstat: cell/pr_util.h | 2 +- cell/spu_profiler.c | 14 +++++++++----- op_model_cell.c | 16 +++++++++++----- 3 files changed, 21 insertions(+), 11 deletions(-) ====== cell-be_info-2.diff ====== Subject: cell: add per BE structure with info about its SPUs From: Andre Detsch Addition of a spufs-global "cbe_info" array. Each entry contains information about one Cell/B.E. node, namelly: * list of spus (both free and busy spus are in this list); * list of free spus (replacing the static spu_list from spu_base.c) * number of spus; * number of reserved (non scheduleable) spus. SPE affinity implementation actually requires only access to one spu per BE node (since it implements its own pointer to walk through the other spus of the ring) and the number of scheduleable spus (n_spus - non_sched_spus) However having this more general structure can be useful for other functionalities, concentrating per-cbe statistics / data. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: arch/powerpc/platforms/cell/spu_base.c | 21 ++++++---- arch/powerpc/platforms/cell/spufs/sched.c | 5 ++ include/asm-powerpc/spu.h | 10 ++++ 3 files changed, 29 insertions(+), 7 deletions(-) ====== cell-spu_indexing-2.diff ====== Subject: cell: add vicinity information on spus From: Andre Detsch This patch adds affinity data to each spu instance. A doubly linked list is created, meant to connect the spus in the physical order they are placed in the BE. SPUs near to memory should be marked as having memory affinity. Adjustments of the fields acording to FW properties is done in separate patches, one for CPBW, one for Malta (patch for Malta under testing). Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: arch/powerpc/platforms/cell/spu_base.c | 2 ++ include/asm-powerpc/spu.h | 3 +++ 2 files changed, 5 insertions(+) ====== cell-spu_indexing_QS20-2.diff ====== Subject: cell: add hardcoded spu vicinity information for QS20 From: Andre Detsch This patch allows the use of spu affinity on QS20, whose original FW does not provide affinity information. This is done through two hardcoded arrays, and by reading the reg property from each spu. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: spu_base.c | 55 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) ====== spufs-affinity_create-4.diff ====== Subject: spufs: extension of spu_create to support affinity definition From: Andre Detsch This patch adds support for additional flags at spu_create, which relate to the establishment of affinity between contexts and contexts to memory. A fourth, optional, parameter is supported. This parameter represent a affinity neighbor of the context being created, and is used when defining SPU-SPU affinity. Affinity is represented as a doubly linked list of spu_contexts. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: arch/powerpc/platforms/cell/spu_syscalls.c | 17 + arch/powerpc/platforms/cell/spufs/context.c | 1 arch/powerpc/platforms/cell/spufs/gang.c | 4 arch/powerpc/platforms/cell/spufs/inode.c | 132 +++++++++- arch/powerpc/platforms/cell/spufs/spufs.h | 16 + arch/powerpc/platforms/cell/spufs/syscalls.c | 32 ++ include/asm-powerpc/spu.h | 8 include/linux/syscalls.h | 2 8 files changed, 195 insertions(+), 17 deletions(-) ====== spufs-affinity_placement-4.diff ====== Subject: cell: add placement computation for scheduling of affinity contexts From: Andre Detsch This patch provides the spu affinity placement logic for the spufs scheduler. Each time a gang is going to be scheduled, the placement of a reference context is defined. The placement of all other contexts with affinity from the gang is defined based on this reference context location and on a precomputed displacement offset. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: gang.c | 4 - sched.c | 142 ++++++++++++++++++++++++++++++++++++++++++++ spufs.h | 6 + 3 files changed, 151 insertions(+), 1 deletion(-) ====== spufs-affinity_schedulling-2.diff ====== Subject: spufs: integration of SPE affinity with the scheduller From: Andre Detsch This patch makes the scheduller honor affinity information for each context being scheduled. If the context has no affinity information, behaviour is unchanged. If there are affinity information, context is schedulled to be run on the exact spu recommended by the affinity placement algorithm. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- --- diffstat: spu_base.c | 19 +++++++++++++++++++ spufs/sched.c | 4 ++++ 2 files changed, 23 insertions(+) ====== cell-spu_indexing_FW_vicinity-1.diff ====== Subject: cell: indexing of SPUs based on firmware vicinity properties From: Andre Detsch This patch links spus according to their physical position using information provided by the firmware through a special vicinity device-tree property. This property is present in current version of Malta firmware. Example of vicinity properties for a node in Malta: Node: Vicinity property contains phandles of: spe@0 [ spe@100000 , mic-tm@50a000 ] spe@100000 [ spe@0 , spe@200000 ] spe@200000 [ spe@100000 , spe@300000 ] spe@300000 [ spe@200000 , bif0@512000 ] spe@80000 [ spe@180000 , mic-tm@50a000 ] spe@180000 [ spe@80000 , spe@280000 ] spe@280000 [ spe@180000 , spe@380000 ] spe@380000 [ spe@280000 , bif0@512000 ] Only spe@* have a vicinity property (e.g., bif0@512000 and mic-tm@50a000 do not have it). Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- diffstat: spu_base.c | 90 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 89 insertions(+), 1 deletion(-) ====== spu_base-locking-cleanup.diff ====== Subject: spu_base: locking cleanup From: Christoph Hellwig Sort out the locking mess in spu_base and document the current rules. As an added benefit spu_alloc* and spu_free don't block anymore. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: spu_base.c | 84 ++++++++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 33 deletions(-) ====== pmi-remove-multiple-device-support-3.diff ====== Subject: cell: pmi remove support for mutiple devices. From: Christian Krafft The pmi driver got simplified by removing support for multiple devices. As there is no more than one pmi device per maschine, there is no need to specify the device for listening and sending messages. This way the caller (cbe_cpufreq) doesn't need to scan the device tree. When registering the handler on a board without a pmi interface, pmi.c will just return -ENODEV. The patch that fixed the breakage of cell_defconfig has been broken out of the earlier version of this patch. So this is the version that applies cleanly on top of it. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/platforms/cell/cbe_cpufreq.c | 36 ++----- arch/powerpc/sysdev/pmi.c | 51 ++++------ include/asm-powerpc/pmi.h | 8 - 3 files changed, 40 insertions(+), 55 deletions(-) ====== cbe_cpufreq-fix-latency-measurement.diff ====== Subject: cell: cbe_cpufreq fix latency measurement From: Christian Krafft This patch fixes the debug code that calculates the transition time when changing the slow modes on a Cell BE cpu. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: cbe_cpufreq.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) ====== cbe_cpufreq-fix-init.diff ====== Subject: cbe_cpufreq: fix initialization From: Christian Krafft This patch fixes the initialization of the cbe_cpufreq driver. The code that initializes the PMI related functions was called per cpu: * registering cpufreq notifier block * registering a pmi handler This ends in a bug that the notifier block gets called in an endless loop. The initialization code is being put to the module init code path by this patch. This way it only gets called once. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: cbe_cpufreq.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) ====== cbe_cpufreq-minor-cleanups.diff ====== Subject: cbe_cpufreq: fix minor issues From: Christian Krafft Minor issues have been fixed: * added a missing call to of_node_put() * signedness of a function parameter * added some line breaks * changed global pmi_frequency_limit to a per node pmi_slow_mode_limit array Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: cbe_cpufreq.c | 58 ++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 18 deletions(-) ====== cbe_cpufreq-split-code-2.diff ====== Subject: cbe_cpufreq: reorganize code From: Christian Krafft This patch reorganizes the code of the driver into three files. Two cbe_cpufreq_pmi.c and cbe_cpufreq_pervasive.c care about hardware. cbe_cpufreq.c contains the logic. There is no changed behaviour, except that the PMI related function is now located in a seperate module cbe_cpufreq_pmi. This module will be required by cbe_cpufreq, if CONFIG_CBE_CPUFREQ_PMI has been set. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: Kconfig | 10 + Makefile | 4 cbe_cpufreq.c | 196 +--------------------------- cbe_cpufreq.h | 24 +++ cbe_cpufreq_pervasive.c | 118 ++++++++++++++++ cbe_cpufreq_pmi.c | 148 +++++++++++++++++++++ 6 files changed, 312 insertions(+), 188 deletions(-) ====== sysfs-fix-warning-3.diff ====== Subject: powerpc: sysfs fix compiler warning From: Christian Krafft This patch fixes the following compiler warning: arch/powerpc/kernel/sysfs.c:385: warning: ignoring return value of `sysfs_create_group', Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: sysfs.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) ====== axon-ram-6.diff ====== Subject: cell: updated driver for DDR2 memory on AXON From: Maxim Shchetynin Signed-off-by: Maxim Shchetynin Signed-off-by: Arnd Bergmann --- diffstat: platforms/Kconfig | 10 sysdev/Makefile | 1 sysdev/axonram.c | 385 ++++++++++++++++++++++++++++++++++ 3 files changed, 396 insertions(+) ====== cell-spus-info-kexec-crash-1.diff ====== Subject: cell: saving spus information for kexec crash From: Andre Detsch This patch adds support for investigating spus information after a kernel crash event, through kdump vmcore file. Implementation is based on xmon code, but the new functionality was kept independent from xmon. Signed-off-by: Lucio Jose Herculano Correia Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/kernel/crash.c | 67 +++++++++++++ arch/powerpc/platforms/cell/spu_base.c | 3 include/asm-powerpc/spu.h | 4 3 files changed, 74 insertions(+) ====== axon-msi-01.diff ====== Subject: Add support for MSI on Axon-based Cell systems From: Michael Ellerman This patch adds support for the setup and decoding of MSIs on Axon-based Cell systems, using the MSIC mechanism. This involves setting up an area of BE memory which the Axon then uses as a FIFO for MSI messages. When one or more MSIs are decoded by the MSIC we receive an interrupt on the MPIC, and the MSI messages are written into the FIFO. At the moment we use a 64KB FIFO, one per MSIC/BE. Signed-off-by: Michael Ellerman Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/cell/Makefile | 2 + arch/powerpc/platforms/cell/axon_msi.c | 445 ++++++++++++++++++++++++++++++++ 2 files changed, 447 insertions(+), 0 deletions(-) --- diffstat: Makefile | 2 axon_msi.c | 445 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 447 insertions(+) ====== edac.diff ====== Subject: EDAC From: Benjamin Herrenschmidt Haven't had a chance to test it... can't error inject and I just finished backporting it. Apply edac-add-xdr.diff then edac-add-cell-ecc.diff It's not suitable for upstream, I'm waiting for the EDAC folks to submit the updated core first. Signed-off-by: Arnd Bergmann --- --=-N2b/mdp0UWZQBJVXOLrV Content-Disposition: attachment; filename=edac-add-xdr.diff Content-Type: text/x-patch; name=edac-add-xdr.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit --- diffstat: arch/powerpc/platforms/cell/cbe_regs.h | 48 ++ arch/powerpc/platforms/cell/setup.c | 10 drivers/edac/Kconfig | 9 drivers/edac/Makefile | 2 drivers/edac/cell-edac.c | 259 +++++++++++++ drivers/edac/edac_mc.c | 3 drivers/edac/edac_mc.h | 6 7 files changed, 332 insertions(+), 5 deletions(-) ====== axon-ram-fix.diff ====== Subject: axonram fixes From: Arnd Bergmann Make sure we always iounmap the memory area, both in the error path and at module unload. Extracted from Maxim's latest version of the full patch. Signed-off-by: Arnd Bergmann --- diffstat: axonram.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) ====== fix-cbe_cpufreq-for-legacy-slof-tree.diff ====== Subject: fix cbe_cpufreq for legacy SLOF tree. From: Jean-Christophe DUBOIS Previous patch changed based on Christian Krafft's comment. On some legacy SLOF tree the generic code is unable to ioremap some Cell BE registers. Therefore the "generic" functions are returning a NULL pointer, triggering a crash on such platforms. Let's handle this more gracefully. Signed-off-by: Jean-Christophe DUBOIS Acked-by: Christian Kraff Signed-off-by: Arnd Bergmann --- diffstat: cbe_cpufreq.c | 10 ++++++++++ 1 file changed, 10 insertions(+) ====== fix-cbe_reg-c-for-legacy-slof-tree.diff ====== Subject: fix cbe_reg.c for legacy SLOF tree. From: Jean-Christophe DUBOIS Some legacy SLOF device trees have a "be" node but no "cpus" properties under it. So le'ts fix the crash until the device tree is fixed. Signed-off-by: Jean-Christophe DUBOIS Acked-by: Christian Kraff Signed-off-by: Arnd Bergmann --- diffstat: cbe_regs.c | 5 +++++ 1 file changed, 5 insertions(+) ====== fix-cbe_thermal-for-legacy-slof-tree.diff ====== Subject: fix cbe_thermal for legacy SLOF tree. From: Jean-Christophe DUBOIS Previous patch changed based on Christian Krafft's comment. On some legacy SLOF tree the generic code is unable to ioremap some Cell BE registers. Therefore the "generic" functions are returning a NULL pointer, triggering a crash on such platforms. Let's handle this more gracefully. Signed-off-by: Jean-Christophe DUBOIS Acked-by: Christian Kraff Signed-off-by: Arnd Bergmann --- diffstat: cbe_thermal.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) ====== allow-linux-to-map-cell-regs-on-legacy-slof-tree.diff ====== Subject: allow linux to map Cell regs on legacy SLOF tree. From: Jean-Christophe DUBOIS The platforms missing the "cpus" property in the "be" node are mono-Cell platforms such as CAB or Getaway. Therefore it is possible to assume that if there is no "cpus" properties under the "be" node then we can safely return the "device node" without more checking. This is a bit hacky but ... it allows it to work on these platforms. Signed-off-by: Jean-Christophe DUBOIS Acked-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: cbe_regs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ====== spufs-avoid-unexpected-restaring-mfc-in-context-saving-take-2.diff ====== Subject: spufs: Avoid unexpected restaring MFC in context saving (take 2) From: Kazunori Asayama The current SPU context saving procedure in SPUFS unexpectedly restarts MFC when halting decrementer, because MFC_CNTL[Dh] is set without MFC_CNTL[Sm]. This bug causes, for example, saving broken DMA queues. Here is a patch to fix the problem. The only difference from the previous patch is the name of "Suspend Mask" (Sm) bit, per Jeremy Kerr's suggestion. Signed-off-by: Kazunori Asayama Acked-by: Jeremy Kerr Signed-off-by: Arnd Bergmann --- arch/powerpc/platforms/cell/spufs/switch.c | 3 ++- include/asm-powerpc/spu.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) --- diffstat: arch/powerpc/platforms/cell/spufs/switch.c | 3 ++- include/asm-powerpc/spu.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) ====== spusched-fix-spu-utilization-statistics.diff ====== Subject: Re: fix physical spu utilization statistics From: Luke Browning SPU contexts only accrue SPU time while they are loaded or running on an SPU. Time spent on the runqueue is not an interesting physical spu utilization statistic. This patch fixes that bug by only measure time when the context is associated with an SPU. This patch also use the timebase register to improve granularity of time stamping and provide a more repeatable statistic. Many of the critical sections that are measured fall into the few microsecond level. ie. context switching. For SPE contexts, utilization should be interpreted as: The "user" category measures the time spent executing SPE application code. The "system" utilization category is a measure of system overhead and includes time spent context switching and executing remote system calls. The physical SPU is not available to be used to schedule other SPU contexts while in this state. The "iowait" time measures time spent processing page faults and provides an indication of the potential benefit that be realized by tuning the I/O subsystem and/or the application. The "loaded" statistic reflects the time spent lazily loaded. Statistics are also collected at the Logical SPUs level. In general, the SPE context statistics are simply added to the corresponding logical SPE utilization bucket, except the SPE context "loaded" category is added to the system spu "idle" bucket. Signed-off-by: Luke Browning Signed-off-by: Arnd Bergmann --- Fixes made so far: - white space formatting - unbind ctxt state transition marked as loaded, so that underlying physical spu is marked as idle. The state of the spu context in this case doesn't matter, since it is not bound to a physical spu. --- --- diffstat: arch/powerpc/platforms/cell/spu_base.c | 17 ++- arch/powerpc/platforms/cell/spufs/context.c | 3 arch/powerpc/platforms/cell/spufs/fault.c | 4 arch/powerpc/platforms/cell/spufs/file.c | 19 ++-- arch/powerpc/platforms/cell/spufs/run.c | 12 ++ arch/powerpc/platforms/cell/spufs/sched.c | 28 ++--- arch/powerpc/platforms/cell/spufs/spufs.h | 47 +++++----- include/asm-powerpc/spu.h | 14 ++ 8 files changed, 87 insertions(+), 57 deletions(-) ====== spidernet-irq.diff ====== Subject: spidernet enable poll() before registering interrupts From: Arnd Bergmann We must not call netif_poll_enable after enabling interrupts, because an interrupt might come in and set the __LINK_STATE_RX_SCHED bit before we get to clear that bit again. If that happens, the next call to the ->poll() function will oops. Signed-off-by: Arnd Bergmann --- diffstat: spider_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ====== oprofile-capture-data-for-generated-code-stubs.diff ====== Subject: oprofile: capture data for generated code stubs From: Bob Nelson The SPU runtime sometimes creates code stubs on the stack. Previously the CBE OProfile module would discard entries captured for these code stubs because the address does not appear in the memory map for the running program. This change keeps these entries for reporting by the user space tools. Signed-off-by: Bob Nelson Signed-off-by: Arnd Bergmann --- diffstat: vma_map.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ====== cell-config_spe_base-is-a-typo.diff ====== Subject: cell: CONFIG_SPE_BASE is a typo From: Geert Uytterhoeven The config symbol for SPE support is called CONFIG_SPU_BASE, not CONFIG_SPE_BASE. Signed-off-by: Geert Uytterhoeven Acked-by: Benjamin Herrenschmidt Signed-off-by: Arnd Bergmann --- diffstat: hash_utils_64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ====== 36385.diff ====== Subject: spufs: Remove spurious WARN_ON for spu_deactivate for NOSCHED contexts From: Jeremy Kerr Commit 6cbf93960e64f313f6e247cbca7afaa50e3ee2c added a WARN_ON for calling spu_deactivate on context created with the SPU_CREATE_NOSCHED flag. However, all NOSCHED contexts will need to be deactivated when the context is closed, so this gives a spurious warning when any NOSCHED context is closed. This change removes the WARN_ON. Signed-off-by: Jeremy Kerr Signed-off-by: Arnd Bergmann --- diffstat: sched.c | 9 --------- 1 file changed, 9 deletions(-) ====== 33435.diff ====== Subject: Fix initial timeslice calculation From: Christoph Hellwig Currently we calculate the first timeslice for every context wrongly. alloc_spu_context calls spu_set_timeslice before we set ctx->prio so we always calculate the longest possible timeslice for the lowest possible priority thread. This patch makes sure to update the schedule-related fields before calculating the timeslice and also makes sure we update the timeslice for a non-running context when entering spu_run so a priority change affects the context as soon as possible. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- --- diffstat: context.c | 3 ++- run.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) ====== 36598.diff ====== Subject: spufs: rework list management and associated locking From: Christoph Hellwig This sorts out the various lists and related locks in the spu code. In detail: - the per-node free_spus and active_list are gone. Instead struct gained an alloc_state member telling whether the spu is free or - the per-node spus array is now locked by a per-node mutex, which takes over from the global spu_lock and the per-node active_mutex - the spu_alloc* and spu_free function are gone as the state change now done inline in the spufs code. This allows some more sharing code for the affinity vs normal case and more efficient locking - some little refactoring in the affinity code for this locking me Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/platforms/cell/spu_base.c | 72 --- arch/powerpc/platforms/cell/spufs/sched.c | 197 +++++----- include/asm-powerpc/spu.h | 11 3 files changed, 111 insertions(+), 169 deletions(-) ====== 35007.diff ====== Subject: Fix affinity after introduction of node_allowed() calls From: Andre Detsch This patch fixes affinity reference point placement, which was not being done in some situations, after the introduction of node_allowed() calls. The previously used parameter, 'ctx', is just the iterator of the previous list_for_each_entry_reverse loop, and its value might be invalid at the end of the loop. Also, the right context to seek for information when defining the reference ctx location _is_ the reference ctx. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- diffstat: sched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ====== 36751.diff ====== Subject: spufs: make sure context are scheduled again after spu_acquire_saved From: Christoph Hellwig Currently a process is removed from the physical spu when spu_acquire_saved is saved but never put back. This patch adds a new spu_release_saved that is to be paired with spu_acquire_saved and put the process back if it has been in RUNNABLE state before. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: context.c | 18 ++++++++++++++++- coredump.c | 2 - file.c | 42 ++++++++++++++++++++--------------------- spufs.h | 2 + 4 files changed, 41 insertions(+), 23 deletions(-) ====== 36920.diff ====== Subject: spusched: fix null pointer dereference in find_victim From: Christoph Hellwig find_victim can dereference a NULL pointer when iterating over the list of victim spus because list_mutex only guarantees spu->ct to be stable, but of course not to be non-NULL. Also fix find_victim to not call spu_unbind_context without list_mutex because that violates the above guarantee. Signed-off-by: Christoph Hellwig Signed-off-by: Arnd Bergmann --- diffstat: sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ====== 35464.diff ====== Subject: fix locking issue in fs/nfs/inode.c From: Christian Krafft The following patch fixes a locking issue in NFS code. The race is caused because after decrementing the ref counter another thread can access the context, before the context gets locked and freed. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: inode.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) ====== 36162.diff ====== Subject: spu_manage: use newer physical-id attribute From: Christian Krafft Legacy device tree used the reg property for the physical id of an spe. On newer device tree layouts the reg property contains the "correct" value in the reg attribute. So there has been intoduced the "physical-id" on newer devicetree layouts. The id is stored by spu_manage into the spu struct as spe_id. cbe_thermal has been changed to use the spu->spe_id. There's no need for the thermal code has to check devicetree attributes for itself. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: cbe_thermal.c | 6 +----- spu_manage.c | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) ====== 37159.diff ====== Subject: cbe_cpufeq: add pmi support to cell_defconfig From: Christian Krafft PMI support should be enabled to have lower voltage while cpu frequency is down. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: cell_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) ====== 36932.diff ====== Subject: powerpc: MPIC protected sources From: Benjamin Herrenschmidt Some HW platforms, such as the new cell blades, requires some MPIC sources to be left alone by the operating system. This implements support for a "protected-sources" property in the mpic controller node containing a list of source numbers to be protected against operating system interference. For those interested in the gory details, the MPIC on the southbridge of those blades has some of the processor outputs routed to the cell, and at least one routed as a GPIO to the service processor. It will be used in the GA product for routing some of the southbridge error interrupts to the service processor which implements some of the RAS stuff, such as checkstopping when fatal errors occurs before they can propagate. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras Signed-off-by: Arnd Bergmann --- --- diffstat: arch/powerpc/sysdev/mpic.c | 32 +++++++++++++++++++++++++ include/asm-powerpc/mpic.h | 3 ++ 2 files changed, 35 insertions(+) ====== 36738.diff ====== Subject: powerpc: slice fix test size From: Benjamin Herrenschmidt Fix testing of size for non standard mappings in slice code Signed-off-by: Arnd Bergmann --- diffstat: slice.c | 2 ++ 1 file changed, 2 insertions(+) ====== 37392.diff ====== Subject: User-space access to bookmark registers. From: Kevin Corry Add the files /sys/devices/system/cpu/cpu*/pmu_bookmark to provide user-space with a method for writing to the bookmark registers in the Cell processor. Writes to these registers can be used by the performance monitoring unit to generate trace data and to trigger the starting and stopping of the hardware performance counters. This renames the existing cbe_init_pm_irq() routine to cbe_init_pmu(), and adds the initialization of these new sysfs files to that init routine. This also patches the smp_call_function_single() routine to match the recent change in mainline, which allows calling the routine with the current CPU as the target. See linux-2.6.git commit adff093d6c545c882f1503607f6af14ddd90bb89. Signed-off-by: Kevin Corry Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/kernel/smp.c | 7 +- arch/powerpc/platforms/cell/pmu.c | 61 +++++++++++++++++- include/asm-powerpc/reg.h | 2 3 files changed, 66 insertions(+), 4 deletions(-) ====== 33438.diff ====== Subject: spufs: not calling spu_run_init on spu_reacquire_runnable From: Andre Detsch This patch fixes a major bug which was happening when a SPU thread advances its execution right after being restored to a SPU. A potentially outdated NPC value was being (re)written to the SPU. So, spu_run_init, in this case, was either not doing anything relevant, or breaking the execution of the SPU thread. This fixes a common problem of losing a mailbox write when it was done to a saved context. Signed-off-by: Andre Detsch Acked-by: Jeremy Kerr Signed-off-by: Arnd Bergmann --- diffstat: run.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) ====== 34342.diff ====== Subject: cell: support pinhole-reset on IBM cell blades From: Arnd Bergmann The Cell Broadband Engine has a method of injecting a system-reset-exception from an external source into the operating system, which should trigger the regular behaviour of entering xmon or kdump. Unfortunately, the exception handler cannot distinguish it from other interrupt causes by the SRR1 register, which gets used for this on Power 6 and others. IBM Blade servers that want to support triggering the system reset exception using a pinhole button in the front panel therefore use an extra register to determine the reset cause. Signed-off-by: Arnd Bergmann --- diffstat: cbe_regs.h | 8 ++++++-- pervasive.c | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) ====== 37426.diff ====== Subject: spufs: fix race condition on gang->aff_ref_spu From: Andre Detsch Affinity reference point location (gang->aff_ref_spu) is reset when the whole gang is descheduled. However, the last member of a gang can be descheduled while we are trying to schedule another member of the gang. This was leading to a race condition, and the code was using gang->aff_ref_spu in an unsafe manner. By holding the gang->aff_mutex a little bit longer, and increment gang->aff_sched_count (which controls when gang->aff_ref_spu should be reset) a little bit earlier, the problem is fixed. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- diffstat: sched.c | 49 ++++++++++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 17 deletions(-) ====== 35766.diff ====== Subject: Axonram module modification for latest firmware API changes From: Maxim Shchetynin Firmware would not deliver two interrupt numbers in device-tree any more but only one, for correctable ECC, because uncorrectable ECC from now handles firmware itself. Changes in the axonram module are necessary because in the old version, if it is not allowed to fetch the second interrupt number from device-tree, it interpretes this as an error case and exits. Signed-off-by: Maximilian Signed-off-by: Arnd Bergmann --- --- diffstat: axonram.c | 43 ++++++++++-------------------------------- 1 file changed, 11 insertions(+), 32 deletions(-) ====== 37801.diff ====== Subject: axonram: do not delete gendisk's queue in error path From: Maxim Shchetynin On exit do not delete gendisk's queue because this is already done by del_gendisk(). Doing it twice may cause memory damage. Signed-off-by: Maximilian Signed-off-by: Arnd Bergmann --- diffstat: axonram.c | 3 --- 1 file changed, 3 deletions(-) ====== 37778.diff ====== Subject: Remove ctx_info and ctx_info_list From: Michael Ellerman Remove the ctx_info struct entirely, and also the ctx_info_list. This fixes a race where two processes can clobber each other's ctx_info structs. Instead of using the list, we just repeat the search through the file descriptor table. Extract the logic for searching through the file descriptors for spu context into a separate routine, coredump_next_context(), so we can use it elsewhere in future. In the process we flatten the for loop, and move the NOSCHED test into coredump_next_context(). Signed-off-by: Michael Ellerman Signed-off-by: Arnd Bergmann --- diffstat: coredump.c | 133 +++++++++++++++++------------------------ 1 file changed, 56 insertions(+), 77 deletions(-) ====== 36663.diff ====== Subject: SLUB: Do not fail on broken memory configurations From: Christoph Lameter Print a big fat warning and do what is necessary to continue if a node is marked as up but allocations from the node do not succeed. Signed-off-by: Christoph Lameter Signed-off-by: Arnd Bergmann --- diffstat: slub.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) ====== 37589.diff ====== Subject: Write some SPU coredump values as ASCII From: Michael Ellerman Unfortunately GDB expects some of the SPU coredump values to be identical in format to what is found in spufs. This means we need to dump some of the values as ASCII strings, not the actual values. Because we don't know what the values will be, we always print the values with the format "0x%.16lx", that way we know the result will be 19 bytes. do_coredump_read() doesn't take a __user buffer, so remove the annotation, and because we know that it's safe to just snprintf() directly to it. The spufs_coredump_reader array contains the size of the data that will be returned by the read routine. Currently these are specified as literals, and though some are obvious, sizeof(u32) == 4, others are not, 69 * 8 == ??? Instead, use sizeof() whatever type is returned by each routine, or in the case of spufs_mem_read() the #define LS_SIZE. Signed-off-by: Michael Ellerman Signed-off-by: Arnd Bergmann --- diffstat: coredump.c | 24 +++++++----------------- file.c | 35 ++++++++++++++++++----------------- 2 files changed, 25 insertions(+), 34 deletions(-) ====== 38125.diff ====== Subject: Don't return -ENOSYS as extra notes size if spufs is not loaded From: Michael Ellerman Because the SPU coredump code might be built as part of a module (spufs), we have a stub which is called by the coredump code, this routine then calls into spufs if it's loaded. Unfortunately the stub returns -ENOSYS if spufs is not loaded, which is interpreted by the coredump code as an extra note size of -38 bytes. This leads to a corrupt core dump. If spufs is not loaded there will be no SPU ELF notes to write, and so the extra notes size will be == 0. Signed-off-by: Michael Ellerman Signed-off-by: Arnd Bergmann --- --- diffstat: spu_coredump.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ====== 36162_2.diff ====== Subject: spu_manage: fix spu_unit_number for celleb device tree From: Christian Krafft New device trees provide "physical-id". Celleb device tree provide the "unit-id". Legacy device tree used the reg property for the physical id of an spe. This patch fixes find_spu_unit_number to look for the spu id in that order. The length is checked to avoid misinterpretation in case the attributes unit-id or reg do not contain the id. Signed-off-by: Christian Krafft Signed-off-by: Arnd Bergmann --- diffstat: spu_manage.c | 8 ++++++++ 1 file changed, 8 insertions(+) ====== 37989.diff ====== Subject: cell: move SPU affinity init to spu_management_of_ops From: Andre Detsch This patch moves affinity initialization code from spu_base.c to a new spu_management_of_ops function (init_affinity), which is empty in the case of PS3. This fixes a linking problem that was happening when compiling for PS3. Also, some code style changes were made. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/platforms/cell/spu_base.c | 141 --------- arch/powerpc/platforms/cell/spu_manage.c | 163 +++++++++++ arch/powerpc/platforms/ps3/spu.c | 6 include/asm-powerpc/spu_priv1.h | 7 4 files changed, 177 insertions(+), 140 deletions(-) ====== 37991.diff ====== Subject: cell: Safer of_has_vicinity routine From: Andre Detsch This patch changes the way we check for the existence of vicinity property in spe device nodes. The new implementation does not depend on having an initialized cbe_spu_info[0].spus, and checks for presence of vicinity in all nodes, not only in the first one. Basically a copy & paste from Arnd's suggestion sent to cbe-oss-dev. Signed-off-by: Andre Detsch Signed-off-by: Arnd Bergmann --- diffstat: spu_manage.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) ====== perfmon2-hack-no-ptrace.diff ====== Subject: perfmon2: don't try ptrace_check_attach From: Arnd Bergmann ptrace_check_attach has been removed with the move to utrace, which breaks perfmon2. This tries to work around the problem with minimal breakage, but some functionality is missing for now. More info from Kevin Corry: There are three ways you can do hardware-counter monitoring with Perfmon2: 1) System-wide, where you monitor all processes on one or more CPUs. 2) Per-process self-monitored, where a process monitors only itself. 3) Per-process externally-monitored, where one process monitors another single process. Number 3 above breaks with the ptrace/utrace changes, since Perfmon2 currently enforces that the monitored process must be ptraced and stopped by the monitoring process in order to perform certain Perfmon2 system calls on the monitored process. Cc: Kevin Corry Signed-off-by: Arnd Bergmann --- diffstat: perfmon_syscalls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ====== 36437.diff ====== Subject: perfmon2: Temporary fix due to the change from ptrace to utrace. From: Kevin Corry When one process (the 'monitoring' process) attempts to load a Perfmon2 context on another process (the 'monitored' process), it need to use ptrace to stop the monitored process and keep it from being scheduled on any CPUs until certain Perfmon2 system-calls have been completed. The Perfmon2 code uses the ptrace_check_attach() call to ensure that user-space has made the appropriate ptrace calls. However, ptrace_check_attach() is no longer available with the switch to utrace. But, as long as user-space behaves correctly, this call is not strictly needed. And if user-space happens to behave incorrectly, the worst that will happen is that the counter values may be invalid. So for the time being, simply comment-out the call to ptrace_check_attach() until a proper solution can be found using the utrace routines. Signed-off-by: Kevin Corry Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: perfmon_syscalls.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ====== 36438.diff ====== Subject: perfmon2: don't call rtas when counting cycles From: Kevin Corry Don't make the RTAS 'activate-signals' call for counters that are counting cycles, since the RTAS code will treat that as an error. Signed-off-by: Kevin Corry Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: perfmon_cell.c | 46 ++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 16 deletions(-) ====== 36439.diff ====== Subject: perfmon2: make pm_interval register read/write From: Kevin Corry The pm_interval register in the Cell PMU is read/write, but was implemented in the kernel as write-only. Previously, the written value was saved in a "shadow" copy so calls to cbe_read_pm() could return the value. Perfmon2 needs to be able to read the current values of pm_interval, so change cbe_read_pm() to read the actual register instead of the "shadow" copy. There is currently no code in the kernel that tries to read the pm_interval register with cbe_read_pm() (expecting to receive the "shadow" value), so this should not break any existing code. Signed-off-by: Kevin Corry Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ====== 36440.diff ====== Subject: perfmon2: context state value is not a mask From: Kevin Corry The 'state' field in the Perfmon2 context is not a mask, so we can't use the '&' operator. Signed-off-by: Kevin Corry Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: perfmon_cell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ====== 36441_1.diff ====== Subject: perfmon2: restructure pfm_cell_hw_smpl_handler From: Kevin Corry Restructure the pfm_cell_hw_smpl_handler() routine to make it a bit easier to understand, and to prepare for an upcoming patch for "partial" sample handling. Signed-off-by: Kevin Corry Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: perfmon_cell_hw_smpl.c | 150 ++++++++++++++++------------- 1 file changed, 86 insertions(+), 64 deletions(-) ====== 36441_2.diff ====== Subject: perfmon2: handle 'partial' samples in hardware-sampling mode From: Kevin Corry When a monitored process is being context-switched-out, or when we are switching event-sets, the Cell PMU trace-buffer will likely not be full, and will likely be in the middle of collecting the next sample to add to the trace-buffer. In this case, the entry that we record in the sampling-buffer will have one entry at the end that does not represent a complete time-interval. In order for user-space to know this has happened, we add a pm_interval field to the end of the pfm_cell_hw_smpl_entry_hdr structure. When this field is non-zero, it indicates that the very last sample in this entry is "partial", and also indicates how far through the current time-interval we were when we recorded this sample. And since the sample is incomplete, we have to record it directly from the counters instead of the trace-buffer. In this case, we also need to make sure the counters are reset to the appropriate value, since the next time this event set is enabled, it will start a new sampling time-interval. Signed-off-by: Kevin Corry Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/perfmon/perfmon_cell.c | 3 arch/powerpc/perfmon/perfmon_cell_hw_smpl.c | 69 ++++++++-- include/asm-powerpc/cell-pmu.h | 5 include/asm-powerpc/perfmon_cell_hw_smpl.h | 30 +++- 4 files changed, 88 insertions(+), 19 deletions(-) ====== 36499.diff ====== Subject: perfmon2: clear partial sample entry in occurence From: Kevin Corry When recording a partial sample, we only have access to the valid data in count mode. If we're sampling in occurrence or threshold mode, we need to clear the appropriate entry in the buffer, or there could be garbage data sent to user-space. Signed-off-by: Kevin Corry Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: perfmon_cell_hw_smpl.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) ====== 36859_1.diff ====== Subject: Don't access 'current' registers in interrupt handler From: Kevin Corry The pfm_cell_disable_counters() routine can be called during interrupt context, and if we are using hardware-sampling, the "current" thread's registers may not be available, and accessing them may cause a segfault. Since we don't actually use the "ip" and "regs" arguments in the hardware-sampling handler, we can just pass zeros and get rid of the reference to the "current" registers. Signed-off-by: Kevin Corry Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: perfmon_cell.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) ====== 36859_2.diff ====== Subject: Lock Perfmon context before calling hardware-sampling handler From: Kevin Corry In handle_trace_buffer_interrupts(), we need to lock the context before calling the hardware-sampling handler to prevent another CPU from operating on the context. This has to be done here, instead of in the handler itself, because pfm_cell_disable_counters(), which also calls the handler, is always called with the context already locked. Signed-off-by: Kevin Corry Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: perfmon_cell.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ====== 36859_3.diff ====== Subject: Don't make printk calls in an interrupt handler From: Kevin Corry Don't print log statements in the hardware-sampling interrupt handler. Making printk calls from an interrupt handler can cause problems. Remove all log messages from the Cell hardware-sampling code that can be called from an interrupt handler. Signed-off-by: Kevin Corry Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: perfmon_cell_hw_smpl.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) ====== 36741.diff ====== Subject: oprofile: provide a default for /dev/oprofile/implementation From: Kevin Corry Provide a default value for the /dev/oprofile/implementation file, since that field is only initialized on i386. Signed-off-by: Kevin Corry Signed-off-by: Arnd Bergmann --- diffstat: oprofile_files.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ====== 37064.diff ====== Subject: fix num_cpus calculation in smp_call_function_map(). From: Kevin Corry In smp_call_function_map(), num_cpus is set to the number of online CPUs minus one. However, if the CPU mask does not include all CPUs (except the one we're running on), the routine will hang in the first while() loop until the 8 second timeout occurs. The num_cpus should be set to the number of CPUs specified in the mask passed into the routine, after we've made any modifications to the mask. With this change, we can also get rid of the call to cpus_empty() and avoid adding another pass through the bitmask. Signed-off-by: Kevin Corry Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: smp.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) ====== 37225.diff ====== Subject: Perfmon2: Reset PMDs when handling a full sampling-buffer From: Kevin Corry In addition to resetting the counters to their "long" reset value after recording a partial sample, we also need to reset the counters while handling a full sampling-buffer. In handle_full_buffer, when we call pfm_mask_monitoring(), it will save the current PMD values. However, the counters were still running between the time the last sample was recorded in the buffer and the time when the counters were disabled in the interrupt handler. When the PMD values get restored later during pfm_unmask_monitoring(), it will restore these values, which effectively changes the initial values for the hardware-sampling. Also reset the interval timer so we start a new interval when monitoring is unmasked. Signed-off-by: Kevin Corry Signed-off-by: Carl Love Signed-off-by: Arnd Bergmann --- diffstat: perfmon_cell_hw_smpl.c | 39 +++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 7 deletions(-) ====== 36651.diff ====== Subject: spufs: block in spu_acquire_runnable From: Arnd Bergmann This patch disables the logic that under the covers faults in spu contexts from the page fault handler. For the upstream version, we want something similar, but this is a relatively straightforward patch to make the review easier. Signed-off-by: Arnd Bergmann --- diffstat: context.c | 1 + file.c | 25 ++++++++++++++++++------- sched.c | 1 + spufs.h | 1 + 4 files changed, 21 insertions(+), 7 deletions(-) ====== 38239_1.diff ====== diff-tree daced0f718b92b0bcdb9790622c255d4660f51ce (from 27b1ea091f0c088ecad0d492f37fbe7b8d54d7dc) Author: Jeremy Kerr Date: Fri Jul 20 21:39:35 2007 +0200 [CELL] spufs: fix array size of channel index Based on a fix from Masato Noguchi . Remove the (incorrect) array size declarations in the spufs channel arrays, and use ARRAY_SIZE rather than hardcoded values. Signed-off-by: Jeremy Kerr Signed-off-by: Arnd Bergmann --- diffstat: switch.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ====== 38239_2.diff ====== diff-tree cfd529b25d9b1d48423b85d76066348e2459e646 (from daced0f718b92b0bcdb9790622c255d4660f51ce) Author: Masato Noguchi Date: Fri Jul 20 21:39:36 2007 +0200 [CELL] spufs: remove needless context save/restore code The following steps are not needed in the SPE context save/restore paths: Save Step 12: save_mfc_decr() save suspend_time to CSA (It will be done by step 14) save ch 7 (decrementer value will be saved in LSCSA by spe-side step 10) Restore Step 59: restore_ch_part1() restore ch 1 (it will be done by spe-side step 15) This change removes the unnecessary steps. Signed-off-by: Masato Noguchi Signed-off-by: Jeremy Kerr Signed-off-by: Arnd Bergmann --- diffstat: switch.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) ====== 38239_3.diff ====== diff-tree 1cfc0f86eb0348dd04ace8c2171642ebe9cd87bb (from cfd529b25d9b1d48423b85d76066348e2459e646) Author: Masato Noguchi Date: Fri Jul 20 21:39:37 2007 +0200 [CELL] spufs: fix decr_status meanings The decr_status in the LSCSA is confusedly used as two meanings: * SPU decrementer was running * SPU decrementer was wrapped as a result of adjust and the code to set decr_status is missing. This patch fixes these problems by using the decr_status argument as a set of flags. This requires a rebuild of the shipped spu_restore code. Signed-off-by: Masato Noguchi Signed-off-by: Jeremy Kerr Signed-off-by: Arnd Bergmann --- diffstat: arch/powerpc/platforms/cell/spufs/spu_restore.c | 2 arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped | 472 +++++----- arch/powerpc/platforms/cell/spufs/switch.c | 12 include/asm-powerpc/spu_csa.h | 8 4 files changed, 270 insertions(+), 224 deletions(-) ====== 38239_4.diff ====== diff-tree d40a01d4f4f205d0645beb371edc153d9ec8fb9f (from 1cfc0f86eb0348dd04ace8c2171642ebe9cd87bb) Author: Masato Noguchi Date: Fri Jul 20 21:39:38 2007 +0200 [CELL] spufs: fix read and write for decr_status file The decr_status in the LSCSA is valid only in the sequence of context restore. Thus, it's nonsense to read and/or write it through spufs. This patch changes decr_status node to access MFC_CNTL[Ds] in the CSA. Signed-off-by: Masato Noguchi Signed-off-by: Jeremy Kerr Signed-off-by: Arnd Bergmann --- diffstat: file.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ====== 38239_5.diff ====== commit b8f209240a9f657ec0d83d9d8c788c6913fcaf50 Author: Jeremy Kerr Date: Wed Aug 29 14:01:56 2007 +1000 Fix restore_decr_wrapped() to match CBE Handbook Based on an original patch from Masato Noguchi . We're currently not restoring the SPE decrementer as specified by the CBE handbook. This change fixes our implementation to match, and makes the function read more like the docs. Signed-off-by: Jeremy Kerr --- diffstat: switch.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) ====== 38239_7.diff ====== diff-tree a103f347a5ae2735b9bf0a725a36c34be3f24c88 (from d40a01d4f4f205d0645beb371edc153d9ec8fb9f) Author: Masato Noguchi Date: Fri Jul 20 21:39:39 2007 +0200 [CELL] spufs: limit saving MFC_CNTL bits At save step 8, the mfc control register in the CSA should be written _only_ with Sc and Sm bits (at least MFC_CNTL[Dh] should be set to 0) Signed-off-by: Masato Noguchi Signed-off-by: Jeremy Kerr Signed-off-by: Arnd Bergmann --- diffstat: switch.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) ====== 38239_8.diff ====== diff-tree cf17df223c8cd56a92f34162f2a362eec9f4b157 (from a103f347a5ae2735b9bf0a725a36c34be3f24c88) Author: Masato Noguchi Date: Fri Jul 20 21:39:40 2007 +0200 [CELL] spufs: dont halt decrementer at restore step 47 No need to halt the SPE decrementer at context restore step 47, it will be done in step 7. Signed-off-by: Masato Noguchi Signed-off-by: Jeremy Kerr Signed-off-by: Arnd Bergmann --- diffstat: switch.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) ====== 38239_9.diff ====== SPU decrementer should be restored after waiting LSCSA CMA completion. Signed-off-by: Masato Noguchi --- arch/powerpc/platforms/cell/spufs/spu_restore.c | 4 - arch/powerpc/platforms/cell/spufs/spu_restore_dump.h_shipped | 36 +++++------ 2 files changed, 20 insertions(+), 20 deletions(-) --- diffstat: spu_restore.c | 4 +- spu_restore_dump.h_shipped | 36 ++++++++++++------------- 2 files changed, 20 insertions(+), 20 deletions(-) ====== 36651_2.diff ====== Subject: fix livelock introduced in previous patch From: Arnd Bergmann The patch labelled 'spufs: block in spu_acquire_runnable' introduced a possible livelock by not releasing the context semaphore in the error path of spufs_mfc_write, so fix that. Signed-off-by: Arnd Bergmann --- diffstat: file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)