aboutsummaryrefslogtreecommitdiff
path: root/arch/mips/kernel
AgeCommit message (Collapse)AuthorFilesLines
2009-07-03MIPS: CMP: Extend IPI handling to CPU numberTim Anderson1-0/+4
This takes the current IPI interrupt assignment from the fix number of 4 to the number of CPUs defined in the system. Signed-off-by: Tim Anderson <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-07-03MIPS: CMP: Extend the GIC IPI interrupts beyond 32Tim Anderson1-11/+4
This patch extends the GIC interrupt handling beyond the current 32 bit range as well as extending the number of interrupts based on the number of CPUs. Signed-off-by: Tim Anderson <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-07-03MIPS: Hookup new syscalls sys_rt_tgsigqueueinfo and sys_perf_counter_open.David Daney4-0/+8
[Ralf: I fixed up the numbering in the comment in scall64-n32.S.] Signed-off-by: David Daney <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-07-03MIPS: MT: Remove unnecessary semicolonsJoe Perches1-1/+1
Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-06-24MIPS: Add arch generic CPU hotplugRalf Baechle4-6/+45
Each platform has to add support for CPU hotplugging itself by providing suitable definitions for the cpu_disable and cpu_die of the smp_ops methods and setting SYS_SUPPORTS_HOTPLUG_CPU. A platform should only set SYS_SUPPORTS_HOTPLUG_CPU once all it's smp_ops definitions have the necessary changes. This patch contains the changes to the dummy smp_ops definition for uni-processor systems. Parts of the code contributed by Cavium Inc. Signed-off-by: Ralf Baechle <[email protected]>
2009-06-24MIPS: Build fix - include <linux/smp.h> into all smp_processor_id() users.Ralf Baechle11-0/+11
Some of the were relying into smp.h being dragged in by another header which of course is fragile. <asm/cpu-info.h> uses smp_processor_id() only in macros and including smp.h there leads to an include loop, so don't change cpu-info.h. Signed-off-by: Ralf Baechle <[email protected]>
2009-06-24linker script: throw away .discard sectionTejun Heo1-0/+1
x86 throws away .discard section but no other archs do. Also, .discard is not thrown away while linking modules. Make every arch and module linking throw it away. This will be used to define dummy variables for percpu declarations and definitions. This patch is based on Ivan Kokshaysky's alpha percpu patch. [ Impact: always throw away everything in .discard ] Signed-off-by: Tejun Heo <[email protected]> Cc: Ivan Kokshaysky <[email protected]> Cc: Richard Henderson <[email protected]> Cc: Russell King <[email protected]> Cc: Haavard Skinnemoen <[email protected]> Cc: Bryan Wu <[email protected]> Cc: Mikael Starvik <[email protected]> Cc: Jesper Nilsson <[email protected]> Cc: David Howells <[email protected]> Cc: Yoshinori Sato <[email protected]> Cc: Tony Luck <[email protected]> Cc: Hirokazu Takata <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Cc: Michal Simek <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Kyle McMartin <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Martin Schwidefsky <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Paul Mundt <[email protected]> Cc: David S. Miller <[email protected]> Cc: Jeff Dike <[email protected]> Cc: Chris Zankel <[email protected]> Cc: Rusty Russell <[email protected]> Cc: Ingo Molnar <[email protected]>
2009-06-17MIPS: Add hibernation supportWu Zhangjin1-0/+13
[Ralf: SMP support requires CPU hotplugging which MIPS currently doesn't support. As implemented in this patch cache and tlb flushing will also be invoked with interrupts disabled so smp_call_function() will blow up in charming ways. So limit to !SMP.] Reviewed-by: Pavel Machek <[email protected]> Reviewed-by: Yan Hua <[email protected]> Reviewed-by: Arnaud Patard <[email protected]> Reviewed-by: Atsushi Nemoto <[email protected]> Signed-off-by: Wu Zhangjin <[email protected]> Signed-off-by: Hu Hongbing <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-06-17MIPS: Move Cavium CP0 hwrena impl bits to cpu-feature-overrides.hDavid Daney1-4/+0
We had an ugly #ifdef for Cavium Octeon hwrena bits in traps.c, remove it to mach-cavium-octeon/cpu-feature-overrides.h Signed-off-by: David Daney <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-06-17MIPS: Allow CPU specific overriding of CP0 hwrena impl bits.David Daney1-1/+1
Some CPUs have implementation dependent rdhwr registers. Allow them to be enabled on a per CPU basis. Signed-off-by: David Daney <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-06-17MIPS: TXx9: micro optimization for clocksource and clock_eventAtsushi Nemoto1-24/+43
Use container structure for clocksource, clock_event_device and hold a pointer to txx9_tmr_reg in it. This saves a few instructions in clocksource and clock_event handlers. Signed-off-by: Atsushi Nemoto <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-06-17MIPS: SMTC: Fix formatting difference to linux-mips.org codeRalf Baechle1-0/+1
Signed-off-by: Ralf Baechle <[email protected]>
2009-06-16mm: consolidate init_mm definitionAlexey Dobriyan1-4/+0
* create mm/init-mm.c, move init_mm there * remove INIT_MM, initialize init_mm with C99 initializer * unexport init_mm on all arches: init_mm is already unexported on x86. One strange place is some OMAP driver (drivers/video/omap/) which won't build modular, but it's already wants get_vm_area() export. Somebody should look there. [[email protected]: add missing #includes] Signed-off-by: Alexey Dobriyan <[email protected]> Cc: Mike Frysinger <[email protected]> Cc: Americo Wang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-06-12module: cleanup FIXME comments about trimming exception table entries.Rusty Russell1-2/+0
Everyone cut and paste this comment from my original one. We now do it generically, so cut the comments. Signed-off-by: Rusty Russell <[email protected]> Cc: Amerigo Wang <[email protected]>
2009-06-10Merge branch 'irq-for-linus' of ↵Linus Torvalds1-2/+3
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (76 commits) x86, apic: Fix dummy apic read operation together with broken MP handling x86, apic: Restore irqs on fail paths x86: Print real IOAPIC version for x86-64 x86: enable_update_mptable should be a macro sparseirq: Allow early irq_desc allocation x86, io-apic: Don't mark pin_programmed early x86, irq: don't call mp_config_acpi_gsi() if update_mptable is not enabled x86, irq: update_mptable needs pci_routeirq x86: don't call read_apic_id if !cpu_has_apic x86, apic: introduce io_apic_irq_attr x86/pci: add 4 more return parameters to IO_APIC_get_PCI_irq_vector(), fix x86: read apic ID in the !acpi_lapic case x86: apic: Fixmap apic address even if apic disabled x86: display extended apic registers with print_local_APIC and cpu_debug code x86: read apic ID in the !acpi_lapic case x86: clean up and fix setup_clear/force_cpu_cap handling x86: apic: Check rev 3 fadt correctly for physical_apic bit x86/pci: update pirq_enable_irq() to setup io apic routing x86/acpi: move setup io apic routing out of CONFIG_ACPI scope x86/pci: add 4 more return parameters to IO_APIC_get_PCI_irq_vector() ...
2009-06-08MIPS: Outline udelay and fix a few issues.Ralf Baechle1-1/+1
Outlining fixes the issue were on certain CPUs such as the R10000 family the delay loop would need an extra cycle if it overlaps a cacheline boundary. The rewrite also fixes build errors with GCC 4.4 which was changed in way incompatible with the kernel's inline assembly. Relying on pure C for computation of the delay value removes the need for explicit. The price we pay is a slight slowdown of the computation - to be fixed on another day. Signed-off-by: Ralf Baechle <[email protected]>
2009-06-01Merge branch 'linus' into irq/numaIngo Molnar4-8/+8
Conflicts: arch/mips/sibyte/bcm1480/irq.c arch/mips/sibyte/sb1250/irq.c Merge reason: we gathered a few conflicts plus update to latest upstream fixes. Signed-off-by: Ingo Molnar <[email protected]>
2009-05-14MIPS: Use force_sig when handling address errors.David Daney1-3/+3
When init is started it is SIGNAL_UNKILLABLE. If it were to get an address error, we would try to send it SIGBUS, but it would be ignored and the faulting instruction restarted. This results in an endless loop. We need to use force_sig() instead so it will actually die and give us some useful information. Reported-by: Florian Fainelli <[email protected]> Signed-off-by: David Daney <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-05-14MIPS: Compat: Use generic 32-bit wrapers for sys_timerfd_{g,s}ettimeDavid Daney2-4/+4
The LTP timerfd01 test is failing (blocking forever) on the 32-bit ABIs. We need to use the compat_* wrappers for these system calls. Signed-off-by: David Daney <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-05-14MIPS: SMTC: Fix xxx_clockevent_init() naming conflict for SMTCKevin D. Kissell1-1/+1
Commit 779e7d41ad004946603da139da99ba775f74cb1c created a name collision in SMTC builds. The attached patch corrects this in a a not-too-terribly-ugly manner. Note that the SMTC case has to come first, because CEVT_R4K will also be true. Signed-off-by: Kevin D. Kissell <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-04-28irq: change ->set_affinity() to return statusYinghai Lu1-2/+3
according to Ingo, change set_affinity() in irq_chip should return int, because that way we can handle failure cases in a much cleaner way, in the genirq layer. v2: fix two typos [ Impact: extend API ] Signed-off-by: Yinghai Lu <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Suresh Siddha <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Rusty Russell <[email protected]> Cc: [email protected] LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2009-04-21clocksource: pass clocksource to read() callbackMagnus Damm6-8/+8
Pass clocksource pointer to the read() callback for clocksources. This allows us to share the callback between multiple instances. [[email protected]: fix powerpc build of clocksource pass clocksource mods] [[email protected]: cleanup] Signed-off-by: Magnus Damm <[email protected]> Acked-by: John Stultz <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Hugh Dickins <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-02preadv/pwritev: MIPS: Add preadv(2) and pwritev(2) syscalls.Ralf Baechle4-0/+8
Signed-off-by: Ralf Baechle <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Al Viro <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-04-02Simplify copy_thread()Alexey Dobriyan1-1/+1
First argument unused since 2.3.11. [[email protected]: coding-style fixes] Signed-off-by: Alexey Dobriyan <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-03-30Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumaskLinus Torvalds4-5/+0
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-cpumask: oprofile: Thou shalt not call __exit functions from __init functions cpumask: remove the now-obsoleted pcibus_to_cpumask(): generic cpumask: remove cpumask_t from core cpumask: convert rcutorture.c cpumask: use new cpumask_ functions in core code. cpumask: remove references to struct irqaction's mask field. cpumask: use mm_cpumask() wrapper: kernel/fork.c cpumask: use set_cpu_active in init/main.c cpumask: remove node_to_first_cpu cpumask: fix seq_bitmap_*() functions. cpumask: remove dangerous CPU_MASK_ALL_PTR, &CPU_MASK_ALL
2009-03-30MIPS: Alchemy: unify CPU model constants.Manuel Lauss1-17/+4
This patch removes the various CPU_AU1??? model constants in favor of a single CPU_ALCHEMY one. All currently existing Alchemy models are identical in terms of cpu core and cache size/organization. The parts of the mips kernel which need to know the exact CPU revision extract it from the c0_prid register already; and finally nothing else in-tree depends on those any more. Should a new variant with slightly different "company options" and/or "processor revision" bits in c0_prid appear, it will be supported immediately (minus an exact model string in cpuinfo). Signed-off-by: Manuel Lauss <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-03-30MIPS: Make a needlessly global symbol static in arch/mips/kernel/smp.cDmitri Vorobiev1-1/+1
The variable cpu_callin_map is needlessly defined global, so let's make it static now. Build-tested using malta_defconfig. Signed-off-by: Dmitri Vorobiev <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-03-30MIPS: Fix global namespace pollution in arch/mips/kernel/smp-up.cDmitri Vorobiev1-7/+7
The following symbols in arch/mips/kernel/smp-up.c are needlessly defined global: up_send_ipi_single() up_init_secondary() up_smp_finish() up_cpus_done() up_boot_secondary() up_smp_setup() up_prepare_cpus() This patch makes the symbols static. Build-tested using malta_defconfig. Signed-off-by: Dmitri Vorobiev <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-03-30MIPS: Use BUG_ON() where possible.Ralf Baechle1-2/+1
Based on original patch by Stoyan Gaydarov <[email protected]> which missed a few places. Signed-off-by: Ralf Baechle <[email protected]>
2009-03-30MIPS: Enable GENERIC_HARDIRQS_NO__DO_IRQ for all platformsRalf Baechle2-3/+6
__do_IRQ() is deprecated and will go away. Signed-off-by: Ralf Baechle <[email protected]>
2009-03-30MIPS: Stop using <asm-generic/int-l64.h>.Ralf Baechle1-1/+2
This fixes a few warnings - and triggers a few new ones which the rest of this patch fixes. Signed-off-by: Ralf Baechle <[email protected]>
2009-03-30MIPS: Compat: Zero upper 32-bit of offset_high and offset_low.Ralf Baechle1-3/+3
Through sys_llseek() arguably should do exactly that it doesn't which means llseek(2) will fail for o32 processes if offset_low has bit 31 set. As suggested by Heiko Carstens. Signed-off-by: Ralf Baechle <[email protected]>
2009-03-30cpumask: remove references to struct irqaction's mask field.Rusty Russell4-5/+0
Impact: cleanup It's unused, since about 1995. So remove all initialization of it in preparation for actually removing the field. Signed-off-by: Rusty Russell <[email protected]> Acked-by: Thomas Gleixner <[email protected]>
2009-03-28Merge branch 'linus' into percpu-cpumask-x86-for-linus-2Ingo Molnar3-36/+2
Conflicts: arch/sparc/kernel/time_64.c drivers/gpu/drm/drm_proc.c Manual merge to resolve build warning due to phys_addr_t type change on x86: drivers/gpu/drm/drm_info.c Signed-off-by: Ingo Molnar <[email protected]>
2009-03-27Merge branch 'for-linus' of ↵Linus Torvalds3-36/+2
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (37 commits) fs: avoid I_NEW inodes Merge code for single and multiple-instance mounts Remove get_init_pts_sb() Move common mknod_ptmx() calls into caller Parse mount options just once and copy them to super block Unroll essentials of do_remount_sb() into devpts vfs: simple_set_mnt() should return void fs: move bdev code out of buffer.c constify dentry_operations: rest constify dentry_operations: configfs constify dentry_operations: sysfs constify dentry_operations: JFS constify dentry_operations: OCFS2 constify dentry_operations: GFS2 constify dentry_operations: FAT constify dentry_operations: FUSE constify dentry_operations: procfs constify dentry_operations: ecryptfs constify dentry_operations: CIFS constify dentry_operations: AFS ...
2009-03-27generic compat_sys_ustatChristoph Hellwig3-36/+2
Due to a different size of ino_t ustat needs a compat handler, but currently only x86 and mips provide one. Add a generic compat_sys_ustat and switch all architectures over to it. Instead of doing various user copy hacks compat_sys_ustat just reimplements sys_ustat as it's trivial. This was suggested by Arnd Bergmann. Found by Eric Sandeen when running xfstests/017 on ppc64, which causes stack smashing warnings on RHEL/Fedora due to the too large amount of data writen by the syscall. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Al Viro <[email protected]>
2009-03-27Merge branch 'core/percpu' into percpu-cpumask-x86-for-linus-2Ingo Molnar2-3/+5
Conflicts: arch/parisc/kernel/irq.c arch/x86/include/asm/fixmap_64.h arch/x86/include/asm/setup.h kernel/irq/handle.c Semantic merge: arch/x86/include/asm/fixmap.h Signed-off-by: Ingo Molnar <[email protected]>
2009-03-26Merge branch 'irq-for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'irq-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (32 commits) x86: disable __do_IRQ support sparseirq, powerpc/cell: fix unused variable warning in interrupt.c genirq: deprecate obsolete typedefs and defines genirq: deprecate __do_IRQ genirq: add doc to struct irqaction genirq: use kzalloc instead of explicit zero initialization genirq: make irqreturn_t an enum genirq: remove redundant if condition genirq: remove unused hw_irq_controller typedef irq: export remove_irq() and setup_irq() symbols irq: match remove_irq() args with setup_irq() irq: add remove_irq() for freeing of setup_irq() irqs genirq: assert that irq handlers are indeed running in hardirq context irq: name 'p' variables a bit better irq: further clean up the free_irq() code flow irq: refactor and clean up the free_irq() code flow irq: clean up manage.c irq: use GFP_KERNEL for action allocation in request_irq() kernel/irq: fix sparse warning: make symbol static irq: optimize init_kstat_irqs/init_copy_kstat_irqs ...
2009-03-23MIPS: R2: Fix problem with code that incorrectly modifies ebase.Chris Dearman1-5/+7
Commit 566f74f6b2f8b85d5b8d6caaf97e5672cecd3e3e had a change that incorrectly modified ebase. This backs out the lines that modified ebase. In addition, the ebase exception vector is now allocated with correct alignment and the ebase register updated according to the architecture specification. Based on original patch by David VomLehn <[email protected]>. Signed-off-by: David VomLehn <[email protected]> Signed-off-by: Chris Dearman <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-03-23MIPS: compat: Remove duplicated #includeHuang Weiyi1-1/+0
Remove duplicated #include in arch/mips/kernel/linux32.c. Signed-off-by: Huang Weiyi <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-03-16Merge branches 'irq/genirq' and 'linus' into irq/coreIngo Molnar10-97/+107
2009-03-11MIPS: NEC VR5500 processor support fixupShinya Kuribayashi1-0/+1
Current VR5500 processor support lacks of some functions which are expected to be configured/synthesized on arch initialization. Here're some VR5500A spec notes: * All execution hazards are handled in hardware. * Once VR5500A stops the operation of the pipeline by WAIT instruction, it could return from the standby mode only when either a reset, NMI request, or all enabled interrupts is/are detected. In other words, if interrupts are disabled by Status.IE=0, it keeps in standby mode even when interrupts are internally asserted. Notes on WAIT: The operation of the processor is undefined if WAIT insn is in the branch delay slot. The operation is also undefined if WAIT insn is executed when Status.EXL and Status.ERL are set to 1. * VR5500A core only implements the Load prefetch. With these changes, it boots fine. Signed-off-by: Shinya Kuribayashi <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-03-11MIPS: Fix build of non-CONFIG_SYSVIPC version of sys_32_ipcXiaotian Feng1-1/+1
Signed-off-by: Xiaotian Feng <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-03-01Merge branch 'x86/urgent' into x86/patIngo Molnar9-97/+106
2009-02-27Revert "MIPS: Print irq handler description"Ralf Baechle1-1/+0
This reverts commit 558d1de8ba9ebb1cc3f3062f1371b9330772164f.
2009-02-27MIPS: CVE-2009-0029: Enable syscall wrappers.Ralf Baechle8-96/+106
Thanks to David Daney helping with debugging and testing. Signed-off-by: Ralf Baechle <[email protected]> Signed-off-by: David Daney <[email protected]>
2009-02-13Merge branches 'irq/genirq', 'irq/sparseirq' and 'irq/urgent' into irq/coreIngo Molnar1-1/+1
2009-02-05Merge branch 'x86/urgent' into x86/apicIngo Molnar3-5/+20
Conflicts: arch/x86/mach-default/setup.c Semantic merge: arch/x86/kernel/irqinit_32.c Signed-off-by: Ingo Molnar <[email protected]>
2009-01-30MIPS: Read watch registers with interrupts disabled.David Daney2-2/+12
If a context switch occurred between the watch exception and reading the watch registers, it would be possible for the new process to corrupt their state. Enabling interrupts only after the watch registers are read avoids this race. Signed-off-by: David Daney <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
2009-01-30MIPS: R2: Fix broken installation of cache error handler.Ralf Baechle1-2/+6
Signed-off-by: Ralf Baechle <[email protected]>