====== 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(-) ====== 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(-)