1. 17 4月, 2015 1 次提交
  2. 16 4月, 2015 1 次提交
  3. 15 4月, 2015 17 次提交
    • V
      arm: add support for memtest · d30eae47
      Vladimir Murzin 提交于
      Add support for memtest command line option.
      Signed-off-by: NVladimir Murzin <vladimir.murzin@arm.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d30eae47
    • K
      mm: fold arch_randomize_brk into ARCH_HAS_ELF_RANDOMIZE · 204db6ed
      Kees Cook 提交于
      The arch_randomize_brk() function is used on several architectures,
      even those that don't support ET_DYN ASLR. To avoid bulky extern/#define
      tricks, consolidate the support under CONFIG_ARCH_HAS_ELF_RANDOMIZE for
      the architectures that support it, while still handling CONFIG_COMPAT_BRK.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Cc: Hector Marco-Gisbert <hecmargi@upv.es>
      Cc: Russell King <linux@arm.linux.org.uk>
      Reviewed-by: NIngo Molnar <mingo@kernel.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: "David A. Long" <dave.long@linaro.org>
      Cc: Andrey Ryabinin <a.ryabinin@samsung.com>
      Cc: Arun Chandran <achandran@mvista.com>
      Cc: Yann Droneaud <ydroneaud@opteya.com>
      Cc: Min-Hua Chen <orca.chen@gmail.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Alex Smith <alex@alex-smith.me.uk>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Vineeth Vijayan <vvijayan@mvista.com>
      Cc: Jeff Bailey <jeffbailey@google.com>
      Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Behan Webster <behanw@converseincode.com>
      Cc: Ismael Ripoll <iripoll@upv.es>
      Cc: Jan-Simon Mller <dl9pf@gmx.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      204db6ed
    • K
      mm: split ET_DYN ASLR from mmap ASLR · d1fd836d
      Kees Cook 提交于
      This fixes the "offset2lib" weakness in ASLR for arm, arm64, mips,
      powerpc, and x86.  The problem is that if there is a leak of ASLR from
      the executable (ET_DYN), it means a leak of shared library offset as
      well (mmap), and vice versa.  Further details and a PoC of this attack
      is available here:
      
        http://cybersecurity.upv.es/attacks/offset2lib/offset2lib.html
      
      With this patch, a PIE linked executable (ET_DYN) has its own ASLR
      region:
      
        $ ./show_mmaps_pie
        54859ccd6000-54859ccd7000 r-xp  ...  /tmp/show_mmaps_pie
        54859ced6000-54859ced7000 r--p  ...  /tmp/show_mmaps_pie
        54859ced7000-54859ced8000 rw-p  ...  /tmp/show_mmaps_pie
        7f75be764000-7f75be91f000 r-xp  ...  /lib/x86_64-linux-gnu/libc.so.6
        7f75be91f000-7f75beb1f000 ---p  ...  /lib/x86_64-linux-gnu/libc.so.6
        7f75beb1f000-7f75beb23000 r--p  ...  /lib/x86_64-linux-gnu/libc.so.6
        7f75beb23000-7f75beb25000 rw-p  ...  /lib/x86_64-linux-gnu/libc.so.6
        7f75beb25000-7f75beb2a000 rw-p  ...
        7f75beb2a000-7f75beb4d000 r-xp  ...  /lib64/ld-linux-x86-64.so.2
        7f75bed45000-7f75bed46000 rw-p  ...
        7f75bed46000-7f75bed47000 r-xp  ...
        7f75bed47000-7f75bed4c000 rw-p  ...
        7f75bed4c000-7f75bed4d000 r--p  ...  /lib64/ld-linux-x86-64.so.2
        7f75bed4d000-7f75bed4e000 rw-p  ...  /lib64/ld-linux-x86-64.so.2
        7f75bed4e000-7f75bed4f000 rw-p  ...
        7fffb3741000-7fffb3762000 rw-p  ...  [stack]
        7fffb377b000-7fffb377d000 r--p  ...  [vvar]
        7fffb377d000-7fffb377f000 r-xp  ...  [vdso]
      
      The change is to add a call the newly created arch_mmap_rnd() into the
      ELF loader for handling ET_DYN ASLR in a separate region from mmap ASLR,
      as was already done on s390.  Removes CONFIG_BINFMT_ELF_RANDOMIZE_PIE,
      which is no longer needed.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Reported-by: NHector Marco-Gisbert <hecmargi@upv.es>
      Cc: Russell King <linux@arm.linux.org.uk>
      Reviewed-by: NIngo Molnar <mingo@kernel.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: "David A. Long" <dave.long@linaro.org>
      Cc: Andrey Ryabinin <a.ryabinin@samsung.com>
      Cc: Arun Chandran <achandran@mvista.com>
      Cc: Yann Droneaud <ydroneaud@opteya.com>
      Cc: Min-Hua Chen <orca.chen@gmail.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Alex Smith <alex@alex-smith.me.uk>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Vineeth Vijayan <vvijayan@mvista.com>
      Cc: Jeff Bailey <jeffbailey@google.com>
      Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Behan Webster <behanw@converseincode.com>
      Cc: Ismael Ripoll <iripoll@upv.es>
      Cc: Jan-Simon Mller <dl9pf@gmx.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d1fd836d
    • K
      mm: expose arch_mmap_rnd when available · 2b68f6ca
      Kees Cook 提交于
      When an architecture fully supports randomizing the ELF load location,
      a per-arch mmap_rnd() function is used to find a randomized mmap base.
      In preparation for randomizing the location of ET_DYN binaries
      separately from mmap, this renames and exports these functions as
      arch_mmap_rnd(). Additionally introduces CONFIG_ARCH_HAS_ELF_RANDOMIZE
      for describing this feature on architectures that support it
      (which is a superset of ARCH_BINFMT_ELF_RANDOMIZE_PIE, since s390
      already supports a separated ET_DYN ASLR from mmap ASLR without the
      ARCH_BINFMT_ELF_RANDOMIZE_PIE logic).
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Cc: Hector Marco-Gisbert <hecmargi@upv.es>
      Cc: Russell King <linux@arm.linux.org.uk>
      Reviewed-by: NIngo Molnar <mingo@kernel.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: "David A. Long" <dave.long@linaro.org>
      Cc: Andrey Ryabinin <a.ryabinin@samsung.com>
      Cc: Arun Chandran <achandran@mvista.com>
      Cc: Yann Droneaud <ydroneaud@opteya.com>
      Cc: Min-Hua Chen <orca.chen@gmail.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Alex Smith <alex@alex-smith.me.uk>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Vineeth Vijayan <vvijayan@mvista.com>
      Cc: Jeff Bailey <jeffbailey@google.com>
      Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Behan Webster <behanw@converseincode.com>
      Cc: Ismael Ripoll <iripoll@upv.es>
      Cc: Jan-Simon Mller <dl9pf@gmx.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      2b68f6ca
    • K
      arm: factor out mmap ASLR into mmap_rnd · fbbc400f
      Kees Cook 提交于
      To address the "offset2lib" ASLR weakness[1], this separates ET_DYN ASLR
      from mmap ASLR, as already done on s390.  The architectures that are
      already randomizing mmap (arm, arm64, mips, powerpc, s390, and x86), have
      their various forms of arch_mmap_rnd() made available via the new
      CONFIG_ARCH_HAS_ELF_RANDOMIZE.  For these architectures,
      arch_randomize_brk() is collapsed as well.
      
      This is an alternative to the solutions in:
      https://lkml.org/lkml/2015/2/23/442
      
      I've been able to test x86 and arm, and the buildbot (so far) seems happy
      with building the rest.
      
      [1] http://cybersecurity.upv.es/attacks/offset2lib/offset2lib.html
      
      This patch (of 10):
      
      In preparation for splitting out ET_DYN ASLR, this moves the ASLR
      calculations for mmap on ARM into a separate routine, similar to x86.
      This also removes the redundant check of personality (PF_RANDOMIZE is
      already set before calling arch_pick_mmap_layout).
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Cc: Hector Marco-Gisbert <hecmargi@upv.es>
      Cc: Russell King <linux@arm.linux.org.uk>
      Reviewed-by: NIngo Molnar <mingo@kernel.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: "David A. Long" <dave.long@linaro.org>
      Cc: Andrey Ryabinin <a.ryabinin@samsung.com>
      Cc: Arun Chandran <achandran@mvista.com>
      Cc: Yann Droneaud <ydroneaud@opteya.com>
      Cc: Min-Hua Chen <orca.chen@gmail.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Alex Smith <alex@alex-smith.me.uk>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: Vineeth Vijayan <vvijayan@mvista.com>
      Cc: Jeff Bailey <jeffbailey@google.com>
      Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Cc: Behan Webster <behanw@converseincode.com>
      Cc: Ismael Ripoll <iripoll@upv.es>
      Cc: Jan-Simon Mller <dl9pf@gmx.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fbbc400f
    • K
      arm: expose number of page table levels on Kconfig level · 1bcad26e
      Kirill A. Shutemov 提交于
      We would want to use number of page table level to define mm_struct.
      Let's expose it as CONFIG_PGTABLE_LEVELS.
      Signed-off-by: NKirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Tested-by: NGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1bcad26e
    • R
      ARM: update errata 430973 documentation to cover Cortex A8 r1p* · 79403cda
      Russell King 提交于
      This errata covers all r1 variants of Cortex A8, it's not limited to
      just r1p0..r1p2.  Update the documentation to reflect this.  The code
      already applies the workaround to all r1p* A8 CPUs.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      79403cda
    • R
      ARM: ensure delay timer has sufficient accuracy for delays · 57ca654b
      Russell King 提交于
      We have recently had an example of someone wanting to use a 90kHz timer
      for the software delay loop.
      
      udelay() needs to have at least microsecond resolution to allow drivers
      access to a delay mechanism with a reasonable chance of delaying the
      period they requested within at least a 50% marging of error, especially
      for small delays.
      
      Discussion about the udelay() accuracy can be found at:
      	https://lkml.org/lkml/2011/1/9/37
      
      Reject timers which are unable to supply this level of resolution.
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      57ca654b
    • R
      ARM: switch to use the generic show_mem() implementation · 37463be8
      Russell King 提交于
      Switch ARM to use the generic show_mem() implementation, which displays
      the statistics from the mm zone rather than walking the page arrays.
      Acked-by: NMel Gorman &lt;mgorman <mgorman@suse.de>
      Tested-by: NGregory Fong <gregory.0xf0@gmail.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      37463be8
    • R
      ARM: proc-v7: avoid errata 430973 workaround for non-Cortex A8 CPUs · a6d74678
      Russell King 提交于
      Avoid the errata 430973 workaround for non-Cortex A8 CPUs.  Having this
      workaround enabled introduces an additional branch target buffer flush
      into the context switching path, something we wish to avoid.  To allow
      this errata to be enabled in multiplatform kernels while reducing its
      impact, rearrange the Cortex-A8 CPU support to avoid impacting on other
      Version 7 CPUs.
      Tested-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      a6d74678
    • R
      ARM: enable ARM errata 643719 workaround by default · e5a5de44
      Russell King 提交于
      The effects of not having ARM errata 643719 enabled on affected CPUs
      can be very confusing and hard to debug.  Rather than leave this to
      chance, enable this workaround by default.  Now that we have rearranged
      the code, it should have a low impact on the majority of CPUs.
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      e5a5de44
    • R
      ARM: cache-v7: optimise test for Cortex A9 r0pX devices · aaf4b5d9
      Russell King 提交于
      Eliminate one unnecessary instruction from this test by pre-shifting
      the Cortex A9 ID - we can shift the actual ID in the teq instruction
      thereby losing the pX bit of the ID at no cost.
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      aaf4b5d9
    • R
      ARM: cache-v7: optimise branches in v7_flush_cache_louis · d3cd451d
      Russell King 提交于
      Optimise the branches such that for the majority of unaffected devices,
      we avoid needing to execute the errata work-around code path by
      branching to start_flush_levels early.
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      d3cd451d
    • R
      ARM: cache-v7: consolidate initialisation of cache level index · cd8b24d9
      Russell King 提交于
      Both v7_flush_cache_louis and v7_flush_dcache_all both begin the
      flush_levels loop with r10 initialised to zero.  In each case, this
      is done immediately prior to entering the loop.  Branch to this
      instruction in v7_flush_dcache_all from v7_flush_cache_louis and
      eliminate the unnecessary initialisation in v7_flush_cache_louis.
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      cd8b24d9
    • R
      ARM: cache-v7: shift CLIDR to extract appropriate field before masking · 47b8484e
      Russell King 提交于
      Rather than have code which masks and then shifts, such as:
      
      	mrc     p15, 1, r0, c0, c0, 1
      ALT_SMP(ands	r3, r0, #7 << 21)
      ALT_UP( ands	r3, r0, #7 << 27)
      ALT_SMP(mov	r3, r3, lsr #20)
      ALT_UP(	mov	r3, r3, lsr #26)
      
      re-arrange this as a shift and then mask.  The masking is the same for
      each field which we want to extract, so this allows the mask to be
      shared amongst code paths:
      
      	mrc     p15, 1, r0, c0, c0, 1
      ALT_SMP(mov	r3, r0, lsr #20)
      ALT_UP(	mov	r3, r0, lsr #26)
      	ands	r3, r3, #7 << 1
      
      Use this method for the LoUIS, LoUU and LoC fields.
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      47b8484e
    • R
      ARM: cache-v7: use movw/movt instructions · 5aca3708
      Russell King 提交于
      We always build cache-v7.S for ARMv7, so we can use the ARMv7 16-bit
      move instructions to load large constants, rather than using constants
      in a literal pool.
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      5aca3708
    • R
      ARM: allow 16-bit instructions in ALT_UP() · 89c6bc58
      Russell King 提交于
      Allow ALT_UP() to cope with a 16-bit Thumb instruction by automatically
      inserting a following nop instruction.  This allows us to care less
      about getting the assembler to emit a 32-bit thumb instruction.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      89c6bc58
  4. 14 4月, 2015 3 次提交
  5. 13 4月, 2015 4 次提交
  6. 10 4月, 2015 6 次提交
  7. 09 4月, 2015 1 次提交
    • A
      jump_label: Allow asm/jump_label.h to be included in assembly · 55dd0df7
      Anton Blanchard 提交于
      Wrap asm/jump_label.h for all archs with #ifndef __ASSEMBLY__.
      Since these are kernel only headers, we don't need #ifdef
      __KERNEL__ so can simplify things a bit.
      
      If an architecture wants to use jump labels in assembly, it
      will still need to define a macro to create the __jump_table
      entries (see ARCH_STATIC_BRANCH in the powerpc asm/jump_label.h
      for an example).
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: benh@kernel.crashing.org
      Cc: catalin.marinas@arm.com
      Cc: davem@davemloft.net
      Cc: heiko.carstens@de.ibm.com
      Cc: jbaron@akamai.com
      Cc: linux@arm.linux.org.uk
      Cc: linuxppc-dev@lists.ozlabs.org
      Cc: liuj97@gmail.com
      Cc: mgorman@suse.de
      Cc: mmarek@suse.cz
      Cc: mpe@ellerman.id.au
      Cc: paulus@samba.org
      Cc: ralf@linux-mips.org
      Cc: rostedt@goodmis.org
      Cc: schwidefsky@de.ibm.com
      Cc: will.deacon@arm.com
      Link: http://lkml.kernel.org/r/1428551492-21977-1-git-send-email-anton@samba.orgSigned-off-by: NIngo Molnar <mingo@kernel.org>
      55dd0df7
  8. 08 4月, 2015 1 次提交
    • T
      ARM: mvebu: use 0xf1000000 as internal registers on Armada 370 DB · 4f054d44
      Thomas Petazzoni 提交于
      All Marvell EBU SoCs (Kirkwood, Dove, Orion, Armada) have the
      capability of changing the location of their internal registers (i.e
      the registers for most hardware blocks inside the SoC). When coming
      out of reset, the internal registers are mapped at 0xd0000000, but
      since years and years, the tradition has been to have the internal
      registers remapped at 0xf1000000 by the bootloader, and Linux has
      since then assumed that the internal registers for the SoC were
      located at 0xf1000000 on Kirkwood, Dove, Orion, etc. Linux has never
      been aware that those registers are remappable (and there is no way to
      know where they are mapped at runtime, since the register to configure
      the address of the registers is itself within the internal registers).
      
      Then came the Armada 370 and Armada XP, in which some of the very
      early silicon steppings had an issue, which forced to use 0xd0000000:
      the SoC was no longer working properly when the internal registers
      were remapped at 0xf1000000. This issue is only affecting very early
      silicon steppings and production steppings are not affected: the issue
      has been fixed in between.
      
      Since what we (Free Electrons) used to do the initial submission of
      the Armada 370 and Armada XP platforms was evaluation boards with
      those very early steppings, we submitted Device Tree that assumed the
      internal registers were mapped at 0xd0000000. This is the case for
      Armada 370 DB, Armada XP DB and Armada XP GP.
      
      However, in practice, since Marvell has been shipping the evaluation
      boards with production steppings of the SoC, they are shipping those
      boards with bootloaders that remap the registers to 0xf1000000. We
      have already changed this internal register address to 0xf1000000 for
      the Armada XP DB in commit 82066bdb and for the Armada XP GP in
      commit 91ed3220 (both merged in v3.15).
      
      We only recently got our hand on an Armada 370 DB with a production
      stepping of the SoC, which uses a bootloader that remaps internal
      registers at 0xf1000000. Therefore, this commit aligns the Armada 370
      DB to be like the Armada XP DB and Armada XP GP: assume that the
      internal registers are mapped at 0xf1000000.
      
      We would like to stress out the fact that the usage of 0xd0000000 as
      the internal register base address was a temporary workaround for
      early steppings deficiencies, and that the real long-term solution is
      the usage of 0xf1000000. Having 0xd0000000 is an *accident* in the
      life of the Marvell platform support in the kernel, as is confirmed by
      the usage of 0xf1000000 in all previous Marvell platforms (Dove,
      Kirkwood, Orion).
      
      There are unfortunately a number of commercial devices that continue
      to use 0xd0000000 even though they use production steppings of the
      SoC, simply because the vendors of such devices have never bothered
      using a more recent bootloader version from Marvell. There is not much
      we can do about it, and we plan on keeping 0xd0000000 in the Device
      Tree of such devices.
      
      The main reason for remapping the internal registers at 0xf1000000
      instead of 0xd0000000 is that it leaves more space in the 0 -> 4 GB
      part of the physical address space for RAM. With registers at
      0xd0000000, all RAM between 0xd0000000 to 0xffffffff is lost because
      it's covered by the I/O registers.
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Acked-by: NAndrew Lunn <andrew@lunn.ch>
      Acked-by: NJason Cooper <jason@lakedameon.net>
      Acked-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      Signed-off-by: NGregory CLEMENT <gregory.clement@free-electrons.com>
      4f054d44
  9. 07 4月, 2015 1 次提交
    • R
      ARM: vexpress: fix CPU hotplug with CT9x4 tile. · f6ac49ba
      Russell King 提交于
      The Cortex A9 tile fails to unplug CPUs if errata 643719 is not enabled.
      This leads to random weird behaviours, but ultimately seem to lock the
      kernel one way or another when a CPU is hot unplugged.
      
      Symptoms range from a spinlock lockup in the scheduler, the entire
      system hanging, to dumping out the kernel printk buffer a few lines at
      a time, and other weird behaviours.
      
      This is caused by the outgoing CPU not having its inner caches properly
      flushed before it exits coherency - flush_cache_louis() is used to
      achieve this, but as a result of the hardware bug, this function ends
      up doing nothing without the errata workaround enabled.
      
      As the Versatile Express has an affected CPU, this errata must always
      be enabled.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      f6ac49ba
  10. 04 4月, 2015 5 次提交