- Jun 30, 2008
-
-
Arnd Bergmann authored
We need to disable ptcal before starting a new kernel after a crash, in order to avoid overwriting data in the kdump kernel. Signed-off-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
Jeremy Kerr <jk@ozlabs.org> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
Nicholas Piggin authored
Signed-off-by:
Nick Piggin <npiggin@suse.de> Acked-by:
Jeremy Kerr <jk@ozlabs.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Acked-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
- Jun 16, 2008
-
-
Luke Browning authored
There is a delay in the transition to the stopped state for class 2 interrupts. In some cases, the controlling thread detects the state of the spu as running, and goes back to sleep resulting in a hung application as the event is missed. This change detects the stop condition and re-generates the wakeup event after a context save. Signed-off-by:
Luke Browning <lukebrowning@us.ibm.com> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Luke Browning authored
Time slicing can occur at the same time as spu exception handling resulting in the wakeup of the wrong thread. This change uses the the spu's register_lock to enforce synchronization between bind/unbind and spu exception handling so that they are mutually exclusive. Signed-off-by:
Luke Browning <lukebrowning@us.ibm.com> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Luke Browning authored
According to the CBEA, the SPU dsisr is not updated for class 0 exceptions. spu_stopped() is testing the dsisr that was passed to it from the class 0 exception handler, so we return a false positive here. This patch cleans up the interrupt handler and erroneous tests in spu_stopped. It also removes the fields from the csa since it is not needed to process class 0 events. Signed-off-by:
Luke Browning <lukebrowning@us.ibm.com> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Luke Browning authored
If the spu is stopping (ie, the SPU_STATUS_RUNNING bit is still set), re-read the register to get the final stopped value. Signed-off-by:
Luke Browning <lukebrowning@us.ibm.com> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
- Jun 09, 2008
-
-
Michael Ellerman authored
When I changed irq_alloc_host() to take an of_node (52964f87: "Add an optional device_node pointer to the irq_host"), I botched the reference counting semantics. Stephen pointed out that it's irq_alloc_host()'s business if it needs to take an additional reference to the device_node, the caller shouldn't need to care. Signed-off-by:
Michael Ellerman <michael@ellerman.id.au> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
Michael Ellerman authored
If we do the call to irq_of_parse_and_map() first, then we don't need to worry about freeing the irq_host. Signed-off-by:
Michael Ellerman <michael@ellerman.id.au> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
- Jun 04, 2008
-
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- May 23, 2008
-
-
Michael Ellerman authored
This adds some debugging code to the Axon MSI driver. It creates a file per MSIC in /sys/kernel/debug/powerpc, which allows the user to trigger a fake MSI interrupt by writing to the file. This can be used to test some of the MSI generation path. In particular, that the MSIC recognises a write to the MSI address, generates an interrupt and writes the MSI packet into the ring buffer. All the code is inside #ifdef DEBUG so it causes no harm unless it's enabled. Signed-off-by:
Michael Ellerman <michael@ellerman.id.au> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
- May 15, 2008
-
-
Ishizaki Kou authored
Fix following warnings: WARNING: arch/powerpc/platforms/cell/built-in.o(.devinit.text+0x9c): Section mismatch in reference from the function .cell_setup_phb() to the function .init.text:.iowa_register_bus() WARNING: arch/powerpc/platforms/cell/built-in.o(.devinit.text+0xa4): Section mismatch in reference from the function .cell_setup_phb() to the function .init.text:.io_workaround_init() Signed-off-by:
Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
FUJITA Tomonori authored
With CONFIG_VIRT_CPU_ACCOUNTING disabled, I got the following error: linux-2.6/arch/powerpc/platforms/cell/spufs/file.c: In function 'spu_switch_log_notify': linux-2.6/arch/powerpc/platforms/cell/spufs/file.c:2542: error: implicit declaration of function 'get_tb' make[4]: *** [arch/powerpc/platforms/cell/spufs/file.o] Error 1 Signed-off-by:
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
Luke Browning authored
If victim (not ctx) is in spu_run, add victim to rq. Signed-off-by:
Luke Browning <lukebrowning@us.ibm.com> Acked-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
- May 08, 2008
-
-
Christoph Hellwig authored
We need to acquire the parent i_mutex with I_MUTEX_PARENT to keep lockdep happy. Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Christoph Hellwig authored
We should not requeue the victim context in find_victim if the owner is not in spu_run. It's first not needed because leaving the context on the spu is an optimization and second is harmful because it means the owner could re-enter spu_run when the context is on the runqueue and trip the BUG_ON in __spu_update_sched_info. Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
- May 05, 2008
-
-
Christoph Hellwig authored
Creating a spufs context or gand using spu_create should send an inotify event so that things like performance monitors have an easy way to find out about newly created contexts. Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Luke Browning authored
Currently, page fault handlers don't issue a mfc restart if the context switch pending flag is set, which can leave us with a hanging DMA after a context restore. This patch introduces fault pending flag that is set by the fault handler and read by the context switch code, so that the latter can add the restart bit at the right spot, after it has successfuly saved the state of the mfc control register. Signed-off-by:
Luke Browning <lukebr@linux.vnet.ibm.com> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Luke Browning authored
SPU class 0 & 1 exceptions may occur in parallel, so we may end up overwriting csa.dsisr. This change adds dedicated fields for each class to the spu and the spu context so that fault data is not overwritten. Signed-off-by:
Luke Browning <lukebr@linux.vnet.ibm.com> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Luke Browning authored
Currently, we re-route SPU interrupts to the current cpu, which may be on a remote node. In the case of time slicing, all spu interrupts will end up routed to the same cpu, where the spusched_tick occurs. This change routes mfc interrupts to the cpu where the controlling thread last ran, provided that cpu is on the same node as the spu (otherwise don't reroute interrupts). This should improve performance and provide a more predictable environment for processing spu exceptions. In the past we have seen concurrent delivery of spu exceptions to two cpus. This eliminates that concern. Signed-off-by:
Luke Browning <lukebr@linux.vnet.ibm.com> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Luke Browning authored
synchronize_irq() provides the serialization for SPU_CONTEXT_SWITCH_PENDING which is read with a simple load. This routine guarantees that the relevant interrupt handlers are not running, so that the next time they do run they will see the update memory value. This must be done correctly so that exception handling code does not restart the mfc in the middle of a context switch while we are trying to atomically stop it and save state. Signed-off-by:
Luke Browning <lukebr@linux.vnet.ibm.com> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Jeremy Kerr authored
There's currently no way to tell if spu_process_callback has returned with the state mutex held, as -EINTR may be returned by either the syscall or the spu_acquire fail case. Instead, just do a non-interruptible mutex_lock here. Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Jeremy Kerr authored
Currently, we update the SPU master run control bit (ie, spu_enable_spu) in spufs_run_spu before we grab the context mutex. This can result in races with other processes accessing this context's resources. This change moves the spu_enable_spu to after we have acquired the context lock. Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Jeremy Kerr authored
We currently have two issues with the MFC save code: * save_mfc_decr doesn't handle a transition of 1 -> 0 of the Ds bit * The Q bit may be stale in the CSA This change fixes the first issue by clearing the relevant bits from the MFC_CNTL value in the CSA before or-ing in the updated status. Also, we add the Q bit to the updated status. Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Jeremy Kerr authored
Currently, we can introduce invalid entries into the MFC queues: 1) context starts a DMA 2) context gets scheduled out during a DMA - kernel saves MFC queue to CSA - kernel saves 0x0 in csa->mfc_control_RW 3) context gets scheduled in - csa->mfc_control[Q] ('queues empty') isn't set, so DMA queues are restored from the CSA 4) context's DMA is completed 5) context gets scheduled out again, no DMA occuring this time - kernel sees that MFC_CNTL[Q] ('queues empty') is set, so doesn't touch saved queue data in CSA - kernel saves 0x0 in csa->mfc_control_RW 6) context gets scheduled in - csa->mfc_control[Q] ('queues empty') isn't set (we saved is as 0!), so DMA queues are restored from the CSA In this last restore, we've restored the queue status from step 2, which are now invalid. This change makes save_mfc_cntl() closer to the save/restore sequence, as specified in the CBE handbook. With changes from Luke Browning. Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Jeremy Kerr authored
When we issue a MFC purge request, we may inadvertantly clear the suspended status. This change adds the MFC_CNTL_SUSPEND_MASK when we issue a purge request, so that the suspend bit is masked out. Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Jeremy Kerr authored
We may currently lose interrupts during SPE context switch, as we alter the INT_Route register. Because the IIC uses a per-thread priority status, changing the interrupt routing to a different thread means that the IRQ is no longer masked by the priority status, so we end up with two fasteoi IRQ handlers executing for the one irq_desc. The fasteoi handler doesn't handle multiple IRQs, so drops the second one. Fix this by using our own flow handler. This is based on handle_edge_irq, but issues an eoi after IRQs are handled, and doesn't do any mask/unmasking. Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
- May 01, 2008
-
-
Al Viro authored
Initial splitoff of the low-level stuff; taken to fdtable.h Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- Apr 30, 2008
-
-
Kumar Gala authored
Signed-off-by:
Kumar Gala <galak@kernel.crashing.org> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Julio M. Merino Vidal authored
The sputrace module contained a trace entry for spu_acquire_saved, but this marker was not placed anywhere. Fix this by adding a marker to the routine. Signed-off-by:
Julio M. Merino Vidal <jmerino@ac.upc.edu> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Julio M. Merino Vidal authored
Fix a typo in the marker for the find_victim function, which prevented it from being traced. It previously read find_vitim. Signed-off-by:
Julio M. Merino Vidal <jmerino@ac.upc.edu> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Julio M. Merino Vidal authored
The sputrace module contained a reference to a marker for destroy_spu_context, but this marker did not appear in the code. Fix this by adding a marker in the function. Signed-off-by:
Julio M. Merino Vidal <jmerino@ac.upc.edu> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Julio M. Merino Vidal authored
The markers facility defines the marker parameters to be of the form 'name %format'. Add parameter names to sputrace, to specify the context and %spu paramerters, instead of just specifying the '%format' part. Signed-off-by:
Julio M. Merino Vidal <jmerino@ac.upc.edu> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
Christoph Hellwig authored
There are userspace instrumentation tools that need to monitor spu context switches. This patch adds a new file called 'switch_log' to each spufs context directory that can be used to monitor the context switches. Context switch in/out and exit from spu_run are monitored after the file was first opened and can be read from it. Signed-off-by:
Christoph Hellwig <hch@lst.de> Signed-off-by:
Jeremy Kerr <jk@ozlabs.org>
-
- Apr 29, 2008
-
-
Denis V. Lunev authored
Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Add correct ->owner to proc_fops to fix reading/module unloading race. Signed-off-by:
Denis V. Lunev <den@openvz.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Apr 28, 2008
-
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- Apr 24, 2008
-
-
Ishizaki Kou authored
This adds support for PCI Express port on Celleb. I/O space of this PCI Express port is not mapped in memory space. So we use the io-workaround mechanism to make accesses indirect. Signed-off-by:
Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Acked-by:
Arnd Bergmann <arnd@arndb.de> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
Ishizaki Kou authored
This moves miscellaneous files for Beat into platforms/cell/. All files in this patch are used by celleb-beat only. Signed-off-by:
Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Acked-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
Ishizaki Kou authored
This moves SPU support code on Beat into platforms/cell/. Signed-off-by:
Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Acked-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
Ishizaki Kou authored
This moves files for mmu and iommu on Beat into platforms/cell/. All files in this patch are used by celleb-beat only. Signed-off-by:
Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Acked-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-
Ishizaki Kou authored
This moves files for Beat hvcall interfaces into platforms/cell/. All files in this patch are used by celleb-beat only. Signed-off-by:
Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Acked-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
Paul Mackerras <paulus@samba.org>
-