1. 31 7月, 2017 1 次提交
  2. 24 7月, 2017 1 次提交
  3. 08 9月, 2015 1 次提交
    • H
      parisc: Filter out spurious interrupts in PA-RISC irq handler · b1b4e435
      Helge Deller 提交于
      When detecting a serial port on newer PA-RISC machines (with iosapic) we have a
      long way to go to find the right IRQ line, registering it, then registering the
      serial port and the irq handler for the serial port. During this phase spurious
      interrupts for the serial port may happen which then crashes the kernel because
      the action handler might not have been set up yet.
      
      So, basically it's a race condition between the serial port hardware and the
      CPU which sets up the necessary fields in the irq sructs. The main reason for
      this race is, that we unmask the serial port irqs too early without having set
      up everything properly before (which isn't easily possible because we need the
      IRQ number to register the serial ports).
      
      This patch is a work-around for this problem. It adds checks to the CPU irq
      handler to verify if the IRQ action field has been initialized already. If not,
      we just skip this interrupt (which isn't critical for a serial port at bootup).
      The real fix would probably involve rewriting all PA-RISC specific IRQ code
      (for CPU, IOSAPIC, GSC and EISA) to use IRQ domains with proper parenting of
      the irq chips and proper irq enabling along this line.
      
      This bug has been in the PA-RISC port since the beginning, but the crashes
      happened very rarely with currently used hardware.  But on the latest machine
      which I bought (a C8000 workstation), which uses the fastest CPUs (4 x PA8900,
      1GHz) and which has the largest possible L1 cache size (64MB each), the kernel
      crashed at every boot because of this race. So, without this patch the machine
      would currently be unuseable.
      
      For the record, here is the flow logic:
      1. serial_init_chip() in 8250_gsc.c calls iosapic_serial_irq().
      2. iosapic_serial_irq() calls txn_alloc_irq() to find the irq.
      3. iosapic_serial_irq() calls cpu_claim_irq() to register the CPU irq
      4. cpu_claim_irq() unmasks the CPU irq (which it shouldn't!)
      5. serial_init_chip() then registers the 8250 port.
      Problems:
      - In step 4 the CPU irq shouldn't have been registered yet, but after step 5
      - If serial irq happens between 4 and 5 have finished, the kernel will crash
      Signed-off-by: NHelge Deller <deller@gmx.de>
      b1b4e435
  4. 01 8月, 2015 1 次提交
  5. 05 3月, 2015 1 次提交
  6. 12 3月, 2014 1 次提交
  7. 08 11月, 2013 1 次提交
  8. 01 10月, 2013 1 次提交
    • F
      irq: Consolidate do_softirq() arch overriden implementations · 7d65f4a6
      Frederic Weisbecker 提交于
      All arch overriden implementations of do_softirq() share the following
      common code: disable irqs (to avoid races with the pending check),
      check if there are softirqs pending, then execute __do_softirq() on
      a specific stack.
      
      Consolidate the common parts such that archs only worry about the
      stack switch.
      Acked-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@au1.ibm.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul Mackerras <paulus@au1.ibm.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: James E.J. Bottomley <jejb@parisc-linux.org>
      Cc: Helge Deller <deller@gmx.de>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      7d65f4a6
  9. 25 5月, 2013 2 次提交
    • H
      parisc: fix irq stack on UP and SMP · d96b51ec
      Helge Deller 提交于
      The logic to detect if the irq stack was already in use with
      raw_spin_trylock() is wrong, because it will generate a "trylock failure
      on UP" error message with CONFIG_SMP=n and CONFIG_DEBUG_SPINLOCK=y.
      
      arch_spin_trylock() can't be used either since in the CONFIG_SMP=n case
      no atomic protection is given and we are reentrant here. A mutex didn't
      worked either and brings more overhead by turning off interrupts.
      
      So, let's use the fastest path for parisc which is the ldcw instruction.
      
      Counting how often the irq stack was used is pretty useless, so just
      drop this piece of code.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      d96b51ec
    • H
      parisc: show number of FPE and unaligned access handler calls in /proc/interrupts · d0c3be80
      Helge Deller 提交于
      Show number of floating point assistant and unaligned access fixup
      handler in /proc/interrupts file.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      d0c3be80
  10. 12 5月, 2013 1 次提交
    • H
      parisc: implement irq stacks - part 2 (v2) · 416821d3
      Helge Deller 提交于
      This patch fixes few build issues which were introduced with the last
      irq stack patch, e.g. the combination of stack overflow check and irq
      stack.
      
      Furthermore we now do proper locking and change the irq bh handler
      to use the irq stack as well.
      
      In /proc/interrupts one now can monitor how huge the irq stack has grown
      and how often it was preferred over the kernel stack.
      
      IRQ stacks are now enabled by default just to make sure that we not
      overflow the kernel stack by accident.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      416821d3
  11. 08 5月, 2013 4 次提交
    • H
      parisc: tlb flush counting fix for SMP and UP · 0fc537d1
      Helge Deller 提交于
      Fix up build error on UP and show correctly number of function call
      (ipi) irqs.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      0fc537d1
    • H
      parisc: more irq statistics in /proc/interrupts · cd85d551
      Helge Deller 提交于
      Add framework and initial values for more fine grained statistics in
      /proc/interrupts.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      cd85d551
    • H
      parisc: implement irq stacks · 200c8804
      Helge Deller 提交于
      Default kernel stack size on parisc is 16k.  During tests we found that the
      kernel stack can easily grow beyond 13k, which leaves 3k left for irq
      processing.
      
      This patch adds the possibility to activate an additional stack of 16k per CPU
      which is being used during irq processing.  This implementation does not yet
      uses this irq stack for the irq bh handler.
      
      The assembler code for call_on_stack was heavily cleaned up by John
      David Anglin.
      
      CC: John David Anglin <dave.anglin@bell.net>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      200c8804
    • H
      parisc: add kernel stack overflow check · 9372450c
      Helge Deller 提交于
      Add the CONFIG_DEBUG_STACKOVERFLOW config option to enable checks to
      detect kernel stack overflows.
      
      Stack overflows can not be detected reliable since we do not want to
      introduce too much overhead.
      
      Instead, during irq processing in do_cpu_irq_mask() we check kernel
      stack usage of the interrupted kernel process. Kernel threads can be
      easily detected by checking the value of space register 7 (sr7) which
      is zero when running inside the kernel.
      
      Since THREAD_SIZE is 16k and PAGE_SIZE is 4k, reduce the alignment of
      the init thread to the lower value (PAGE_SIZE) in the kernel
      vmlinux.ld.S linker script.
      Signed-off-by: NHelge Deller <deller@gmx.de>
      9372450c
  12. 21 2月, 2013 1 次提交
    • P
      parisc: remove IRQF_DISABLED · b54cb233
      Peter Zijlstra 提交于
      People are playing odd games with IRQF_DISABLED, remove it.
      
      Its not reliable, since shared interrupt lines could disable it for you,
      and its possible and allowed for archs to disable IRQs to limit IRQ nesting.
      
      Therefore, simply mandate that _ALL_ IRQ handlers are run with IRQs disabled.
      
      [ This _should_ not break anything, since we've mandated that IRQ handlers
        _must_ be able to deal with this for a _long_ time ]
      
      IRQ handlers should be fast, no if buts and any other exceptions. We also have
      plenty instrumentation to find any offending IRQ latency sources.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NHelge Deller <deller@gmx.de>
      b54cb233
  13. 08 1月, 2013 1 次提交
  14. 29 3月, 2011 3 次提交
  15. 11 2月, 2011 1 次提交
  16. 10 2月, 2011 1 次提交
  17. 05 12月, 2010 2 次提交
  18. 14 10月, 2010 4 次提交
  19. 16 12月, 2009 1 次提交
  20. 15 12月, 2009 1 次提交
  21. 28 9月, 2009 1 次提交
  22. 03 7月, 2009 2 次提交
  23. 28 4月, 2009 1 次提交
    • Y
      irq: change ->set_affinity() to return status · d5dedd45
      Yinghai Lu 提交于
      according to Ingo, change set_affinity() in irq_chip should return int,
      because that way we can handle failure cases in a much cleaner way, in
      the genirq layer.
      
      v2: fix two typos
      
      [ Impact: extend API ]
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Suresh Siddha <suresh.b.siddha@intel.com>
      Cc: "Eric W. Biederman" <ebiederm@xmission.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: linux-arch@vger.kernel.org
      LKML-Reference: <49F654E9.4070809@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      d5dedd45
  24. 16 3月, 2009 1 次提交
  25. 13 3月, 2009 3 次提交
  26. 13 1月, 2009 1 次提交
  27. 11 1月, 2009 1 次提交
    • Y
      sparseirq: use kstat_irqs_cpu instead · dee4102a
      Yinghai Lu 提交于
      Impact: build fix
      
      Ingo Molnar wrote:
      
      > tip/arch/blackfin/kernel/irqchip.c: In function 'show_interrupts':
      > tip/arch/blackfin/kernel/irqchip.c:85: error: 'struct kernel_stat' has no member named 'irqs'
      > make[2]: *** [arch/blackfin/kernel/irqchip.o] Error 1
      > make[2]: *** Waiting for unfinished jobs....
      >
      
      So could move kstat_irqs array to irq_desc struct.
      
      (s390, m68k, sparc) are not touched yet, because they don't support genirq
      Signed-off-by: NYinghai Lu <yinghai@kernel.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      dee4102a