Skip to content
Snippets Groups Projects
  1. Jun 07, 2013
    • Jonathan Austin's avatar
      ARM: mpu: add early bring-up code for the ARMv7 PMSA-compliant MPU · 67c9845b
      Jonathan Austin authored
      
      This patch adds initial support for using the MPU, which is necessary for
      SMP operation on PMSAv7 processors because it is the only way to ensure
      memory is shared. This is an initial patch and full SMP support is added
      later in this series.
      
      The setup of the MPU is performed in a way analagous to that for the MMU:
      Very early initialisation before the C environment is brought up, followed
      by a sanity check and more complete initialisation in C.
      
      This patch provides the simplest possible memory region configuration:
      MPU_PROBE_REGION: Reserved for probing MPU details, not enabled
      MPU_BG_REGION: A 'background' region that specifies all memory strongly ordered
      MPU_RAM_REGION: A single shared, cacheable, normal region for the valid RAM.
      
      In this early initialisation code we simply map the whole of the address
      space with the BG_REGION and (at least) the kernel with the RAM_REGION. The
      MPU has region alignment constraints that require us to round past the end
      of the kernel.
      
      As region 2 has a higher priority than region 1, it overrides the strongly-
      ordered behaviour for RAM only.
      
      Subsequent patches will add more complete initialisation from the C-world
      and support for bringing up secondary CPUs.
      
      Signed-off-by: default avatarJonathan Austin <jonathan.austin@arm.com>
      Reviewed-by: default avatarWill Deacon <will.deacon@arm.com>
      CC: Hyok S. Choi <hyok.choi@samsung.com>
      67c9845b
    • Jonathan Austin's avatar
      ARM: mpu: add header for MPU register layouts and region data · a2b45b0d
      Jonathan Austin authored
      
      This commit adds definitions relevant to the ARM v7 PMSA compliant MPU.
      
      The register layouts and region configuration data is made accessible to asm
      as well as C-code so that it can be used in early bring-up of the MPU.
      
      The mpu region information structs assume that the properties for the I/D side
      are the same, though the implementation could be trivially extended for future
      platforms where this is no-longer true.
      
      The MPU_*_REGION defines are used for the basic, static MPU region setup.
      
      Signed-off-by: default avatarJonathan Austin <jonathan.austin@arm.com>
      Reviewed-by: default avatarWill Deacon <will.deacon@arm.com>
      a2b45b0d
    • Jonathan Austin's avatar
      ARM: mpu: add PMSA related registers and bitfields to existing headers · aca7e592
      Jonathan Austin authored
      
      This patch adds the following definitions relevant to the PMSA:
      
      Add SCTLR bit 17, (CR_BR - Background Region bit) to the list of CR_*
      bitfields. This bit determines whether to use the architecturally defined
      memory map
      
      Add the MPUIR to the available registers when using read_cpuid macro. The
      MPUIR is the MPU type register.
      
      Signed-off-by: default avatarJonathan Austin <jonathan.austin@arm.com>
      Reviewed-by: default avatarWill Deacon <will.deacon@arm.com>
      CC:"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
      aca7e592
    • Jonathan Austin's avatar
      ARM: vexpress: Add Cortex-R Series UART, selectable via DEBUG_LL · ed18bdc8
      Jonathan Austin authored
      
      The Cortex-R series processors on Versatile Express have a different memory
      map to the RS1 and CA9X4 tiles. Most of the platform difference can be
      expressed in device-trees, but the UART definitions for LL_DEBUG cannot.
      
      This patch defines the UART location for R-Series processors on
      versatile-express, allowing low-level debug and output from the decompressor.
      These definitions are selectable via Kconfig
      
      Signed-off-by: default avatarJonathan Austin <jonathan.austin@arm.com>
      CC: Pawel Moll <pawel.moll@arm.com>
      ed18bdc8
    • Jonathan Austin's avatar
      ARM: add Cortex-R7 Processor Info · c90ad5c9
      Jonathan Austin authored
      
      This patch adds processor info for ARM Ltd. Cortex-R7.
      
      The R7 has many similarities to the A9 and though the ACTLR layout is not
      identical, the bits associated with cache operations broadcasting and SMP
      modes are the same for A9, A5 and R7 (Though in the A-class processors the
      same bits toggle TLB-ops broadcasting as well as cache-ops)
      
      Signed-off-by: default avatarJonathan Austin <jonathan.austin@arm.com>
      Reviewed-by: default avatarWill Deacon <will.deacon@arm.com>
      CC: Catalin Marinas <catalin.marinas@arm.com>
      CC: Stephen Boyd <sboyd@codeaurora.org>
      c90ad5c9
    • Jonathan Austin's avatar
      ARM: select CPU_CPU15_MMU/MPU appropriately · 66567618
      Jonathan Austin authored
      
      Currently CPU_V7 selects CPU_CP15_MMU, however in the case of a V7 CPU
      implementing the PMSA, such as the Cortex-R7, the CP15_MMU operations are
      not available. Selecting CPU_CP15_MPU is appropriate in this case.
      
      This patch makes CPU_CP15_MMU dependent on the use of the MMU, selecting
      CPU_CP15_MPU for v7 processors when !MMU is chosen.
      
      Signed-off-by: default avatarJonathan Austin <jonathan.austin@arm.com>
      66567618
    • Jonathan Austin's avatar
      ARM: nommu: add stub local_flush_bp_all() for !CONFIG_MMUU · 8d655d83
      Jonathan Austin authored
      
      Since the merging of Will's tlb-ops branch, specifically 89c7e4b8
      (ARM: 7661/1: mm: perform explicit branch predictor maintenance when required),
      building SMP without CONFIG_MMU has been broken.
      
      The local_flush_bp_all function is only called for operations related to
      changing the kernel's view of memory and ASID rollover - both of which are
      irrelevant to an !MMU kernel.
      
      This patch adds a stub local_flush_bp_all() function to the other tlb
      maintenance stubs and restores the ability to build an SMP !MMU kernel.
      
      Signed-off-by: default avatarJonathan Austin <jonathan.austin@arm.com>
      Acked-by: default avatarWill Deacon <will.deacon@arm.com>
      8d655d83
    • Jonathan Austin's avatar
      ARM: nommu: Don't build smp_tlb.c for !CONFIG_MMU · 8006b4d1
      Jonathan Austin authored
      
      Without an MMU we don't need to do any TLB maintenance. Until the addition
      of 93dc6887 (ARM: 7684/1: errata: Workaround for Cortex-A15 erratum 798181
      (TLBI/DSB operations)) building the tlb maintenance ops in smp_tlb.c worked,
      though none of the contents were used.
      
      Since that commit, however, SMP NOMMU has not been able to build. This patch
      restores that ability by making the building of smp_tlb.c dependent on MMU.
      
      Signed-off-by: default avatarJonathan Austin <jonathan.austin@arm.com>
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      CC: Will Deacon <will.deacon@arm.com>
      8006b4d1
    • Will Deacon's avatar
      ARM: suspend: fix CPU suspend code for !CONFIG_MMU configurations · aa1aadc3
      Will Deacon authored
      
      The ARM CPU suspend code can be selected even for a !CONFIG_MMU
      configuration. The resulting kernel will not compile and, even if it did,
      would access undefined co-processor registers when executing.
      
      This patch fixes the v6 and v7 CPU suspend code for the nommu case.
      
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Tested-by: default avatarJonathan Austin <jonathan.austin@arm.com>
      CC: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> (commit_signer:1/3=33%)
      CC: Santosh Shilimkar <santosh.shilimkar@ti.com> (commit_signer:1/3=33%)
      CC: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
      aa1aadc3
    • Will Deacon's avatar
      ARM: nommu: do not initialise page tables in secondary_data structure · c4a1f032
      Will Deacon authored
      
      nommu systems do not require any page tables, so don't try to initialise
      them when bringing up secondary cores.
      
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      c4a1f032
    • Will Deacon's avatar
      ARM: nommu: provide dummy cpu_switch_mm implementation · 02ed1c7b
      Will Deacon authored
      
      cpu_switch_mm is a logical nop on nommu systems, so define it as such
      when !CONFIG_MMU.
      
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      02ed1c7b
    • Will Deacon's avatar
      ARM: nommu: define dummy TLB operations for nommu configurations · 5c709e69
      Will Deacon authored
      
      nommu platforms do not perform address translation and therefore clearly
      don't have TLBs. However, some SMP code assumes the presence of the TLB
      flushing routines and will therefore fail to compile for a nommu system.
      
      This patch defines dummy local_* TLB operations and #defines
      tlb_ops_need_broadcast() as 0, therefore causing the usual ARM SMP TLB
      operations to call the local variants instead.
      
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      CC: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      CC: Nicolas Pitre <nico@linaro.org>
      5c709e69
    • Will Deacon's avatar
      ARM: nommu: add entry point for secondary CPUs to head-nommu.S · 01fafcab
      Will Deacon authored
      
      This patch adds a secondary_startup entry point to head-nommu.S so that
      we can boot secondary CPUs on an SMP nommu configuration.
      
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      CC: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
      CC: Nicolas Pitre <nico@linaro.org>
      01fafcab
  2. May 21, 2013
  3. May 20, 2013
    • Linus Torvalds's avatar
      x86: Fix bit corruption at CPU resume time · 5e427ec2
      Linus Torvalds authored
      
      In commit 78d77df7 ("x86-64, init: Do not set NX bits on non-NX
      capable hardware") we added the early_pmd_flags that gets the NX bit set
      when a CPU supports NX. However, the new variable was marked __initdata,
      because the main _use_ of this is in an __init routine.
      
      However, the bit setting happens from secondary_startup_64(), which is
      called not only at bootup, but on every secondary CPU start.  Including
      resuming from STR and at CPU hotplug time.  So the value cannot be
      __initdata.
      
      Reported-bisected-and-tested-by: default avatarMichal Hocko <mhocko@suse.cz>
      Cc: stable@vger.kernel.org # v3.9
      Acked-by: default avatarPeter Anvin <hpa@linux.intel.com>
      Cc: Fernando Luis Vázquez Cao <fernando@oss.ntt.co.jp>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5e427ec2
  4. May 18, 2013
  5. May 17, 2013
  6. May 16, 2013
  7. May 15, 2013
    • Heiko Carstens's avatar
      s390/ftrace: fix mcount adjustment · aca91209
      Heiko Carstens authored
      
      Tony Jones reported that the ftrace self tests on s390 do not work:
      
      <6>Testing dynamic ftrace ops #1: (0 0 0 0 0) FAILED!
      <6>Testing tracer irqsoff:
      <3>failed to start irqsoff tracer
      <4>.. no entries found ..FAILED!
      <6>Testing tracer wakeup:
      <3>failed to start wakeup tracer
      <4>.. no entries found ..FAILED!
      <6>Testing tracer function_graph:
      <4>Failed to init function_graph tracer, init returned -19
      <4>FAILED!
      
      This happens because we forgot to adjust the instruction pointer that gets
      passed to the ftrace trace function by MCOUNT_INSN_SIZE.
      
      In addition change MCOUNT_INSN_SIZE to the correct value on 31 bit.
      It only worked so far because the to be patched instruction was identical.
      
      Reported-by: default avatarTony Jones <tonyj@suse.com>
      Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      aca91209
    • Christian Borntraeger's avatar
      s390: fix gmap_ipte_notifier vs. software dirty pages · bb4b42ce
      Christian Borntraeger authored
      
      On heavy paging load some guest cpus started to loop in gmap_ipte_notify.
      This was visible as stalled cpus inside the guest. The gmap_ipte_notifier
      tries to map a user page and then made sure that the pte is valid and
      writable. Turns out that with the software change bit tracking the pte
      can become read-only (and only software writable) if the page is clean.
      Since we loop in this code, the page would stay clean and, therefore,
      be never writable again.
      Let us just use fixup_user_fault, that guarantees to call handle_mm_fault.
      
      Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
      Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
      bb4b42ce
  8. May 14, 2013
Loading