Received: by 10.192.165.156 with SMTP id m28csp511584imm; Wed, 11 Apr 2018 02:56:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx48ZLZiWSQRGIGoOCogc3N4tl9LLqQwJLeVLu0xLv1NeXvMFX5xLT0Q52bwypX+AwyzY3HuX X-Received: by 2002:a17:902:8543:: with SMTP id d3-v6mr4317783plo.20.1523440596768; Wed, 11 Apr 2018 02:56:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523440596; cv=none; d=google.com; s=arc-20160816; b=OoxNnfwVpllNPIr9S+FGvoi6rhPeZkUJv0A6vTA+J0E/HNFqCmlqPGqVOTaX7U5wM9 lZGKjUa1kO9eIW2NVXB11FlmDKErTRz9CcaHLaj9zAU+B7P2Ny+TR4KJZTZo38/nogVG DhFzNIpsZW2ezFJ6uDZO6sjQtn9MiBbgtoq1GWRfJIWYdpAaJGTIWFI+savdr6EhRyt+ oWy5AqDRXcEhw9ZCUktladPcSTni7rLO4fVUQClW5xLHCy0ub5el93+Ecvxbr2kgVnmF PV8Zp6V8D77oEVfcny2acWa6uOkvancuEj/O3l0iuweLuAGPnAt8wB/ZlmBznQTyW2f2 H3hw== 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=TF0hc7MlYY9oyWNxP716eLcMbb7IATv525nQ8tze770=; b=1BjcEHj6n4g1Wpj7CEKvjlcaSlQGIa/XEa+abKPBCoankT2LDTJVmUTFZuUtj31om1 m9hg8Cjs8LYekQH00ZV0UQ6U21yiRSerDqlck10DWVBkBsrNP7RR7YxLN+muhIIRNLFP 3duQGe5GazLbymwE6FLJyOO28EHz/9C6RXVUbP3PXGlWqRtGay303AA56WlYDOYbG80J 2sp+/NVoTAmUIjYYEm3ya2pBcnomOlq5gnS5IebKOwldKnvYjZNJynIkurVXSAWuxpfX 51FYvzc+8ioahmmKXO4cP7dwn6pfVlqn6ADQgEB1391lzm4ie+x5cF9PSuZLOgs4Dgi+ zJsA== 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 g1-v6si756138plm.747.2018.04.11.02.56.00; Wed, 11 Apr 2018 02:56:36 -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 S1752572AbeDKJwu convert rfc822-to-8bit (ORCPT + 99 others); Wed, 11 Apr 2018 05:52:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:33592 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752323AbeDKJws (ORCPT ); Wed, 11 Apr 2018 05:52:48 -0400 Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) (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 37D382183D; Wed, 11 Apr 2018 09:52:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37D382183D 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-f45.google.com with SMTP id b127so2855865wmf.5; Wed, 11 Apr 2018 02:52:47 -0700 (PDT) X-Gm-Message-State: ALQs6tDI040FZZPKvqQr9pQqlRA0s3ivpdl1mG40iBpObSltuY2n4nU6 P/F82j/A3YXy6PMSoQkdBXaMO4L39l2rW7eSmo8= X-Received: by 10.28.238.2 with SMTP id m2mr1906736wmh.135.1523440365551; Wed, 11 Apr 2018 02:52:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.199.7 with HTTP; Wed, 11 Apr 2018 02:52:44 -0700 (PDT) In-Reply-To: References: <1523210867-3806-1-git-send-email-pawel.mikolaj.chmiel@gmail.com> From: Krzysztof Kozlowski Date: Wed, 11 Apr 2018 11:52:44 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] pinctrl/samsung: Correct EINTG banks order To: Tomasz Figa Cc: =?UTF-8?Q?Pawe=C5=82_Chmiel?= , Sylwester Nawrocki , "linus.walleij@linaro.org" , Kukjin Kim , linux-arm-kernel , "moderated list:SAMSUNG SOC CLOCK DRIVERS" , linux-gpio@vger.kernel.org, linux-kernel , 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 Wed, Apr 11, 2018 at 10:36 AM, Tomasz Figa wrote: > 2018-04-10 17:38 GMT+09:00 Tomasz Figa : >> 2018-04-10 16:06 GMT+09:00 Krzysztof Kozlowski : >>> 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? >> >> Perhaps let's limit this patch to s5pv210 and Exynos5410 alone, where >> a simple swap of bank order in the arrays should be okay. >> >> We might also need to have some fixes on 4x12, because I noticed that >> in exynos4x12_pin_banks0[] there is a hole in eint_offsets between >> gpd1 and gpf0 and exynos4x12_pin_banks1[] starts with gpk0 that has >> eint_offset equal to 0x08 (not 0). > > To close the loop, after talking offline and checking the > documentation, Exynos4x12 is fine, because the group numbers in SVC > register actually match what is defined in bank arrays. Great! Thanks for checking. Best regards, Krzysztof