1. 04 8月, 2010 1 次提交
  2. 14 7月, 2010 1 次提交
  3. 21 6月, 2010 1 次提交
  4. 18 5月, 2010 2 次提交
  5. 11 5月, 2010 2 次提交
    • P
      sh: Reject small mappings for PMB bolting. · dfbca899
      Paul Mundt 提交于
      The minimum section size for the PMB is 16M, so just always error
      out early if the specified size is too small. This permits us to
      unconditionally call in to pmb_bolt_mapping() with variable sizes
      without wasting a TLB and cache flush for the range.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      dfbca899
    • P
      sh: bootmem refactoring. · 4bc277ac
      Paul Mundt 提交于
      This reworks much of the bootmem setup and initialization code allowing
      us to get rid of duplicate work between the NUMA and non-NUMA cases. The
      end result is that we end up with a much more flexible interface for
      supporting more complex topologies (fake NUMA, highmem, etc, etc.) which
      is entirely LMB backed. This is an incremental step for more NUMA work as
      well as gradually enabling migration off of bootmem entirely.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      4bc277ac
  6. 10 5月, 2010 1 次提交
  7. 26 4月, 2010 3 次提交
  8. 20 4月, 2010 1 次提交
  9. 19 4月, 2010 1 次提交
  10. 02 4月, 2010 1 次提交
    • P
      sh: Fix up the SH-3 build for recent TLB changes. · be97d758
      Paul Mundt 提交于
      While the MMUCR.URB and ITLB/UTLB differentiation works fine for all SH-4
      and later TLBs, these features are absent on SH-3. This splits out
      local_flush_tlb_all() in to SH-4 and PTEAEX copies while restoring the
      old SH-3 one, subsequently fixing up the build.
      
      This will probably want some further reordering and tidying in the
      future, but that's out of scope at present.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      be97d758
  11. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  12. 29 3月, 2010 1 次提交
  13. 26 3月, 2010 1 次提交
  14. 23 3月, 2010 3 次提交
  15. 10 3月, 2010 1 次提交
  16. 08 3月, 2010 1 次提交
  17. 05 3月, 2010 1 次提交
  18. 04 3月, 2010 1 次提交
    • P
      sh: fix up MMU reset with variable PMB mapping sizes. · 281983d6
      Paul Mundt 提交于
      Presently we run in to issues with the MMU resetting the CPU when
      variable sized mappings are employed. This takes a slightly more
      aggressive approach to keeping the TLB and cache state sane before
      establishing the mappings in order to cut down on races observed on
      SMP configurations.
      
      At the same time, we bump the VMA range up to the 0xb000...0xc000 range,
      as there still seems to be some undocumented behaviour in setting up
      variable mappings in the 0xa000...0xb000 range, resulting in reset by the
      TLB.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      281983d6
  19. 03 3月, 2010 2 次提交
  20. 02 3月, 2010 3 次提交
  21. 01 3月, 2010 1 次提交
  22. 23 2月, 2010 2 次提交
  23. 21 2月, 2010 1 次提交
    • R
      MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself · 4b3073e1
      Russell King 提交于
      On VIVT ARM, when we have multiple shared mappings of the same file
      in the same MM, we need to ensure that we have coherency across all
      copies.  We do this via make_coherent() by making the pages
      uncacheable.
      
      This used to work fine, until we allowed highmem with highpte - we
      now have a page table which is mapped as required, and is not available
      for modification via update_mmu_cache().
      
      Ralf Beache suggested getting rid of the PTE value passed to
      update_mmu_cache():
      
        On MIPS update_mmu_cache() calls __update_tlb() which walks pagetables
        to construct a pointer to the pte again.  Passing a pte_t * is much
        more elegant.  Maybe we might even replace the pte argument with the
        pte_t?
      
      Ben Herrenschmidt would also like the pte pointer for PowerPC:
      
        Passing the ptep in there is exactly what I want.  I want that
        -instead- of the PTE value, because I have issue on some ppc cases,
        for I$/D$ coherency, where set_pte_at() may decide to mask out the
        _PAGE_EXEC.
      
      So, pass in the mapped page table pointer into update_mmu_cache(), and
      remove the PTE value, updating all implementations and call sites to
      suit.
      
      Includes a fix from Stephen Rothwell:
      
        sparc: fix fallout from update_mmu_cache API change
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      4b3073e1
  24. 18 2月, 2010 2 次提交
    • P
      sh: Merge legacy and dynamic PMB modes. · d01447b3
      Paul Mundt 提交于
      This implements a bit of rework for the PMB code, which permits us to
      kill off the legacy PMB mode completely. Rather than trusting the boot
      loader to do the right thing, we do a quick verification of the PMB
      contents to determine whether to have the kernel setup the initial
      mappings or whether it needs to mangle them later on instead.
      
      If we're booting from legacy mappings, the kernel will now take control
      of them and make them match the kernel's initial mapping configuration.
      This is accomplished by breaking the initialization phase out in to
      multiple steps: synchronization, merging, and resizing. With the recent
      rework, the synchronization code establishes page links for compound
      mappings already, so we build on top of this for promoting mappings and
      reclaiming unused slots.
      
      At the same time, the changes introduced for the uncached helpers also
      permit us to dynamically resize the uncached mapping without any
      particular headaches. The smallest page size is more than sufficient for
      mapping all of kernel text, and as we're careful not to jump to any far
      off locations in the setup code the mapping can safely be resized
      regardless of whether we are executing from it or not.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      d01447b3
    • P
      sh: Use uncached I/O helpers in PMB setup. · 2e450643
      Paul Mundt 提交于
      The PMB code is an example of something that spends an absurd amount of
      time running uncached when only a couple of operations really need to be.
      This switches over to the shiny new uncached helpers, permitting us to
      spend far more time running cached.
      
      Additionally, MMUCR twiddling is perfectly safe from cached space given
      that it's paired with a control register barrier, so fix that up, too.
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      2e450643
  25. 17 2月, 2010 5 次提交