Received: by 10.213.65.68 with SMTP id h4csp3543863imn; Tue, 10 Apr 2018 00:10:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/K/5fWLVtj2Xr248JUmQBj/kd1/EmarN/cAM97aLUcJ0PwbDjbQHwTf8o6iaqvn5xB070U X-Received: by 2002:a17:902:604f:: with SMTP id a15-v6mr42709547plt.184.1523344209840; Tue, 10 Apr 2018 00:10:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523344209; cv=none; d=google.com; s=arc-20160816; b=coNE/KmovgNs+A/VYpNvoL4mFO+Io2SXjs8dvIveEDSGvoDSZD9B4lfw2jboW/H1Wo yy6lsp2GdnS0V/liMsKHe9l2Q94t6skV0iPCRwXRGj+EcWQ9nsILpCgAONBksXwtIUgW jJa+v9yvo+HqyOkgUSrAV6UZKQV2g1Wf4adOlmaajpcuiStcojJYwtGDT9ESrA1WRx9J l3FC1mKhKbf+BBy86IIdbk61YiEK/fPU6F93qkVUKEqc7QU0+VTDxx6MufcayGioesFY KkAsbYBmWqo2d+bXN+lF58xyXGtaiHiCbjgvzV8v0nVhzlxajj4dXVgBZO2mHAhSCaVc 5L0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dmarc-filter:arc-authentication-results; bh=o3/Fadz+WKtHloCyj0bTI4LK0Gft9Jo8kLVKrvb5VRA=; b=KWIGJBSkR1YZXEv4fHO+6feJDzD1dG9p2DGXsoFbrCx6Clg3Iq8sN5RiE3CU5/G60T HoA2s2HtGwgpQygoDEZ040mXGtrbGKHIq6ZTkhCLQACUTNgxRBK5FbE5q53zma4HguIM cdEGC3EMOe3Dwi3MtxursQ+sgSrIsfx/7IpjLEU13HmrqMJBW7bNhsTNhaBU1GZlljkc j7+0oP+PsLbQYLbuN7pDAMQs+vrutsj0IUo+3cwrR2v6vjVM+gpyek2n5pClnccwZ053 +JiUdtfbBI1hw4QQ31ts88kDGFapW9G1FFSZ3IYLrN7/IQjnV9MBRZ7oIntMN89GwEOC xo0Q== 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 w13-v6si2099910plp.149.2018.04.10.00.09.33; Tue, 10 Apr 2018 00:10:09 -0700 (PDT) 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 S1752320AbeDJHGb convert rfc822-to-8bit (ORCPT + 99 others); Tue, 10 Apr 2018 03:06:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:52538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751490AbeDJHG3 (ORCPT ); Tue, 10 Apr 2018 03:06:29 -0400 Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8812C217BA; Tue, 10 Apr 2018 07:06:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8812C217BA Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=krzk@kernel.org Received: by mail-wm0-f49.google.com with SMTP id b127so23872806wmf.5; Tue, 10 Apr 2018 00:06:28 -0700 (PDT) X-Gm-Message-State: ALQs6tAYOHTfNgT9CL7HYWkFeg3lvkuvc/C0+5NhTof77WFPY/DzS/2i qCKPecEbgMMVl7bP3tq0znZX7A76TJF6r9UzN+Y= X-Received: by 10.28.92.203 with SMTP id q194mr628306wmb.135.1523343986938; Tue, 10 Apr 2018 00:06:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.199.7 with HTTP; Tue, 10 Apr 2018 00:06:26 -0700 (PDT) In-Reply-To: <1523210867-3806-1-git-send-email-pawel.mikolaj.chmiel@gmail.com> References: <1523210867-3806-1-git-send-email-pawel.mikolaj.chmiel@gmail.com> From: Krzysztof Kozlowski Date: Tue, 10 Apr 2018 09:06:26 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] pinctrl/samsung: Correct EINTG banks order To: =?UTF-8?Q?Pawe=C5=82_Chmiel?= Cc: Tomasz Figa , Sylwester Nawrocki , linus.walleij@linaro.org, kgene@kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Marek Szyprowski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 8, 2018 at 8:07 PM, Paweł Chmiel wrote: > 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. Thanks for the patch. The issue looks real although one thing was missed - there is a gap in SVC group between GPK2 and GPL0 (pointed by Marek Szyprowski): 0x0 - EINT_23 - gpk0 0x1 - EINT_24 - gpk1 0x2 - EINT_25 - gpk2 0x4 - EINT_27 - gpl0 0x7 - EINT_8 - gpm0 Maybe this should be done differently - to remove such hidden requirement entirely in favor of another parameter of EXYNOS_PIN_BANK_EINTG argument? Anyway if such hidden requirement stays, then please document it in the source code (it maybe next to PIN order... or next macro... or also in exynos_eint_gpio_irq()). Beside that please add cc-stable and appropriate fixes tag, Best regards, Krzysztof