aboutsummaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
2007-06-14Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (30 commits) [PARISC] remove global_ack_eiem [PARISC] Fix kernel panic in check_ivt [PARISC] Fix bug when syscall nr is __NR_Linux_syscalls [PARISC] be more defensive in process.c::get_wchan [PARISC] fix "reduce size of task_struct on 64-bit machines" fallout [PARISC] fix null ptr deref in unwind.c [PARISC] fix trivial spelling nit in asm/linkage.h [PARISC] remove remnants of parisc-specific softirq code [PARISC] fix section mismatch in smp.c [PARISC] fix "ENTRY" macro redefinition [PARISC] Wire up utimensat/signalfd/timerfd/eventfd syscalls [PARISC] fix section mismatch in superio serial drivers [PARISC] fix section mismatch in parisc eisa driver [PARISC] fix section mismatches in arch/parisc/kernel [PARISC] fix section mismatch in ccio-dma [PARISC] fix section mismatch in parisc STI video drivers [PARISC] fix section mismatch in parport_gsc [PARISC] fix lasi_82596 build [PARISC] Build fixes for power.c [PARISC] kobject is embedded in subsys, not kset ...
2007-06-14Merge branch 'master' of ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: Fix args to sun4v_ldc_revoke(). [SPARC64]: Really fix parport. [SPARC64]: Fix IO/MEM space sizing for PCI. [SPARC64]: Wire up cookie based sun4v interrupt registry.
2007-06-14Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] 4445/1: ANUBIS: Fix CPLD registers [ARM] 4444/2: OSIRIS: CPLD suspend fix [ARM] 4443/1: OSIRIS: Add watchdog device to machine devices [ARM] 4442/1: OSIRIS: Fix CPLD register definitions [ARM] VFP: fix section mismatch error
2007-06-13[SPARC64]: Fix args to sun4v_ldc_revoke().David S. Miller
First argument is LDC channel ID, then mapping cookie, then the MTE revoke cookie. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-13[SPARC64]: Fix IO/MEM space sizing for PCI.David S. Miller
In pci_determine_mem_io_space(), do not hard code the region sizes. Instead, use the values given to us in the ranges property. Thanks goes to Mikael Petterson for the original Xorg failure bug repoert, and strace dumps from Mikael and Dmitry Artamonow. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-13[SPARC64]: Wire up cookie based sun4v interrupt registry.David S. Miller
This will be used for logical domain channel interrupts. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-12[PARISC] remove global_ack_eiemGrant Grundler
Kudos to Thibaut Varene for spotting the (mis)use of appropriately named global_ack_eiem. This took a long time to figure out and both insight from myself, Kyle McMartin, and James Bottomley were required to narrow down which bit of code could have this race condition. The symptom was interrupts stopped getting delivered while some workload was generating IO interrupts on two different CPUs. One of the interrupt sources would get masked off and stay unmasked. Problem was global_ack_eiem was accessed with read/modified/write sequence and not protected by a spinlock. PA-RISC doesn't need a global ack flag though. External Interrupts are _always_ delivered to a single CPU (except for "global broadcast interrupt" which AFAIK currently is not used.) So we don't have to worry about any given IRQ vector getting delivered to more than one CPU. Tested on a500 and rp34xx boxen. rsync to/from gsyprf11 (a500) would lock up the box since NIC (tg3) interrupt and SCSI (sym2) were on "opposite" CPUs (2 CPU system). Put them on the same CPU or apply this patch and 10GB of data would rsync completely. Please apply the following critical patch. thanks, grant Signed-off-by: Grant Grundler <grundler@parisc-linux.org> Acked-by: Thibaut VARENE <T-Bone@parisc-linux.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-06-11Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Fix smp barriers in test_and_{change,clear,set}_bit [MIPS] Fix IP27 build [MIPS] Fix modpost warnings by making start_secondary __cpuinit [MIPS] SMTC: Fix build error caused by nonsense code. [MIPS] SMTC: The MT ASE requires to initialize c0_pagemask and c0_wired. [MIPS] SMTC: Don't continue in set_vi_srs_handler on detected bad arguments. [MIPS] SMTC: Fix warning. [MIPS] Wire up utimensat, signalfd, timerfd, eventfd [MIPS] Atlas: Fix build. [MIPS] Always install the DSP exception handler. [MIPS] SMTC: Don't set and restore irqregs ptr from self_ipi. [MIPS] Fix KMODE for the R3000
2007-06-11[MIPS] Fix IP27 buildAtsushi Nemoto
IP27 does no longer have ZONE_DMA. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-11[MIPS] Fix modpost warnings by making start_secondary __cpuinitRalf Baechle
WARNING: arch/mips/kernel/built-in.o(.text+0x9a58): Section mismatch: reference to .init.text:cpu_report (between 'start_secondary' and 'smp_prepare_boot_cpu') WARNING: arch/mips/kernel/built-in.o(.text+0x9a60): Section mismatch: reference to .init.text:per_cpu_trap_init (between 'start_secondary' and 'smp_prepare_boot_cpu') WARNING: arch/mips/kernel/built-in.o(.text+0x9adc): Section mismatch: reference to .init.text:cpu_probe (between 'start_secondary' and 'smp_prepare_boot_cpu') mipsel-linux-objcopy -S -O srec --remove-section=.reginfo --remove-section=.mdebug --remove-section=.comment --remove-section=.note --remove-section=.pdr --remove-section=.options --remove-section=.MIPS.options vmlinux arch/mips/boot/vmlinux.srec Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-11[MIPS] SMTC: Fix build error caused by nonsense code.Chris Dearman
Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-11[MIPS] SMTC: The MT ASE requires to initialize c0_pagemask and c0_wired.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-11[MIPS] SMTC: Don't continue in set_vi_srs_handler on detected bad arguments.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-11[MIPS] SMTC: Fix warning.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-11[MIPS] Wire up utimensat, signalfd, timerfd, eventfdAtsushi Nemoto
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-11[MIPS] Atlas: Fix build.Ralf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-11[MIPS] Always install the DSP exception handler.Chris Dearman
Some non-DSP enabled cores 24K / 34K can generate a DSP exception where they are actually expected to produce a reserved instruction exception. Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-11[MIPS] SMTC: Don't set and restore irqregs ptr from self_ipi.Ralf Baechle
This did corrupt register s0 which the caller of self_ipi expects to be unchanged. This is a kernel bug which will only be triggered with the compilers which compile __smtc_ipi_replay to use s0 across the invocation of self_ipi. Gcc 4.1.2 does this, for example. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-11[ARM] 4445/1: ANUBIS: Fix CPLD registersBen Dooks
Update the ANUBIS register definitions inline with the specs and ensure they are registered correctly. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-06-11[ARM] 4444/2: OSIRIS: CPLD suspend fixBen Dooks
Ensure the CPLD 8bit settings are preserved over a suspend/resume cycle as the CPU sends a hard-reset at resume time. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-06-11[ARM] 4443/1: OSIRIS: Add watchdog device to machine devicesBen Dooks
Add the watchdog timer to the list of devices the Osiris registers at startup. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-06-11[ARM] 4442/1: OSIRIS: Fix CPLD register definitionsBen Dooks
Fix the CPLD register definitions to correctly mirror the documentation Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-06-10[ARM] VFP: fix section mismatch errorRussell King
Fix a real section mismatch issue; the test code is thrown away after initialisation, but if we do not detect the VFP hardware, it is left hooked into the exception handler. Any VFP instructions which are subsequently executed risk calling the discarded exception handler. Introduce a new "null" handler which returns to the "unrecognised fault" return address. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-06-08Merge branch 'master' of ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: Handle PCI bridges without 'ranges' property. [SPARC64]: Include <linux/rwsem.h> instead of <asm/rwsem.h>.
2007-06-08x86_64: oops_begin() fixAndrew Morton
We don't want to see this: > BUG: using smp_processor_id() in preemptible [00000001] code: bash/3857 > caller is oops_begin+0xb/0x6f > > Call Trace: > [<ffffffff8020ab4d>] show_trace+0x34/0x4f > [<ffffffff8020ab7a>] dump_stack+0x12/0x17 > [<ffffffff8030d92d>] debug_smp_processor_id+0xad/0xbc > [<ffffffff8042388f>] oops_begin+0xb/0x6f > [<ffffffff8042520b>] do_page_fault+0x66a/0x7c0 > [<ffffffff804234bd>] error_exit+0x0/0x84 > coming out when the kernel is trying to oops. Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-08fix sysrq-m oopsBob Picco
We aren't sampling for holes in memory. Thus we encounter a section hole with empty section map pointer for SPARSEMEM and OOPs for show_mem. This issue has been seen in 2.6.21, current git and current mm. The patch below is for mainline and mm. It was boot tested for SPARSEMEM, current VMEMMAP of Andy's in mm ml and DISCONTIGMEM. A slightly different patch will be posted to stable for 2.6.21. Previous to commit f0a5a58aa812b31fd9f197c4ba48245942364eae memory_present was called for node_start_pfn to node_end_pfn. This would cover the hole(s) with reserved pages and valid sections. Most SPARSEMEM supported arches do a pfn_valid check in show_mem before computing the page structure address. This issue was brought to my attention on IRC by Arnaldo Carvalho de Melo. Thanks to Arnaldo for testing. Signed-off-by: Bob Picco <bob.picco@hp.com> Cc: Chuck Ebbert <cebbert@redhat.com> Cc: Andi Kleen <ak@suse.de> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-08uml: get declaration of simple_strtoulJeff Dike
Include linux/kernel.h wherever simple_strtoul is used. This kills a compile warning in stderr_console.c and potential ones in the other files. This also fixes a bunch of style violations in exitcode.c. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-08uml: fix kernel stack size on x86_64Jeff Dike
Force KERNEL_STACK_ORDER to be at least 1 on UML/x86_64, to avoid overflows. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-08potential parse error in ifdef part 3Yoann Padioleau
Fix various bits of obviously-busted code which we're not happening to compile, due to ifdefs. Signed-off-by: Yoann Padioleau <padator@wanadoo.fr> Cc: Andi Kleen <ak@suse.de> Cc: Paul Mackerras <paulus@samba.org> Acked-by: Paul Mundt <lethal@linux-sh.org> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-08m68knommu: fix ColdFire timer off by 1Greg Ungerer
The coldfire timer runs from 0 to TRR included, then 0 again and so on. It counts thus actually TRR + 1 steps for 1 tick, not TRR. Fix that. Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-07[SPARC64]: Handle PCI bridges without 'ranges' property.David S. Miller
This fixes the IDE controller not showing up on Netra-T1 systems. Just like Simba bridges, some PCI bridges can lack the 'ranges' OBP property. So we handle this similarly to the existing Simba code: 1) In of_device register address resolving, we push the translation to the parent. 2) In PCI device scanning, we interrogate the PCI config space registers of the PCI bus device in order to resolve the resources, just like the generic Linux PCI probing code does. With much help and testing from Fabio, who also reported the initial problem. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Fabio Massimo Di Nitto <fabbione@ubuntu.com>
2007-06-07[SPARC64]: Include <linux/rwsem.h> instead of <asm/rwsem.h>.Robert P. J. Day
To be consistent with other architectures, include the generic version of rwsem.h. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-07Merge git://git.linux-xtensa.org/kernel/xtensa-feedLinus Torvalds
* git://git.linux-xtensa.org/kernel/xtensa-feed: Xtensa: use asm-generic/fcntl.h [XTENSA] Remove non-rt signal handling [XTENSA] Move common sections into bss sections [XTENSA] clean-up header files [XTENSA] Use generic 64-bit division [XTENSA] Remove multi-exported symbols from xtensa_ksyms.c [XTENSA] fix sources using deprecated assembler directive [XTENSA] Spelling fixes in arch/xtensa [XTENSA] fix bit operations in bitops.h
2007-06-07Merge branch 'master' of ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: Fix SBUS IRQ regression caused by PCI-E driver. [SPARC64]: Fix 2 bugs in PCI Sabre bus scanning.
2007-06-07enable interrupts in user path of page fault.Steven Rostedt
This is a minor fix, but what is currently there is essentially wrong. In do_page_fault, if the faulting address from user code happens to be in kernel address space (int *p = (int*)-1; p = 0xbed;) then the do_page_fault handler will jump over the local_irq_enable with the goto bad_area_nosemaphore; But the first line there sees this is user code and goes through the process of sending a signal to send SIGSEGV to the user task. This whole time interrupts are disabled and the task can not be preempted by a higher priority task. This patch always enables interrupts in the user path of the bad_area_nosemaphore. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-07Merge master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds
* master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] pxa: fix pxa27x keyboard driver [ARM] Fix 4417/1: Serial: Fix AMBA drivers locking [ARM] 4421/1: AT91: Value of _KEY fields. [ARM] Solve buggy smp_processor_id() usage [ARM] 4422/1: Fix default value handling in gpio_direction_output (PXA) [ARM] 4419/1: AT91: SAM9 USB clocks check for suspending [ARM] 4418/1: AT91: Number of programmable clocks differs [ARM] 4392/2: Do not corrupt the SP register in compressed/head.S
2007-06-07Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Fix warning by moving do_default_vi into CONFIG_CPU_MIPSR2_SRS [MIPS] Fix some minor typoes in arch/mips/Kconfig. [MIPS] Remove prototype for deleted function qemu_handle_int [MIPS] Fix some system calls with long long arguments [MIPS] Make dma_map_sg handle sg elements which are longer than one page [MIPS] Drop __ARCH_WANT_SYS_FADVISE64 [MIPS] Fix VGA corruption on RM300C [MIPS] RM300: Fix MMIO problems by marking the PCI INT ACK region busy [MIPS] EMMA2RH: remove dead KGDB code [MIPS] Remove duplicate fpu enable hazard code. [MIPS] Atlas, Malta, SEAD: Remove scroll from interrupt handler.
2007-06-07[SPARC64]: Fix SBUS IRQ regression caused by PCI-E driver.David S. Miller
We used to access the 64-bit IRQ IMAP and ICLR registers of bus controllers 4-bytes in and as a 32-bit register word, since only the low 32-bits were relevant. This seemed like a good idea at the time. But the PCI-E controller requires full 8-byte 64-bit access to these registers, so we switched over to accessing them fully. SBUS was not adjusted properly, which broke interrupts completely. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-07[SPARC64]: Fix 2 bugs in PCI Sabre bus scanning.David S. Miller
If we are on hummingbird, bus runs at 66MHZ. pbm->pci_bus should be setup with the result of pci_scan_one_pbm() or else we deref NULL pointers in the error interrupt handlers. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-07Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6: sh: Fix se73180 platform device registration. sh: ioremap() through PMB needs asm/mmu.h. sh: voyagergx: Fix build warnings. sh: Fix SH4-202 clock fwk set_rate() mismatch. sh: microdev: Fix compile warnings. sh: Fix in_nmi symbol build error.
2007-06-07Merge branch 'master' of ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: [VIDEO] sunxvr500fb: Fix pseudo_palette array size [VIDEO] sunxvr2500fb: Fix pseudo_palette array size [VIDEO] ffb: The pseudo_palette is only 16 elements long [VIDEO]: Fix section mismatch warning in promcon. [ATA]: Back out bogus (SPARC64 && !PCI) Kconfig depends. [SPARC64]: Fill in gaps in non-PCI dma_*() NOP implementation. [SPARC64]: Fix {mc,smt}_capable(). [SPARC64]: Make core and sibling groups equal on UltraSPARC-IV. [SPARC64]: Proper multi-core scheduling support. [SPARC64]: Provide mmu statistics via sysfs. [SPARC64]: Fix service channel hypervisor function names. [SPARC64]: Export basic cpu properties via sysfs. [SPARC64]: Move topology init code into new file, sysfs.c
2007-06-07[POWERPC] Fix building of COFF zImagesPaul Mackerras
The COFF zImage (for booting oldworld powermacs) wasn't being built correctly because the procedure descriptor in crt0.S for the zImage entry point wasn't declared as .globl, and therefore wasn't getting pulled in from wrapper.a by the linker. This adds the necessary .globl statement. Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-07[POWERPC] spufs: Fix error handling in spufs_fill_dir()Sebastian Siewior
The error path in spufs_fill_dir() is broken. If d_alloc_name() or spufs_new_file() fails, spufs_prune_dir() is getting called. At this time dir->inode is not set and a NULL pointer is dereferenced by mutex_lock(). This bugfix replaces spufs_prune_dir() with a shorter version that does not touch dir->inode but simply removes all children. Signed-off-by: Sebastian Siewior <bigeasy@linux.vnet.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-07[POWERPC] spufs: Don't yield nosched contextChristoph Hellwig
Nosched context sould never be scheduled out, thus we must not deactivate them in spu_yield ever. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-07[POWERPC] scc_sio: Fix link failureChristoph Hellwig
scc_sio.o should only be built if the txx9 serial driver is actually built into the kernel. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> -- Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-07[POWERPC] cbe_cpufreq: Limit frequency via cpufreq notifier chainThomas Renninger
... and get rid of cpufreq_set_policy call that caused a build failure due interfering commits. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Christian Krafft <krafft@de.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-07[POWERPC] Fix pci_setup_phb_io_dynamic for pci_iomapArnd Bergmann
We had a problem on a system with only dynamically allocated PCI buses (using of_pci_phb_driver) in combination with libata. This setup ended up having no "primary" phb, which means that pci_io_base never got initialized and all IO port numbers are 64 bit numbers, which is larger than the PIO_MASK limit. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-07[POWERPC] spufs scheduler: Fix wakeup racesChristoph Hellwig
Fix the race between checking for contexts on the runqueue and actually waking them in spu_deactive and spu_yield. The guts of spu_reschedule are split into a new helper called grab_runnable_context which shows if there is a runnable thread below a specified priority and if yes removes if from the runqueue and uses it. This function is used by the new __spu_deactivate hepler shared by preemption and spu_yield to grab a new context before deactivating a specified priority and if yes removes if from the runqueue and uses it. This function is used by the new __spu_deactivate hepler shared by preemption and spu_yield to grab a new context before deactivating the old one. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-07[POWERPC] spufs: Synchronize pte invalidation vs ps closeChristoph Hellwig
Make sure the mapping_lock also protects access to the various address_space pointers used for tearing down the ptes on a spu context switch. Because unmap_mapping_range can sleep we need to turn mapping_lock from a spinlock into a sleeping mutex. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-07[POWERPC] spufs: Free mm if spufs_fill_dir() failedSebastian Siewior
In case spufs_fill_dir() fails only put_spu_context() gets called for cleanup and the acquired mm_struct never gets freed. Signed-off-by: Sebastian Siewior <bigeasy@linux.vnet.ibm.com> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>