Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3338964imu; Sun, 11 Nov 2018 12:43:13 -0800 (PST) X-Google-Smtp-Source: AJdET5fBX30iG7sXx7varLFG17jjlVwlZvXb2SkNFwzl5tU7cgUAjiyfr7wmsGuZ9sclgQSDPXhz X-Received: by 2002:a62:e0dd:: with SMTP id d90-v6mr17141303pfm.214.1541968993304; Sun, 11 Nov 2018 12:43:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968993; cv=none; d=google.com; s=arc-20160816; b=khJx/WcpAWoVIRpQX11IoMveZN6i2Ty1ASfzmRa4ByUpT5HWvmzIxstr9baIh0wMRt kgrzlWhYZ8DqP13kVqZbfFLOHHA9ga+p8Yw7IXUcV2BvzoW6VXfX8BppKeXVBfNBmkmc I9b/d4MbplUzVYik/ahsv+tYO9dOqT0aSGGcJbL9CdoBdwffySkNvRvGCe+rQc6tt2hQ WnTSt9EufXmM7/svAVpczIPzODIQmFvQb2dffERrGhyDPU8m2ZXhbYrIMqeQidbGrH4Q Hg/VSUpL2xrqP74wrJib7oHc9KR28HQNKeh5kUQsa8uIl3Zx1hYTU4342U7CUkQMR1Ht evQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=723lJPdHRw6jpKBu8XmQcYXPo1gGjRNETu7B7wi+iw4=; b=Hd+tjKE/9KMQt0bsnnaoym30Wu3Xf2cGanjUy+S5lGvwy0Q/TQGtiJTa+ZElQ0ZwOH RcpMgPA89UKHer07H4/k/dEnVC4zgAAajwAfCzqiMkW9z1DQvVoPcK6L0TvChGYhvQdy mpbkBuc764yWbaCM5/x4DkYzw0oLqSt6pcv9/GvU/reBZ/J/29VqwLr1J7BohLo3ldZz Wuj2CP5wyhkbV/1NFtjmnS327kYk51el5PjlHvR9ypT84yUIEM2rEo7Yf1FxF4vPG0vZ O0R+0uOROFhBe2X0pjml61SEylpPpRmKBfhFCQY8z5xhVGOlS2sKwdm7a6mUqpCBBcCi FeDA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x187si14386990pgx.241.2018.11.11.12.42.58; Sun, 11 Nov 2018 12:43:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730210AbeKLGas (ORCPT + 99 others); Mon, 12 Nov 2018 01:30:48 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:49392 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729850AbeKLFsD (ORCPT ); Mon, 12 Nov 2018 00:48:03 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsQ-0000l7-Bo; Sun, 11 Nov 2018 19:58:34 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsN-0001Nd-TZ; Sun, 11 Nov 2018 19:58:31 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "=?UTF-8?q?Pawe=C5=82=20Chmiel?=" , "Krzysztof Kozlowski" , "Tomasz Figa" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 020/366] pinctrl: samsung: Correct EINTG banks order In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Paweł Chmiel commit 5cf9a338db94cfd570aa2607bef1b30996f188e3 upstream. All banks with GPIO interrupts should be at beginning of bank array and without any other types of banks between them. This order is expected by exynos_eint_gpio_irq, when doing interrupt group to bank translation. Otherwise, kernel NULL pointer dereference would happen when trying to handle interrupt, due to wrong bank being looked up. Observed on s5pv210, when trying to handle gpj0 interrupt, where kernel was mapping it to gpi bank. Fixes: 023e06dfa688 ("pinctrl: exynos: add exynos5410 SoC specific data") Fixes: 608a26a7bc04 ("pinctrl: Add s5pv210 support to pinctrl-exynos) Signed-off-by: Paweł Chmiel Reviewed-by: Tomasz Figa Signed-off-by: Krzysztof Kozlowski [bwh: Backported to 3.16: - Drop change to exynos5410_pin_banks0 - Adjust filename] Signed-off-by: Ben Hutchings --- --- a/drivers/pinctrl/pinctrl-exynos.c +++ b/drivers/pinctrl/pinctrl-exynos.c @@ -679,12 +679,12 @@ static struct samsung_pin_bank s5pv210_p EXYNOS_PIN_BANK_EINTG(7, 0x1c0, "gpg1", 0x38), EXYNOS_PIN_BANK_EINTG(7, 0x1e0, "gpg2", 0x3c), EXYNOS_PIN_BANK_EINTG(7, 0x200, "gpg3", 0x40), - EXYNOS_PIN_BANK_EINTN(7, 0x220, "gpi"), EXYNOS_PIN_BANK_EINTG(8, 0x240, "gpj0", 0x44), EXYNOS_PIN_BANK_EINTG(6, 0x260, "gpj1", 0x48), EXYNOS_PIN_BANK_EINTG(8, 0x280, "gpj2", 0x4c), EXYNOS_PIN_BANK_EINTG(8, 0x2a0, "gpj3", 0x50), EXYNOS_PIN_BANK_EINTG(5, 0x2c0, "gpj4", 0x54), + EXYNOS_PIN_BANK_EINTN(7, 0x220, "gpi"), EXYNOS_PIN_BANK_EINTN(8, 0x2e0, "mp01"), EXYNOS_PIN_BANK_EINTN(4, 0x300, "mp02"), EXYNOS_PIN_BANK_EINTN(8, 0x320, "mp03"),