1. 02 2月, 2010 1 次提交
    • E
      x86, mtrr: Constify struct mtrr_ops · 3b9cfc0a
      Emese Revfy 提交于
      This is part of the ops structure constification
      effort started by Arjan van de Ven et al.
      
      Benefits of this constification:
      
       * prevents modification of data that is shared
         (referenced) by many other structure instances
         at runtime
      
       * detects/prevents accidental (but not intentional)
         modification attempts on archs that enforce
         read-only kernel data at runtime
      
       * potentially better optimized code as the compiler
         can assume that the const data cannot be changed
      
       * the compiler/linker move const data into .rodata
         and therefore exclude them from false sharing
      Signed-off-by: NEmese Revfy <re.emese@gmail.com>
      LKML-Reference: <4B65D712.3080804@gmail.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      3b9cfc0a
  2. 04 7月, 2009 1 次提交
  3. 15 5月, 2009 6 次提交
  4. 17 3月, 2009 1 次提交
  5. 13 3月, 2009 1 次提交
  6. 31 12月, 2008 2 次提交
  7. 25 5月, 2008 1 次提交
    • Y
      x86: mtrr cleanup for converting continuous to discrete layout, v8 · 95ffa243
      Yinghai Lu 提交于
      some BIOS like to use continus MTRR layout, and X driver can not add
      WB entries for graphical cards when 4g or more RAM installed.
      
      the patch will change MTRR to discrete.
      
      mtrr_chunk_size= could be used to have smaller continuous block to hold holes.
      default is 256m, could be set according to size of graphics card memory.
      
      mtrr_gran_size= could be used to send smallest mtrr block to avoid run out of MTRRs
      
      v2: fix -1 for UC checking
      v3: default to disable, and need use enable_mtrr_cleanup to enable this feature
          skip the var state change warning.
          remove next_basek in range_to_mtrr()
      v4: correct warning mask.
      v5: CONFIG_MTRR_SANITIZER
      v6: fix 1g, 2g, 512 aligment with extra hole
      v7: gran_sizek to prevent running out of MTRRs.
      v8: fix hole_basek caculation caused when removing next_basek
          gran_sizek using when basek is 0.
      
      need to apply
      	[PATCH] x86: fix trimming e820 with MTRR holes.
      right after this one.
      Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      95ffa243
  8. 04 2月, 2008 1 次提交
  9. 30 1月, 2008 2 次提交
    • J
      x86, 32-bit: trim memory not covered by wb mtrrs · 99fc8d42
      Jesse Barnes 提交于
      On some machines, buggy BIOSes don't properly setup WB MTRRs to cover all
      available RAM, meaning the last few megs (or even gigs) of memory will be
      marked uncached.  Since Linux tends to allocate from high memory addresses
      first, this causes the machine to be unusably slow as soon as the kernel
      starts really using memory (i.e.  right around init time).
      
      This patch works around the problem by scanning the MTRRs at boot and
      figuring out whether the current end_pfn value (setup by early e820 code)
      goes beyond the highest WB MTRR range, and if so, trimming it to match.  A
      fairly obnoxious KERN_WARNING is printed too, letting the user know that
      not all of their memory is available due to a likely BIOS bug.
      
      Something similar could be done on i386 if needed, but the boot ordering
      would be slightly different, since the MTRR code on i386 depends on the
      boot_cpu_data structure being setup.
      
      This patch fixes a bug in the last patch that caused the code to run on
      non-Intel machines (AMD machines apparently don't need it and it's untested
      on other non-Intel machines, so best keep it off).
      
      Further enhancements and fixes from:
      
        Yinghai Lu <Yinghai.Lu@Sun.COM>
        Andi Kleen <ak@suse.de>
      Signed-off-by: NJesse Barnes <jesse.barnes@intel.com>
      Tested-by: NJustin Piszcz <jpiszcz@lucidpixels.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Yinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      99fc8d42
    • P
      x86: mtrr use type bool [RESEND AGAIN] · 2d2ee8de
      Paul Jimenez 提交于
      This is a janitorish patch to 1) remove private TRUE/FALSE #def's in
      favor of using the standard enum from linux/stddef.h and 2) switch the
      variables holding those values to type 'bool' (from linux/types.h)
      since it both seems more appropriate and allows for potentially better
      optimization.
      
      As a truly minor aside, I removed a couple of comments documenting
      a 'do_safe' parameter that seems to no longer exist.
      Signed-off-by: NPaul Jimenez <pj@place.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      2d2ee8de
  10. 11 10月, 2007 1 次提交
  11. 13 2月, 2007 1 次提交
  12. 07 12月, 2006 1 次提交
    • J
      [PATCH] i386: fix MTRR code · 365bff80
      Jan Beulich 提交于
      Until not so long ago, there were system log messages pointing to
      inconsistent MTRR setup of the video frame buffer caused by the way vesafb
      and X worked. While vesafb was fixed meanwhile, I believe fixing it there
      only hides a shortcoming in the MTRR code itself, in that that code is not
      symmetric with respect to the ordering of attempts to set up two (or more)
      regions where one contains the other. In the current shape, it permits
      only setting up sub-regions of pre-exisiting ones. The patch below makes
      this symmetric.
      
      While working on that I noticed a few more inconsistencies in that code,
      namely
      - use of 'unsigned int' for sizes in many, but not all places (the patch
        is converting this to use 'unsigned long' everywhere, which specifically
        might be necessary for x86-64 once a processor supporting more than 44
        physical address bits would become available)
      - the code to correct inconsistent settings during secondary processor
        startup tried (if necessary) to correct, among other things, the value
        in IA32_MTRR_DEF_TYPE, however the newly computed value would never get
        used (i.e. stored in the respective MSR)
      - the generic range validation code checked that the end of the
        to-be-added range would be above 1MB; the value checked should have been
        the start of the range
      - when contained regions are detected, previously this was allowed only
        when the old region was uncacheable; this can be symmetric (i.e. the new
        region can also be uncacheable) and even further as per Intel's
        documentation write-trough and write-back for either region is also
        compatible with the respective opposite in the other
      Signed-off-by: NJan Beulich <jbeulich@novell.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      365bff80
  13. 08 7月, 2005 1 次提交
  14. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      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!
      1da177e4