stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH 4.1 11/65] gpio: rcar: Check for irq_set_irq_wake() failures
Date: Sun, 19 Jul 2015 12:07:30 -0700	[thread overview]
Message-ID: <20150719190809.866017401@linuxfoundation.org> (raw)
In-Reply-To: <20150719190809.469715936@linuxfoundation.org>

4.1-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Geert Uytterhoeven <geert+renesas@glider.be>

commit 501ef0f95a57e7c32138733c468394a52244c85b upstream.

If an interrupt controller doesn't support wake-up configuration,
irq_set_irq_wake() returns an error code.  Then any subsequent call
trying to deconfigure wake-up will cause an imbalance, and a warning
will be printed:

    WARNING: CPU: 1 PID: 1341 at kernel/irq/manage.c:540 irq_set_irq_wake+0x9c/0xf8()
    Unbalanced IRQ 26 wake disable

To fix this, refrain from any further parent interrupt controller
(de)configuration if irq_set_irq_wake() failed.

Alternative fixes would be:
  - calling "gic_set_irqchip_flags(IRQCHIP_SKIP_SET_WAKE)" from the
    platform code,
  - setting "gic_chip.flags = IRQCHIP_SKIP_SET_WAKE" in the GIC driver
    code,
but these were withheld as the GIC hardware doesn't really support
wake-up interrupts.

Fixes: ab82fa7da4dce5c7 ("gpio: rcar: Prevent module clock disable when wake-up is enabled")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpio/gpio-rcar.c |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

--- a/drivers/gpio/gpio-rcar.c
+++ b/drivers/gpio/gpio-rcar.c
@@ -177,8 +177,17 @@ static int gpio_rcar_irq_set_wake(struct
 	struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
 	struct gpio_rcar_priv *p = container_of(gc, struct gpio_rcar_priv,
 						gpio_chip);
+	int error;
 
-	irq_set_irq_wake(p->irq_parent, on);
+	if (p->irq_parent) {
+		error = irq_set_irq_wake(p->irq_parent, on);
+		if (error) {
+			dev_dbg(&p->pdev->dev,
+				"irq %u doesn't support irq_set_wake\n",
+				p->irq_parent);
+			p->irq_parent = 0;
+		}
+	}
 
 	if (!p->clk)
 		return 0;



  parent reply	other threads:[~2015-07-19 19:08 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-19 19:07 [PATCH 4.1 00/65] 4.1.3-stable review Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 01/65] fs: Add helper functions for permanently empty directories Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 02/65] sysctl: Allow creating permanently empty directories that serve as mountpoints Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 03/65] proc: Allow creating permanently empty directories that serve as mount points Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 04/65] kernfs: Add support for always empty directories Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 05/65] sysfs: Add support for permanently empty directories to serve as mount points Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 06/65] sysfs: Create mountpoints with sysfs_create_mount_point Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 07/65] mnt: Update fs_fully_visible to test for permanently empty directories Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 08/65] mnt: Refactor the logic for mounting sysfs and proc in a user namespace Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 09/65] mnt: Modify fs_fully_visible to deal with locked ro nodev and atime Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 10/65] gpio: crystalcove: set IRQCHIP_SKIP_SET_WAKE for the irqchip Greg Kroah-Hartman
