summaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel
Commit message (Collapse)AuthorAgeFilesLines
* ARC: signal handling robustifyVineet Gupta2015-03-261-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A malicious signal handler / restorer can DOS the system by fudging the user regs saved on stack, causing weird things such as sigreturn returning to user mode PC but cpu state still being kernel mode.... Ensure that in sigreturn path status32 always has U bit; any other bogosity (gargbage PC etc) will be taken care of by normal user mode exceptions mechanisms. Reproducer signal handler: void handle_sig(int signo, siginfo_t *info, void *context) { ucontext_t *uc = context; struct user_regs_struct *regs = &(uc->uc_mcontext.regs); regs->scratch.status32 = 0; } Before the fix, kernel would go off to weeds like below: --------->8----------- [ARCLinux]$ ./signal-test Path: /signal-test CPU: 0 PID: 61 Comm: signal-test Not tainted 4.0.0-rc5+ #65 task: 8f177880 ti: 5ffe6000 task.ti: 8f15c000 [ECR ]: 0x00220200 => Invalid Write @ 0x00000010 by insn @ 0x00010698 [EFA ]: 0x00000010 [BLINK ]: 0x2007c1ee [ERET ]: 0x10698 [STAT32]: 0x00000000 : <-------- BTA: 0x00010680 SP: 0x5ffe7e48 FP: 0x00000000 LPS: 0x20003c6c LPE: 0x20003c70 LPC: 0x00000000 ... --------->8----------- Reported-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: <stable@vger.kernel.org> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: SA_SIGINFO ucontext regs off-by-oneVineet Gupta2015-03-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The regfile provided to SA_SIGINFO signal handler as ucontext was off by one due to pt_regs gutter cleanups in 2013. Before handling signal, user pt_regs are copied onto user_regs_struct and copied back later. Both structs are binary compatible. This was all fine until commit 2fa919045b72 (ARC: pt_regs update #2) which removed the empty stack slot at top of pt_regs (corresponding to first pad) and made the corresponding fixup in struct user_regs_struct (the pad in there was moved out of @scratch - not removed altogether as it is part of ptrace ABI) struct user_regs_struct { + long pad; struct { - long pad; long bta, lp_start, lp_end,.... } scratch; ... } This meant that now user_regs_struct was off by 1 reg w.r.t pt_regs and signal code needs to user_regs_struct.scratch to reflect it as pt_regs, which is what this commit does. This problem was hidden for 2 years, because both save/restore, despite using wrong location, were using the same location. Only an interim inspection (reproducer below) exposed the issue. void handle_segv(int signo, siginfo_t *info, void *context) { ucontext_t *uc = context; struct user_regs_struct *regs = &(uc->uc_mcontext.regs); printf("regs %x %x\n", <=== prints 7 8 (vs. 8 9) regs->scratch.r8, regs->scratch.r9); } int main() { struct sigaction sa; sa.sa_sigaction = handle_segv; sa.sa_flags = SA_SIGINFO; sigemptyset(&sa.sa_mask); sigaction(SIGSEGV, &sa, NULL); asm volatile( "mov r7, 7 \n" "mov r8, 8 \n" "mov r9, 9 \n" "mov r10, 10 \n" :::"r7","r8","r9","r10"); *((unsigned int*)0x10) = 0; } Fixes: 2fa919045b72ec892e "ARC: pt_regs update #2: Remove unused gutter at start of pt_regs" CC: <stable@vger.kernel.org> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: Fix thread_saved_pc()Vineet Gupta2015-02-271-23/+0Star
| | | | | | | | | The old implementation assumed that SP at the time of __switch_to() is right above pt_regs which is almost certainly not the case as there will be some stack build up between entry into kernel and leading up to __switch_to Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: Fix KSTK_ESP()Vineet Gupta2015-02-271-3/+3
| | | | | | | | | | | | | /proc/<pid>/maps currently don't annotate stack vma with "[stack]" This is because KSTK_ESP ie expected to return usermode SP of tsk while currently it returns the kernel mode SP of a sleeping tsk. While the fix is trivial, we also need to adjust the ARC kernel stack unwinder to not use KSTK_SP and friends any more. Cc: <stable@vger.kernel.org> Reported-and-suggested-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: perf: Enable generic software eventsVineet Gupta2015-02-271-0/+2
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* ARC: Make arc_unwind_core accessible externallyVineet Gupta2015-02-271-1/+14
| | | | | | | The arc unwinder can also be used for perf callchains. Signed-off-by: Mischa Jonker <mjonker@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* Merge tag 'arc-3.20-rc1' of ↵Linus Torvalds2015-02-164-7/+40
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC updates from Vineet Gupta: "Some fixes, nothing too exciting this time as well..." * tag 'arc-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: fix page address calculation if PAGE_OFFSET != LINUX_LINK_BASE ARC: Fix earlycon build breakage ARC: Dynamically determine BASE_BAUD from DeviceTree arc: Remove unused prepare_to_copy() ARC: use ACCESS_ONCE in cmpxchg loop ARC: add some more comments to ret_from_fork ARC: fix /proc/cpuinfo for offline cpus
| * ARC: Fix earlycon build breakagePeter Hurley2015-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit ffb7fcd66f14 ("ARC: Dynamically determine BASE_BAUD from DeviceTree") breaks arc:defconfig build: drivers/built-in.o: In function `of_setup_earlycon': (.init.text+0xb3e): undefined reference to `arc_early_base_baud' drivers/built-in.o: In function `setup_earlycon': (.init.text+0xcd0): undefined reference to `arc_early_base_baud' make: *** [vmlinux] Error 1 BASE_BAUD is only required for earlycon, which should depend on CONFIG_SERIAL_EARLYCON. Reported-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * ARC: Dynamically determine BASE_BAUD from DeviceTreeVineet Gupta2015-02-021-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8250 earlycon is broken on multi-platform ARC because the UART clk value (BASE_BAUD) is fixed at build time. Instead, determine the appropriate UART clk at runtime; parse the devicetree early for platforms requiring alternate UART clk values (currently only the TB10X platform). Cc: Jiri Slaby <jslaby@suse.cz> Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: Rob Herring <robh@kernel.org> Cc: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * ARC: use ACCESS_ONCE in cmpxchg loopVineet Gupta2015-02-021-1/+1
| | | | | | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * ARC: add some more comments to ret_from_forkVineet Gupta2015-02-021-5/+9
| | | | | | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * ARC: fix /proc/cpuinfo for offline cpusVineet Gupta2015-02-021-1/+6
| | | | | | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* | all arches, signal: move restart_block to struct task_structAndy Lutomirski2015-02-131-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an attacker can cause a controlled kernel stack overflow, overwriting the restart block is a very juicy exploit target. This is because the restart_block is held in the same memory allocation as the kernel stack. Moving the restart block to struct task_struct prevents this exploit by making the restart_block harder to locate. Note that there are other fields in thread_info that are also easy targets, at least on some architectures. It's also a decent simplification, since the restart code is more or less identical on all architectures. [james.hogan@imgtec.com: metag: align thread_info::supervisor_stack] Signed-off-by: Andy Lutomirski <luto@amacapital.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Kees Cook <keescook@chromium.org> Cc: David Miller <davem@davemloft.net> Acked-by: Richard Weinberger <richard@nod.at> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Matt Turner <mattst88@gmail.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Cc: Steven Miao <realmz6@gmail.com> Cc: Mark Salter <msalter@redhat.com> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: David Howells <dhowells@redhat.com> Cc: Richard Kuo <rkuo@codeaurora.org> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michal Simek <monstr@monstr.eu> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Jonas Bonn <jonas@southpole.se> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> Cc: Helge Deller <deller@gmx.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Tested-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Chen Liqin <liqin.linux@gmail.com> Cc: Lennox Wu <lennox.wu@gmail.com> Cc: Chris Metcalf <cmetcalf@ezchip.com> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Chris Zankel <chris@zankel.net> Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Guenter Roeck <linux@roeck-us.net> Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ARC: R-M-W assist locks only needed for !LLSCVineet Gupta2014-12-121-0/+2
| | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* Merge tag 'remove-weak-declarations' of ↵Linus Torvalds2014-10-241-5/+0Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull weak function declaration removal from Bjorn Helgaas: "The "weak" attribute is commonly used for the default version of a function, where an architecture can override it by providing a strong version. Some header file declarations included the "weak" attribute. That's error-prone because it causes every implementation to be weak, with no strong version at all, and the linker chooses one based on link order. What we want is the "weak" attribute only on the *definition* of the default implementation. These changes remove "weak" from the declarations, leaving it on the default definitions" * tag 'remove-weak-declarations' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: uprobes: Remove "weak" from function declarations memory-hotplug: Remove "weak" from memory_block_size_bytes() declaration kgdb: Remove "weak" from kgdb_arch_pc() declaration ARC: kgdb: generic kgdb_arch_pc() suffices vmcore: Remove "weak" from function declarations clocksource: Remove "weak" from clocksource_default_clock() declaration x86, intel-mid: Remove "weak" from function declarations audit: Remove "weak" from audit_classify_compat_syscall() declaration
| * ARC: kgdb: generic kgdb_arch_pc() sufficesVineet Gupta2014-10-231-5/+0Star
| | | | | | | | | | | | | | The ARC version of kgdb_arch_pc() is identical to the generic version in kernel/debug/debug_core.c. Drop the ARC version so we use the generic one. Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
* | ARC: boot: cpu feature print enhancementsVineet Gupta2014-10-132-109/+120
| | | | | | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* | ARC: boot: consolidate cross-checking of h/w and s/wVineet Gupta2014-10-131-29/+15Star
| | | | | | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* | ARC: RIP @running_on_hwVineet Gupta2014-10-132-12/+0Star
| | | | | | | | | | | | | | | | | | | | * No active users of this flag anymore * flag itself was no longer usable with new simualtor which acts just like hardware, not providing the special chip-id = 0xffff which good old ISS used to do. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* | ARC: rename kconfig option for unaligned emulationVineet Gupta2014-10-132-3/+3
| | | | | | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* | ARC: [plat*] move code out of .init_machine into commonVineet Gupta2014-10-131-1/+9
| | | | | | | | | | | | | | All the platforms do the same thing in init_machine callback so move it out of callback into caller of callback Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* | ARC: Allow SMP kernel to build/boot on UP-only infrastructureVineet Gupta2014-09-272-13/+2Star
|/ | | | | | | | | | | | | In light of recent SNAFU with SMP build, allow simple platform to build as SMP but run UP. * Remove the dependence on simulation SMP extension to enable quick build/test iterations of SMP kernel. * In absence of platform SMP registration, prevent the NULL smp feature name from borkign the system Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* Merge branch 'signal-cleanup' of ↵Linus Torvalds2014-08-091-30/+17Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc Pull arch signal handling cleanup from Richard Weinberger: "This patch series moves all remaining archs to the get_signal(), signal_setup_done() and sigsp() functions. Currently these archs use open coded variants of the said functions. Further, unused parameters get removed from get_signal_to_deliver(), tracehook_signal_handler() and signal_delivered(). At the end of the day we save around 500 lines of code." * 'signal-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/misc: (43 commits) powerpc: Use sigsp() openrisc: Use sigsp() mn10300: Use sigsp() mips: Use sigsp() microblaze: Use sigsp() metag: Use sigsp() m68k: Use sigsp() m32r: Use sigsp() hexagon: Use sigsp() frv: Use sigsp() cris: Use sigsp() c6x: Use sigsp() blackfin: Use sigsp() avr32: Use sigsp() arm64: Use sigsp() arc: Use sigsp() sas_ss_flags: Remove nested ternary if Rip out get_signal_to_deliver() Clean up signal_delivered() tracehook_signal_handler: Remove sig, info, ka and regs ...
| * arc: Use sigsp()Richard Weinberger2014-08-061-7/+3Star
| | | | | | | | | | | | | | Use sigsp() instead of the open coded variant. Signed-off-by: Richard Weinberger <richard@nod.at> Acked-by: Vineet Gupta <vgupta@synopsys.com>
| * arc: Use get_signal() signal_setup_done()Richard Weinberger2014-08-061-24/+15Star
| | | | | | | | | | | | | | | | Use the more generic functions get_signal() signal_setup_done() for signal delivery. Signed-off-by: Richard Weinberger <richard@nod.at> Acked-by: Vineet Gupta <vgupta@synopsys.com>
* | Merge tag 'arc-v3.17-rc1' of ↵Linus Torvalds2014-08-093-49/+55
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC changes from Vineet Gupta: "Mostly cleanup/refactoring in core intc, cache flush, IPI send..." * tag 'arc-v3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: mm, arc: remove obsolete pagefault oom killer comment ARC: help gcc elide icache helper for !SMP ARC: move common ops for line/full cache into helpers ARC: cache boot reporting updates ARC: [intc] mask/unmask can be hidden again ARC: [plat-arcfpga] No need for init_irq hack ARC: [intc] don't mask all IRQ by default ARC: prune extra header includes from smp.c ARC: update some comments ARC: [SMP] unify cpu private IRQ requests (TIMER/IPI)
| * | ARC: [intc] mask/unmask can be hidden againVineet Gupta2014-07-231-6/+14
| | | | | | | | | | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * | ARC: [intc] don't mask all IRQ by defaultVineet Gupta2014-07-231-6/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware keeps them enabled on reset, and Linux needs to keep status quo. Any spurious interrupts will be reported/blocked by genirq. This helps remove a SMP IRQ quirk (next commit), where a peripheral IRQ is hard wired to core0, and request_irq()->unmask() happens on core1, keeping the IRQ masked on core0, needing an explicit unmask. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * | ARC: prune extra header includes from smp.cVineet Gupta2014-07-231-8/+0Star
| | | | | | | | | | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * | ARC: update some commentsVineet Gupta2014-07-231-3/+7
| | | | | | | | | | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * | ARC: [SMP] unify cpu private IRQ requests (TIMER/IPI)Vineet Gupta2014-07-233-26/+33
| |/ | | | | | | | | | | | | | | | | | | | | | | The current cpu-private IRQ registration is ugly as it requires need to expose arch_unmask_irq() outside of intc code. So switch to percpu IRQ APIs: -request_percpu_irq [boot core] -enable_percpu_irq [all cores] Encapsulated in helper arc_request_percpu_irq() Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* | Merge tag 'v3.16-rc7' into perf/core, to merge in the latest fixes before ↵Ingo Molnar2014-07-286-8/+24
|\| | | | | | | | | | | applying new changes Signed-off-by: Ingo Molnar <mingo@kernel.org>
| * ARC: [SMP] Fix IPI IRQ registrationNoam Camus2014-06-261-2/+13
| | | | | | | | | | | | | | | | | | Handle it just like timer. Current request_percpu_irq() would fail on non-boot cpus and thus IRQ will remian unmasked on those cpus. [vgupta: fix changelong] Signed-off-by: Noam Camus <noamc@ezchip.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * ARC: Implement ptrace(PTRACE_GET_THREAD_AREA)Anton Kolesov2014-06-261-0/+4
| | | | | | | | | | | | | | | | This patch adds implementation of GET_THREAD_AREA ptrace request type. This is required by GDB to debug NPTL applications. Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * ARC: optimize kernel bss clearing in early boot codeVineet Gupta2014-06-262-4/+5
| | | | | | | | | | | | using ARC ZOL which reduces tot num of instructions by half Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * ARC: Fix build breakage for !CONFIG_ARC_DW2_UNWINDVineet Gupta2014-06-261-1/+1
| | | | | | | | | | | | Fixes: ec7ac6afd07b (ARC: switch to generic ENTRY/END assembler annotations) Reported-by: Anton Kolesov <akolesov@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * ARC: fix build warning in devtreeVineet Gupta2014-06-231-1/+1
| | | | | | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* | arc, perf: Use common PMU interrupt disabled codeVince Weaver2014-06-181-4/+3Star
|/ | | | | | | | | | | | | | | Transition to using the new generic PERF_PMU_CAP_NO_INTERRUPT method for failing a sampling event when no PMU interrupt is available. Signed-off-by: Vince Weaver <vincent.weaver@maine.edu> Acked-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Grant Likely <grant.likely@linaro.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Rob Herring <robh+dt@kernel.org> Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1406150159280.16738@vincent-weaver-1.umelst.maine.edu Signed-off-by: Ingo Molnar <mingo@kernel.org>
* Merge tag 'arc-v3.16-rc1' of ↵Linus Torvalds2014-06-106-33/+71
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC updates from Vineet Gupta: "Nothing too exciting here, just minor fixes/cleanup. Only noteworthy ones are: - Moving cache disabling to early boot - ARC UART enabled only if earlyprintk setup in cmdline" * tag 'arc-v3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: ARC: Disable caches in early boot if so configured ARC: [arcfpga] Early ARC UART to be only activated by cmdline ARC: [arcfpga] Get rid of legacy BVCI latency unit support ARC: remove duplicate header exports ARC: arc_local_timer_setup() need not pass own cpu id ARC: Fixed spelling errors within comments ARC: make start_thread() out-of-line ARC: fix mmuv2 warning ARC: [SMP] ISS SMP extension bitrot
| * ARC: Disable caches in early boot if so configuredVineet Gupta2014-06-031-3/+35
| | | | | | | | | | Requested-by: Noam Camus <noamc@ezchip.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * ARC: arc_local_timer_setup() need not pass own cpu idVineet Gupta2014-06-032-6/+7
| | | | | | | | Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * ARC: Fixed spelling errors within commentsTerence Eden2014-05-051-6/+6
| | | | | | | | | | | | | | | | [vgupta: fixed changelong + added Randy's suggestion] Signed-off-by: Terence Eden <github.com@shkspr.mobi> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * ARC: make start_thread() out-of-lineVineet Gupta2014-05-051-0/+23
| | | | | | | | | | | | Helps move out ISA specific bits from a arch exported header Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
| * ARC: [SMP] ISS SMP extension bitrotVineet Gupta2014-05-051-18/+0Star
| | | | | | | | | | | | | | * Move extension specific code out of common SMP code * Don't enable it by default for SMP Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
* | arc: call find_vma with the mmap_sem heldDavidlohr Bueso2014-06-051-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Performing vma lookups without taking the mm->mmap_sem is asking for trouble. While doing the search, the vma in question can be modified or even removed before returning to the caller. Take the lock (shared) in order to avoid races while iterating through the vmacache and/or rbtree. [akpm@linux-foundation.org: CSE current->active_mm, per Vineet] Signed-off-by: Davidlohr Bueso <davidlohr@hp.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge branch 'dt-bus-name' into for-nextRob Herring2014-05-141-3/+5
|\|
| * ARC: !PREEMPT: Ensure Return to kernel mode is IRQ safeVineet Gupta2014-04-301-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a very small race window where resume to kernel mode from a Exception Path (or pure kernel mode which is true for most of ARC exceptions anyways), was not disabling interrupts in restore_regs, clobbering the exception regs Anton found the culprit call flow (after many sleepless nights) | 1. we got a Trap from user land | 2. started to service it. | 3. While doing some stuff on user-land memory (I think it is padzero()), | we got a DataTlbMiss | 4. On return from it we are taking "resume_kernel_mode" path | 5. NEED_RESHED is not set, so we go to "return from exception" path in | restore regs. | 6. there seems to be IRQ happening Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: <stable@vger.kernel.org> #3.10, 3.12, 3.13, 3.14 Cc: Anton Kolesov <Anton.Kolesov@synopsys.com> Cc: Francois Bedard <Francois.Bedard@synopsys.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | of/fdt: update of_get_flat_dt_prop in prep for libfdtRob Herring2014-04-301-1/+1
|/ | | | | | | | | | | Make of_get_flat_dt_prop arguments compatible with libfdt fdt_getprop call in preparation to convert FDT code to use libfdt. Make the return value const and the property length ptr type an int. Signed-off-by: Rob Herring <robh@kernel.org> Tested-by: Michal Simek <michal.simek@xilinx.com> Tested-by: Grant Likely <grant.likely@linaro.org> Tested-by: Stephen Chivers <schivers@csc.com>
* ARC: [SMP] General FixesVineet Gupta2014-04-051-3/+4
| | | | | | | -Pass the expected arg to non-boot park'ing routine (It worked so far because existing SMP backends don't use the arg) -CONFIG_DEBUG_PREEMPT warning
* ARC: [clockevent] simplify timer ISRVineet Gupta2014-03-261-19/+15Star
| | | | | | * Remove one liner IRQ ACK accessor, it was coming in the way of readability. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>