aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/thread_info.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-03-26MIPS: Basic MSA context switching supportPaul Burton1-0/+4
This patch adds support for context switching the MSA vector registers. These 128 bit vector registers are aliased with the FP registers - an FP register accesses the least significant bits of the vector register with which it is aliased (ie. the register with the same index). Due to both this & the requirement that the scalar FPU must be 64-bit (FR=1) if enabled at the same time as MSA the kernel will enable MSA & scalar FP at the same time for tasks which use MSA. If we restore the MSA vector context then we might as well enable the scalar FPU since the reason it was left disabled was to allow for lazy FP context restoring - but we just restored the FP context as it's a subset of the vector context. If we restore the FP context and have previously used MSA then we have to restore the whole vector context anyway (see comment in enable_restore_fp_context for details) so similarly we might as well enable MSA. Thus if a task does not use MSA then it will continue to behave as without this patch - the scalar FP context will be saved & restored as usual. But if a task executes an MSA instruction then it will save & restore the vector context forever more. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6431/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-03-26MIPS: asm: thread_info: Add _TIF_SECCOMP flagMarkos Chandras1-1/+2
Add _TIF_SECCOMP flag to _TIF_WORK_SYSCALL_ENTRY to indicate that the system call needs to be checked against a seccomp filter. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Reviewed-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6405/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-01-13MIPS: Support for 64-bit FP with O32 binariesPaul Burton1-1/+3
CPUs implementing MIPS32 R2 may include a 64-bit FPU, just as MIPS64 CPUs do. In order to preserve backwards compatibility a 64-bit FPU will act like a 32-bit FPU (by accessing doubles from the least significant 32 bits of an even-odd pair of FP registers) when the Status.FR bit is zero, again just like a mips64 CPU. The standard O32 ABI is defined expecting a 32-bit FPU, however recent toolchains support use of a 64-bit FPU from an O32 MIPS32 executable. When an ELF executable is built to use a 64-bit FPU a new flag (EF_MIPS_FP64) is set in the ELF header. With this patch the kernel will check the EF_MIPS_FP64 flag when executing an O32 binary, and set Status.FR accordingly. The addition of O32 64-bit FP support lessens the opportunity for optimisation in the FPU emulator, so a CONFIG_MIPS_O32_FP64_SUPPORT Kconfig option is introduced to allow this support to be disabled for those that don't require it. Inspired by an earlier patch by Leonid Yegoshin, but implemented more cleanly & correctly. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: Paul Burton <paul.burton@imgtec.com> Patchwork: https://patchwork.linux-mips.org/patch/6154/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-11-13preempt: Make PREEMPT_ACTIVE genericThomas Gleixner1-2/+0
No point in having this bit defined by architecture. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20130917183629.090698799@linutronix.de
2013-10-29MIPS: ftrace: Add support for syscall tracepoints.Ralf Baechle1-3/+6
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-29MIPS: Move definition of SMP processor id register to header fileJayachandran C1-1/+32
The definition of the CP0 register used to save the smp processor id is repicated in many files, move them all to thread_info.h. Signed-off-by: Jayachandran C <jchandra@broadcom.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/5708/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-06-10MIPS: Implement HAVE_CONTEXT_TRACKING.Ralf Baechle1-3/+8
This enables support for CONFIG_NO_HZ_FULL. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-06-10MIPS: Cleanup flags in syscall flags handlers.Ralf Baechle1-0/+2
This will simplify further modifications. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-04-11MIPS: Use inline function to access current thread pointer.Ralf Baechle1-2/+6
With LTE this fixes this issue: LDFINAL vmlinux.o arch/mips/built-in.o (symbol from plugin): In function `sgimc_init': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here kernel/built-in.o (symbol from plugin): In function `get_task_mm': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here mm/built-in.o (symbol from plugin): In function `iov_iter_single_seg_count': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here fs/built-in.o (symbol from plugin): In function `finish_no_open': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here ipc/built-in.o (symbol from plugin): In function `ipc_init_ids': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here security/built-in.o (symbol from plugin): In function `key_schedule_gc': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here crypto/built-in.o (symbol from plugin): In function `crypto_find_alg': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here block/built-in.o (symbol from plugin): In function `elv_rb_find': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here argv_split.o (symbol from plugin): In function `argv_free': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here dec_and_lock.o (symbol from plugin): In function `_atomic_dec_and_lock': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here extable.o (symbol from plugin): In function `sort_extable': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here flex_proportions.o (symbol from plugin): In function `fprop_global_init': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here idr.o (symbol from plugin): In function `idr_for_each': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here is_single_threaded.o (symbol from plugin): In function `current_is_single_threaded': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here kobject.o (symbol from plugin): In function `kobject_get': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here kobject_uevent.o (symbol from plugin): In function `add_uevent_var': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here plist.o (symbol from plugin): In function `plist_add': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here radix-tree.o (symbol from plugin): In function `radix_tree_lookup_slot': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here ratelimit.o (symbol from plugin): In function `___ratelimit': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here rwsem-spinlock.o (symbol from plugin): In function `__init_rwsem': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here show_mem.o (symbol from plugin): In function `show_mem': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here timerqueue.o (symbol from plugin): In function `timerqueue_iterate_next': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here vsprintf.o (symbol from plugin): In function `simple_strtoull': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here delay.o (symbol from plugin): In function `__delay': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here mips-atomic.o (symbol from plugin): In function `arch_local_irq_disable': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here uncached.o (symbol from plugin): In function `run_uncached': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here lib/built-in.o (symbol from plugin): In function `_bcd2bin': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here arch/mips/lib/built-in.o (symbol from plugin): In function `ioread8': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here drivers/built-in.o (symbol from plugin): In function `fb_notifier_call_chain': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here net/built-in.o (symbol from plugin): In function `sock_from_file': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here klist.o (symbol from plugin): In function `klist_init': (.text+0x0): multiple definition of `$28' init/built-in.o (symbol from plugin):(.text+0x0): first defined here It also makes the code a little more readable, so let's merge it. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-02-01MIPS: Whitespace cleanup.Ralf Baechle1-1/+1
Having received another series of whitespace patches I decided to do this once and for all rather than dealing with this kind of patches trickling in forever. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-12-27MIPS: Fix comment.Ralf Baechle1-4/+5
The value is incorrect and were copied in Linux 2.5.4 from i386. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-11-09MIPS: compat: Delete now unused TIF_32BIT.Ralf Baechle1-6/+0
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-11-09MIPS: compat: Fix use of TIF_32BIT_ADDR vs _TIF_32BIT_ADDRRalf Baechle1-1/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-10-01sanitize tsk_is_polling()Al Viro1-2/+0
Make default just return 0. The current default (checking TIF_POLLING_NRFLAG) is taken to architectures that need it; ones that don't do polling in their idle threads don't need to defined TIF_POLLING_NRFLAG at all. ia64 defined both TS_POLLING (used by its tsk_is_polling()) and TIF_POLLING_NRFLAG (not used at all). Killed the latter... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-10-01bury _TIF_RESTORE_SIGMASKAl Viro1-1/+0
never used... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-10-01mips: NOTIFY_RESUME is not needed in TIF masksAl Viro1-2/+1
If it's set, SIGPENDING is also set. And SIGPENDING is present in the masks... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-10-01mips: unobfuscate _TIF..._MASKAl Viro1-3/+4
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-07-19MIPS: Properly align the .data..init_task section.David Daney1-2/+2
Improper alignment can lead to unbootable systems and/or random crashes. [ralf@linux-mips.org: This is a lond standing bug since 6eb10bc9e2deab06630261cd05c4cb1e9a60e980 (kernel.org) rsp. c422a10917f75fd19fa7fe070aaaa23e384dae6f (lmo) [MIPS: Clean up linker script using new linker script macros.] so dates back to 2.6.32.] Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Cc: <stable@vger.kernel.org> Patchwork: https://patchwork.linux-mips.org/patch/3881/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2012-05-08mips: Use common threadinfo allocatorThomas Gleixner1-12/+0
No point in using kmalloc for allocating 0, 1 resp. 2 pages for threadinfo. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Ralf Baechle <ralf@linux-mips.org> Link: http://lkml.kernel.org/r/20120505150141.936950979@linutronix.de
2011-11-21freezer: remove now unused TIF_FREEZETejun Heo1-2/+0
Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: linux-arch@vger.kernel.org
2011-05-19MIPS: Use single define for pending work on syscall exitRalf Baechle1-0/+3
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-03-22mm: NUMA aware alloc_thread_info_node()Eric Dumazet1-2/+4
Add a node parameter to alloc_thread_info(), and change its name to alloc_thread_info_node() This change is needed to allow NUMA aware kthread_create_on_cpu() Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Reviewed-by: Andi Kleen <ak@linux.intel.com> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Tejun Heo <tj@kernel.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: David Howells <dhowells@redhat.com> Cc: <linux-arch@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-10-29MIPS: IRQ: Add stackoverflow detectionFrom: jiang.adam@gmail.com1-0/+2
Add stackoverflow detection to mips arch Signed-off-by: Adam Jiang <jiang.adam@gmail.com> Cc: dmitri.vorobiev@movial.com Cc: wuzhangjin@gmail.com Cc: ddaney@caviumnetworks.com Cc: peterz@infradead.org Cc: fweisbec@gmail.com Cc: tj@kernel.org Cc: tglx@linutronix.de Cc: mingo@elte.hu Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/1559/ Patchwork: https://patchwork.linux-mips.org/patch/1651/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-10-04MIPS: Audit: Fix hang in entry.S.Ralf Baechle1-1/+2
_TIF_WORK_MASK false had _TIF_SYSCALL_AUDIT set. If a thread's _TIF_SYSCALL_AUDIT is ever set this will lead to an endless loop on the way out from a syscall. Currently this is only a theoretic bug as init/Kconfig doesn't allow AUDIT_SYSCALL to be enabled for MIPS. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2010-05-14add descriptive comment for TIF_MEMDIE task flag declaration.Andreas Dilger1-1/+1
Signed-off-by: Andreas Dilger <adilger@dilger.ca> Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-11-02MIPS: Cleanup CONFIG_DEBUG_STACK_USAGE version of alloc_thread_info.Ralf Baechle1-8/+1
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2009-09-02KEYS: Extend TIF_NOTIFY_RESUME to (almost) all architectures [try #6]David Howells1-0/+2
Implement TIF_NOTIFY_RESUME for most of those architectures in which isn't yet available, and, whilst we're at it, have it call the appropriate tracehook. After this patch, blackfin, m68k* and xtensa still lack support and need alteration of assembly code to make it work. Resume notification can then be used (by a later patch) to install a new session keyring on the parent of a process. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> cc: linux-arch@vger.kernel.org Signed-off-by: James Morris <jmorris@namei.org>
2009-07-10sched: INIT_PREEMPT_COUNTPeter Zijlstra1-3/+1
Pull the initial preempt_count value into a single definition site. Maintainers for: alpha, ia64 and m68k, please have a look, your arch code is funny. The header magic is a bit odd, but similar to the KERNEL_DS one, CPP waits with expanding these macros until the INIT_THREAD_INFO macro itself is expanded, which is in arch/*/kernel/init_task.c where we've already included sched.h so we're good. Cc: tony.luck@intel.com Cc: rth@twiddle.net Cc: geert@linux-m68k.org Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-05-14MIPS: Cavium: Add support for 8k and 32k page sizes.Ralf Baechle1-0/+3
Beyond the requirements of the architecture standard Cavium also supports 8k and 32k pages. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Acked-by: David Daney <ddaney@caviumnetworks.com>
2009-03-13MIPS: Fix TIF_32BIT undefined problem when seccomp is disabledZhang Le1-0/+6
Signed-off-by: Zhang Le <r0bertz@gentoo.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2008-10-11MIPS: Add HARDWARE_WATCHPOINTS definitions and support code.David Daney1-0/+2
This is the main support code for the patch. Here we just add the code, the following patches hook it up. Signed-off-by: David Daney <ddaney@avtrex.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> create mode 100644 arch/mips/include/asm/watch.h create mode 100644 arch/mips/kernel/watch.c
2008-10-11MIPS: Move headfiles to new location below arch/mips/includeRalf Baechle1-0/+151
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>