1. 06 12月, 2011 3 次提交
    • W
      ARM: SMP: use idmap_pgd for mapping MMU enable during secondary booting · 4e8ee7de
      Will Deacon 提交于
      The ARM SMP booting code allocates a temporary set of page tables
      containing an identity mapping of the kernel image and provides this
      to secondary CPUs for initial booting.
      
      In reality, we only need to include the __turn_mmu_on function in the
      identity mapping since the rest of the kernel is executing from virtual
      addresses after this point.
      
      This patch adds __turn_mmu_on to the .idmap.text section, allowing the
      SMP booting code to use the idmap_pgd directly and not have to populate
      its own set of page table.
      
      As a result of this patch, we can make the identity_mapping_add function
      static (since it is only used within mm/idmap.c) and also remove the
      identity_mapping_del function. The identity map population is moved to
      an early initcall so that it is setup in time for secondary CPU bringup.
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      4e8ee7de
    • W
      ARM: idmap: use idmap_pgd when setting up mm for reboot · 2c8951ab
      Will Deacon 提交于
      For soft-rebooting a system, it is necessary to map the MMU-off code
      with an identity mapping so that execution can continue safely once the
      MMU has been switched off.
      
      Currently, switch_mm_for_reboot takes out a 1:1 mapping from 0x0 to
      TASK_SIZE during reboot in the hope that the reset code lives at a
      physical address corresponding to a userspace virtual address.
      
      This patch modifies the code so that we switch to the idmap_pgd tables,
      which contain a 1:1 mapping of the cpu_reset code. This has the
      advantage of only remapping the code that we need and also means we
      don't need to worry about allocating a pgd from an atomic context in the
      case that the physical address of the cpu_reset code aliases with the
      virtual space used by the kernel.
      Acked-by: NDave Martin <dave.martin@linaro.org>
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      2c8951ab
    • W
      ARM: idmap: populate identity map pgd at init time using .init.text · 8903826d
      Will Deacon 提交于
      When disabling and re-enabling the MMU, it is necessary to take out an
      identity mapping for the code that manipulates the SCTLR in order to
      avoid it disappearing from under our feet. This is useful when soft
      rebooting and returning from CPU suspend.
      
      This patch allocates a set of page tables during boot and populates them
      with an identity mapping for the .idmap.text section. This means that
      users of the identity map do not need to manage their own pgd and can
      instead annotate their functions with __idmap or, in the case of assembly
      code, place them in the correct section.
      Acked-by: NDave Martin <dave.martin@linaro.org>
      Reviewed-by: NCatalin Marinas <catalin.marinas@arm.com>
      Tested-by: NLorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      8903826d
  2. 11 11月, 2011 1 次提交
  3. 22 2月, 2011 1 次提交
  4. 22 12月, 2010 2 次提交