aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc
AgeCommit message (Collapse)Author
2007-04-24[POWERPC] pasemi: PA6T oprofile supportOlof Johansson
Oprofile support for PA6T, kernel side. Also rename the PA6T_SPRN.* defines to SPRN_PA6T.*. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24[POWERPC] pasemi: Reset mpic on bootOlof Johansson
Reset MPIC on boot to clear some timer state that firmware might leave configured. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24[POWERPC] pasemi: Enable one more hid bitOlof Johansson
Minor HID change. Firmware can't know that we want this set so we have to set it in the kernel. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24[POWERPC] pasemi: Allow 8KB config space for I/O bridgeOlof Johansson
Device 0 function 0 on the root bus is really a two-function bus agent, but only the first function is visible. Because of this, we need to allow config accesses into the second range. Modify the check for valid offsets accordingly. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24[POWERPC] Fix PowerPC 750CL and 750GX CPU featuresJosh Boyer
PowerPC 750CL has high BATs. The patch below adds a CPU_FTRS_750CL that includes that. Without it, the original firmware mappings in the high BATs aren't cleared which continue to override the linux translations. It also adds CPU_FTR_COMMON to CPU_FTRS_750GX for completeness. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24[POWERPC] Rename last get_property callsStephen Rothwell
These got added recently. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-24Merge branch 'for-2.6.22' of ↵Paul Mackerras
master.kernel.org:/pub/scm/linux/kernel/git/arnd/cell-2.6 into for-2.6.22
2007-04-24Merge branch 'spufs' of ↵Paul Mackerras
master.kernel.org:/pub/scm/linux/kernel/git/arnd/cell-2.6 into for-2.6.22
2007-04-24Merge branch 'kconfig' of ↵Paul Mackerras
master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into for-2.6.22
2007-04-23[POWERPC] update cell_defconfigArnd Bergmann
Sync with the Kconfig changes, and enable some options for celleb Cc: Ishizaki Kou <kou.ishizaki@toshiba.co.jp> Signed-off-by: Jens Osterkamp <jens@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] cell: enable RTAS-based PTCAL for Cell XDR memoryJeremy Kerr
Enable Periodic Recalibration (PTCAL) support for Cell XDR memory, using the new ibm,cbe-start-ptcal and ibm,cbe-stop-ptcal RTAS calls. Tested on QS20 and QS21 (by Thomas Huth). It seems that SLOF has problems disabling, at least on QS20; this patch should only be used once these problems have been addressed. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] cell: add support for proper device-treeChristian Krafft
This patch adds support for a proper device-tree. A porper device-tree on cell contains be nodes for each CBE containg nodes for SPEs and all the other special devices on it. Ofcourse oldschool devicetree is still supported. Signed-off-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] add of_iomap functionChristian Krafft
The of_iomap function maps memory for a given device_node and returns a pointer to that memory. This is used at some places, so it makes sense to a seperate function. Signed-off-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] pmi probe device by device-typeChristian Krafft
At the moment the pmi device driver is probing for devices with a given type and a given name. As there may be devices of the same type but with a different name, probing should be done also for device type only. Signed-off-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] add check for initialized driver data to pmi driverChristian Krafft
This patch adds a check for the private driver data to be initialized. The bug showed up, as the caller found a pmi device by it's type. Whereas the pmi driver probes for the type and the name. Since the name was not as the driver expected, it did not initialize. A more relaxed probing will be supplied with an extra patch, too. Signed-off-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] cell: use pmi in cpufreq driverChristian Krafft
The new PMI driver was added in order to support cpufreq on blades that require the frequency to be controlled by the service processor, so use it on those. Signed-off-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] cbe_thermal: add throttling attributes to cpu and spu nodesChristian Krafft
This patch adds some attributes the cpu and spu nodes: /sys/devices/system/[c|s]pu/[c|s]pu*/thermal/throttle_begin /sys/devices/system/[c|s]pu/[c|s]pu*/thermal/throttle_end /sys/devices/system/[c|s]pu/[c|s]pu*/thermal/throttle_full_stop Signed-off-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] cbe_thermal: clean up computation of temperatureChristian Krafft
This patch introduces a little function for transforming register values into temperature. Signed-off-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] cell: add cbe_node_to_cpu functionChristian Krafft
This patch adds code to deal with conversion of logical cpu to cbe nodes. It removes code that assummed there were two logical CPUs per CBE. Signed-off-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spu_base: fix initialisation on systems with no SPEsJeremy Kerr
This change fixes the case where spu_base and spufs are initialised on a system with no SPEs - unconditionally create the spu_lists so spu_alloc doesn't explode, and check for spu_management ops before starting spufs. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> arch/powerpc/platforms/cell/spu_base.c | 7 ++++--- arch/powerpc/platforms/cell/spufs/inode.c | 5 +++++ 2 files changed, 9 insertions(+), 3 deletions(-)
2007-04-23[POWERPC] spu_base: remove cleanup_spu_baseChristoph Hellwig
spu_base.c is always built into the kernel image, so there is no need for a cleanup function. And some of the things it does are in the way for my following patches, so I'd rather get rid of it ASAP. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: various run.c cleanupsChristoph Hellwig
- remove the spu_acquire_runnable from spu_run_init. I need to opencode it in spufs_run_spu in the next patch - remove various inline attributes, we don't really want to inline long functions with multiple callsites - cleanup return values and runcntl_write calls in spu_run_init - use normal kernel codingstyle in spu_reacquire_runnable Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: enable SPU coredump for kernel-builtin spufsAkinobu Mita
spu_coredump_calls.owner is NULL in case of a builtin spufs, so the checks in here break. Check for the availability of the spu_coredump_calls variable instead. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: fix memory leak on coredumpArnd Bergmann
Dynamically allocated read/write buffer in spufs_arch_write_note() will not be freed. Convert it to get_free_page at the same time. Cc: Akinobu Mita <mita@fixstars.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: Minor cleanup of spu_waitJeremy Kerr
Change the loop in spu_wait to be a little more straightforward. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: add mode= mount optionJeremy Kerr
Add a 'mode=' option to spufs mount arguments. This allows more control over access to the top-level spufs directory. Tested on Cell. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: use memcpy_fromio() to copy from local storeAkinobu Mita
GCC may generates inline copy loop to handle memcpy() function instead of kernel defined memcpy(). But this inlined version of memcpy() causes an alignment interrupt when copying from local store. This patch uses memcpy_fromio() and memcpy_toio to copy local store to prevent memcpy() being inlined. Signed-off-by: Akinobu Mita <mita@fixstars.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: avoid spurious memory barriersChristoph Hellwig
We now have proper locking around assignets of the mapping pointers, and the spin_unlock implies enough of a barrier to get rid of the explicit one. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: fix memory leak on spufs reloadingAkinobu Mita
When SPU isolation mode enabled, isolated_loader would be allocated by spufs_init_isolated_loader() on module_init(). But anyone do not free it. This patch introduces spufs_exit_isolated_loader() which is the opposite of spufs_init_isolated_loader() and called on module_exit(). Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Akinobu Mita <mita@fixstars.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: fix missing error handling in module_init()Akinobu Mita
spufs module_init forgot to call a few cleanup functions on error path. This patch also includes cosmetic changes in spu_sched_init() (identation fix and return error code). [modified by hch to apply ontop of the latest schedule changes] Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Akinobu Mita <mita@fixstars.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: check spu_acquire_runnable() return valueAkinobu Mita
This patch checks return value of spu_acquire_runnable() in spufs_mfc_write(). Signed-off-by: Akinobu Mita <mita@fixstars.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: turn run_sema into run_mutexChristoph Hellwig
There is no reason for run_sema to be a struct semaphore. Changing it to a mutex and rename it accordingly. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: provide siginfo for SPE faultsJeremy Kerr
This change populates a siginfo struct for SPE application exceptions (ie, invalid DMAs and illegal instructions). Tested on an IBM Cell Blade. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: make spu page faults not block schedulingArnd Bergmann
Until now, we have always entered the spu page fault handler with a mutex for the spu context held. This has multiple bad side-effects: - it becomes impossible to suspend the context during page faults - if an spu program attempts to access its own mmio areas through DMA, we get an immediate livelock when the nopage function tries to acquire the same mutex This patch makes the page fault logic operate on a struct spu_context instead of a struct spu, and moves it from spu_base.c to a new file fault.c inside of spufs. We now also need to copy the dar and dsisr contents of the last fault into the saved context to have it accessible in case we schedule out the context before activating the page fault handler. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spu_base: move spu_init_channels out of spu_mutexChristoph Hellwig
There is no reason to execute spu_init_channels under spu_mutex after the spu has been taken off the freelist it's ours. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spu sched: make addition to stop_wq and runque atomic vs wakeupLuke Browning
Addition to stop_wq needs to happen before adding to the runqeueue and under the same lock so that we don't have a race window for a lost wake up in the spu scheduler. Signed-off-by: Luke Browning <lukebrowning@us.ibm.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: streamline locking for isolated spu setupChristoph Hellwig
For quite a while now spu state is protected by a simple mutex instead of the old rw_semaphore, and this means we can simplify the locking around spu_setup_isolated a lot. Instead of doing an spu_release before entering spu_setup_isolated and then calling the complicated spu_acquire_exclusive we can now simply enter the function locked an in guaranteed runnable state, so that the only bit of spu_acquire_exclusive that's left is the call to spu_unmap_mappings. Similarly there's no more need to unlock and reacquire the state_mutex when spu_setup_isolated is done, but we can always return with the lock held and only drop it in spu_run_init in the failure case. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: remove woken threads from the runqueue earlyChristoph Hellwig
A single context should only be woken once, and we should not have more wakeups for a given priority than the number of contexts on that runqueue position. Also add some asserts to trap future problems in this area more easily. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: add memory barriers after set_bitArnd Bergmann
set_bit does not guarantee ordering on powerpc, so using it for communication between threads requires explicit mb() calls. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spu sched: ensure preempted threads are put back on the runqueue, ↵Christoph Hellwig
part2 To not lose a spu thread we need to make sure it always gets put back on the runqueue. In find_victim aswell as in the scheduler tick as done in the previous patch. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spu sched: ensure preempted threads are put back on the runqueueChristoph Hellwig
To not lose a spu thread we need to make sure it always gets put back on the runqueue. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: clear mapping pointers after last closeChristoph Hellwig
Make sure the pointers to various mappings are cleared once the last user stopped using them. This avoids accessing freed memory when tearing down the gang directory aswell as optimizing away pte invalidations if no one uses these. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-23[POWERPC] spufs: use cancel_rearming_delayed_workqueue when stopping spu ↵Christoph Hellwig
contexts The scheduler workqueue may rearm itself and deadlock when we try to stop it. Put a flag in place to avoid skip the work if we're tearing down the context. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-04-13[POWERPC] Fix detection of loader-supplied initrd on OF platformsPaul Mackerras
Commit 79c8541924a220964f9f2cbed31eaa9fdb042eab introduced code to move the initrd if it was in a place where it would get overwritten by the kernel image. Unfortunately this exposed the fact that the code that checks whether the values passed in r3 and r4 are intended to indicate the start address and size of an initrd image was not as thorough as the kernel's checks. The symptom is that on OF-based platforms, the bootwrapper can cause an exception which causes the system to drop back into OF. Previously it didn't matter so much if the code incorrectly thought that there was an initrd, since the values for start and size were just passed through to the kernel. Now the bootwrapper needs to apply the same checks as the kernel since it is now using the initrd data itself (in the process of copying it if necessary). This adds the code to do that. Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-04-12[POWERPC] Miscellaneous arch/powerpc Kconfig and platform/Kconfig cleanupKumar Gala
* Cleaned up some whitespace in arch/powerpc/Kconfig * Moved sourcing of platforms/embedded6xx/Kconfig into platform/Kconfig * Moved sourcing of platforms/4xx/Kconfig into platform/Kconfig and disabled it * Removed EMBEDDEDBOOT since its not supported in arch/powerpc * Removed PC_KEYBOARD since its not used anywhere * Moved a few CONFIG options around in platform/Kconfig * Moved interrupt controllers into platform/Kconfig out of bus section Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-04-12[POWERPC] Convert 85xx platform to unified platform KconfigKumar Gala
Moved 85xx platform Kconfig over to being sourced by the unified arch/powerpc/platforms/Kconfig. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-04-12[POWERPC] Convert 8xx platform to unified platform KconfigKumar Gala
Moved 8xx platform Kconfig over to being sourced by the unified arch/powerpc/platforms/Kconfig. Also, cleaned up whitespace issues in 8xx Kconfig. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-04-12[POWERPC] Convert 82xx platform to unified platform KconfigKumar Gala
Moved 82xx platform Kconfig over to being sourced by the unified arch/powerpc/platforms/Kconfig. Also, cleaned up whitespace issues in 82xx Kconfig. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-04-12[POWERPC] Convert 83xx platform to unified platform KconfigKumar Gala
Moved 83xx platform Kconfig over to being sourced by the unified arch/powerpc/platforms/Kconfig. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-04-12[POWERPC] Convert 86xx platform to unified platform KconfigKumar Gala
Moved 86xx platform Kconfig over to being sourced by the unified arch/powerpc/platforms/Kconfig. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>