1. 30 1月, 2008 15 次提交
  2. 25 1月, 2008 1 次提交
  3. 24 10月, 2007 1 次提交
  4. 18 10月, 2007 2 次提交
    • J
      x86: expand /proc/interrupts to include missing vectors, v2 · 38e760a1
      Joe Korty 提交于
      Add missing IRQs and IRQ descriptions to /proc/interrupts.
      
      /proc/interrupts is most useful when it displays every IRQ vector in use by
      the system, not just those somebody thought would be interesting.
      
      This patch inserts the following vector displays to the i386 and x86_64
      platforms, as appropriate:
      
      	rescheduling interrupts
      	TLB flush interrupts
      	function call interrupts
      	thermal event interrupts
      	threshold interrupts
      	spurious interrupts
      
      A threshold interrupt occurs when ECC memory correction is occuring at too
      high a frequency.  Thresholds are used by the ECC hardware as occasional
      ECC failures are part of normal operation, but long sequences of ECC
      failures usually indicate a memory chip that is about to fail.
      
      Thermal event interrupts occur when a temperature threshold has been
      exceeded for some CPU chip.  IIRC, a thermal interrupt is also generated
      when the temperature drops back to a normal level.
      
      A spurious interrupt is an interrupt that was raised then lowered by the
      device before it could be fully processed by the APIC.  Hence the apic sees
      the interrupt but does not know what device it came from.  For this case
      the APIC hardware will assume a vector of 0xff.
      
      Rescheduling, call, and TLB flush interrupts are sent from one CPU to
      another per the needs of the OS.  Typically, their statistics would be used
      to discover if an interrupt flood of the given type has been occuring.
      
      AK: merged v2 and v4 which had some more tweaks
      AK: replace Local interrupts with Local timer interrupts
      AK: Fixed description of interrupt types.
      
      [ tglx: arch/x86 adaptation ]
      [ mingo: small cleanup ]
      Signed-off-by: NJoe Korty <joe.korty@ccur.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Tim Hockin <thockin@hockin.org>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "H. Peter Anvin" <hpa@zytor.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>
      38e760a1
    • T
      x86: C1E late detection fix. Really switch off lapic timer · 3dfbc884
      Thomas Gleixner 提交于
      Doh, I completely missed that devices marked DUMMY are not running
      the set_mode function. So we force broadcasting, but we keep the
      local APIC timer running.
      
      Let the clock event layer mark the device _after_ switching it off.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      3dfbc884
  5. 15 10月, 2007 1 次提交
    • T
      x86: force timer broadcast on late AMD C1E detection · 89039b37
      Thomas Gleixner 提交于
      The 64bit SMP bootup is slightly different to the 32bit one. It enables
      the boot CPU local APIC timer before all CPUs are brought up. Some AMD C1E
      systems have the C1E feature flag only set in the secondary CPU. Due to
      the early enable of the boot CPU local APIC timer the APIC timer is
      registered as a fully functional device. When we detect the wreckage during
      the bringup of the secondary CPU, we need to force the boot CPU into
      broadcast mode. 
      
      Check the C1E caused APIC timer disable, when the secondary APIC timer is
      initialized. If the boot CPU APIC timer was registered as a functional
      clock event device, then fix this up and utilize the
      CLOCK_EVT_NOTIFY_BROADCAST_FORCE mechanism to force the already
      registered boot CPU APIC timer into broadcast mode.
      
      Tested by force injecting the failure mode.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      89039b37
  6. 13 10月, 2007 12 次提交
  7. 11 10月, 2007 2 次提交
  8. 12 8月, 2007 1 次提交
    • R
      x86_64: fix HPET init race · b291aa7a
      Robin Holt 提交于
      I have had four seperate system lockups attributable to this exact problem
      in two days of testing.  Instead of trying to handle all the weird end
      cases and wrap, how about changing it to look for exactly what we appear
      to want.
      
      The following patch removes a couple races in setup_APIC_timer.  One occurs
      when the HPET advances the COUNTER past the T0_CMP value between the time
      the T0_CMP was originally read and when COUNTER is read.  This results in
      a delay waiting for the counter to wrap.  The other results from the counter
      wrapping.
      
      This change takes a snapshot of T0_CMP at the beginning of the loop and
      simply loops until T0_CMP has changed (a tick has happened).
      
      <later>
      
      I have one small concern about the patch.  I am not sure it meets the intent
      as well as it should.  I think we are trying to match APIC timer interrupts up
      with the hpet counter increment.  The event which appears to be disturbing
      this loop in our test environment is the NMI watchdog.  What we believe has
      been happening with the existing code is the setup_APIC_timer loop has read
      the CMP value, and the NMI watchdog code fires for the first time.  This
      results in a series of icache miss slowdowns and by the time we get back to
      things it has wrapped.
      
      I think this code is trying to get the CMP as close to the counter value as
      possible.  If that is the intent, maybe we should really be testing against a
      "window" around the CMP.  Something like COUNTER = CMP+/2.  It appears COUNTER
      should get advanced every 89nSec (IIRC).  The above seems like an unreasonably
      small window, but may be necessary.  Without documentation, I am not sure of
      the original intent with this code.
      
      In summary, this code fixes my boot hangs, but since I am not certain of the
      intent of the existing code, I am not certain this has not introduced new bugs
      or unexpected behaviors.
      Signed-off-by: NRobin Holt <holt@sgi.com>
      Acked-by: NAndi Kleen <ak@suse.de>
      Cc: Vojtech Pavlik <vojtech@suse.cz>
      Cc: "Aaron Durbin" <adurbin@google.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b291aa7a
  9. 22 7月, 2007 2 次提交
  10. 09 5月, 2007 1 次提交
  11. 03 5月, 2007 2 次提交
    • D
      [PATCH] x86-64: Avoid overflows during apic timer calibration · 4637a74c
      David P. Reed 提交于
      - Use 64bit TSC calculations to avoid handling overflow
      - Use 32bit unsigned arithmetic for the APIC timer. This
      way overflows are handled correctly.
      - Fix exit check of loop to account for apic timer counting down
      
      Signed-off-by: dpreed@reed.com
      Signed-off-by: NAndi Kleen <ak@suse.de>
      4637a74c
    • F
      [PATCH] x86-64: safe_apic_wait_icr_idle - x86_64 · 8339e9fb
      Fernando Luis VazquezCao 提交于
      apic_wait_icr_idle looks like this:
      
      static __inline__ void apic_wait_icr_idle(void)
      {
        while (apic_read(APIC_ICR) & APIC_ICR_BUSY)
          cpu_relax();
      }
      
      The busy loop in this function would not be problematic if the
      corresponding status bit in the ICR were always updated, but that does
      not seem to be the case under certain crash scenarios. Kdump uses an IPI
      to stop the other CPUs in the event of a crash, but when any of the
      other CPUs are locked-up inside the NMI handler the CPU that sends the
      IPI will end up looping forever in the ICR check, effectively
      hard-locking the whole system.
      
      Quoting from Intel's "MultiProcessor Specification" (Version 1.4), B-3:
      
      "A local APIC unit indicates successful dispatch of an IPI by
      resetting the Delivery Status bit in the Interrupt Command
      Register (ICR). The operating system polls the delivery status
      bit after sending an INIT or STARTUP IPI until the command has
      been dispatched.
      
      A period of 20 microseconds should be sufficient for IPI dispatch
      to complete under normal operating conditions. If the IPI is not
      successfully dispatched, the operating system can abort the
      command. Alternatively, the operating system can retry the IPI by
      writing the lower 32-bit double word of the ICR. This “time-out”
      mechanism can be implemented through an external interrupt, if
      interrupts are enabled on the processor, or through execution of
      an instruction or time-stamp counter spin loop."
      
      Intel's documentation suggests the implementation of a time-out
      mechanism, which, by the way, is already being open-coded in some parts
      of the kernel that tinker with ICR.
      
      Create a apic_wait_icr_idle replacement that implements the time-out
      mechanism and that can be used to solve the aforementioned problem.
      
      AK: moved both functions out of line
      AK: Added improved loop from Keith Owens
      Signed-off-by: NFernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      8339e9fb