aboutsummaryrefslogtreecommitdiff
path: root/arch
AgeCommit message (Collapse)Author
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>
2007-06-07[POWERPC] spufs: Fix gang destroy leaksJeremy Kerr
Previously, closing a SPE gang that still has contexts would trigger a WARN_ON, and leak the allocated gang. This change fixes the problem by using the gang's reference counts to destroy the gang instead. The gangs will persist until their last reference (be it context or open file handle) is gone. Also, avoid using statements with side-effects in a WARN_ON(). Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-07[POWERPC] spufs: Hook up spufs_release_memChristoph Hellwig
Currently spufs_mem_release and the mem file doesn't have any release method hooked up, leading to leaks everytime is used. 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] spufs: Refuse to load the module when not running on cellArnd Bergmann
As noticed by David Woodhouse, it's currently possible to mount spufs on any machine, which means that it actually will get mounted by fedora. This refuses to load the module on platforms that have no support for SPUs. Cc: David Woodhouse <dwmw2@infradead.org> 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] pasemi: Fix iommu + 64K PAGE_SIZE bugOlof Johansson
The powerpc iommu code was refactored by Linas back in the 2.6.20 time frame to map 4K pages from the generic code, but I had forgotten to go back and fix my platform driver before submitting it. Signed-off-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-06[MIPS] Fix warning by moving do_default_vi into CONFIG_CPU_MIPSR2_SRSAtsushi Nemoto
This fixes the warning: arch/mips/kernel/traps.c:931: warning: 'do_default_vi' defined but not used Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-06[MIPS] Fix some minor typoes in arch/mips/Kconfig.Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-06[MIPS] Remove prototype for deleted function qemu_handle_intRalf Baechle
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-06[MIPS] Fix some system calls with long long argumentsAtsushi Nemoto
* O32 fadvise64() pass long long arguments by register pairs. Add sys32 version for 64 bit kernel. * N32 readahead() can pass a long long argument by one register. No need to use sys32_readahead. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-06[MIPS] Make dma_map_sg handle sg elements which are longer than one pageThomas Bogendoerfer
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-06[MIPS] Fix VGA corruption on RM300CThomas Bogendoerfer
... by setting DRAM config to 2MB (SNI always used that size). This also fixes video dram size detection in cirrusfb. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-06[MIPS] RM300: Fix MMIO problems by marking the PCI INT ACK region busyThomas Bogendoerfer
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-06[MIPS] EMMA2RH: remove dead KGDB codeSergei Shtylyov
Get rid of the cross-arch KGDB specific code which shouldn't have been there in the first place... Signed-off-by: Sergey Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-06[MIPS] Remove duplicate fpu enable hazard code.Chris Dearman
Use common code from hazards.h instead. Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-06[MIPS] Atlas, Malta, SEAD: Remove scroll from interrupt handler.Ralf Baechle
Aside of being handy for debugging this has never been a particularly good idea but is now getting in the way of dyntick / tickless kernels and general cleanups. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2007-06-04[SPARC64]: Fix {mc,smt}_capable().David S. Miller
It's not just sun4v hypervisor platforms that should return true for this, sun4u with UltraSPARC-IV should return true too. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-04[SPARC64]: Make core and sibling groups equal on UltraSPARC-IV.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-04[SPARC64]: Proper multi-core scheduling support.David S. Miller
The scheduling domain hierarchy is: all cpus --> cpus that share an instruction cache --> cpus that share an integer execution unit Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-04[SPARC64]: Provide mmu statistics via sysfs.David Miller
If the system supports hypervisor based statistics, allow them to be fetched, enabled, and disabled via sysfs. Enable and disable via the boolean: /sys/devices/systems/cpu/cpuN/mmustat_enable Statistic values are provided under: /sys/devices/systems/cpu/cpuN/mmu_status/ Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-04[SPARC64]: Fix service channel hypervisor function names.David Miller
sed 's/scv/svc/' Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-04[SPARC64]: Export basic cpu properties via sysfs.David S. Miller
Cache sizes, udelay_val, and clock_tick. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-04[SPARC64]: Move topology init code into new file, sysfs.cDavid S. Miller
Also, use per-cpu data for struct cpu. Calling kmalloc for each cpu in topology_init() is just plain clumsy. Signed-off-by: David S. Miller <davem@davemloft.net>
2007-06-04mtrr atomicity fixAndrew Morton
Rafael gets this on an SMP box with kernel preemption enabled, during hibernation and restore (100% of the time): Enabling non-boot CPUs ... BUG: using smp_processor_id() in preemptible [00000001] code: bash/4514 caller is mtrr_save_state+0x9/0x40 Cc: "Rafael J. Wysocki" <rjw@sisk.pl> 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-04sh: Fix se73180 platform device registration.Paul Mundt
Copy and paste error from se7343, fix it up. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-04sh: ioremap() through PMB needs asm/mmu.h.Paul Mundt
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-04sh: voyagergx: Fix build warnings.Paul Mundt
pr_debug() was using a %x on an unsigned long, which was making the build a bit noisy. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-04sh: Fix SH4-202 clock fwk set_rate() mismatch.Paul Mundt
With the SH7722 changes, ->set_rate() also takes an algo_id, SH4-202 was overlooked when this change went in. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-04sh: microdev: Fix compile warnings.Paul Mundt
irq.c needs linux/interrupt.h. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-04sh: Fix in_nmi symbol build error.Paul Mundt
If CONFIG_KGDB_NMI is disabled, we're left with a stray in_nmi reference that can't be resolved. Move the symbol under the ifdef, too. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-06-02[ARM] Solve buggy smp_processor_id() usageRussell King
BUG: using smp_processor_id() in preemptible [00000001] code: opcontrol/427 Resolve this bug by ensuring that we're not using smp_processor_id() in a preemptable context (by disabling preemption.) Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-06-02[ARM] 4419/1: AT91: SAM9 USB clocks check for suspendingAndrew Victor
When suspending to slow-clock mode, at91_pm_verify_clocks() is called to ensure that all the clocks are disabled or in the correct state. This patch replaces the "#warning TODO" messages for the SAM9 processors with the correct code. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-06-02[ARM] 4418/1: AT91: Number of programmable clocks differsAndrew Victor
The number of programmable clocks available on the AT91 processors can differ, therefore do not always display the contents of the PMC_PCKR(0) .. PMC_PCKR(3) registers (ie, assume there are 4 clocks). If CONFIG_AT91_PROGRAMMABLE_CLOCKS is enabled, the programmable clocks will be registered like the other system/peripheral clocks, and the state of the programmable clocks will be displayed like with the other clocks. Signed-off-by: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-06-02[ARM] 4392/2: Do not corrupt the SP register in compressed/head.SCatalin Marinas
ARMv7 support code requires a valid stack for saving/restoring registers as the whole D-cache flushing function is more complex. This patch ensures that the SP register is not corrupted. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2007-06-02[POWERPC] Fix zImage.coff generation for 32-bit pmacMilton Miller
Commit 9da82a6dee9db4cd5ae7a74ab4f51afb52b6efb9 inadvertently removed the platform override for zImage.coff to be generated with pmaccoff. Rather than add a special makefile rule, change the platform for which the wrapper platform uses the special rules. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-02[POWERPC] Fix compile breakage for IBM/AMCC 4xx arch/ppc platformsStefan Roese
The IBM/AMCC 405 platforms don't compile anymore in the current kernel version. This fixes the compile breakage. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-02[POWERPC] Compare irq numbers with NO_IRQ not IRQ_NONEMichael Ellerman
There is a thinko in the irq code, it uses IRQ_NONE to indicate no irq, whereas it should be using NO_IRQ. IRQ_NONE is returned from irq handlers to say "not handled". As it happens they currently have the same value (0), so this is just for future proof-ness. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-02[POWERPC] Fix compile warning in pseries xics codeMichael Neuling
In 616883df78bd4b3fcdb6ddc39bd3d4cb902bfa32 request_irq was marked as __must_check so we must... er... check it. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-02[POWERPC] Don't use HOSTCFLAGS in BOOTCFLAGSDavid Gibson
In the bootwrapper code for powerpc, we include HOSTCFLAGS into the BOOTCFLAGS used for building the zImage wrapper code. Since the wrapper code is not host code, this makes no sense. This patch removes the use of HOSTCFLAGS here, instead including directly into BOOTCFLAGS those flags from the normal kernel CFLAGS which also make sense in the bootwrapper code. In particular, this makes the bootwrapper use -msoft-float, preventing the compiler from generating floating point instructions. Previously, under some circumstances the compiler could generate floating point instructions in the bootwrapper which would cause exceptions on embedded CPUS which don't have floating point support. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Acked-by: Josh Boyer <jwboyer@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-02[POWERPC] Create a zImage for legacy iSeriesStephen Rothwell
This zImage is really just the stripped vmlinux, but it means that there is one less special case for iSeries and also that the zImages will be built for a combined kernel build that happens to include iSeries. This zImage boots fine on legacy iSeries. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-02[POWERPC] pasemi idle uses hard_smp_processor_idStephen Rothwell
and so needs to include asm/smp.h so a UP build works. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-02[POWERPC] ps3/interrupt.c uses get_hard_smp_processor_idStephen Rothwell
and so needs to include asm/smp.h for a UP build to work. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-02[POWERPC] Fix compiler/assembler flags for Ebony platform boot filesDavid Gibson
The recent addition of assembler flags for 44x.c and ebony.c in the bootwrapper to make them compile on certain toolchains was not correct and could break other platforms. This patch switches to using a compiler flag instead, which implies the appropriate assembler flag, and also stops the compiler itself generating instructions which are invalid for the platform in question. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Acked-by: Segher Boessenkool <segher@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-06-02[POWERPC] Fix ppc32 single-stepping out of syscallsBenjamin Herrenschmidt
The ppc32 kernel didn't properly set/clear the TIF_SINGLESTEP flag, causing return from syscalls to not SIGTRAP, thus executing one more instruction before stopping again. This fixes it. The ptrace code is a bit of a mess, and is overdue for at least a -proper- 32/64 bits split and possibly more cleanups but this minimum fix should be ok for 2.6.22 Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>