1. 22 12月, 2010 3 次提交
  2. 30 11月, 2010 1 次提交
    • D
      ARM: 6501/1: Thumb-2: Correct data alignment for CONFIG_THUMB2_KERNEL in mm/proc-v7.S · 6323875d
      Dave Martin 提交于
      Directives such as .long and .word do not magically cause the
      assembler location counter to become aligned in gas.  As a result,
      using these directives in code sections can result in misaligned
      data words when building a Thumb-2 kernel (CONFIG_THUMB2_KERNEL).
      
      This is a Bad Thing, since the ABI permits the compiler to assume
      that fundamental types of word size or above are word- aligned when
      accessing them from C.  If the data is not really word-aligned,
      this can cause impaired performance and stray alignment faults in
      some circumstances.
      
      In general, the following rules should be applied when using data
      word declaration directives inside code sections:
      
          * .quad and .double:
               .align 3
      
          * .long, .word, .single, .float:
               .align (or .align 2)
      
          * .short:
              No explicit alignment required, since Thumb-2
              instructions are always 2 or 4 bytes in size.
              immediately after an instruction.
      
      In this specific case, we can achieve the desired alignment by
      forcing a 32-bit branch instruction using the W() macro, since the
      assembler location counter is already 32-bit aligned in this case.
      Reviewed-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NDave Martin <dave.martin@linaro.org>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      6323875d
  3. 04 11月, 2010 2 次提交
    • L
      ARM: 6396/1: Add SWP/SWPB emulation for ARMv7 processors · 64d2dc38
      Leif Lindholm 提交于
      The SWP instruction was deprecated in the ARMv6 architecture,
      superseded by the LDREX/STREX family of instructions for
      load-linked/store-conditional operations. The ARMv7 multiprocessing
      extensions mandate that SWP/SWPB instructions are treated as undefined
      from reset, with the ability to enable them through the System Control
      Register SW bit.
      
      This patch adds the alternative solution to emulate the SWP and SWPB
      instructions using LDREX/STREX sequences, and log statistics to
      /proc/cpu/swp_emulation. To correctly deal with copy-on-write, it also
      modifies cpu_v7_set_pte_ext to change the mappings to priviliged RO when
      user RO.
      Signed-off-by: NLeif Lindholm <leif.lindholm@arm.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Acked-by: NKirill A. Shutemov <kirill@shutemov.name>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      64d2dc38
    • C
      ARM: 6384/1: Remove the domain switching on ARMv6k/v7 CPUs · 247055aa
      Catalin Marinas 提交于
      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: NAnton Vorontsov <cbouatmailru@gmail.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      247055aa
  4. 08 10月, 2010 2 次提交
    • R
      ARM: hotplug cpu: Keep processor information, startup code & __lookup_processor_type · 5085f3ff
      Russell King 提交于
      When hotplug CPU is enabled, we need to keep the list of supported CPUs,
      their setup functions, and __lookup_processor_type in place so that we
      can find and initialize secondary CPUs.  Move these into the __CPUINIT
      section.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      5085f3ff
    • T
      ARM: 6435/1: Fix HWCAP_TLS flag for ARM11MPCore/Cortex-A9 · c0bb5862
      Tony Lindgren 提交于
      Commit 14eff181 added proper
      detection for ARM11MPCore/Cortex-A9 instead of detecting them
      as ARMv7. However, it was missing the HWCAP_TLS flags.
      
      HWCAP_TLS is needed if support for earlier ARMv6 is compiled
      into the same kernel. Without HWCAP_TLS flags the userspace
      won't work unless nosmp is specified:
      
      Kernel panic - not syncing: Attempted to kill init!
      CPU0: stopping
      <c005d5e4>] (unwind_backtrace+0x0/0xec) from [<c004c2f8>] (do_IPI+0xfc/0x184)
      <c004c2f8>] (do_IPI+0xfc/0x184) from [<c03f25bc>] (__irq_svc+0x9c/0x160)
      Exception stack(0xc0565f80 to 0xc0565fc8)
      5f80: 00000001 c05772a0 00000000 00003a61 c0564000 c05cf500 c003603c c0578600
      5fa0: 80033ef0 410fc091 0000001f 00000000 00000000 c0565fc8 c00b91f8 c0057cb4
      5fc0: 20000013 ffffffff
      [<c03f25bc>] (__irq_svc+0x9c/0x160) from [<c0057cb4>] (default_idle+0x30/0x38)
      [<c0057cb4>] (default_idle+0x30/0x38) from [<c005829c>] (cpu_idle+0x9c/0xf8)
      [<c005829c>] (cpu_idle+0x9c/0xf8) from [<c0008d48>] (start_kernel+0x2a4/0x300)
      [<c0008d48>] (start_kernel+0x2a4/0x300) from [<80008084>] (0x80008084)
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      c0bb5862
  5. 05 10月, 2010 2 次提交
  6. 17 9月, 2010 4 次提交
  7. 27 7月, 2010 1 次提交
    • R
      ARM: Factor out common code from cpu_proc_fin() · 9ca03a21
      Russell King 提交于
      All implementations of cpu_proc_fin() start by disabling interrupts
      and then flush caches.  Rather than have every processors proc_fin()
      implementation do this, move it out into generic code - and move the
      cache flush past setup_mm_for_reboot() (so it can benefit from having
      caches still enabled.)
      
      This allows cpu_proc_fin() to become independent of the L1/L2 cache
      types, and eventually move the L2 cache flushing into the L2 support
      code.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      9ca03a21
  8. 09 7月, 2010 1 次提交
  9. 20 1月, 2010 2 次提交
  10. 04 11月, 2009 1 次提交
  11. 03 11月, 2009 1 次提交
    • R
      ARM: ensure initial page tables are setup for SMP systems · 4b46d641
      Russell King 提交于
      Mapping the same memory using two different attributes (memory
      type, shareability, cacheability) is unpredictable.  During boot,
      we encounter a situation when we're updating the kernel's page
      tables which can lead to dirty cache lines existing in the cache
      which are subsequently missed.  This causes stack corruption,
      and therefore a crash.
      
      Therefore, ensure that the shared and cacheability settings
      matches the configuration that will be used later; this together
      with the restriction in early_cachepolicy() ensures that we won't
      create a mismatch during boot.
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4b46d641
  12. 03 10月, 2009 1 次提交
  13. 24 7月, 2009 2 次提交
  14. 03 6月, 2009 1 次提交
  15. 30 5月, 2009 5 次提交
  16. 01 5月, 2009 3 次提交
  17. 28 4月, 2009 1 次提交
  18. 10 11月, 2008 1 次提交
  19. 07 11月, 2008 1 次提交
  20. 06 11月, 2008 2 次提交
  21. 23 10月, 2008 1 次提交
  22. 03 10月, 2008 1 次提交
  23. 01 10月, 2008 1 次提交