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, Yu C Chen <yu.c.chen@intel.com>,
	Anisse Astier <anisse@astier.eu>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	Sumit Semwal <sumit.semwal@linaro.org>
Subject: [PATCH 4.4 08/30] pinctrl: cherryview: Do not mask all interrupts in probe
Date: Fri, 24 Mar 2017 18:58:47 +0100	[thread overview]
Message-ID: <20170324151221.329487554@linuxfoundation.org> (raw)
In-Reply-To: <20170324151220.759111698@linuxfoundation.org>

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

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

From: Mika Westerberg <mika.westerberg@linux.intel.com>

commit bcb48cca23ec9852739e4a464307fa29515bbe48 upstream.

The Cherryview GPIO controller has 8 or 16 wires connected to the I/O-APIC
which can be used directly by the platform/BIOS or drivers. One such wire
is used as SCI (System Control Interrupt) which ACPI depends on to be able
to trigger GPEs (General Purpose Events).

The pinctrl driver itself uses another IRQ resource which is wire OR of all
the 8 (or 16) wires and follows what BIOS has programmed to the IntSel
register of each pin.

Currently the driver masks all interrupts at probe time and this prevents
these direct interrupts from working as expected. The reason for this is
that some early stage prototypes had some pins misconfigured causing lots
of spurious interrupts.

We fix this by leaving the interrupt mask untouched. This allows SCI and
other direct interrupts work properly. What comes to the possible spurious
interrupts we switch the default handler to be handle_bad_irq() instead of
handle_simple_irq() (which was not correct anyway).

Reported-by: Yu C Chen <yu.c.chen@intel.com>
Reported-by: Anisse Astier <anisse@astier.eu>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pinctrl/intel/pinctrl-cherryview.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
@@ -1466,12 +1466,11 @@ static int chv_gpio_probe(struct chv_pin
 		offset += range->npins;
 	}
 
-	/* Mask and clear all interrupts */
-	chv_writel(0, pctrl->regs + CHV_INTMASK);
+	/* Clear all interrupts */
 	chv_writel(0xffff, pctrl->regs + CHV_INTSTAT);
 
 	ret = gpiochip_irqchip_add(chip, &chv_gpio_irqchip, 0,
-				   handle_simple_irq, IRQ_TYPE_NONE);
+				   handle_bad_irq, IRQ_TYPE_NONE);
 	if (ret) {
 		dev_err(pctrl->dev, "failed to add IRQ chip\n");
 		goto fail;

  parent reply	other threads:[~2017-03-24 18:03 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-24 17:58 [PATCH 4.4 00/30] 4.4.57-stable review Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 01/30] usb: core: hub: hub_port_init lock controller instead of bus Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 02/30] USB: dont free bandwidth_mutex too early Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 03/30] crypto: ghash-clmulni - Fix load failure Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 04/30] crypto: cryptd - Assign statesize properly Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 05/30] crypto: mcryptd - Fix load failure Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 06/30] cxlflash: Increase cmd_per_lun for better throughput Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 07/30] ACPI / video: skip evaluating _DOD when it does not exist Greg Kroah-Hartman
2017-03-24 17:58 ` Greg Kroah-Hartman [this message]
2017-03-24 17:58 ` [PATCH 4.4 09/30] Drivers: hv: balloon: dont crash when memory is added in non-sorted order Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 10/30] Drivers: hv: avoid vfree() on crash Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 11/30] xen/qspinlock: Dont kick CPU if IRQ is not initialized Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 12/30] KVM: PPC: Book3S PR: Fix illegal opcode emulation Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 13/30] s390/pci: fix use after free in dma_init Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 14/30] drm/amdgpu: add missing irq.h include Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 15/30] tpm_tis: Use devm_free_irq not free_irq Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 16/30] hv_netvsc: use skb_get_hash() instead of a homegrown implementation Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 17/30] kernek/fork.c: allocate idle task for a CPU always on its local node Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 18/30] give up on gcc ilog2() constant optimizations Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 19/30] perf/core: Fix event inheritance on fork() Greg Kroah-Hartman
2017-03-24 17:58 ` [PATCH 4.4 20/30] cpufreq: Fix and clean up show_cpuinfo_cur_freq() Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 21/30] powerpc/boot: Fix zImage TOC alignment Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 22/30] md/raid1/10: fix potential deadlock Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 23/30] target/pscsi: Fix TYPE_TAPE + TYPE_MEDIMUM_CHANGER export Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 24/30] scsi: lpfc: Add shutdown method for kexec Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 25/30] scsi: libiscsi: add lock around task lists to fix list corruption regression Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 26/30] target: Fix VERIFY_16 handling in sbc_parse_cdb Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 27/30] isdn/gigaset: fix NULL-deref at probe Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 28/30] gfs2: Avoid alignment hole in struct lm_lockname Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 29/30] percpu: acquire pcpu_lock when updating pcpu_nr_empty_pop_pages Greg Kroah-Hartman
2017-03-24 17:59 ` [PATCH 4.4 30/30] ext4: fix fencepost in s_first_meta_bg validation Greg Kroah-Hartman
2017-03-25  0:02 ` [PATCH 4.4 00/30] 4.4.57-stable review Shuah Khan
     [not found] ` <58d5acb7.5ed7190a.6dd61.3845@mx.google.com>
     [not found]   ` <m2vaqycj2a.fsf@baylibre.com>
2017-03-25  4:15     ` Guenter Roeck
2017-03-25 11:27       ` Alexandre Belloni
2017-03-25 11:35         ` Alexandre Belloni
2017-03-25  4:16 ` Guenter Roeck

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=20170324151221.329487554@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=anisse@astier.eu \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=yu.c.chen@intel.com \
    /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).