1. 22 8月, 2009 2 次提交
    • H
      x86, mtrr: make mtrr_aps_delayed_init static bool · 5400743d
      H. Peter Anvin 提交于
      mtr_aps_delayed_init was declared u32 and made global, but it only
      ever takes boolean values and is only ever used in
      arch/x86/kernel/cpu/mtrr/main.c.  Declare it "static bool" and remove
      external references.
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      5400743d
    • S
      x86, pat/mtrr: Rendezvous all the cpus for MTRR/PAT init · d0af9eed
      Suresh Siddha 提交于
      SDM Vol 3a section titled "MTRR considerations in MP systems" specifies
      the need for synchronizing the logical cpu's while initializing/updating
      MTRR.
      
      Currently Linux kernel does the synchronization of all cpu's only when
      a single MTRR register is programmed/updated. During an AP online
      (during boot/cpu-online/resume)  where we initialize all the MTRR/PAT registers,
      we don't follow this synchronization algorithm.
      
      This can lead to scenarios where during a dynamic cpu online, that logical cpu
      is initializing MTRR/PAT with cache disabled (cr0.cd=1) etc while other logical
      HT sibling continue to run (also with cache disabled because of cr0.cd=1
      on its sibling).
      
      Starting from Westmere, VMX transitions with cr0.cd=1 don't work properly
      (because of some VMX performance optimizations) and the above scenario
      (with one logical cpu doing VMX activity and another logical cpu coming online)
      can result in system crash.
      
      Fix the MTRR initialization by doing rendezvous of all the cpus. During
      boot and resume, we delay the MTRR/PAT init for APs till all the
      logical cpu's come online and the rendezvous process at the end of AP's bringup,
      will initialize the MTRR/PAT for all AP's.
      
      For dynamic single cpu online, we synchronize all the logical cpus and
      do the MTRR/PAT init on the AP that is coming online.
      Signed-off-by: NSuresh Siddha <suresh.b.siddha@intel.com>
      Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
      d0af9eed
  2. 04 7月, 2009 1 次提交
    • J
      x86: Clean up mtrr/main.c · dbd51be0
      Jaswinder Singh Rajput 提交于
      Fix following trivial style problems:
      
        ERROR: trailing whitespace X 25
        WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>
        WARNING: Use #include <linux/kvm_para.h> instead of <asm/kvm_para.h>
        ERROR: do not initialise externals to 0 or NULL X 2
        ERROR: "foo * bar" should be "foo *bar" X 5
        ERROR: do not use assignment in if condition X 2
        WARNING: line over 80 characters X 8
        ERROR: return is not a function, parentheses are not required
        WARNING: braces {} are not necessary for any arm of this statement
        ERROR: space required before the open parenthesis '(' X 2
        ERROR: open brace '{' following function declarations go on the next line
        ERROR: space required after that ',' (ctx:VxV) X 8
        ERROR: space required before the open parenthesis '(' X 3
        ERROR: else should follow close brace '}'
        WARNING: space prohibited between function name and open parenthesis '('
        WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable X 2
      
      Also use pr_debug and pr_warning where possible.
      
      total: 50 errors, 14 warnings
      
      arch/x86/kernel/cpu/mtrr/main.o:
      
         text	   data	    bss	    dec	    hex	filename
         3668	    116	   4156	   7940	   1f04	main.o.before
         3668	    116	   4156	   7940	   1f04	main.o.after
      
      md5:
         e01af2fd28deef77c8d01e71acfbd365  main.o.before.asm
         e01af2fd28deef77c8d01e71acfbd365  main.o.after.asm
      Suggested-by: NAlan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NJaswinder Singh Rajput <jaswinderrajput@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Yinghai Lu <yinghai@kernel.org>
      LKML-Reference: <20090703164225.GA21447@elte.hu>
      Cc: Avi Kivity <avi@redhat.com> # Avi, please have a look at the kvm_para.h bit
      [ More cleanups ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      dbd51be0
  3. 15 5月, 2009 1 次提交
  4. 17 3月, 2009 1 次提交
  5. 13 3月, 2009 2 次提交
  6. 29 1月, 2009 1 次提交
  7. 31 12月, 2008 1 次提交
  8. 26 12月, 2008 1 次提交
  9. 28 10月, 2008 1 次提交
  10. 05 10月, 2008 3 次提交
  11. 03 10月, 2008 2 次提交
  12. 30 9月, 2008 4 次提交
  13. 28 9月, 2008 4 次提交
  14. 19 9月, 2008 1 次提交
    • Y
      x86: fix arch/x86/kernel/cpu/mtrr/main.c warning · 279b0bbb
      Yinghai Lu 提交于
      fix this warning reported by Andrew Morton:
      
      > arch/x86/kernel/cpu/mtrr/main.c: In function 'mtrr_bp_init':
      > arch/x86/kernel/cpu/mtrr/main.c:1170: warning: 'extra_remove_base' may be used uninitialized in this function
      
      the warning is bogus but the logic that prevents uninitialized use
      is a bit convoluted so simplify it all.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      279b0bbb
  15. 21 8月, 2008 1 次提交
  16. 22 7月, 2008 1 次提交
  17. 08 7月, 2008 1 次提交
  18. 26 6月, 2008 1 次提交
  19. 25 5月, 2008 6 次提交
  20. 17 4月, 2008 1 次提交
  21. 22 3月, 2008 1 次提交
  22. 26 2月, 2008 2 次提交
  23. 07 2月, 2008 1 次提交
    • Y
      x86: fix mttr trimming · 20651af9
      Yinghai Lu 提交于
      Pavel Emelyanov reported that his networking card did not work
      and bisected it down to:
      
      "
      The commit
      
        093af8d7
        x86_32: trim memory by updating e820
      
      broke my e1000 card: on loading driver says that
      
        e1000: probe of 0000:04:03.0 failed with error -5
      
      and the interface doesn't appear.
      "
      
      on a 32-bit kernel, base will overflow when try to do PAGE_SHIFT,
      and highest_addr will always less 4G.
      
      So use pfn instead of address to avoid the overflow when more than
      4g RAM is installed on a 32-bit kernel.
      
      Many thanks to Pavel Emelyanov for reporting and testing it.
      Bisected-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NYinghai Lu <yinghai.lu@sun.com>
      Tested-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      20651af9