1. 04 8月, 2010 2 次提交
    • F
      x86, hwmon: Package Level Thermal/Power: thermal throttling handler · 55d435a2
      Fenghua Yu 提交于
      Add package level thermal throttle interrupt support. The interrupt handler
      increases package level thermal throttle count. It also logs the event in MCE
      log.
      
      The package level thermal throttle interrupt happens across threads in a
      package. Each thread handles the interrupt individually. User level application
      is supposed to retrieve correct event count and log based on package/thread
      topology. This is the same situation for core level interrupt handler. In the
      future, interrupt may be reported only per package or per core.
      
      core_throttle_count and package_throttle_count are used for user interface.
      Previously only throttle_count is used for core throttle count. If you think
      new core_throttle_count name breaks user interface, I can change this part.
      Signed-off-by: NFenghua Yu <fenghua.yu@intel.com>
      LKML-Reference: <1280448826-12004-4-git-send-email-fenghua.yu@intel.com>
      Reviewed-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      55d435a2
    • F
      x86, hwmon: Package Level Thermal/Power: pkgtemp hwmon driver · cb84b194
      Fenghua Yu 提交于
      This patch adds a hwmon driver for package level thermal control. The driver
      dumps package level thermal information through sysfs interface so that upper
      level application (e.g. lm_sensor) can retrive the information.
      
      Instead of having the package level hwmon code in coretemp, I write a seperate
      driver pkgtemp because:
      
      First, package level thermal sensors include not only sensors for each core,
      but also sensors for uncore, memory controller or other components in the
      package. Logically it will be clear to have a seperate hwmon driver for package
      level hwmon to monitor wider range of sensors in a package. Merging package
      thermal driver into core thermal driver doesn't make sense and may mislead.
      
      Secondly, merging the two drivers together may cause coding mess. It's easier
      to include various package level sensors info if more sensor information is
      implemented. Coretemp code needs to consider a lot of legacy machine cases.
      Pkgtemp code only considers platform starting from Sandy Bridge.
      
      On a 1Sx4Cx2T Sandy Bridge platform, lm-sensors dumps the pkgtemp and coretemp:
      
      pkgtemp-isa-0000
      Adapter: ISA adapter
      physical id 0: +33.0°C  (high = +79.0°C, crit = +99.0°C)
      
      coretemp-isa-0000
      Adapter: ISA adapter
      Core 0:      +32.0°C  (high = +79.0°C, crit = +99.0°C)
      
      coretemp-isa-0001
      Adapter: ISA adapter
      Core 1:      +32.0°C  (high = +79.0°C, crit = +99.0°C)
      
      coretemp-isa-0002
      Adapter: ISA adapter
      Core 2:      +32.0°C  (high = +79.0°C, crit = +99.0°C)
      
      coretemp-isa-0003
      Adapter: ISA adapter
      Core 3:      +32.0°C  (high = +79.0°C, crit = +99.0°C)
      
      [ hpa: folded v3 patch removing improper global variable "SHOW" ]
      Signed-off-by: NFenghua Yu <fenghua.yu@intel.com>
      LKML-Reference: <1280448826-12004-3-git-send-email-fenghua.yu@intel.com>
      Reviewed-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      cb84b194
  2. 31 7月, 2010 1 次提交
  3. 29 7月, 2010 5 次提交
  4. 26 7月, 2010 16 次提交
  5. 25 7月, 2010 2 次提交
  6. 24 7月, 2010 3 次提交
  7. 23 7月, 2010 11 次提交
    • S
      nconfig: Fix segfault when help contains special characters · 58f915a3
      Stephen Boyd 提交于
      nconfig segfaults when help text contains the character '%'. For a quick
      example, navigate to the kernel compression options and get the help for
      bzip2. Doing so triggers a call to mvwprintw() with a string containing
      '%' and no extra arguments to fill in the specifier's value. Fix this
      case by printing the literal string retrieved from the kconfig.
      
       #0  0x00002b52b6b11d83 in vfprintf () from /lib/libc.so.6
       #1  0x00002b52b6bad010 in __vsnprintf_chk () from /lib/libc.so.6
       #2  0x00002b52b623991b in _nc_printf_string () from
       /lib/libncursesw.so.5
       #3  0x00002b52b6234cff in vwprintw () from /lib/libncursesw.so.5
       #4  0x00002b52b6234db9 in mvwprintw () from /lib/libncursesw.so.5
       #5  0x00000000004151d8 in fill_window (win=0x21b64c0,
           text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression ratio and
           speed is intermediate.\nDecompression speed is slowest among the
           three.  The kernel\nsize is about 10% smaller with bzip2, in
           comparison to gzip.\nBzip2 us"...)
           at scripts/kconfig/nconf.gui.c:229
       #6  0x0000000000416335 in show_scroll_win (main_window=0x21a5630,
               title=0x157fa30 "Bzip2",
       	    text=0x21b62b0 "CONFIG_KERNEL_BZIP2:\n\nIts compression
       	    ratio and speed is intermediate.\nDecompression speed is
       	    slowest among the three.  The kernel\nsize is about 10%
       	    smaller with bzip2, in comparison to gzip.\nBzip2 us"...)
           at scripts/kconfig/nconf.gui.c:535
       #7  0x00000000004055b2 in show_help (menu=0x157f9d0)
               at scripts/kconfig/nconf.c:1257
       #8  0x0000000000405897 in conf_choice (menu=0x157f130)
       	    at scripts/kconfig/nconf.c:1321
       #9  0x0000000000405326 in conf (menu=0x157d130) at
       	    scripts/kconfig/nconf.c:1208
       #10 0x00000000004052e8 in conf (menu=0xb434a0) at
       	    scripts/kconfig/nconf.c:1203
       #11 0x0000000000406092 in main (ac=2, av=0x7fff96a93c38)
      
      Cc: Michal Marek <mmarek@suse.cz>
      Cc: Nir Tzachar <nir.tzachar@gmail.com>
      Signed-off-by: NStephen Boyd <bebarino@gmail.com>
      Signed-off-by: NMichal Marek <mmarek@suse.cz>
      58f915a3
    • A
      KVM: Use kmalloc() instead of vmalloc() for KVM_[GS]ET_MSR · 7a73c028
      Avi Kivity 提交于
      We don't need more than a page, and vmalloc() is slower (much
      slower recently due to a regression).
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      7a73c028
    • X
      KVM: MMU: fix conflict access permissions in direct sp · 6aa0b9de
      Xiao Guangrong 提交于
      In no-direct mapping, we mark sp is 'direct' when we mapping the
      guest's larger page, but its access is encoded form upper page-struct
      entire not include the last mapping, it will cause access conflict.
      
      For example, have this mapping:
              [W]
            / PDE1 -> |---|
        P[W]          |   | LPA
            \ PDE2 -> |---|
              [R]
      
      P have two children, PDE1 and PDE2, both PDE1 and PDE2 mapping the
      same lage page(LPA). The P's access is WR, PDE1's access is WR,
      PDE2's access is RO(just consider read-write permissions here)
      
      When guest access PDE1, we will create a direct sp for LPA, the sp's
      access is from P, is W, then we will mark the ptes is W in this sp.
      
      Then, guest access PDE2, we will find LPA's shadow page, is the same as
      PDE's, and mark the ptes is RO.
      
      So, if guest access PDE1, the incorrect #PF is occured.
      
      Fixed by encode the last mapping access into direct shadow page
      Signed-off-by: NXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Signed-off-by: NMarcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      6aa0b9de
    • B
      Merge commit 'kumar/merge' into merge · 7ffb65f8
      Benjamin Herrenschmidt 提交于
      7ffb65f8
    • S
      vmlinux.lds: fix .data..init_task output section (fix popwerpc boot) · da5e37ef
      Sam Ravnborg 提交于
      The .data..init_task output section was missing
      a load offset causing a popwerpc target to fail to boot.
      
      Sean MacLennan tracked it down to the definition of
      INIT_TASK_DATA_SECTION().
      
      There are only two users of INIT_TASK_DATA_SECTION()
      in the kernel today: cris and popwerpc.
      cris do not support relocatable kernels and is thus not
      impacted by this change.
      
      Fix INIT_TASK_DATA_SECTION() to specify load offset like
      all other output sections.
      Reported-by: NSean MacLennan <smaclennan@pikatech.com>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      da5e37ef
    • B
      powerpc: Fix erroneous lmb->memblock conversions · 3fdfd990
      Benjamin Herrenschmidt 提交于
      Oooops... we missed these. We incorrectly converted strings
      used when parsing the device-tree on pseries, thus breaking
      access to drconf memory and hotplug memory.
      
      While at it, also revert some variable names that represent
      something the FW calls "lmb" and thus don't need to be converted
      to "memblock".
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ---
      3fdfd990
    • B
      powerpc/mm: Add some debug output when hash insertion fails · 4b8692c0
      Benjamin Herrenschmidt 提交于
      This adds some debug output to our MMU hash code to print out some
      useful debug data if the hypervisor refuses the insertion (which
      should normally never happen).
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ---
      4b8692c0
    • B
      powerpc/mm: Fix bugs in huge page hashing · 171aa2ca
      Benjamin Herrenschmidt 提交于
      There's a couple of nasty bugs lurking in our huge page hashing code.
      
      First, we don't check the access permission atomically with setting
      the _PAGE_BUSY bit, which means that the PTE value we end up using
      for the hashing might be different than the one we have checked
      the access permissions for.
      
      We've seen cases where that leads us to try to use an invalidated
      PTE for hashing, causing all sort of "interesting" issues.
      
      Then, we also failed to set _PAGE_DIRTY on a write access.
      
      Finally, a minor tweak but we should return 0 when we find the
      PTE busy, in order to just re-execute the access, rather than 1
      which means going to do_page_fault().
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ---
      171aa2ca
    • B
      powerpc/mm: Move around testing of _PAGE_PRESENT in hash code · ca91e6c0
      Benjamin Herrenschmidt 提交于
      Instead of adding _PAGE_PRESENT to the access permission mask
      in each low level routine independently, we add it once from
      hash_page().
      
      We also move the preliminary access check (the racy one before
      the PTE is locked) up so it applies to the huge page case. This
      duplicates code in __hash_page_huge() which we'll remove in a
      subsequent patch to fix a race in there.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ca91e6c0
    • A
      powerpc/mm: Handle hypervisor pte insert failure in __hash_page_huge · b1623e7e
      Anton Blanchard 提交于
      If the hypervisor gives us an error on a hugepage insert we panic. The
      normal page code already handles this by returning an error instead and we end
      calling low_hash_fault which will just kill the task if possible.
      
      The patch below does a similar thing for the hugepage case.
      Signed-off-by: NAnton Blanchard <anton@samba.org>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      b1623e7e
    • L
      Merge branch 'misc' into release · bbac30ed
      Len Brown 提交于
      bbac30ed