Commit graph android_kernel_sony_sdm845/arch/mips/kernel
Message SHA1
[MIPS] Export except_vec_vi_{mori,lui,ori} as text symbols.
Otherwise objdump will screw up disassembly.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-03-19 20:22:44 +00:00
7df4246117
[MIPS] VI: TRACE_IRQS_OFF clobbers $v0, so save & restore around call.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-03-19 20:22:43 +00:00
8c3644350f
[MIPS] RTLX: Handle copy_*_user return values.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-03-17 01:03:29 +00:00
46230aa6ea
[MIPS] RTLX: Protect rtlx_{read,write} with mutex.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-03-17 01:03:28 +00:00
bc4809e939
[MIPS] RTLX: Harden against compiler reordering and optimization.
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>

Ralf Baechle   commited 2007-03-17 01:03:27 +00:00
61dcc6f4d9
[MIPS] RTLX: Don't use volatile; it's fragile.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-03-17 01:03:27 +00:00
9e34682026
[MIPS] Compat: Fix build if CONFIG_SYSVIPC is disabled.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-03-17 01:03:26 +00:00
65f8ebe063
[MIPS] FPU ownership management & preemption fixes
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2007-03-17 01:03:26 +00:00
53dc80287d
[MIPS] Check FCSR for pending interrupts, alternative version
Commit 6d6671066a 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>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2007-03-17 01:03:25 +00:00
c6a2f46793
[MIPS] kspd: ioctl needs a translation entry.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-03-13 16:59:31 +00:00
0e6ee854e7
[PATCH] Add epoll compat_ code to fs/compat.c
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>

Davide Libenzi   authored and   Linus Torvalds   commited 2007-03-08 07:38:22 -08:00
f6dfb4fd7d
[MIPS] Wire up ioprio_set and ioprio_get.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-03-07 00:07:18 +00:00
08253b39f8
[MIPS] Export __copy_user_inatomic.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-03-07 00:07:17 +00:00
d0c91ae2bb
[MIPS] Fix and cleanup the mess that a dozen prom_printf variants are.
early_printk is a so much saner thing.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-03-04 19:02:37 +00:00
36a885306f
[MIPS] Replace sys32_timer_create with the generic compat_sys_timer_create.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-03-04 19:02:30 +00:00
821d313c25
[MIPS] Replace sys32_socketcall with the generic compat_sys_socketcall.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-03-04 19:02:30 +00:00
08274cefdc
[MIPS] N32 waitid is the same as o32.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-03-04 19:02:29 +00:00
440537ef40
[MIPS] Make SMTC_IDLE_HOOK_DEBUG a proper option in Kconfig.debug.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-26 23:06:06 +00:00
c68644d330
[MIPS] Fix foobar in wiring up compat_sys_epoll_pwait syscall.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-26 23:06:06 +00:00
e016c38d18
[MIPS] Always fixup unaligned accesses in kernel mode.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-26 23:06:06 +00:00
b772e6d272
[MIPS] RTLX: Delete multiple definition of ret shaddowing each other.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-26 23:06:06 +00:00
3dac2561e2
[MIPS] RTLX, VPE: Make open actually atomic.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-26 23:06:06 +00:00
c4c4018b04
[MIPS] Kill redundant EXTRA_AFLAGS
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>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2007-02-26 23:06:05 +00:00
d2af363cfb
[MIPS] RTLX: Handle signals when sleeping.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-26 23:06:05 +00:00
67e2cccec6
[MIPS] SMP: Get smp_tune_scheduling to do something useful.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-22 00:50:45 +00:00
de7fa296b6
[MIPS] Add basic SMARTMIPS ASE support
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>

Franck Bui-Huu   authored and   Ralf Baechle   commited 2007-02-22 00:50:44 +00:00
9693a85378
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* '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

Linus Torvalds   commited 2007-02-20 10:14:29 -08:00
d7f786e065
[MIPS] Drop __init from init_8259A()
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>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2007-02-20 17:11:55 +00:00
a0be2f7999
[MIPS] Fix double signal on trap and break instruction
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>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2007-02-20 17:11:55 +00:00
90fccb1363
[MIPS] sigset_32 has been made redundand by compat_sigset_t.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-20 17:11:55 +00:00
01ee603708
[MIPS] Make some __setup functions static
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>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2007-02-20 01:26:41 +00:00
f49a747c4a
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* '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.

