summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
Commit message (Collapse)AuthorAgeFilesLines
* [MIPS] Fix BUG(), BUG_ON() handlingAtsushi Nemoto2007-04-201-2/+2
| | | | | | | | | | With commit 63dc68a8cf60cb110b147dab1704d990808b39e2, kernel can not handle BUG() and BUG_ON() properly since get_user() returns false for kernel code. Use __get_user() to skip unnecessary access_ok(). This patch also make BRK_BUG code encoded in the TNE instruction. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Retry {save,restore}_fp_context if failed in atomic context.Atsushi Nemoto2007-04-203-18/+95
| | | | | | | | | | | | | | | The save_fp_context()/restore_fp_context() might sleep on accessing user stack and therefore might lose FPU ownership in middle of them. If these function failed due to "in_atomic" test in do_page_fault, touch the sigcontext area in non-atomic context and retry these save/restore operation. This is a replacement of a (broken) fix which was titled "Allow CpU exception in kernel partially". Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Disallow CpU exception in kernel again.Atsushi Nemoto2007-04-205-40/+21
| | | | | | | | | The commit 4d40bff7110e9e1a97ff8c01bdd6350e9867cc10 ("Allow CpU exception in kernel partially") was broken. The commit was to fix theoretical problem but broke usual case. Revert it for now. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] SMTC: Fix recursion in instant IPI replay code.Ralf Baechle2007-03-291-7/+33
| | | | | | | | | | | | local_irq_restore -> raw_local_irq_restore -> irq_restore_epilog -> smtc_ipi_replay -> smtc_ipi_dq -> spin_unlock_irqrestore -> _spin_unlock_irqrestore -> local_irq_restore The recursion does abort when there is no more IPI queued for a CPU, so this isn't usually fatal which is why we got away with this for so long until this was discovered by code inspection. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] SMTC: Fix false trigger of debug code on single VPE.Ralf Baechle2007-03-291-5/+15
| | | | | | | | Make smtc_setup_irq() update the list of interrupts which need to be watched by the debug code itself. Also there is no need to initialize the IPI swint when running with a single VPE, so don't initialize it. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] SMTC: irq_{enter,leave} and kstats keeping for relayed timer ints.Ralf Baechle2007-03-291-0/+5
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] lockdep: Deal with interrupt disable hazard in TRACE_IRQFLAGSChris Dearman2007-03-291-0/+31
| | | | | | | | | | | Between the mtc0 or di instruction that disables interrupts and the following hazard barrier a processor may still take interrupts. If an interrupt is taken after interrupts are disabled but before the state is updated it will appear to restore_all that it is incorrectly returning with interrupts disabled. Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] lockdep: Handle interrupts in R3000 style c0_status register.Chris Dearman2007-03-291-1/+5
| | | | | | | | Check the IEP bit for R3000 style processors when checking to see if interrupts will be reenabled in restore_all. Signed-off-by: Chris Dearman <chris@mips.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Export except_vec_vi_{mori,lui,ori} as text symbols.Ralf Baechle2007-03-191-3/+3
| | | | | | Otherwise objdump will screw up disassembly. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] VI: TRACE_IRQS_OFF clobbers $v0, so save & restore around call.Ralf Baechle2007-03-191-0/+10
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] RTLX: Handle copy_*_user return values.Ralf Baechle2007-03-172-29/+35
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] RTLX: Protect rtlx_{read,write} with mutex.Ralf Baechle2007-03-171-0/+6
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] RTLX: Harden against compiler reordering and optimization.Ralf Baechle2007-03-171-17/+24
| | | | | | | | | | | RTLX communication is based on lock-free shared memory buffers. It happened to be working by luck so far but relies on the optimizer doing certain optimizations but no reordering. Fixed by inserting proper barriers in rtlx_read and rtlx_write, and careful pointer dereferencing. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] RTLX: Don't use volatile; it's fragile.Ralf Baechle2007-03-171-5/+16
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Compat: Fix build if CONFIG_SYSVIPC is disabled.Ralf Baechle2007-03-171-0/+12
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] FPU ownership management & preemption fixesAtsushi Nemoto2007-03-175-89/+73
| | | | | Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Check FCSR for pending interrupts, alternative versionAtsushi Nemoto2007-03-175-23/+75
| | | | | | | | | | | Commit 6d6671066a311703bca1b91645bb1e04cc983387 is incomplete and misses non-r4k CPUs. This patch reverts the commit and fixes in other way. o Do FCSR checking in caller of restore_fp_context. o Send SIGFPE if the signal handler set any FPU exception bits. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] kspd: ioctl needs a translation entry.Ralf Baechle2007-03-131-1/+3
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [PATCH] Add epoll compat_ code to fs/compat.cDavide Libenzi2007-03-081-46/+0
| | | | | | | | | | | | | | | | | | | | | | | | IA64 and ARM-OABI are currently using their own version of epoll compat_ code. An architecture needs epoll_event translation if alignof(u64) in 32 bit mode is different from alignof(u64) in 64 bit mode. If an architecture needs epoll_event translation, it must define struct compat_epoll_event in asm/compat.h and set CONFIG_HAVE_COMPAT_EPOLL_EVENT and use compat_sys_epoll_ctl and compat_sys_epoll_wait. All 64 bit architecture should use compat_sys_epoll_pwait. [sfr: restructure and move to fs/compat.c, remove MIPS version of compat_sys_epoll_pwait, use __put_user_unaligned] Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Russell King <rmk@arm.linux.org.uk> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [MIPS] Wire up ioprio_set and ioprio_get.Ralf Baechle2007-03-074-1/+11
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Export __copy_user_inatomic.Ralf Baechle2007-03-071-0/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Fix and cleanup the mess that a dozen prom_printf variants are.Ralf Baechle2007-03-043-0/+49
| | | | | | early_printk is a so much saner thing. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Replace sys32_timer_create with the generic compat_sys_timer_create.Ralf Baechle2007-03-043-33/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Replace sys32_socketcall with the generic compat_sys_socketcall.Ralf Baechle2007-03-042-115/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] N32 waitid is the same as o32.Ralf Baechle2007-03-042-29/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Make SMTC_IDLE_HOOK_DEBUG a proper option in Kconfig.debug.Ralf Baechle2007-02-262-13/+10
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Fix foobar in wiring up compat_sys_epoll_pwait syscall.Ralf Baechle2007-02-262-2/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Always fixup unaligned accesses in kernel mode.Ralf Baechle2007-02-261-1/+1
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] RTLX: Delete multiple definition of ret shaddowing each other.Ralf Baechle2007-02-261-4/+0
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] RTLX, VPE: Make open actually atomic.Ralf Baechle2007-02-262-28/+23
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Kill redundant EXTRA_AFLAGSAtsushi Nemoto2007-02-261-2/+0
| | | | | | | | | | Many Makefiles in arch/mips have EXTRA_AFLAGS := $(CFLAGS) line. This is redundant while AFLAGS contains $(cflags-y) and any options only listed in CFLAGS (not in cflags-y) should be unnecessary for asm sources. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] RTLX: Handle signals when sleeping.Ralf Baechle2007-02-261-80/+42
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] SMP: Get smp_tune_scheduling to do something useful.Ralf Baechle2007-02-221-21/+4
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* [MIPS] Add basic SMARTMIPS ASE supportFranck Bui-Huu2007-02-224-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds trivial support for SMARTMIPS extension. This extension is currently implemented by 4KS[CD] CPUs. Basically it saves/restores ACX register, which is part of the SMARTMIPS ASE, when needed. This patch does *not* add any support for Smartmips MMU features. Futhermore this patch does not add explicit support for 4KS[CD] CPUs since they are respectively mips32 and mips32r2 compliant. So with the current processor configuration, a platform that has such CPUs needs to select both configs: CPU_HAS_SMARTMIPS SYS_HAS_CPU_MIPS32_R[12] This is due to the processor configuration which is mixing up all the architecture variants and the processor types. The drawback of this, is that we currently pass '-march=mips32' option to gcc when building a kernel instead of '-march=4ksc' for 4KSC case. This can lead to a kernel image a little bit bigger than required. Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds2007-02-203-13/+11
|\ | | | | | | | | | | | | | | | | | | | | * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [NET] Eliminate user-selectable CONFIG_MV643XX_ETH_[012] [MIPS] Drop __init from init_8259A() [MIPS] Fix Kconfig typo bug [MIPS] Fix double signal on trap and break instruction [MIPS] sigset_32 has been made redundand by compat_sigset_t. [MIPS] emma2rh: Remove needless <asm/i8259.h> inclusion. [MIPS] Add MTD device support for Cobalt
| * [MIPS] Drop __init from init_8259A()Atsushi Nemoto2007-02-201-5/+8
| | | | | | | | | | | | | | | | | | init_8259A() is called from i8259A_resume() so should not be marked as __init. And add some tests for whether 8259A was already initialized or not. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * [MIPS] Fix double signal on trap and break instructionAtsushi Nemoto2007-02-201-0/+2
| | | | | | | | | | | | | | This commit broke gdb, since any BREAK or TRAP instruction cause SIGSEGV. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * [MIPS] sigset_32 has been made redundand by compat_sigset_t.Ralf Baechle2007-02-201-8/+1
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | [MIPS] Make some __setup functions staticAtsushi Nemoto2007-02-202-3/+3
|/ | | | | | | | This fixes some sparse warnings. ("warning: symbol 'foo' was not declared. Should it be static?") Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds2007-02-197-158/+40
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: [MIPS] Update defconfigs [MIPS] Support for several more SNI RM models. [MIPS] Include <asm/bugs> to for declaration of check_bugs32. [MIPS] Add external declaration of pagetable_init() to pgalloc.h [MIPS] Make kernel_thread_helper() static [MIPS] Make __declare_dbe_table static and avoid it getting optimized away [MIPS] Use MIPS R2 instructions for bitops. [MIPS] signals: Share even more code. [MIPS] Fix CONFIG_MIPS32_N32=y CONFIG_MIPS32_O32=n build [MIPS] Iomap implementation. [MIPS] <asm/compat-signal.h> needs to include <asm/uaccess.h>. [MIPS] IP27: Fix warning. [MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.
| * [MIPS] Include <asm/bugs> to for declaration of check_bugs32.Ralf Baechle2007-02-181-0/+1
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * [MIPS] Make kernel_thread_helper() staticAtsushi Nemoto2007-02-181-1/+1
| | | | | | | | | | Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * [MIPS] Make __declare_dbe_table static and avoid it getting optimized awayRalf Baechle2007-02-181-7/+3
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * [MIPS] signals: Share even more code.Ralf Baechle2007-02-184-146/+31
| | | | | | | | | | | | | | native and compat do_signal and handle_signal are identical and can easily be unified. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * [MIPS] Fix CONFIG_MIPS32_N32=y CONFIG_MIPS32_O32=n buildRalf Baechle2007-02-181-2/+2
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * [MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.Atsushi Nemoto2007-02-181-2/+2
| | | | | | | | | | | | | | | | | | | | access_ok in compat-signal.h is wrong (checking destination instead of source) and redundant (already checked before calling this function). Also sf_mask in struct sigframe32 should be compat_sigset_t type. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Storage class should be before const qualifierTobias Klauser2007-02-171-2/+2
|/ | | | | | | | | | | The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* [PATCH] clocksource: fixup is_continous changes on MIPSThomas Gleixner2007-02-161-1/+1
| | | | | | | | | | | | Fixup the is_contionous replacement by a flag field. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: john stultz <johnstul@us.ibm.com> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linusLinus Torvalds2007-02-138-59/+115
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '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.
| * [MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.Ralf Baechle2007-02-135-9/+60
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
OpenPOWER on IntegriCloud