1. 25 5月, 2011 1 次提交
  2. 18 10月, 2010 1 次提交
  3. 14 10月, 2010 1 次提交
    • J
      xen: Cope with unmapped pages when initializing kernel pagetable · fef5ba79
      Jeremy Fitzhardinge 提交于
      Xen requires that all pages containing pagetable entries to be mapped
      read-only.  If pages used for the initial pagetable are already mapped
      then we can change the mapping to RO.  However, if they are initially
      unmapped, we need to make sure that when they are later mapped, they
      are also mapped RO.
      
      We do this by knowing that the kernel pagetable memory is pre-allocated
      in the range e820_table_start - e820_table_end, so any pfn within this
      range should be mapped read-only.  However, the pagetable setup code
      early_ioremaps the pages to write their entries, so we must make sure
      that mappings created in the early_ioremap fixmap area are mapped RW.
      (Those mappings are removed before the pages are presented to Xen
      as pagetable pages.)
      Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      LKML-Reference: <4CB63A80.8060702@goop.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      fef5ba79
  4. 17 9月, 2010 1 次提交
    • C
      mm, x86: Saving vmcore with non-lazy freeing of vmas · 3ee48b6a
      Cliff Wickman 提交于
      During the reading of /proc/vmcore the kernel is doing
      ioremap()/iounmap() repeatedly. And the buildup of un-flushed
      vm_area_struct's is causing a great deal of overhead. (rb_next()
      is chewing up most of that time).
      
      This solution is to provide function set_iounmap_nonlazy(). It
      causes a subsequent call to iounmap() to immediately purge the
      vma area (with try_purge_vmap_area_lazy()).
      
      With this patch we have seen the time for writing a 250MB
      compressed dump drop from 71 seconds to 44 seconds.
      Signed-off-by: NCliff Wickman <cpw@sgi.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: kexec@lists.infradead.org
      Cc: <stable@kernel.org>
      LKML-Reference: <E1OwHZ4-0005WK-Tw@eag09.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3ee48b6a
  5. 30 4月, 2010 1 次提交
    • L
      x86: Fix 'reservetop=' functionality · e67a807f
      Liang Li 提交于
      When specifying the 'reservetop=0xbadc0de' kernel parameter,
      the kernel will stop booting due to a early_ioremap bug that
      relates to commit 8827247f.
      
      The root cause of boot failure problem is the value of
      'slot_virt[i]' was initialized in setup_arch->early_ioremap_init().
      But later in setup_arch, the function 'parse_early_param' will
      modify 'FIXADDR_TOP' when 'reservetop=0xbadc0de' being specified.
      
      The simplest fix might be use __fix_to_virt(idx0) to get updated
      value of 'FIXADDR_TOP' in '__early_ioremap' instead of reference
      old value from slot_virt[slot] directly.
      
      Changelog since v0:
      
      -v1: When reservetop being handled then FIXADDR_TOP get
           adjusted, Hence check prev_map then re-initialize slot_virt and
           PMD based on new FIXADDR_TOP.
      
      -v2: place fixup_early_ioremap hence call early_ioremap_init in
           reserve_top_address  to re-initialize slot_virt and
           corresponding PMD when parse_reservertop
      
      -v3: move fixup_early_ioremap out of reserve_top_address to make
           sure other clients of reserve_top_address like xen/lguest won't
           broken
      Signed-off-by: NLiang Li <liang.li@windriver.com>
      Tested-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Acked-by: NYinghai Lu <yinghai@kernel.org>
      Acked-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Cc: Wang Chen <wangchen@cn.fujitsu.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      LKML-Reference: <1272621711-8683-1-git-send-email-liang.li@windriver.com>
      [ fixed three small cleanliness details in fixup_early_ioremap() ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      e67a807f
  6. 06 2月, 2010 1 次提交
  7. 11 4月, 2009 1 次提交
  8. 04 3月, 2009 1 次提交
  9. 18 2月, 2009 1 次提交
    • H
      x86: truncate ISA addresses to unsigned int · a7eb5189
      H. Peter Anvin 提交于
      Impact: Cleanup; fix inappropriate macro use
      
      ISA addresses on x86 are mapped 1:1 with the physical address space.
      Since the ISA address space is only 24 bits (32 for VLB or LPC) it
      will always fit in an unsigned int, and at least in the aha1542 driver
      using a wider type would cause an undesirable promotion.  Hence
      explicitly cast the ISA bus addresses to unsigned int.
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
      a7eb5189
  10. 14 2月, 2009 1 次提交
  11. 07 2月, 2009 2 次提交
  12. 29 1月, 2009 1 次提交
  13. 22 1月, 2009 1 次提交
  14. 16 1月, 2009 1 次提交
    • J
      x86: fix assumed to be contiguous leaf page tables for kmap_atomic region (take 2) · a3c6018e
      Jan Beulich 提交于
      Debugging and original patch from Nick Piggin <npiggin@suse.de>
      
      The early fixmap pmd entry inserted at the very top of the KVA is causing the
      subsequent fixmap mapping code to not provide physically linear pte pages over
      the kmap atomic portion of the fixmap (which relies on said property to
      calculate pte addresses).
      
      This has caused weird boot failures in kmap_atomic much later in the boot
      process (initial userspace faults) on a 32-bit PAE system with a larger number
      of CPUs (smaller CPU counts tend not to run over into the next page so don't
      show up the problem).
      
      Solve this by attempting to clear out the page table, and copy any of its
      entries to the new one. Also, add a bug if a nonlinear condition is encountered
      and can't be resolved, which might save some hours of debugging if this fragile
      scheme ever breaks again...
      
      Once we have such logic, we can also use it to eliminate the early ioremap
      trickery around the page table setup for the fixmap area. This also fixes
      potential issues with FIX_* entries sharing the leaf page table with the early
      ioremap ones getting discarded by early_ioremap_clear() and not restored by
      early_ioremap_reset(). It at once eliminates the temporary (and configuration,
      namely NR_CPUS, dependent) unavailability of early fixed mappings during the
      time the fixmap area page tables get constructed.
      
      Finally, also replace the hard coded calculation of the initial table space
      needed for the fixmap area with a proper one, allowing kernels configured for
      large CPU counts to actually boot.
      
      Based-on: Nick Piggin <npiggin@suse.de>
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a3c6018e
  15. 03 12月, 2008 1 次提交
  16. 30 11月, 2008 3 次提交
  17. 29 10月, 2008 1 次提交
    • H
      x86: start annotating early ioremap pointers with __iomem · 1d6cf1fe
      Harvey Harrison 提交于
      Impact: some new sparse warnings in e820.c etc, but no functional change.
      
      As with regular ioremap, iounmap etc, annotate with __iomem.
      
      Fixes the following sparse warnings, will produce some new ones
      elsewhere in arch/x86 that will get worked out over time.
      
      arch/x86/mm/ioremap.c:402:9: warning: cast removes address space of expression
      arch/x86/mm/ioremap.c:406:10: warning: cast adds address space to expression (<asn:2>)
      arch/x86/mm/ioremap.c:782:19: warning: Using plain integer as NULL pointer
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1d6cf1fe
  18. 23 10月, 2008 2 次提交
  19. 13 10月, 2008 2 次提交
  20. 15 8月, 2008 1 次提交
    • M
      x86: fix readb() et al compile error with gcc-3.2.3 · 1c5b0eb6
      Mikael Pettersson 提交于
      Building 2.6.27-rc1 on x86 with gcc-3.2.3 fails with:
      
      In file included from include/asm/dma.h:12,
                       from include/linux/bootmem.h:8,
                       from init/main.c:26:
      include/asm/io.h: In function `readb':
      include/asm/io.h:32: syntax error before string constant
      include/asm/io.h: In function `readw':
      include/asm/io.h:33: syntax error before string constant
      include/asm/io.h: In function `readl':
      include/asm/io.h:34: syntax error before string constant
      include/asm/io.h: In function `__readb':
      include/asm/io.h:36: syntax error before string constant
      include/asm/io.h: In function `__readw':
      include/asm/io.h:37: syntax error before string constant
      include/asm/io.h: In function `__readl':
      include/asm/io.h:38: syntax error before string constant
      make[1]: *** [init/main.o] Error 1
      make: *** [init] Error 2
      
      Starting with 2.6.27-rc1 readb() et al are generated by a
      build_mmio_read() macro, which generates asm() statements with
      output register constraints like "=" "q", i.e. as two adjacent
      string literals. This doesn't work with gcc-3.2.3.
      
      Fixed by moving the "=" part into the callers' reg parameter
      (as suggested by Ingo).
      
      Build and boot-tested with gcc-3.2.3 on 32 and 64-bit x86.
      
      Fixes <http://bugzilla.kernel.org/show_bug.cgi?id=11205>.
      Signed-off-by: NMikael Pettersson <mikpe@it.uu.se>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1c5b0eb6
  21. 23 7月, 2008 1 次提交
    • V
      x86: consolidate header guards · 77ef50a5
      Vegard Nossum 提交于
      This patch is the result of an automatic script that consolidates the
      format of all the headers in include/asm-x86/.
      
      The format:
      
      1. No leading underscore. Names with leading underscores are reserved.
      2. Pathname components are separated by two underscores. So we can
         distinguish between mm_types.h and mm/types.h.
      3. Everything except letters and numbers are turned into single
         underscores.
      Signed-off-by: NVegard Nossum <vegard.nossum@gmail.com>
      77ef50a5
  22. 22 7月, 2008 1 次提交
  23. 08 7月, 2008 2 次提交
  24. 02 6月, 2008 1 次提交
    • L
      x86: MMIO and gcc re-ordering issue · c1f64a58
      Linus Torvalds 提交于
      On Tue, 27 May 2008, Linus Torvalds wrote:
      >
      > Expecting people to fix up all drivers is simply not going to happen. And
      > serializing things shouldn't be *that* expensive. People who cannot take
      > the expense can continue to use the magic __raw_writel() etc stuff.
      
      Of course, for non-x86, you kind of have to expect drivers to be
      well-behaved, so non-x86 can probably avoid this simply because there are
      less relevant drivers involved.
      
      Here's a UNTESTED patch for x86 that may or may not compile and work, and
      which serializes (on a compiler level) the IO accesses against regular
      memory accesses.
      
      __read[bwlq]()/__write[bwlq]() are not serialized with a :"memory"
      barrier, although since they still use "asm volatile" I suspect that i
      practice they are probably serial too. Did not look very closely at any
      generated code (only did a trivial test to see that the code looks
      *roughly* correct).
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c1f64a58
  25. 25 4月, 2008 1 次提交
  26. 17 4月, 2008 3 次提交
  27. 11 10月, 2007 1 次提交