Linus Torvalds   commited 2007-02-19 13:38:42 -08:00
cb553c4800
[MIPS] Include <asm/bugs> to for declaration of check_bugs32.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-18 21:31:36 +00:00
5759906ca9
[MIPS] Make kernel_thread_helper() static
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2007-02-18 21:31:36 +00:00
db0b937daf
[MIPS] Make __declare_dbe_table static and avoid it getting optimized away
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-18 21:31:36 +00:00
b6dcec9ba4
[MIPS] signals: Share even more code.
native and compat do_signal and handle_signal are identical and can easily
be unified.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-18 21:31:35 +00:00
151fd6acd9
[MIPS] Fix CONFIG_MIPS32_N32=y CONFIG_MIPS32_O32=n build
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-18 21:31:34 +00:00
38201fb23c
[MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.
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>

Atsushi Nemoto   authored and   Ralf Baechle   commited 2007-02-18 21:31:33 +00:00
755f21bb89
Storage class should be before const qualifier
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>

Tobias Klauser   authored and   Adrian Bunk   commited 2007-02-17 20:11:19 +01:00
c5a69d57eb
[PATCH] clocksource: fixup is_continous changes on MIPS
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>

Thomas Gleixner   authored and   Linus Torvalds   commited 2007-02-16 08:13:57 -08:00
877fe38029
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* '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.

Linus Torvalds   commited 2007-02-13 16:12:23 -08:00
463020ce42
[MIPS] Fix sigset_t endianess swapping issues in 32-bit compat code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-13 22:40:51 +00:00
431dc80403
[MIPS] Make entry.S a little more readable.
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>

Franck Bui-Huu   authored and   Ralf Baechle   commited 2007-02-13 22:40:51 +00:00
7da8a581f5
[MIPS] signals: make common _BLOCKABLE macro
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Franck Bui-Huu   authored and   Ralf Baechle   commited 2007-02-13 22:40:51 +00:00
24c556e99e
[MIPS] signal: Move sigframe definition for native O32/N64 into signal.c
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-13 22:40:50 +00:00
6668058346
[MIPS] signal: Move {restore,setup}_sigcontext prototypes to their user
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-13 22:40:50 +00:00
205d84aaea
[MIPS] signal: Fix warnings in o32 compat code.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

Ralf Baechle   commited 2007-02-13 22:40:50 +00:00
dd02f06aa9
[PATCH] mark struct file_operations const 2
Many struct file_operations in the kernel can be "const".  Marking them const
moves these to the .rodata section, which avoids false sharing with potential
dirty data.  In addition it'll catch accidental writes at compile time to
these shared resources.

[akpm@osdl.org: sparc64 fix]
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Arjan van de Ven   authored and   Linus Torvalds   commited 2007-02-12 09:48:44 -08:00
5dfe4c964a
[PATCH] Dynamic kernel command-line: mips
Rename saved_command_line into boot_command_line.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Alon Bar-Lev   authored and   Linus Torvalds   commited 2007-02-12 09:48:38 -08:00
43cd34645d
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] signal: do not inline handle_signal()
  [MIPS] signal: do not use save_static_function() anymore
  [MIPS] signal32: no need to save c0_status register in setup_sigcontext32()
  [MIPS] signal32: reduce {setup,restore}_sigcontext32 sizes
  [MIPS] signal: factorize debug code
  [MIPS] signal: test return value of install_sigtramp()
  [MIPS] signal32: remove duplicate code
  [MIPS] signal: clean up sigframe structure
  [MIPS] signal: do not inline functions in signal-common.h
  [MIPS] signals: reduce {setup,restore}_sigcontext sizes
  [MIPS] Fix warning in get_user when fetching pointer object from userspace.
  [MIPS] Fix eth2 platform device id for jaguar_atx and ocelot_3 platforms
  [MIPS] JMR3927 and RBTX49x7 support little endian
  [MIPS] RBTX49x7: declare prom_getcmdline()
  [MIPS] RTLX: Sprinkle device model code into code to make udev happier.
  [MIPS] VPE: Sprinkle device model code into code to make udev happier.

Linus Torvalds   commited 2007-02-11 11:40:04 -08:00
574009c1a8