1. 06 Dec, 2011 4 commits
    • Will Deacon's avatar
      ARM: SMP: use idmap_pgd for mapping MMU enable during secondary booting · 4e8ee7de
      Will Deacon authored
      
      
      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: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      4e8ee7de
    • Will Deacon's avatar
      ARM: idmap: use idmap_pgd when setting up mm for reboot · 2c8951ab
      Will Deacon authored
      
      
      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: default avatarDave Martin <dave.martin@linaro.org>
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      2c8951ab
    • Will Deacon's avatar
      ARM: proc-*.S: place cpu_reset functions into .idmap.text section · 1a4baafa
      Will Deacon authored
      
      
      The CPU reset functions disable the MMU and therefore must be executed
      with an identity mapping in place.
      
      This patch places the CPU reset functions into the .idmap.text section,
      causing the idmap code to include them as part of the identity mapping.
      Acked-by: default avatarDave Martin <dave.martin@linaro.org>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      1a4baafa
    • Will Deacon's avatar
      ARM: idmap: populate identity map pgd at init time using .init.text · 8903826d
      Will Deacon authored
      
      
      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: default avatarDave Martin <dave.martin@linaro.org>
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Tested-by: default avatarLorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      8903826d
  2. 26 Nov, 2011 5 commits
  3. 21 Nov, 2011 2 commits
  4. 18 Nov, 2011 2 commits
    • Nicolas Pitre's avatar
      ARM: move initialization of the high_memory variable earlier · 55a8173c
      Nicolas Pitre authored
      
      
      Some upcoming changes must know the VMALLOC_START value, which is based
      on high_memory, before bootmem_init() is called.
      
      The best location to set it is in sanity_check_meminfo() where the needed
      computation is already done, and in the non MMU case it is trivial to do
      now that the meminfo array is already sorted at that point.
      Signed-off-by: default avatarNicolas Pitre <nicolas.pitre@linaro.org>
      55a8173c
    • Nicolas Pitre's avatar
      ARM: sort the meminfo array earlier · 27a3f0e9
      Nicolas Pitre authored
      
      
      The meminfo array has to be sorted before sanity_check_meminfo() in
      arch/arm/mm/mmu.c is called for it to work properly.  This also allows
      for a simpler find_limits() in arch/arm/mm/init.c.
      
      The sort is moved to arch/arm/kernel/setup.c because that's where the
      meminfo array is populated.  Eventually this should be improved upon
      to make the memory bank parser a bit more robust against problems
      such as overlapping memory ranges.
      Signed-off-by: default avatarNicolas Pitre <nicolas.pitre@linaro.org>
      27a3f0e9
  5. 10 Nov, 2011 1 commit
  6. 31 Oct, 2011 5 commits
  7. 22 Oct, 2011 1 commit
  8. 17 Oct, 2011 5 commits
  9. 06 Oct, 2011 1 commit
  10. 01 Oct, 2011 3 commits
  11. 26 Sep, 2011 1 commit
  12. 23 Sep, 2011 1 commit
  13. 20 Sep, 2011 3 commits
  14. 17 Sep, 2011 1 commit
  15. 13 Sep, 2011 1 commit
  16. 10 Sep, 2011 1 commit
  17. 06 Sep, 2011 1 commit
  18. 04 Sep, 2011 1 commit
  19. 28 Aug, 2011 1 commit