1. 25 11月, 2009 5 次提交
    • T
      [ACPI/CPUFREQ] Introduce bios_limit per cpu cpufreq sysfs interface · e2f74f35
      Thomas Renninger 提交于
      This interface is mainly intended (and implemented) for ACPI _PPC BIOS
      frequency limitations, but other cpufreq drivers can also use it for
      similar use-cases.
      
      Why is this needed:
      
      Currently it's not obvious why cpufreq got limited.
      People see cpufreq/scaling_max_freq reduced, but this could have
      happened by:
        - any userspace prog writing to scaling_max_freq
        - thermal limitations
        - hardware (_PPC in ACPI case) limitiations
      
      Therefore export bios_limit (in kHz) to:
        - Point the user that it's the BIOS (broken or intended) which limits
          frequency
        - Export it as a sysfs interface for userspace progs.
          While this was a rarely used feature on laptops, there will appear
          more and more server implemenations providing "Green IT" features like
          allowing the service processor to limit the frequency. People want
          to know about HW/BIOS frequency limitations.
      
      All ACPI P-state driven cpufreq drivers are covered with this patch:
        - powernow-k8
        - powernow-k7
        - acpi-cpufreq
      
      Tested with a patched DSDT which limits the first two cores (_PPC returns 1)
      via _PPC, exposed by bios_limit:
      # echo 2200000 >cpu2/cpufreq/scaling_max_freq
      # cat cpu*/cpufreq/scaling_max_freq
      2600000
      2600000
      2200000
      2200000
      # #scaling_max_freq shows general user/thermal/BIOS limitations
      
      # cat cpu*/cpufreq/bios_limit
      2600000
      2600000
      2800000
      2800000
      # #bios_limit only shows the HW/BIOS limitation
      
      CC: Pallipadi Venkatesh <venkatesh.pallipadi@intel.com>
      CC: Len Brown <lenb@kernel.org>
      CC: davej@codemonkey.org.uk
      CC: linux@dominikbrodowski.net
      Signed-off-by: NThomas Renninger <trenn@suse.de>
      Signed-off-by: NDave Jones <davej@redhat.com>
      e2f74f35
    • R
      [CPUFREQ] use an enum for speedstep processor identification · 1cce76c2
      Rusty Russell 提交于
      The "unsigned int processor" everywhere confused Rusty, leading to
      breakage when he passed in smp_processor_id().
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Acked-by: NDominik Brodowski <linux@dominikbrodowski.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDave Jones <davej@redhat.com>
      1cce76c2
    • K
      [CPUFREQ] powernow-k6: set transition latency value so ondemand governor can be used · db2820dd
      Krzysztof Helt 提交于
      Set the transition latency to value smaller than CPUFREQ_ETERNAL so
      governors other than "performance" work (like the "ondemand" one).
      
      The value is found in "AMD PowerNow! Technology Platform Design Guide for
      Embedded Processors" dated December 2000 (AMD doc #24267A). There is the
      answer to one of FAQs on page 40 which states that suggested complete transition
      period is 200 us.
      
      Tested on K6-2+ CPU with K6-3 core (model 13, stepping 4).
      Signed-off-by: NKrzysztof Helt <krzysztof.h1@wp.pl>
      Signed-off-by: NDave Jones <davej@redhat.com>
      db2820dd
    • R
      [CPUFREQ] cpumask: don't put a cpumask on the stack in x86...cpufreq/powernow-k8.c · b8cbe7e8
      Rusty Russell 提交于
      It's still mugging the current process's cpumask, but as comment in
      1ff6e97f says, it's not a trivial fix.
      
      So, at least we can use a cpumask_var_t to do the Wrong Thing the Right Way :)
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      To: cpufreq@vger.kernel.org
      Cc: Mark Langsdorf <mark.langsdorf@amd.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      b8cbe7e8
    • H
      [CPUFREQ] Enable ACPI PDC handshake for VIA/Centaur CPUs · d77b8197
      Harald Welte 提交于
      In commit 0de51088, we introduced the
      use of acpi-cpufreq on VIA/Centaur CPU's by removing a vendor check for
      VENDOR_INTEL.  However, as it turns out, at least the Nano CPU's also
      need the PDC (processor driver capabilities) handshake in order to
      activate the methods required for acpi-cpufreq.
      
      Since arch_acpi_processor_init_pdc() contains another vendor check for
      Intel, the PDC is not initialized on VIA CPU's.  The resulting behavior
      of a current mainline kernel on such systems is:  acpi-cpufreq
      loads and it indicates CPU frequency changes.  However, the CPU stays at
      a single frequency
      
      This trivial patch ensures that init_intel_pdc() is called on Intel and
      VIA/Centaur CPU's alike.
      Signed-off-by: NHarald Welte <HaraldWelte@viatech.com>
      Signed-off-by: NDave Jones <davej@redhat.com>
      d77b8197
  2. 18 11月, 2009 4 次提交
  3. 10 11月, 2009 1 次提交
  4. 08 11月, 2009 1 次提交
  5. 07 11月, 2009 1 次提交
  6. 04 11月, 2009 1 次提交
    • S
      x86, fs: Fix x86 procfs stack information for threads on 64-bit · 89240ba0
      Stefani Seibold 提交于
      This patch fixes two issues in the procfs stack information on
      x86-64 linux.
      
      The 32 bit loader compat_do_execve did not store stack
      start. (this was figured out by Alexey Dobriyan).
      
      The stack information on a x64_64 kernel always shows 0 kbyte
      stack usage, because of a missing implementation of the KSTK_ESP
      macro which always returned -1.
      
      The new implementation now returns the right value.
      Signed-off-by: NStefani Seibold <stefani@seibold.net>
      Cc: Americo Wang <xiyou.wangcong@gmail.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      LKML-Reference: <1257240160.4889.24.camel@wall-e>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      89240ba0
  7. 02 11月, 2009 2 次提交
  8. 29 10月, 2009 1 次提交
  9. 27 10月, 2009 1 次提交
  10. 26 10月, 2009 1 次提交
    • J
      x86: crash_dump: Fix non-pae kdump kernel memory accesses · 72ed7de7
      Jiri Slaby 提交于
      Non-PAE 32-bit dump kernels may wrap an address around 4G and
      poke unwanted space. ptes there are 32-bit long, and since
      pfn << PAGE_SIZE may exceed this limit, high pfn bits are
      cropped and wrong address mapped by kmap_atomic_pfn in
      copy_oldmem_page.
      
      Don't allow this behavior in non-PAE kdump kernels by checking
      pfns passed into copy_oldmem_page. In the case of failure,
      userspace process gets EFAULT.
      
      [v2]
      - fix comments
      - move ifdefs inside the function
      Signed-off-by: NJiri Slaby <jirislaby@gmail.com>
      Cc: Vivek Goyal <vgoyal@redhat.com>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Simon Horman <horms@verge.net.au>
      Cc: Paul Mundt <lethal@linux-sh.org>
      LKML-Reference: <1256551903-30567-1-git-send-email-jirislaby@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      72ed7de7
  11. 16 10月, 2009 4 次提交
    • R
      x86, UV: Fix and clean up bau code to use uv_gpa_to_pnode() · 1d21e6e3
      Robin Holt 提交于
      Create an inline function to extract the pnode from a global
      physical address and then convert the broadcast assist unit to
      use the newly created uv_gpa_to_pnode function.
      
      The open-coded code was wrong as well - it might explain a
      few of our unexplained bau hangs.
      Signed-off-by: NRobin Holt <holt@sgi.com>
      Acked-by: NCliff Whickman <cpw@sgi.com>
      Cc: linux-mm@kvack.org
      Cc: Jack Steiner <steiner@sgi.com>
      LKML-Reference: <20091016112920.GZ8903@sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1d21e6e3
    • R
      x86: Don't print number of MCE banks for every CPU · 93ae5012
      Roland Dreier 提交于
      The MCE initialization code explicitly says it doesn't handle
      asymmetric configurations where different CPUs support different
      numbers of MCE banks, and it prints a big warning in that case.
      
      Therefore, printing the "mce: CPU supports <x> MCE banks"
      message into the kernel log for every CPU is pure redundancy
      that clutters the log significantly for systems with lots of
      CPUs.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      LKML-Reference: <adaeip473qt.fsf@cisco.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      93ae5012
    • R
      x86, UV: Fix information in __uv_hub_info structure · 036ed8ba
      Robin Holt 提交于
      A few parts of the uv_hub_info structure are initialized
      incorrectly.
      
       - n_val is being loaded with m_val.
       - gpa_mask is initialized with a bytes instead of an unsigned long.
       - Handle the case where none of the alias registers are used.
      
      Lastly I converted the bau over to using the uv_hub_info->m_val
      which is the correct value.
      
      Without this patch, booting a large configuration hits a
      problem where the upper bits of the gnode affect the pnode
      and the bau will not operate.
      Signed-off-by: NRobin Holt <holt@sgi.com>
      Acked-by: NJack Steiner <steiner@sgi.com>
      Cc: Cliff Whickman <cpw@sgi.com>
      Cc: stable@kernel.org
      LKML-Reference: <20091015224946.396355000@alcatraz.americas.sgi.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      036ed8ba
    • I
      x86: Document linker script ASSERT() quirk · a5912f6b
      Ingo Molnar 提交于
      Older binutils breaks if ASSERT() is used without a sink
      for the output.
      
      For example 2.14.90.0.6 is known to be broken, the link
      fails with:
      
        LD      .tmp_vmlinux1
        ld:arch/x86/kernel/vmlinux.lds:678: parse error
      
      Document this quirk in all three files that use it.
      
        See:    http://marc.info/?l=linux-kbuild&m=124930110427870&w=2
        See[2]: d2ba8b21 ("x86: Fix assert syntax in vmlinux.lds.S")
      
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Roland McGrath <roland@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      LKML-Reference: <4AD6523D.5030909@zytor.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a5912f6b
  12. 15 10月, 2009 2 次提交
  13. 14 10月, 2009 1 次提交
    • L
      x86, perf_event: Rename 'performance counter interrupt' · 89ccf465
      Li Hong 提交于
      In 'cdd6c482', we renamed
      Performance Counters -> Performance Events.
      
      The name showed up in /proc/interrupts also needs a change. I use
      PMI (Performance monitoring interrupt) here, since it is the
      official name used in Intel's documents.
      Signed-off-by: NLi Hong <lihong.hi@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <20091014105039.GA22670@uhli>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      89ccf465
  14. 13 10月, 2009 2 次提交
  15. 12 10月, 2009 3 次提交
  16. 10 10月, 2009 1 次提交
    • J
      x86/amd-iommu: Workaround for erratum 63 · c5cca146
      Joerg Roedel 提交于
      There is an erratum for IOMMU hardware which documents
      undefined behavior when forwarding SMI requests from
      peripherals and the DTE of that peripheral has a sysmgt
      value of 01b. This problem caused weird IO_PAGE_FAULTS in my
      case.
      This patch implements the suggested workaround for that
      erratum into the AMD IOMMU driver.  The erratum is
      documented with number 63.
      
      Cc: stable@kernel.org
      Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
      c5cca146
  17. 09 10月, 2009 2 次提交
  18. 08 10月, 2009 1 次提交
    • A
      x86, timers: Check for pending timers after (device) interrupts · 9bcbdd9c
      Arjan van de Ven 提交于
      Now that range timers and deferred timers are common, I found a
      problem with these using the "perf timechart" tool. Frans Pop also
      reported high scheduler latencies via LatencyTop, when using
      iwlagn.
      
      It turns out that on x86, these two 'opportunistic' timers only get
      checked when another "real" timer happens. These opportunistic
      timers have the objective to save power by hitchhiking on other
      wakeups, as to avoid CPU wakeups by themselves as much as possible.
      
      The change in this patch runs this check not only at timer
      interrupts, but at all (device) interrupts. The effect is that:
      
       1) the deferred timers/range timers get delayed less
      
       2) the range timers cause less wakeups by themselves because
          the percentage of hitchhiking on existing wakeup events goes up.
      
      I've verified the working of the patch using "perf timechart", the
      original exposed bug is gone with this patch. Frans also reported
      success - the latencies are now down in the expected ~10 msec
      range.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Tested-by: NFrans Pop <elendil@planet.nl>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Mike Galbraith <efault@gmx.de>
      LKML-Reference: <20091008064041.67219b13@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9bcbdd9c
  19. 04 10月, 2009 1 次提交
  20. 03 10月, 2009 1 次提交
    • A
      x86: Simplify bound checks in the MTRR code · 11879ba5
      Arjan van de Ven 提交于
      The current bound checks for copy_from_user in the MTRR driver are
      not as obvious as they could be, and gcc agrees with that.
      
      This patch simplifies the boundary checks to the point that gcc can
      now prove to itself that the copy_from_user() is never going past
      its bounds.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Cc: Yinghai Lu <yinghai@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <20090926205150.30797709@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      11879ba5
  21. 02 10月, 2009 1 次提交
    • I
      x86: EDAC: MCE: Fix MCE decoding callback logic · f436f8bb
      Ingo Molnar 提交于
      Make decoding of MCEs happen only on AMD hardware by registering a
      non-default callback only on CPU families which support it.
      
      While looking at the interaction of decode_mce() with the other MCE
      code i also noticed a few other things and made the following
      cleanups/fixes:
      
       - Fixed the mce_decode() weak alias - a weak alias is really not
         good here, it should be a proper callback. A weak alias will be
         overriden if a piece of code is built into the kernel - not
         good, obviously.
      
       - The patch initializes the callback on AMD family 10h and 11h.
      
       - Added the more correct fallback printk of:
      
      	No support for human readable MCE decoding on this CPU type.
      	Transcribe the message and run it through 'mcelog --ascii' to decode.
      
         On CPUs that dont have a decoder.
      
       - Made the surrounding code more readable.
      
      Note that the callback allows us to have a default fallback -
      without having to check the CPU versions during the printout
      itself. When an EDAC module registers itself, it can install the
      decode-print function.
      
      (there's no unregister needed as this is core code.)
      
      version -v2 by Borislav Petkov:
      
       - add K8 to the set of supported CPUs
      
       - always build in edac_mce_amd since we use an early_initcall now
      
       - fix checkpatch warnings
      Signed-off-by: NBorislav Petkov <borislav.petkov@amd.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      LKML-Reference: <20091001141432.GA11410@aftab>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f436f8bb
  22. 01 10月, 2009 3 次提交
    • J
      x86: earlyprintk: Fix regression to handle serial,ttySn as 1 arg · ea3acb19
      Jason Wessel 提交于
      Commit c9530948 ("early_printk: Allow more than one early console")
      introduced a regression in the parsing of the earlyprintk= kernel
      arguments.
      
      If you specify "earlyprintk=serial,ttyS0,115200" as a kernel
      argument, the "serial,ttyS" should be parsed as a single argument
      and not as "serial" and then "ttyS".
      
      Also update the documentation to reflect you can specify the ttyS
      directly without the "serial" argument.
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Greg KH <gregkh@suse.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      LKML-Reference: <4ABB7D5E.6000301@windriver.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ea3acb19
    • E
      x86: Don't generate cmpxchg8b_emu if CONFIG_X86_CMPXCHG64=y · 04edbdef
      Eric Dumazet 提交于
      Conditionaly compile cmpxchg8b_emu.o and EXPORT_SYMBOL(cmpxchg8b_emu).
      
      This reduces the kernel size a bit.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: John Stultz <johnstul@us.ibm.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <4AC43E7E.1000600@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      04edbdef
    • A
      x86: Provide an alternative() based cmpxchg64() · 79e1dd05
      Arjan van de Ven 提交于
      cmpxchg64() today generates, to quote Linus, "barf bag" code.
      
      cmpxchg64() is about to get used in the scheduler to fix a bug there,
      but it's a prerequisite that cmpxchg64() first be made non-sucking.
      
      This patch turns cmpxchg64() into an efficient implementation that
      uses the alternative() mechanism to just use the raw instruction on
      all modern systems.
      
      Note: the fallback is NOT smp safe, just like the current fallback
      is not SMP safe. (Interested parties with i486 based SMP systems
      are welcome to submit fix patches for that.)
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      [ fixed asm constraint bug ]
      Fixed-by: NEric Dumazet <eric.dumazet@gmail.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: John Stultz <johnstul@us.ibm.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <20090930170754.0886ff2e@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      79e1dd05