aboutsummaryrefslogtreecommitdiffstats
path: root/arch (follow)
AgeCommit message (Collapse)AuthorFilesLines
2007-02-13Merge master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpcLinus Torvalds80-1349/+8052
* master.kernel.org:/pub/scm/linux/kernel/git/paulus/powerpc: (61 commits) [POWERPC] Use udbg_early_init() on ppc32 [POWERPC] Open Firmware serial port driver [POWERPC] Move MPIC smp routines into mpic.c [POWERPC] Cleanup pseries kexec code [POWERPC] Cleanup pseries smp initialisation code [POWERPC] Consolidate pseries platform header files into pseries.h [POWERPC] 85xx: Drop use of SYNC macro in head_fsl_booke.S [POWERPC] cell: pm_rtas_activat_signals routine cleanup [POWERPC] cell: PPU Oprofile cleanup patch [POWERPC] spufs: avoid accessing kernel memory through mmapped /mem node [POWERPC] spu sched: static timeslicing for SCHED_RR contexts [POWERPC] spu sched: use DECLARE_BITMAP [POWERPC] spu sched: forced preemption at execution [POWERPC] spu sched: update some comments [POWERPC] spu sched: simplity spu_remove_from_active_list [POWERPC] spufs: optimize spu_run [POWERPC] spufs: runqueue simplification [POWERPC] spufs: move prio to spu_context [POWERPC] spufs: state_mutex cleanup [POWERPC] spufs: simplify state_mutex ...
2007-02-14[POWERPC] Use udbg_early_init() on ppc32David Gibson3-6/+13
udbg_early_init() is a function used on 64 bit systems, which initializes whichever early udbg backend is configured. This function is not called on 32-bit, however if btext early debug is enabled it does have an explicit, inline, #ifdef-ed assignment performing analagous initialization. This patch makes things more uniform by folding the btext initialization as an option into udbg_early_init() and calling that from the 32-bit setup path. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-14[POWERPC] Open Firmware serial port driverArnd Bergmann1-0/+15
This can be used for serial ports that are connected to an OF platform bus but are not autodetected by the lecacy serial support. It will automatically take over devices that come from the legacy serial detection, which usually is only one device. In some cases, rtas may be set up to use the serial port in the firmware, which allows easier debugging before probing the serial ports. In this case, the "used-by-rtas" property must be set by the firmware. This patch also adds code to the legacy serial driver to check for this. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-14[POWERPC] Move MPIC smp routines into mpic.cMichael Ellerman2-23/+21
Move a couple of MPIC smp routines into mpic.c, they're inside an SMP block in mpic.c - so they're still only built for SMP. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-14[POWERPC] Cleanup pseries kexec codeMichael Ellerman4-48/+83
Move all the pseries kexec code into one file, platforms/pseries/kexec.c Provide helpers for setting up ppc_md.kexec_cpu_down, so that we don't have to have #ifdef CONFIG_KEXEC in setup.c Move the initialisation of the ppc_md kexec callbacks into an init routine. This is well and truly early enough to cause no change in behaviour, we can't kexec until userspace has given us a kernel to kexec into. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-14[POWERPC] Cleanup pseries smp initialisation codeMichael Ellerman3-6/+9
Move some extern declarations from setup.c into the new pseries.h. While we're at it, provide dummy implementations for !SMP, to avoid cluttering the C file with more #ifdefs. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-14[POWERPC] Consolidate pseries platform header files into pseries.hMichael Ellerman5-29/+23
Following the example of platforms/pasemi, consolidate a couple of tiny header files in platforms/pseries into pseries.h. This gives us a convenient place to put things that need to be available to the platform code, but not public. And hopefully will help people resist the temptation of sticking externs in C files. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-14Merge branch 'cell-merge' of git+ssh://master.kernel.org/pub/scm/linux/kernel/git/arnd/cell-2.6Paul Mackerras8-273/+473
2007-02-13Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds19-1084/+305
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code. [MIPS] Fix uniprocessor Sibyte builds. [MIPS] Make entry.S a little more readable. [MIPS] Remove stray instruction from __get_user_asm_ll32. [MIPS] 32-bit: Fix warning about cast for fetching pointer from userspace. [MIPS] DECstation: Fix irq handling [MIPS] signals: make common _BLOCKABLE macro [MIPS] signal: Move sigframe definition for native O32/N64 into signal.c [MIPS] signal: Move {restore,setup}_sigcontext prototypes to their user [MIPS] signal: Fix warnings in o32 compat code. [MIPS] IP27: Enable N32 support in defconfig. Revert "[MIPS] Fix warning in get_user when fetching pointer object from userspace." [MIPS] Don't claim we support dma_declare_coherent_memory - we don't. [MIPS] Unify dma-{coherent,noncoherent.ip27,ip32} [MIPS] Improve branch prediction in ll/sc atomic operations.
2007-02-13[MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.Ralf Baechle5-9/+60
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13[MIPS] Fix uniprocessor Sibyte builds.Andrew Sharp1-0/+6
Signed-off-by: Andrew Sharp <tigerand@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13[MIPS] Make entry.S a little more readable.Franck Bui-Huu1-11/+8
When CONFIG_PREEMPT is not set, it also moves one branch instruction from ret_from_irq() to ret_from_exception(). Therefore we favour the return from irq case which should be more common than the other one. Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13[MIPS] DECstation: Fix irq handlingAtsushi Nemoto1-4/+0
When I post a patch (commit f431baa55abf8adeed0c718b51deacbc151f58f1), I just tried to not change behavior of existing codes, but it seems dec/int-handler.S had been broken since its previous commit 937a801576f954bd030d7c4a5a94571710d87c0b. The caller of plat_irq_dispatch do setup/restore TI_REGS($28), so dec's plat_irq_dispatch should not do it, and there is no need to adjust RA. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13[MIPS] signals: make common _BLOCKABLE macroFranck Bui-Huu4-6/+2
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13[MIPS] signal: Move sigframe definition for native O32/N64 into signal.cRalf Baechle2-26/+20
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13[MIPS] signal: Move {restore,setup}_sigcontext prototypes to their userRalf Baechle2-6/+4
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13[MIPS] signal: Fix warnings in o32 compat code.Ralf Baechle1-3/+23
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13[MIPS] IP27: Enable N32 support in defconfig.Ralf Baechle1-1/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13[MIPS] Unify dma-{coherent,noncoherent.ip27,ip32}Ralf Baechle8-1020/+183
Platforms will now have to supply a function dma_device_is_coherent which returns if a particular device participates in the coherence domain. For most platforms this function will always return 0 or 1. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-02-13Merge branch '85xx' into for_paulusKumar Gala2-4/+0
2007-02-13[POWERPC] 85xx: Drop use of SYNC macro in head_fsl_booke.SBecky Bruce2-4/+0
Eliminate needless invocation of the SYNC macro (which always evaluates to nothing on BookE) from head_fsl_booke.S (for both arch/ppc & arch/powerpc). Signed-off-by: Becky Bruce <becky.bruce@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-13[POWERPC] cell: pm_rtas_activat_signals routine cleanupMaynard Johnson1-16/+33
The code was setting up the debug bus for group 21 when profiling on the event PPU CYCLES. The debug bus is not actually used by the hardware performance counters when counting PPU CYCLES. Setting up the debug bus for PPU CYCLES causes signal routing conflicts on the debug bus when profiling PPU cycles and another PPU event. This patch fixes the code to only setup the debug bus to route the performance signals for the non PPU CYCLE events. Signed-off-by: Maynard Johnson <mpjohn@us.ibm.com> Signed-off-by: Carl Love <carll@us.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] cell: PPU Oprofile cleanup patchCarl Love2-51/+67
This is a clean up patch that includes the following changes: -Some comments were added to clarify the code based on feedback from the community. -The write_pm_cntrl() and set_count_mode() were passed a structure element from a global variable. The argument was removed so the functions now just operate on the global directly. -The set_pm_event() function call in the cell_virtual_cntr() routine was moved to a for-loop before the for_each_cpu loop Signed-off-by: Carl Love <carll@us.ibm.com> Signed-off-by: Maynard Johnson <mpjohn@us.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: avoid accessing kernel memory through mmapped /mem nodeMasato Noguchi1-0/+3
I found an exploit in current kernel. Currently, there is no range check about mmapping "/mem" node in spufs. Thus, an application can access privilege memory region. In case this kernel already worked on a public server, I send this information only here. If there are such servers in somewhere, please replace it, ASAP. Signed-off-by: Masato Noguchi <Masato.Noguchi@jp.sony.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spu sched: static timeslicing for SCHED_RR contextsChristoph Hellwig4-3/+56
For SCHED_RR tasks we can do some really trivial timeslicing. Basically we fire up a time for every scheduler tick that searches for a higher or same priority thread that is on the runqueue and if there is one context switches to it. Because we can't lock spus from timer context we actually run this from a delayed runqueue instead of a timer. A nice optimization would be to skip the actual priority bitmap search when there are less contexts than physical spus available. To implement this I need a so far unpublished patch from Andre, and it will be added after we have that patch in. Note that right now we only do the time slicing for SCHED_RR tasks. The code would work for SCHED_OTHER tasks aswell, but their prio value is defered from the one the PPU thread has at time of spu_run, and using this for spu scheduling decisions would make the code very unfair. SCHED_OTHER support will be enabled once we the spu scheduler knows how to calculcate cpu_context.prio (very soon) Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spu sched: use DECLARE_BITMAPChristoph Hellwig1-2/+1
use DECLARE_BITMAP in the spu scheduler instead of reimplementing it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spu sched: forced preemption at executionChristoph Hellwig3-0/+76
If we start a spu context with realtime priority we want it to run immediately and not wait until some other lower priority thread has finished. Try to find a suitable victim and use it's spu in this case. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spu sched: update some commentsChristoph Hellwig1-8/+8
Give spu_yield a kerneldoc comment and remove the old comment documenting spu_activate, spu_deactive and spu_yield as all of them now have descriptive kerneldoc comments of their own. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spu sched: simplity spu_remove_from_active_listChristoph Hellwig1-29/+15
If we call spu_remove_from_active_list that spu is always guaranteed to be on the active list and in runnable state, so we can simply do a list_del to remove it and unconditionally take the was_active codepath. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: optimize spu_runChristoph Hellwig5-12/+23
There is no need to directly wake up contexts in spu_activate when called from spu_run, so add a flag to surpress this wakeup. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: runqueue simplificationChristoph Hellwig2-67/+93
This is the biggest patch in this series, and it reworks the guts of the spu scheduler runqueue mechanism: - instead of embedding a waitqueue in the runqueue there is now a simple doubly-linked list, the actual wakeups happen by reusing the stop_wq in the spu context (maybe we should rename it one day) - spu_free and spu_prio_wakeup are merged into a single spu_reschedule function - various functionality is split out into small helpers, and kerneldoc comments are added in various places to document what's going on. - spu_activate is rewritten into a tight loop by removing test for various impossible conditions and using the infrastructure in this patch. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: move prio to spu_contextChristoph Hellwig4-8/+6
It doesn't make any sense to have a priority field in the physical spu structure. Move it into the spu context instead. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: state_mutex cleanupChristoph Hellwig3-53/+64
Various cleanups in code surrounding the state semaphore: - inline spu_acquire/spu_release - cleanup spu_acquire_* and add kerneldoc comments to these functions - remove spu_release_exclusive and replace it with spu_release Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: simplify state_mutexChristoph Hellwig3-30/+17
The r/w semaphore to lock the spus was overkill and can be replaced with a mutex to make it faster, simpler and easier to debug. It also helps to allow making most spufs interruptible in future patches. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: sched.c cleanupsChristoph Hellwig1-37/+61
Various cleanups to sched.c that don't change the global control flow: - add kerneldoc comments to various functions - add spu_ prefixes to various functions - add/remove context from the runqueue in bind/unbind_context as it's part of the logical operation - add a call to put_active_spu to spu_unbind_contex as it's logically part of the unbind operation Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: bind_context sets SPU_STATE_RUNNABLEChristoph Hellwig2-2/+2
Only bind_context/unbind_context change the spu context state. Thus we can move all assignents of SPU_STATE_RUNNABLE into bind_context, which parallels the unbind side aswell. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: remove superfluous SPU_STATE_SAVED assignmentsChristoph Hellwig2-4/+1
unbind_context already sets the context state to SPU_STATE_SAVED, thus the spu_deactivate callers don't need to do it again. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: remove empty last line in run.cChristoph Hellwig1-1/+0
Remove the empty last line in arch/powerpc/platforms/cell/spufs/run.c. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13[POWERPC] spufs: remove SPU_CONTEXT_PREEMPTChristoph Hellwig1-3/+0
Remove the SPU_CONTEXT_PREEMPT define. It's unused and won't be used in this form after the scheduler rework. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
2007-02-13Merge branch '83xx' into for_paulusKumar Gala3-172/+1421
2007-02-13[POWERPC] 83xx: Updated mpc834x_itx_defconfigTimur Tabi1-172/+60
This patch updates the defconfig for the MPC8349E-mITX. In addition to picking up changes from recent kernels, disables support for e100 (which doesn't ship with the system), turns off input devices, turns on some I2C support, turns off HW monitoring (HW not yet supported), turns off OHCI USB (not used), turns off USB gadget support (HW not yet supported), turns on DOS FS support, and turns off kernel debugging. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-13[POWERPC] 83xx: Add support for MPC8349E-mITX-GPTimur Tabi2-0/+1361
This patch adds a defconfig and a DTS for the MPC8349E-mITX-GP, a variant of the MPC8349E-mITX. USB is disabled because the only USB port is not setup properly by firmware/kernel Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-13[POWERPC] 85xx: Add a defconfig for the 8568 MDSAndy Fleming1-0/+992
Add defconfig for the MPC8568 MDS reference board Signed-off-by: Andrew Fleming <afleming@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-13[POWERPC] 85xx: Add support for the 8568 MDS boardAndy Fleming4-0/+640
Add support for the MPC8568 MDS reference board Signed-off-by: Andrew Fleming <afleming@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2007-02-12Merge branch 'master' into 85xxKumar Gala425-7270/+12581
2007-02-13[POWERPC] spufs: Fix bitrot of the SPU mmap facilityBenjamin Herrenschmidt3-8/+22
It looks like we've had some serious bitrot there mostly due to tracking of address_space's of mmap'ed files getting out of sync with the actual mmap code. The mfc, mss and psmap were not tracked properly and thus not invalidated on context switches (oops !) I also removed the various file->f_mapping = inode->i_mapping; assignments that were done in the other open() routines since that is already done for us by __dentry_open. One improvement we might want to do later is to assign the various ctx-> fields at mmap time instead of file open/close time so that we don't call unmap_mapping_range() on thing that have not been mmap'ed Finally, I added some smp_wmb's after assigning the ctx-> fields to make sure they are visible to other CPUs. I don't think this is really necessary as I suspect locking in the fs layer will make that happen anyway but better safe than sorry. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-13[POWERPC] powerpc: Remove SPU struct pages for PS3Benjamin Herrenschmidt1-40/+2
Struct page are no longer needed for SPUs, so let's not create them on PS3 anymore. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-13[POWERPC] spufs: remove need for struct page for SPEsBenjamin Herrenschmidt3-145/+80
This patch removes the need for struct page for SPE local store and registers from spufs. It also makes the locking much more obvious and no longer relying on the truncate logic black magic for protecting against races between unmap_mapping_range() and new pages faulted in. It does so by switching to a nopfn() handler and using the new vm_insert_pfn() to setup the PTEs itself while holding a lock on the SPE. The nice thing is that this patch actually removes a lot more code than it adds :-) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-13[POWERPC] Small cleanup of EFIKA platformSylvain Munaut5-260/+244
The efika platform used three files efika-pci.c efika-setup.c and a 2 line efika.h to link the two. The total of code in those is really not much and therefore, I think they're better merged in a single file. There is absolutely _no_code_change_ at all, just merged the files. Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-02-13[POWERPC] Fix unbalanced of_node_{get,put} in efika-setup.cSylvain Munaut1-7/+6
Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>