1. 09 11月, 2016 3 次提交
  2. 15 9月, 2016 2 次提交
  3. 04 7月, 2016 1 次提交
  4. 26 3月, 2016 1 次提交
  5. 09 3月, 2016 1 次提交
    • C
      x86/ACPI/PCI: Recognize that Interrupt Line 255 means "not connected" · e237a551
      Chen Fan 提交于
      Per the x86-specific footnote to PCI spec r3.0, sec 6.2.4, the value 255 in
      the Interrupt Line register means "unknown" or "no connection."
      Previously, when we couldn't derive an IRQ from the _PRT, we fell back to
      using the value from Interrupt Line as an IRQ.  It's questionable whether
      we should do that at all, but the spec clearly suggests we shouldn't do it
      for the value 255 on x86.
      
      Calling request_irq() with IRQ 255 may succeed, but the driver won't
      receive any interrupts.  Or, if IRQ 255 is shared with another device, it
      may succeed, and the driver's ISR will be called at random times when the
      *other* device interrupts.  Or it may fail if another device is using IRQ
      255 with incompatible flags.  What we *want* is for request_irq() to fail
      predictably so the driver can fall back to polling.
      
      On x86, assume 255 in the Interrupt Line means the INTx line is not
      connected.  In that case, set dev->irq to IRQ_NOTCONNECTED so request_irq()
      will fail gracefully with -ENOTCONN.
      
      We found this problem on a system where Secure Boot firmware assigned
      Interrupt Line 255 to an i801_smbus device and another device was already
      using MSI-X IRQ 255.  This was in v3.10, where i801_probe() fails if
      request_irq() fails:
      
        i801_smbus 0000:00:1f.3: enabling device (0140 -> 0143)
        i801_smbus 0000:00:1f.3: can't derive routing for PCI INT C
        i801_smbus 0000:00:1f.3: PCI INT C: no GSI
        genirq: Flags mismatch irq 255. 00000080 (i801_smbus) vs. 00000000 (megasa)
        CPU: 0 PID: 2487 Comm: kworker/0:1 Not tainted 3.10.0-229.el7.x86_64 #1
        Hardware name: FUJITSU PRIMEQUEST 2800E2/D3736, BIOS PRIMEQUEST 2000 Serie5
        Call Trace:
          dump_stack+0x19/0x1b
          __setup_irq+0x54a/0x570
          request_threaded_irq+0xcc/0x170
          i801_probe+0x32f/0x508 [i2c_i801]
          local_pci_probe+0x45/0xa0
        i801_smbus 0000:00:1f.3: Failed to allocate irq 255: -16
        i801_smbus: probe of 0000:00:1f.3 failed with error -16
      
      After aeb8a3d1 ("i2c: i801: Check if interrupts are disabled"),
      i801_probe() will fall back to polling if request_irq() fails.  But we
      still need this patch because request_irq() may succeed or fail depending
      on other devices in the system.  If request_irq() fails, i801_smbus will
      work by falling back to polling, but if it succeeds, i801_smbus won't work
      because it expects interrupts that it may not receive.
      Signed-off-by: NChen Fan <chen.fan.fnst@cn.fujitsu.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NBjorn Helgaas <bhelgaas@google.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      e237a551
  6. 12 12月, 2015 1 次提交
  7. 08 12月, 2015 1 次提交
    • T
      genirq: Implement irq_percpu_is_enabled() · f0cb3220
      Thomas Petazzoni 提交于
      Certain interrupt controller drivers have a register set that does not
      make it easy to save/restore the mask of enabled/disabled interrupts
      at suspend/resume time. At resume time, such drivers rely on the core
      kernel irq subsystem to tell whether such or such interrupt is enabled
      or not, in order to restore the proper state in the interrupt
      controller register.
      
      While the irqd_irq_disabled() provides the relevant information for
      global interrupts, there is no similar function to query the
      enabled/disabled state of a per-CPU interrupt.
      
      Therefore, this commit complements the percpu_irq API with an
      irq_percpu_is_enabled() function.
      
      [ tglx: Simplified the implementation and added kerneldoc ]
      Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Tawfik Bayouk <tawfik@marvell.com>
      Cc: Nadav Haklai <nadavh@marvell.com>
      Cc: Lior Amsalem <alior@marvell.com>
      Cc: Andrew Lunn <andrew@lunn.ch>
      Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
      Cc: Gregory Clement <gregory.clement@free-electrons.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Link: http://lkml.kernel.org/r/1445347435-2333-2-git-send-email-thomas.petazzoni@free-electrons.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      f0cb3220
  8. 22 9月, 2015 1 次提交
    • T
      genirq: Handle force threading of irqs with primary and thread handler · 2a1d3ab8
      Thomas Gleixner 提交于
      Force threading of interrupts does not really deal with interrupts
      which are requested with a primary and a threaded handler. The current
      policy is to leave them alone and let the primary handler run in
      interrupt context, but we set the ONESHOT flag for those interrupts as
      well.
      
      Kohji Okuno debugged a problem with the SDHCI driver where the
      interrupt thread waits for a hardware interrupt to trigger, which can't
      work well because the hardware interrupt is masked due to the ONESHOT
      flag being set. He proposed to set the ONESHOT flag only if the
      interrupt does not provide a thread handler.
      
      Though that does not work either because these interrupts can be
      shared. So the other interrupt would rightfully get the ONESHOT flag
      set and therefor the same situation would happen again.
      
      To deal with this proper, we need to force thread the primary handler
      of such interrupts as well. That means that the primary interrupt
      handler is treated as any other primary interrupt handler which is not
      marked IRQF_NO_THREAD. The threaded handler becomes a separate thread
      so the SDHCI flow logic can be handled gracefully.
      
      The same issue was reported against 4.1-rt.
      Reported-and-tested-by: NKohji Okuno <okuno.kohji@jp.panasonic.com>
      Reported-By: NMichal Smucr <msmucr@gmail.com>
      Reported-and-tested-by: NNathan Sullivan <nathan.sullivan@ni.com>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1509211058080.5606@nanosSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      2a1d3ab8
  9. 22 4月, 2015 2 次提交
  10. 09 4月, 2015 1 次提交
    • M
      genirq: Allow the irqchip state of an IRQ to be save/restored · 1b7047ed
      Marc Zyngier 提交于
      There is a number of cases where a kernel subsystem may want to
      introspect the state of an interrupt at the irqchip level:
      
      - When a peripheral is shared between virtual machines,
        its interrupt state becomes part of the guest's state,
        and must be switched accordingly. KVM on arm/arm64 requires
        this for its guest-visible timer
      - Some GPIO controllers seem to require peeking into the
        interrupt controller they are connected to to report
        their internal state
      
      This seem to be a pattern that is common enough for the core code
      to try and support this without too many horrible hacks. Introduce
      a pair of accessors (irq_get_irqchip_state/irq_set_irqchip_state)
      to retrieve the bits that can be of interest to another subsystem:
      pending, active, and masked.
      
      - irq_get_irqchip_state returns the state of the interrupt according
        to a parameter set to IRQCHIP_STATE_PENDING, IRQCHIP_STATE_ACTIVE,
        IRQCHIP_STATE_MASKED or IRQCHIP_STATE_LINE_LEVEL.
      - irq_set_irqchip_state similarly sets the state of the interrupt.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Reviewed-by: NBjorn Andersson <bjorn.andersson@sonymobile.com>
      Tested-by: NBjorn Andersson <bjorn.andersson@sonymobile.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Phong Vo <pvo@apm.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Tin Huynh <tnhuynh@apm.com>
      Cc: Y Vo <yvo@apm.com>
      Cc: Toan Le <toanle@apm.com>
      Cc: Bjorn Andersson <bjorn@kryo.se>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Link: http://lkml.kernel.org/r/1426676484-21812-2-git-send-email-marc.zyngier@arm.comSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      1b7047ed
  11. 06 3月, 2015 1 次提交
    • V
      genirq: Remove the deprecated 'IRQF_DISABLED' request_irq() flag entirely · d8bf368d
      Valentin Rothberg 提交于
      The IRQF_DISABLED flag is a NOOP and has been scheduled for removal
      since Linux v2.6.36 by commit 6932bf37 ("genirq: Remove
      IRQF_DISABLED from core code").
      
      According to commit e58aa3d2 ("genirq: Run irq handlers with
      interrupts disabled"), running IRQ handlers with interrupts
      enabled can cause stack overflows when the interrupt line of the
      issuing device is still active.
      
      This patch ends the grace period for IRQF_DISABLED (i.e.,
      SA_INTERRUPT in older versions of Linux) and removes the
      definition and all remaining usages of this flag.
      
      There's still a few non-functional references left in the kernel
      source:
      
        - The bigger hunk in Documentation/scsi/ncr53c8xx.txt is removed entirely
          as IRQF_DISABLED is gone now; the usage in older kernel versions
          (including the old SA_INTERRUPT flag) should be discouraged.  The
          trouble of using IRQF_SHARED is a general problem and not specific to
          any driver.
      
        - I left the reference in Documentation/PCI/MSI-HOWTO.txt untouched since
          it has already been removed in linux-next.
      
        - All remaining references are changelogs that I suggest to keep.
      Signed-off-by: NValentin Rothberg <valentinrothberg@gmail.com>
      Cc: Afzal Mohammed <afzal@ti.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Ewan Milne <emilne@redhat.com>
      Cc: Eyal Perry <eyalpe@mellanox.com>
      Cc: Felipe Balbi <balbi@ti.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Hongliang Tao <taohl@lemote.com>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Nishanth Menon <nm@ti.com>
      Cc: Paul Bolle <pebolle@tiscali.nl>
      Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Quentin Lambert <lambert.quentin@gmail.com>
      Cc: Rajendra Nayak <rnayak@ti.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
      Cc: Sricharan R <r.sricharan@ti.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Zhou Wang <wangzhou1@hisilicon.com>
      Cc: iss_storagedev@hp.com
      Cc: linux-mips@linux-mips.org
      Cc: linux-mtd@lists.infradead.org
      Link: http://lkml.kernel.org/r/1425565425-12604-1-git-send-email-valentinrothberg@gmail.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      d8bf368d
  12. 05 3月, 2015 1 次提交
    • R
      genirq / PM: Add flag for shared NO_SUSPEND interrupt lines · 17f48034
      Rafael J. Wysocki 提交于
      It currently is required that all users of NO_SUSPEND interrupt
      lines pass the IRQF_NO_SUSPEND flag when requesting the IRQ or the
      WARN_ON_ONCE() in irq_pm_install_action() will trigger.  That is
      done to warn about situations in which unprepared interrupt handlers
      may be run unnecessarily for suspended devices and may attempt to
      access those devices by mistake.  However, it may cause drivers
      that have no technical reasons for using IRQF_NO_SUSPEND to set
      that flag just because they happen to share the interrupt line
      with something like a timer.
      
      Moreover, the generic handling of wakeup interrupts introduced by
      commit 9ce7a258 (genirq: Simplify wakeup mechanism) only works
      for IRQs without any NO_SUSPEND users, so the drivers of wakeup
      devices needing to use shared NO_SUSPEND interrupt lines for
      signaling system wakeup generally have to detect wakeup in their
      interrupt handlers.  Thus if they happen to share an interrupt line
      with a NO_SUSPEND user, they also need to request that their
      interrupt handlers be run after suspend_device_irqs().
      
      In both cases the reason for using IRQF_NO_SUSPEND is not because
      the driver in question has a genuine need to run its interrupt
      handler after suspend_device_irqs(), but because it happens to
      share the line with some other NO_SUSPEND user.  Otherwise, the
      driver would do without IRQF_NO_SUSPEND just fine.
      
      To make it possible to specify that condition explicitly, introduce
      a new IRQ action handler flag for shared IRQs, IRQF_COND_SUSPEND,
      that, when set, will indicate to the IRQ core that the interrupt
      user is generally fine with suspending the IRQ, but it also can
      tolerate handler invocations after suspend_device_irqs() and, in
      particular, it is capable of detecting system wakeup and triggering
      it as appropriate from its interrupt handler.
      
      That will allow us to work around a problem with a shared timer
      interrupt line on at91 platforms.
      
      Link: http://marc.info/?l=linux-kernel&m=142252777602084&w=2
      Link: http://marc.info/?t=142252775300011&r=1&w=2
      Link: https://lkml.org/lkml/2014/12/15/552Reported-by: NBoris Brezillon <boris.brezillon@free-electrons.com>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Acked-by: NMark Rutland <mark.rutland@arm.com>
      17f48034
  13. 26 2月, 2015 1 次提交
    • M
      genirq / PM: better describe IRQF_NO_SUSPEND semantics · 737eb030
      Mark Rutland 提交于
      The IRQF_NO_SUSPEND flag is intended to be used for interrupts required
      to be enabled during the suspend-resume cycle. This mostly consists of
      IPIs and timer interrupts, potentially including chained irqchip
      interrupts if these are necessary to handle timers or IPIs. If an
      interrupt does not fall into one of the aforementioned categories,
      requesting it with IRQF_NO_SUSPEND is likely incorrect.
      
      Using IRQF_NO_SUSPEND does not guarantee that the interrupt can wake the
      system from a suspended state. For an interrupt to be able to trigger a
      wakeup, it may be necessary to program various components of the system.
      In these cases it is necessary to use {enable,disabled}_irq_wake.
      
      Unfortunately, several drivers assume that IRQF_NO_SUSPEND ensures that
      an IRQ can wake up the system, and the documentation can be read
      ambiguously w.r.t. this property.
      
      This patch updates the documentation regarding IRQF_NO_SUSPEND to make
      this caveat explicit, hopefully making future misuse rarer. Cleanup of
      existing misuse will occur as part of later patch series.
      Signed-off-by: NMark Rutland <mark.rutland@arm.com>
      Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      737eb030
  14. 18 2月, 2015 1 次提交
    • P
      genirq: Provide disable_hardirq() · 02cea395
      Peter Zijlstra 提交于
      For things like netpoll there is a need to disable an interrupt from
      atomic context. Currently netpoll uses disable_irq() which will
      sleep-wait on threaded handlers and thus forced_irqthreads breaks
      things.
      
      Provide disable_hardirq(), which uses synchronize_hardirq() to only wait
      for active hardirq handlers; also change synchronize_hardirq() to
      return the status of threaded handlers.
      
      This will allow one to try-disable an interrupt from atomic context, or
      in case of request_threaded_irq() to only wait for the hardirq part.
      Suggested-by: NSabrina Dubroca <sd@queasysnail.net>
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: David Miller <davem@davemloft.net>
      Cc: Eyal Perry <eyalpe@mellanox.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Quentin Lambert <lambert.quentin@gmail.com>
      Cc: Randy Dunlap <rdunlap@infradead.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Link: http://lkml.kernel.org/r/20150205130623.GH5029@twins.programming.kicks-ass.net
      [ Fixed typos and such. ]
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      02cea395
  15. 13 12月, 2014 1 次提交
  16. 01 9月, 2014 1 次提交
    • T
      genirq: Simplify wakeup mechanism · 9ce7a258
      Thomas Gleixner 提交于
      Currently we suspend wakeup interrupts by lazy disabling them and
      check later whether the interrupt has fired, but that's not sufficient
      for suspend to idle as there is no way to check that once we
      transitioned into the CPU idle state.
      
      So we change the mechanism in the following way:
      
      1) Leave the wakeup interrupts enabled across suspend
      
      2) Add a check to irq_may_run() which is called at the beginning of
         each flow handler whether the interrupt is an armed wakeup source.
      
         This check is basically free as it just extends the existing check
         for IRQD_IRQ_INPROGRESS. So no new conditional in the hot path.
      
         If the IRQD_WAKEUP_ARMED flag is set, then the interrupt is
         disabled, marked as pending/suspended and the pm core is notified
         about the wakeup event.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      [ rjw: syscore.c and put irq_pm_check_wakeup() into pm.c ]
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      9ce7a258
  17. 21 5月, 2014 1 次提交
  18. 07 5月, 2014 1 次提交
    • A
      genirq: Provide irq_force_affinity fallback for non-SMP · 4c88d7f9
      Arnd Bergmann 提交于
      Patch 01f8fa4f "genirq: Allow forcing cpu affinity of interrupts" added
      an irq_force_affinity() function, and 30ccf03b "clocksource: Exynos_mct:
      Use irq_force_affinity() in cpu bringup" subsequently uses it. However, the
      driver can be used with CONFIG_SMP disabled, but the function declaration
      is only available for CONFIG_SMP, leading to this build error:
      
      drivers/clocksource/exynos_mct.c:431:3: error: implicit declaration of function 'irq_force_affinity' [-Werror=implicit-function-declaration]
         irq_force_affinity(mct_irqs[MCT_L0_IRQ + cpu], cpumask_of(cpu));
      
      This patch introduces a dummy helper function for the non-SMP case
      that always returns success, to get rid of the build error.
      Since the patches causing the problem are marked for stable backports,
      this one should be as well.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
      Acked-by: NKukjin Kim <kgene.kim@samsung.com>
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/5619084.0zmrrIUZLV@wuerfelSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      4c88d7f9
  19. 28 4月, 2014 1 次提交
  20. 18 4月, 2014 2 次提交
  21. 20 2月, 2014 1 次提交
    • T
      genirq: Provide irq_wake_thread() · a92444c6
      Thomas Gleixner 提交于
      In course of the sdhci/sdio discussion with Russell about killing the
      sdio kthread hackery we discovered the need to be able to wake an
      interrupt thread from software.
      
      The rationale for this is, that sdio hardware can lack proper
      interrupt support for certain features. So the driver needs to poll
      the status registers, but at the same time it needs to be woken up by
      an hardware interrupt.
      
      To be able to get rid of the home brewn kthread construct of sdio we
      need a way to wake an irq thread independent of an actual hardware
      interrupt.
      
      Provide an irq_wake_thread() function which wakes up the thread which
      is associated to a given dev_id. This allows sdio to invoke the irq
      thread from the hardware irq handler via the IRQ_WAKE_THREAD return
      value and provides a possibility to wake it via a timer for the
      polling scenarios. That allows to simplify the sdio logic
      significantly.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Chris Ball <chris@printf.net>
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20140215003823.772565780@linutronix.de
      a92444c6
  22. 09 2月, 2014 1 次提交
  23. 28 1月, 2014 1 次提交
  24. 15 11月, 2013 1 次提交
  25. 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
  26. 13 9月, 2013 1 次提交
  27. 12 1月, 2013 1 次提交
  28. 23 9月, 2012 1 次提交
    • P
      time: RCU permitted to stop idle entry via softirq · 803b0eba
      Paul E. McKenney 提交于
      The can_stop_idle_tick() function complains if a softirq vector is
      raised too late in the idle-entry process, presumably in order to
      prevent dangling softirq invocations from being delayed across the
      full idle period, which might be indefinitely long -- and if softirq
      was asserted any later than the call to this function, such a delay
      might well happen.
      
      However, RCU needs to be able to use softirq to stop idle entry in
      order to be able to drain RCU callbacks from the current CPU, which in
      turn enables faster entry into dyntick-idle mode, which in turn reduces
      power consumption.  Because RCU takes this action at a well-defined
      point in the idle-entry path, it is safe for RCU to take this approach.
      
      This commit therefore silences the error message that is sometimes
      produced when the going-idle CPU suddenly finds that it has an RCU_SOFTIRQ
      to process.  The error message will continue to be issued for other
      softirq vectors.
      Reported-by: NSedat Dilek <sedat.dilek@gmail.com>
      Signed-off-by: NPaul E. McKenney <paul.mckenney@linaro.org>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Tested-by: NSedat Dilek <sedat.dilek@gmail.com>
      Reviewed-by: NJosh Triplett <josh@joshtriplett.org>
      803b0eba
  29. 19 7月, 2012 1 次提交
  30. 24 5月, 2012 1 次提交
    • O
      genirq: reimplement exit_irq_thread() hook via task_work_add() · 4d1d61a6
      Oleg Nesterov 提交于
      exit_irq_thread() and task->irq_thread are needed to handle the unexpected
      (and unlikely) exit of irq-thread.
      
      We can use task_work instead and make this all private to
      kernel/irq/manage.c, cleanup plus micro-optimization.
      
      1. rename exit_irq_thread() to irq_thread_dtor(), make it
         static, and move it up before irq_thread().
      
      2. change irq_thread() to do task_work_add(irq_thread_dtor)
         at the start and task_work_cancel() before return.
      
         tracehook_notify_resume() can never play with kthreads,
         only do_exit()->exit_task_work() can call the callback
         and this is what we want.
      
      3. remove task_struct->irq_thread and the special hook
         in do_exit().
      Signed-off-by: NOleg Nesterov <oleg@redhat.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Richard Kuo <rkuo@codeaurora.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Alexander Gordeev <agordeev@redhat.com>
      Cc: Chris Zankel <chris@zankel.net>
      Cc: David Smith <dsmith@redhat.com>
      Cc: "Frank Ch. Eigler" <fche@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Larry Woodman <lwoodman@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      4d1d61a6
  31. 19 4月, 2012 1 次提交
  32. 29 3月, 2012 1 次提交
  33. 03 2月, 2012 1 次提交
  34. 17 10月, 2011 1 次提交
  35. 03 10月, 2011 1 次提交