1. 13 Jul, 2011 1 commit
    • Jon Medhurst's avatar
      ARM: Thumb-2: Support Thumb-2 in undefined instruction handler · 592201a9
      Jon Medhurst authored
      This patch allows undef_hook's to be specified for 32-bit Thumb
      instructions and also to be used for thumb kernel-side code.
      32-bit Thumb instructions are specified in the form:
      	((first_half << 16 ) | second_half)
      which matches the layout used by the ARM ARM.
      ptrace was handling 32-bit Thumb instructions by hooking the first
      halfword and manually checking the second half. This method would be
      broken by this patch so it is migrated to make use of the new Thumb-2
      Signed-off-by: default avatarJon Medhurst <tixy@yxit.co.uk>
      Acked-by: default avatarNicolas Pitre <nicolas.pitre@linaro.org>
  2. 09 Jun, 2011 2 commits
  3. 13 May, 2011 1 commit
  4. 14 Apr, 2011 1 commit
  5. 23 Feb, 2011 2 commits
    • Will Deacon's avatar
      ARM: 6668/1: ptrace: remove single-step emulation code · 425fc47a
      Will Deacon authored
      PTRACE_SINGLESTEP is a ptrace request designed to offer single-stepping
      support to userspace when the underlying architecture has hardware
      support for this operation.
      On ARM, we set arch_has_single_step() to 1 and attempt to emulate hardware
      single-stepping by disassembling the current instruction to determine the
      next pc and placing a software breakpoint on that location.
      Unfortunately this has the following problems:
      1.) Only a subset of ARMv7 instructions are supported
      2.) Thumb-2 is unsupported
      3.) The code is not SMP safe
      We could try to fix this code, but it turns out that because of the above
      issues it is rarely used in practice.  GDB, for example, uses PTRACE_POKETEXT
      and PTRACE_PEEKTEXT to manage breakpoints itself and does not require any
      kernel assistance.
      This patch removes the single-step emulation code from ptrace meaning that
      the PTRACE_SINGLESTEP request will return -EIO on ARM. Portable code must
      check the return value from a ptrace call and handle the failure gracefully.
      Acked-by: default avatarNicolas Pitre <nicolas.pitre@linaro.org>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    • Russell King's avatar
      ARM: fix some sparse errors in generic ARM code · 2bbd7e9b
      Russell King authored
      arch/arm/kernel/return_address.c:37:6: warning: symbol 'return_address' was not declared. Should it be static?
      arch/arm/kernel/setup.c:76:14: warning: symbol 'processor_id' was not declared. Should it be static?
      arch/arm/kernel/traps.c:259:1: warning: symbol 'die_lock' was not declared. Should it be static?
      arch/arm/vfp/vfpmodule.c:156:6: warning: symbol 'vfp_raise_sigfpe' was not declared. Should it be static?
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
  6. 15 Feb, 2011 1 commit
  7. 26 Nov, 2010 1 commit
  8. 07 Nov, 2010 1 commit
  9. 04 Nov, 2010 1 commit
    • Catalin Marinas's avatar
      ARM: 6384/1: Remove the domain switching on ARMv6k/v7 CPUs · 247055aa
      Catalin Marinas authored
      This patch removes the domain switching functionality via the set_fs and
      __switch_to functions on cores that have a TLS register.
      Currently, the ioremap and vmalloc areas share the same level 1 page
      tables and therefore have the same domain (DOMAIN_KERNEL). When the
      kernel domain is modified from Client to Manager (via the __set_fs or in
      the __switch_to function), the XN (eXecute Never) bit is overridden and
      newer CPUs can speculatively prefetch the ioremap'ed memory.
      Linux performs the kernel domain switching to allow user-specific
      functions (copy_to/from_user, get/put_user etc.) to access kernel
      memory. In order for these functions to work with the kernel domain set
      to Client, the patch modifies the LDRT/STRT and related instructions to
      the LDR/STR ones.
      The user pages access rights are also modified for kernel read-only
      access rather than read/write so that the copy-on-write mechanism still
      works. CPU_USE_DOMAINS gets disabled only if the hardware has a TLS register
      (CPU_32v6K is defined) since writing the TLS value to the high vectors page
      isn't possible.
      The user addresses passed to the kernel are checked by the access_ok()
      function so that they do not point to the kernel space.
      Tested-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
  10. 09 Jul, 2010 1 commit
  11. 15 Feb, 2010 1 commit
  12. 10 Nov, 2009 1 commit
  13. 08 Nov, 2009 1 commit
  14. 25 Oct, 2009 1 commit
  15. 11 Oct, 2009 3 commits
  16. 28 Sep, 2009 1 commit
  17. 19 Feb, 2009 1 commit
  18. 12 Feb, 2009 1 commit
  19. 15 Dec, 2008 1 commit
  20. 06 Sep, 2008 2 commits
  21. 05 Sep, 2008 1 commit
    • Russell King's avatar
      [ARM] sparse: fix several warnings · 09d9bae0
      Russell King authored
      arch/arm/kernel/process.c:270:6: warning: symbol 'show_fpregs' was not declared. Should it be static?
      This function isn't used, so can be removed.
      arch/arm/kernel/setup.c:532:9: warning: symbol 'len' shadows an earlier one
      arch/arm/kernel/setup.c:524:6: originally declared here
      A function containing two 'len's.
      arch/arm/mm/fault-armv.c:188:13: warning: symbol 'check_writebuffer_bugs' was not declared. Should it be static?
      arch/arm/mm/mmap.c:122:5: warning: symbol 'valid_phys_addr_range' was not declared. Should it be static?
      arch/arm/mm/mmap.c:137:5: warning: symbol 'valid_mmap_phys_addr_range' was not declared. Should it be static?
      Missing includes.
      arch/arm/kernel/traps.c:71:77: warning: Using plain integer as NULL pointer
      arch/arm/mm/ioremap.c:355:46: error: incompatible types in comparison expression (different address spaces)
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
  22. 01 Sep, 2008 1 commit
  23. 12 Aug, 2008 1 commit
  24. 23 Jul, 2008 1 commit
    • Jason Wessel's avatar
      kgdb: support for ARCH=arm · 5cbad0eb
      Jason Wessel authored
      This patch adds the ARCH=arm specific a kgdb backend, originally
      written by Deepak Saxena <dsaxena@plexity.net> and George Davis
      <gdavis@mvista.com>.  Geoff Levand <geoffrey.levand@am.sony.com>,
      Nicolas Pitre, Manish Lachwani, and Jason Wessel have contributed
      various fixups here as well.
      The KGDB patch makes one change to the core ARM architecture such that
      the traps are initialized early for use with the debugger or other
      [ mingo@elte.hu: small cleanups. ]
      [ ben-linux@fluff.org: fixed early_trap_init ]
      Signed-off-by: default avatarJason Wessel <jason.wessel@windriver.com>
      Acked-by: default avatarDeepak Saxena <dsaxena@plexity.net>
  25. 26 Jan, 2008 2 commits
  26. 26 Nov, 2007 2 commits
    • Nicolas Pitre's avatar
      [ARM] 4659/1: remove possibilities for spurious false negative with __kuser_cmpxchg · b49c0f24
      Nicolas Pitre authored
      The ARM __kuser_cmpxchg routine is meant to implement an atomic cmpxchg
      in user space.  It however can produce spurious false negative if a
      processor exception occurs in the middle of the operation.  Normally
      this is not a problem since cmpxchg is typically called in a loop until
      it succeeds to implement an atomic increment for example.
      Some use cases which don't involve a loop require that the operation be
      100% reliable though.  This patch changes the implementation so to
      reattempt the operation after an exception has occurred in the critical
      section rather than abort it.
      Here's a simple program to test the fix (don't use CONFIG_NO_HZ in your
      kernel as this depends on a sufficiently high interrupt rate):
      	#include <stdio.h>
      	typedef int (__kernel_cmpxchg_t)(int oldval, int newval, int *ptr);
      	#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *)0xffff0fc0)
      	int main()
      		int i, x = 0;
      		for (i = 0; i < 100000000; i++) {
      			int v = x;
      			if (__kernel_cmpxchg(v, v+1, &x))
      				printf("failed at %d: %d vs %d\n", i, v, x);
      		printf("done with %d vs %d\n", i, x);
      		return 0;
      Signed-off-by: default avatarNicolas Pitre <nico@marvell.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    • Nicolas Pitre's avatar
      [ARM] 4661/1: fix do_undefinstr wrt the enabling of IRQs · aeb747af
      Nicolas Pitre authored
      The lock is acquired with spin_lock_irqsave() and released in the
      not-found case with spin_unlock_irqrestore().
      Signed-off-by: default avatarNicolas Pitre <nico@marvell.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
  27. 19 Oct, 2007 1 commit
  28. 26 Jul, 2007 1 commit
  29. 17 Jul, 2007 1 commit
  30. 05 Jul, 2007 1 commit
  31. 17 Jun, 2007 1 commit
  32. 08 May, 2007 1 commit
    • Christoph Hellwig's avatar
      move die notifier handling to common code · 1eeb66a1
      Christoph Hellwig authored
      This patch moves the die notifier handling to common code.  Previous
      various architectures had exactly the same code for it.  Note that the new
      code is compiled unconditionally, this should be understood as an appel to
      the other architecture maintainer to implement support for it aswell (aka
      sprinkling a notify_die or two in the proper place)
      arm had a notifiy_die that did something totally different, I renamed it to
      arm_notify_die as part of the patch and made it static to the file it's
      declared and used at.  avr32 used to pass slightly less information through
      this interface and I brought it into line with the other architectures.
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix vmalloc_sync_all bustage]
      [bryan.wu@analog.com: fix vmalloc_sync_all in nommu]
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Cc: <linux-arch@vger.kernel.org>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: default avatarBryan Wu <bryan.wu@analog.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  33. 03 May, 2007 1 commit