1. 03 Mar, 2013 1 commit
    • Will Deacon's avatar
      ARM: 7659/1: mm: make mm->context.id an atomic64_t variable · 8a4e3a9e
      Will Deacon authored
      mm->context.id is updated under asid_lock when a new ASID is allocated
      to an mm_struct. However, it is also read without the lock when a task
      is being scheduled and checking whether or not the current ASID
      generation is up-to-date.
      If two threads of the same process are being scheduled in parallel and
      the bottom bits of the generation in their mm->context.id match the
      current generation (that is, the mm_struct has not been used for ~2^24
      rollovers) then the non-atomic, lockless access to mm->context.id may
      yield the incorrect ASID.
      This patch fixes this issue by making mm->context.id and atomic64_t,
      ensuring that the generation is always read consistently. For code that
      only requires access to the ASID bits (e.g. TLB flushing by mm), then
      the value is accessed directly, which GCC converts to an ldrb.
      Cc: <stable@vger.kernel.org> # 3.8
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
  2. 26 Nov, 2012 1 commit
  3. 05 Nov, 2012 1 commit
    • Will Deacon's avatar
      ARM: mm: remove IPI broadcasting on ASID rollover · b5466f87
      Will Deacon authored
      ASIDs are allocated to MMU contexts based on a rolling counter. This
      means that after 255 allocations we must invalidate all existing ASIDs
      via an expensive IPI mechanism to synchronise all of the online CPUs and
      ensure that all tasks execute with an ASID from the new generation.
      This patch changes the rollover behaviour so that we rely instead on the
      hardware broadcasting of the TLB invalidation to avoid the IPI calls.
      This works by keeping track of the active ASID on each core, which is
      then reserved in the case of a rollover so that currently scheduled
      tasks can continue to run. For cores without hardware TLB broadcasting,
      we keep track of pending flushes in a cpumask, so cores can flush their
      local TLB before scheduling a new mm.
      Reviewed-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Tested-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
  4. 17 Apr, 2012 2 commits
  5. 28 Mar, 2012 1 commit
  6. 13 Sep, 2011 1 commit
  7. 23 Nov, 2010 1 commit
  8. 15 Feb, 2010 1 commit
    • Catalin Marinas's avatar
      ARM: 5905/1: ARM: Global ASID allocation on SMP · 11805bcf
      Catalin Marinas authored
      The current ASID allocation algorithm doesn't ensure the notification
      of the other CPUs when the ASID rolls over. This may lead to two
      processes using the same ASID (but different generation) or multiple
      threads of the same process using different ASIDs.
      This patch adds the broadcasting of the ASID rollover event to the
      other CPUs. To avoid a race on multiple CPUs modifying "cpu_last_asid"
      during the handling of the broadcast, the ASID numbering now starts at
      "smp_processor_id() + 1". At rollover, the cpu_last_asid will be set
      to NR_CPUS.
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
  9. 08 Jan, 2009 1 commit
    • David Howells's avatar
      NOMMU: Make VMAs per MM as for MMU-mode linux · 8feae131
      David Howells authored
      Make VMAs per mm_struct as for MMU-mode linux.  This solves two problems:
       (1) In SYSV SHM where nattch for a segment does not reflect the number of
           shmat's (and forks) done.
       (2) In mmap() where the VMA's vm_mm is set to point to the parent mm by an
           exec'ing process when VM_EXECUTABLE is specified, regardless of the fact
           that a VMA might be shared and already have its vm_mm assigned to another
           process or a dead process.
      A new struct (vm_region) is introduced to track a mapped region and to remember
      the circumstances under which it may be shared and the vm_list_struct structure
      is discarded as it's no longer required.
      This patch makes the following additional changes:
       (1) Regions are now allocated with alloc_pages() rather than kmalloc() and
           with no recourse to __GFP_COMP, so the pages are not composite.  Instead,
           each page has a reference on it held by the region.  Anything else that is
           interested in such a page will have to get a reference on it to retain it.
           When the pages are released due to unmapping, each page is passed to
           put_page() and will be freed when the page usage count reaches zero.
       (2) Excess pages are trimmed after an allocation as the allocation must be
           made as a power-of-2 quantity of pages.
       (3) VMAs are added to the parent MM's R/B tree and mmap lists.  As an MM may
           end up with overlapping VMAs within the tree, the VMA struct address is
           appended to the sort key.
       (4) Non-anonymous VMAs are now added to the backing inode's prio list.
       (5) Holes may be punched in anonymous VMAs with munmap(), releasing parts of
           the backing region.  The VMA and region structs will be split if
       (6) sys_shmdt() only releases one attachment to a SYSV IPC shared memory
           segment instead of all the attachments at that addresss.  Multiple
           shmat()'s return the same address under NOMMU-mode instead of different
           virtual addresses as under MMU-mode.
       (7) Core dumping for ELF-FDPIC requires fewer exceptions for NOMMU-mode.
       (8) /proc/maps is now the global list of mapped regions, and may list bits
           that aren't actually mapped anywhere.
       (9) /proc/meminfo gains a line (tagged "MmapCopy") that indicates the amount
           of RAM currently allocated by mmap to hold mappable regions that can't be
           mapped directly.  These are copies of the backing device or file if not
      These changes make NOMMU mode more similar to MMU mode.  The downside is that
      NOMMU mode requires some extra memory to track things over NOMMU without this
      patch (VMAs are no longer shared, and there are now region structs).
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Tested-by: default avatarMike Frysinger <vapier.adi@gmail.com>
      Acked-by: default avatarPaul Mundt <lethal@linux-sh.org>
  10. 02 Aug, 2008 1 commit
  11. 17 May, 2007 1 commit
    • Russell King's avatar
      [ARM] ARMv6: add CPU_HAS_ASID configuration · 516793c6
      Russell King authored
      Presently, we check for the minimum ARM architecture that we're
      building for to determine whether we need ASID support.  This is
      wrong - if we're going to support a range of CPUs which include
      ARMv6 or higher, we need the ASID.
      Convert the checks to use a new configuration symbol, and arrange
      for ARMv6 and higher CPU entries to select it.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
  12. 29 Jun, 2006 1 commit
    • Russell King's avatar
      [ARM] Add section support to ioremap · ff0daca5
      Russell King authored
      Allow section mappings to be setup using ioremap() and torn down
      with iounmap().  This requires additional support in the MM
      context switch to ensure that mappings are properly synchronised
      when mapped in.
      Based an original implementation by Deepak Saxena, reworked and
      ARMv6 support added by rmk.
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
  13. 28 Jun, 2006 1 commit
    • Russell King's avatar
      [ARM] nommu: adjust headers for !MMU ARM systems · 002547b4
      Russell King authored
      Majorily based on Hyok Choi's patches, this fixes up the asm-arm
      header files for mmuless systems.  Over and above Hyok's patches:
      - nommu.h merged into mmu.h (it's only a structure)
      - nommu_context.h is essentially the same as mmu_context.h, but
        without the MM switching code.
      so there's no point having separate files.  Also, in memory.h,
      there's no point #ifndef'ing PHYS_OFFSET and END_MEM - both
      CONFIG_DRAM_BASE and CONFIG_DRAM_SIZE will always be set by the
      configuration scripts.
      Other files have minor formatting changes, but are essentially
      the same.  Hyok's original patches were signed off thusly:
      Signed-off-by: default avatarHyok S. Choi <hyok.choi@samsung.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
  14. 16 Apr, 2005 1 commit
    • Linus Torvalds's avatar
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds authored
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      Let it rip!