2015-07-19 19:07 ` Greg Kroah-Hartman [this message]
2015-07-19 19:07 ` [PATCH 4.1 12/65] rcu: Correctly handle non-empty Tiny RCU callback list with none ready Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 13/65] ipr: Increase default adapter init stage change timeout Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 14/65] Disable write buffering on Toshiba ToPIC95 Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 15/65] ALSA: pcm: Fix pcm_class sysfs output Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 16/65] ALSA: hda - Fix Dock Headphone on Thinkpad X250 seen as a Line Out Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 17/65] ALSA: hda - set proper caps for newer AMD hda audio in KB/KV Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 18/65] ALSA: hda - Disable widget power-save for VIA codecs Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 19/65] ALSA: hda - restore the MIC FIXUP for some Dell machines Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 20/65] ALSA: hda - Add headset support to Acer Aspire V5 Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 21/65] ALSA: hda - Fix the dock headphone output on Fujitsu Lifebook E780 Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 22/65] ALSA: hda - Add a fixup for Dell E7450 Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 23/65] ACPI / init: Switch over platform to the ACPI mode later Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 24/65] ACPI / PM: Add missing pm_generic_complete() invocation Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 25/65] ACPI / PNP: Avoid conflicting resource reservations Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 26/65] iio: accel: kxcjk-1013: add the "KXCJ9000" ACPI id Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 27/65] tools selftests: Fix clean target with make 3.81 Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 28/65] ARC: add smp barriers around atomics per Documentation/atomic_ops.txt Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 29/65] ARC: add compiler barrier to LLSC based cmpxchg Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 30/65] arc: fix use of uninitialized arc_pmu Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 31/65] power_supply: Fix NULL pointer dereference during bq27x00_battery probe Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 32/65] power_supply: Fix possible NULL pointer dereference on early uevent Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 33/65] mei: me: wait for power gating exit confirmation Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 34/65] mei: txe: reduce suspend/resume time Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 35/65] arm64: Do not attempt to use init_mm in reset_context() Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 36/65] arm64: entry: fix context tracking for el0_sp_pc Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 37/65] arm64: mm: Fix freeing of the wrong memmap entries with !SPARSEMEM_VMEMMAP Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 38/65] arm64: vdso: work-around broken ELF toolchains in Makefile Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 39/65] mm: kmemleak: allow safe memory scanning during kmemleak disabling Greg Kroah-Hartman
2015-07-19 19:07 ` [PATCH 4.1 40/65] mm: kmemleak_alloc_percpu() should follow the gfp from per_alloc() Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 41/65] mm, thp: respect MPOL_PREFERRED policy with non-local node Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 42/65] regmap: Fix regmap_bulk_read in BE mode Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 43/65] regmap: Fix possible shift overflow in regmap_field_init() Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 44/65] regulator: max77686: fix gpio_enabled shift wrapping bug Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 45/65] regulator: core: fix constraints output buffer Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 46/65] livepatch: add module locking around kallsyms calls Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 48/65] spi: orion: Fix maximum baud rates for Armada 370/XP Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 49/65] spi: pl022: Specify num-cs property as required in devicetree binding Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 50/65] scsi_transport_srp: Introduce srp_wait_for_queuecommand() Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 51/65] scsi_transport_srp: Fix a race condition Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 52/65] IB/srp: Remove an extraneous scsi_host_put() from an error path Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 53/65] IB/srp: Fix a connection setup race Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 54/65] IB/srp: Fix connection state tracking Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 55/65] IB/srp: Fix reconnection failure handling Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 56/65] genirq: devres: Fix testing return value of request_any_context_irq() Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 57/65] video: mxsfb: Make sure axi clock is enabled when accessing registers Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 58/65] leds / PM: fix hibernation on arm when gpio-led used with CPU led trigger Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 59/65] mtd: fix: avoid race condition when accessing mtd->usecount Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 61/65] PCI: Propagate the "ignore hotplug" setting to parent Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 62/65] PCI: Add pci_bus_addr_t Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 63/65] PCI: pciehp: Wait for hotplug command completion where necessary Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 64/65] of/pci: Fix pci_address_to_pio() conversion of CPU address to I/O port Greg Kroah-Hartman
2015-07-19 19:08 ` [PATCH 4.1 65/65] Input: pixcir_i2c_ts - fix receive error Greg Kroah-Hartman
2015-07-20  3:19 ` [PATCH 4.1 00/65] 4.1.3-stable review Guenter Roeck
2015-07-20 19:26   ` Greg Kroah-Hartman
2015-07-20  6:33 ` Sudip Mukherjee
2015-07-20 19:27   ` Greg Kroah-Hartman
2015-07-20 17:17 ` Shuah Khan
2015-07-20 19:27   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150719190809.866017401@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=geert+renesas@glider.be \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).