1. 30 1月, 2008 4 次提交
  2. 25 1月, 2008 1 次提交
  3. 20 12月, 2007 1 次提交
  4. 27 11月, 2007 1 次提交
  5. 20 10月, 2007 1 次提交
  6. 18 10月, 2007 1 次提交
    • 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
  7. 11 10月, 2007 2 次提交
  8. 19 8月, 2007 1 次提交
  9. 12 8月, 2007 1 次提交
  10. 22 7月, 2007 3 次提交
  11. 09 5月, 2007 1 次提交
  12. 03 5月, 2007 1 次提交
    • F
      [PATCH] i386: safe_apic_wait_icr_idle - i386 · f2b218dd
      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>
      f2b218dd
  13. 02 4月, 2007 1 次提交
    • A
      [PATCH] x86-64: Disable local APIC timer use on AMD systems with C1E · 3556ddfa
      Andi Kleen 提交于
      AMD dual core laptops with C1E do not run the APIC timer correctly
      when they go idle. Previously the code assumed this only happened
      on C2 or deeper.  But not all of these systems report support C2.
      
      Use a AMD supplied snippet to detect C1E being enabled and then disable
      local apic timer use.
      
      This supercedes an earlier workaround using DMI detection of specific systems.
      
      Thanks to Mark Langsdorf for the detection snippet.
      Signed-off-by: NAndi Kleen <ak@suse.de>
      3556ddfa
  14. 24 3月, 2007 1 次提交
  15. 23 3月, 2007 2 次提交
  16. 19 3月, 2007 1 次提交
    • T
      [PATCH] i386: trust the PM-Timer calibration of the local APIC timer · ca1b940c
      Thomas Gleixner 提交于
      When PM-Timer is available for local APIC timer calibration we can skip the
      verification of the calibrated time value.  The resulting error is quite
      small on a bunch of evaluated platforms and is less harming than the
      observed false positives.
      
      We need to keep the verification on systems, which have no PM-Timer to
      avoid bogus local APIC timer calibrations in the range of factor 2-10,
      which can be observed when swicthing off the PM-timer support in the kernel
      configuration.
      
      The wrong calibration values are probably caused by SMM code trying to
      emulate a PS/2 keyboard from a (maybe connected or not) USB keyboard.  This
      prohibits the accurate delivery of PIT interrupts, which are used to
      calibrate the local APIC timer.  Unfortunately we have no way to disable
      this BIOS misfeature in the early boot process.
      
      Add also the dropped cpu_relax() back to the wait loops.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ca1b940c
  17. 05 3月, 2007 1 次提交
  18. 27 2月, 2007 1 次提交
    • L
      Revert "[PATCH] i386: add idle notifier" · ea3d5226
      Linus Torvalds 提交于
      This reverts commit 2ff2d3d7.
      
      Uwe Bugla reports that he cannot mount a floppy drive any more, and Jiri
      Slaby bisected it down to this commit.
      
      Benjamin LaHaise also points out that this is a big hot-path, and that
      interrupt delivery while idle is very common and should not go through
      all these expensive gyrations.
      
      Fix up conflicts in arch/i386/kernel/apic.c and arch/i386/kernel/irq.c
      due to other unrelated irq changes.
      
      Cc: Stephane Eranian <eranian@hpl.hp.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Andrew Morton <akpm@osdl.org>
      Cc: Uwe Bugla <uwe.bugla@gmx.de>
      Cc: Jiri Slaby <jirislaby@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ea3d5226
  19. 17 2月, 2007 3 次提交
    • T
      [PATCH] i386 rework local apic timer calibration · d36b49b9
      Thomas Gleixner 提交于
      The local apic timer calibration has two problem cases:
      
      1.  The calibration is based on readout of the PIT/HPET timer to detect the
         wrap of the periodic tick.  It happens that a box gets stuck in the
         calibration loop due to a PIT with a broken readout function.
      
      2.  CoreDuo boxen show a sporadic PIT runs too slow defect, which results
         in a wrong lapic calibration.  The PIT goes back to normal operation once
         the lapic timer is switched to periodic mode.
      
      Both are existing and unfixed problems in the current upstream kernel and
      prevent certain laptops and other systems from booting Linux.
      
      Rework the code to address both problems:
      
      - Make the calibration interrupt driven.  This removes the wait_timer_tick
        magic hackery from lapic.c and time_hpet.c.  The clockevents framework
        allows easy substitution of the global tick event handler for the
        calibration.  This is more accurate than monitoring jiffies.  At this point
        of the boot process, nothing disturbes the interrupt delivery, so the
        results are very accurate.
      
      - Verify the calibration against the PM timer, when available by using the
        early access function.  When the measured calibration period is outside of
        an one percent window, then the lapic timer calibration is adjusted to the
        pm timer result.
      
      - Verify the calibration by running the lapic timer with the calibration
        handler.  Disable lapic timer in case of deviation.
      
      This also removes the "synchronization" of the local apic timer to the global
      tick.  This synchronization never worked, as there is no way to synchronize
      PIT(HPET) and local APIC timer.  The synchronization by waiting for the tick
      just alignes the local APIC timer for the first events, but later the events
      drift away due to the different clocks.  Removing the "sync" is just
      randomizing the asynchronous behaviour at setup time.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Cc: Zachary Amsden <zach@vmware.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Rohit Seth <rohitseth@google.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: john stultz <johnstul@us.ibm.com>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d36b49b9
    • T
      [PATCH] clockevents: i386 drivers · e9e2cdb4
      Thomas Gleixner 提交于
      Add clockevent drivers for i386: lapic (local) and PIT/HPET (global).  Update
      the timer IRQ to call into the PIT/HPET driver's event handler and the
      lapic-timer IRQ to call into the lapic clockevent driver.  The assignement of
      timer functionality is delegated to the core framework code and replaces the
      compile and runtime evalution in do_timer_interrupt_hook()
      
      Use the clockevents broadcast support and implement the lapic_broadcast
      function for ACPI.
      
      No changes to existing functionality.
      
      [ kdump fix from Vivek Goyal <vgoyal@in.ibm.com> ]
      [ fixes based on review feedback from Arjan van de Ven <arjan@infradead.org> ]
      Cleanups-from: Adrian Bunk <bunk@stusta.de>
      Build-fixes-from: Andrew Morton <akpm@osdl.org>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Cc: john stultz <johnstul@us.ibm.com>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Andi Kleen <ak@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e9e2cdb4
    • T
      [PATCH] i386, apic: clean up the APIC code · e05d723f
      Thomas Gleixner 提交于
      The apic code is quite unstructured and missing a lot of comments.
      
      - Restructure the code into helper functions, timer, setup/shutdown,
        interrupt and power management blocks.
      - Fixup comments.
      - Namespace fixups
      - Inline helpers for version and is_integrated
      - Combine the ack_bad_irq functions
      
      No functional changes.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Cc: Zachary Amsden <zach@vmware.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Rohit Seth <rohitseth@google.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: john stultz <johnstul@us.ibm.com>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e05d723f
  20. 13 2月, 2007 2 次提交
    • S
      [PATCH] i386: add idle notifier · 2ff2d3d7
      Stephane Eranian 提交于
      Add a notifier mechanism to the low level idle loop.  You can register a
      callback function which gets invoked on entry and exit from the low level idle
      loop.  The low level idle loop is defined as the polling loop, low-power call,
      or the mwait instruction.  Interrupts processed by the idle thread are not
      considered part of the low level loop.
      
      The notifier can be used to measure precisely how much is spent in useless
      execution (or low power mode).  The perfmon subsystem uses it to turn on/off
      monitoring.
      Signed-off-by: Nstephane eranian <eranian@hpl.hp.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      2ff2d3d7
    • Z
      [PATCH] i386: vMI timer patches · bbab4f3b
      Zachary Amsden 提交于
      VMI timer code.  It works by taking over the local APIC clock when APIC is
      configured, which requires a couple hooks into the APIC code.  The backend
      timer code could be commonized into the timer infrastructure, but there are
      some pieces missing (stolen time, in particular), and the exact semantics of
      when to do accounting for NO_IDLE need to be shared between different
      hypervisors as well.  So for now, VMI timer is a separate module.
      
      [Adrian Bunk: cleanups]
      
      Subject: VMI timer patches
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Chris Wright <chrisw@sous-sol.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      bbab4f3b
  21. 07 12月, 2006 1 次提交
  22. 06 10月, 2006 1 次提交
  23. 05 10月, 2006 1 次提交
    • D
      IRQ: Maintain regs pointer globally rather than passing to IRQ handlers · 7d12e780
      David Howells 提交于
      Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
      of passing regs around manually through all ~1800 interrupt handlers in the
      Linux kernel.
      
      The regs pointer is used in few places, but it potentially costs both stack
      space and code to pass it around.  On the FRV arch, removing the regs parameter
      from all the genirq function results in a 20% speed up of the IRQ exit path
      (ie: from leaving timer_interrupt() to leaving do_IRQ()).
      
      Where appropriate, an arch may override the generic storage facility and do
      something different with the variable.  On FRV, for instance, the address is
      maintained in GR28 at all times inside the kernel as part of general exception
      handling.
      
      Having looked over the code, it appears that the parameter may be handed down
      through up to twenty or so layers of functions.  Consider a USB character
      device attached to a USB hub, attached to a USB controller that posts its
      interrupts through a cascaded auxiliary interrupt controller.  A character
      device driver may want to pass regs to the sysrq handler through the input
      layer which adds another few layers of parameter passing.
      
      I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
      main part of the code on FRV and i386, though I can't test most of the drivers.
      I've also done partial conversion for powerpc and MIPS - these at least compile
      with minimal configurations.
      
      This will affect all archs.  Mostly the changes should be relatively easy.
      Take do_IRQ(), store the regs pointer at the beginning, saving the old one:
      
      	struct pt_regs *old_regs = set_irq_regs(regs);
      
      And put the old one back at the end:
      
      	set_irq_regs(old_regs);
      
      Don't pass regs through to generic_handle_irq() or __do_IRQ().
      
      In timer_interrupt(), this sort of change will be necessary:
      
      	-	update_process_times(user_mode(regs));
      	-	profile_tick(CPU_PROFILING, regs);
      	+	update_process_times(user_mode(get_irq_regs()));
      	+	profile_tick(CPU_PROFILING);
      
      I'd like to move update_process_times()'s use of get_irq_regs() into itself,
      except that i386, alone of the archs, uses something other than user_mode().
      
      Some notes on the interrupt handling in the drivers:
      
       (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
           the input_dev struct.
      
       (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
           something different depending on whether it's been supplied with a regs
           pointer or not.
      
       (*) Various IRQ handler function pointers have been moved to type
           irq_handler_t.
      Signed-Off-By: NDavid Howells <dhowells@redhat.com>
      (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
      7d12e780
  24. 26 9月, 2006 3 次提交
    • A
      [PATCH] i386: Make enable_local_apic static · 3d08a256
      Adrian Bunk 提交于
      enable_local_apic can now become static.
      
      Cc: len.brown@intel.com
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      3d08a256
    • R
      [PATCH] i386: Replace i386 open-coded cmdline parsing with · 1a3f239d
      Rusty Russell 提交于
      This patch replaces the open-coded early commandline parsing
      throughout the i386 boot code with the generic mechanism (already used
      by ppc, powerpc, ia64 and s390).  The code was inconsistent with
      whether it deletes the option from the cmdline or not, meaning some of
      these will get passed through the environment into init.
      
      This transformation is mainly mechanical, but there are some notable
      parts:
      
      1) Grammar: s/linux never set's it up/linux never sets it up/
      
      2) Remove hacked-in earlyprintk= option scanning.  When someone
         actually implements CONFIG_EARLY_PRINTK, then they can use
         early_param().
      [AK: actually it is implemented, but I'm adding the early_param it in the next
      x86-64 patch]
      
      3) Move declaration of generic_apic_probe() from setup.c into asm/apic.h
      
      4) Various parameters now moved into their appropriate files (thanks Andi).
      
      5) All parse functions which examine arg need to check for NULL,
         except one where it has subtle humor value.
      
      AK: readded acpi_sci handling which was completely dropped
      AK: moved some more variables into acpi/boot.c
      
      Cc: len.brown@intel.com
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      1a3f239d
    • D
      [PATCH] i386: Add SMP support on i386 to reservation framework · b7471c6d
      Don Zickus 提交于
      This patch includes the changes to make the nmi watchdog on i386 SMP aware.
      A bunch of code was moved around to make it simpler to read.  In addition,
      it is now possible to determine if a particular NMI was the result of the
      watchdog or not.  This feature allows the kernel to filter out unknown NMIs
      easier.
      Signed-off-by: NDon Zickus <dzickus@redhat.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      b7471c6d
  25. 01 7月, 2006 1 次提交
  26. 27 6月, 2006 2 次提交
  27. 23 6月, 2006 1 次提交