Received: by 10.192.165.156 with SMTP id m28csp1929111imm; Sat, 14 Apr 2018 09:31:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx48MqgntQhPuWSUksuf6Udt0GXd9t+mXP7XRoVOPgx9ZAcs7WriKNpfO2P7ZY3sjU1WB+N5i X-Received: by 2002:a17:902:43:: with SMTP id 61-v6mr7337103pla.112.1523723480960; Sat, 14 Apr 2018 09:31:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523723480; cv=none; d=google.com; s=arc-20160816; b=XFOCS1ZXZbcp6NWFj/cK97kHTYkZg1Utb5fdQaKRJMHnlRSyURlostyxq7vbHDDrMT Id81ONuouFExdI2NMa1rFW3ydefLDyb1pB1Ent+hhbyb/j1PPoYG6GvQfecRGFJTdfeC a0RPEdLlbo3PGGkxl80hY+TKaGMfLRc3YSgHps0FPDINjyZMVnm/lucbxgQzdPxkBH6Z Ot9YMElP7rqA/ZPRUcTDTVbJAw1QxePjb7S6HqlpD7o3AXzmIGNspebWIb6A4GHJ9mxm dktCyjufyMKSuStmfdYK1fJbWdg2oLED3uq9CJUsw+y9rDdCKGyP+JQGuFgVh3tkirxk kM6g== 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:mime-version :references:in-reply-to:user-agent:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=qq8cT0Isa2bluVWKMFN+IY8hT69xF36j53G39NggioY=; b=BgRqyKN0ds/5Tozf99y3/7Kl9sLO7P0QGyMppzK7LeY7yRAxCXLQ1I8mjCQpaPc9gr QtwM3D5rDADbB1bdii2JxkWX45QZEG79SwphznTxpOZo8AgP22KyF4IL8t02T+Ze0uom /sPrNcBrgx1vUzW1IkU3pr3//zvON5WijpNnbkXG6BY3lJsRtUIRHn1IqAPXqfRbDhe7 jc5/zrMdTmGCMf3PbYy7K6qw5XTCj5GoBf1sXmzBrYaj/9OlvLupDFct4Ou9E8FrmMSq 7BT3KHQLWYFuE9eTvbO8W2TerxN0p6w7Lr69Sq227uUU6O2/fuaWUO2baDTlfi782/gq ntEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hDanHT/9; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f13si6278791pgr.143.2018.04.14.09.30.36; Sat, 14 Apr 2018 09:31:20 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hDanHT/9; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751590AbeDNQ1Q (ORCPT + 99 others); Sat, 14 Apr 2018 12:27:16 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:35728 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751220AbeDNQ1N (ORCPT ); Sat, 14 Apr 2018 12:27:13 -0400 Received: by mail-lf0-f67.google.com with SMTP id b189-v6so16525471lfe.2; Sat, 14 Apr 2018 09:27:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=qq8cT0Isa2bluVWKMFN+IY8hT69xF36j53G39NggioY=; b=hDanHT/90weT4rn7mxPREDh06uezw+qKVD3k1HdSXpxU06eK0B8nBA+jFVK6/czmQo FfcYvE1eJq8+1QfulF/KH9yQCjZ4ajsQfmv9X/AF1K3i1tG5Se2IVnK1zfpyi7RiJPsa 9UqbMbsqHxWRQlLa/f8cralLd0ch7B0HJX3PIl9aaFz4w179gEm/NY1sHZ5pipRKLzVv jd/WYi5jt/BjVF995KCj49lTBCnK0BXh9JrScHr9YrGrycYXlHBYIGRCSi+dwTvOf01h DBiL/yiZ8Mi10i5CH35MhmIEp8wW9qYJpG2IhOtsn8qP8yOTB8hXKqcqBNoNL/6eEaAl X7Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=qq8cT0Isa2bluVWKMFN+IY8hT69xF36j53G39NggioY=; b=iEy6H5MsYVgwwEXfZXOgoUrnk+9q560stHGHhZnB5sQxfJ8dW7n7c05m0iVmvQ4VOh 7HTSM98I3+y8cEmtHCtglAfUu3WiQ0dDgjkXJWlV0ccD7yews39D4uPA9a9AR/7GChQj rdW9/cgwSkWOn8EnoNPlu7boDjjuxmCfQE2zkZJG1bb+GckBV3jzrDimJo2ZAk9TYjOi 5WHupaPBqh1I2e/eT23JvKbS2FGqGoc9NewuABPp867KQl7KeO2wP8xkMUjjJWa8X9ir BVCT2Hh6HEWZIx7BoxnhHZQDNaZIlKd37t35xfi9yLHhq9jVRMjoryQXCCSBETN1UHcB bO/w== X-Gm-Message-State: ALQs6tDcWiSERiTYlQrh//z/YjVVnNS/QhwbxKD2bMmul+gXSUusGyM5 lMbXvor+QGxIKQl/yxcfD3g= X-Received: by 2002:a19:dbc5:: with SMTP id t66-v6mr11445981lfi.62.1523723231510; Sat, 14 Apr 2018 09:27:11 -0700 (PDT) Received: from acerlaptop.localnet (user-94-254-174-4.play-internet.pl. [94.254.174.4]) by smtp.gmail.com with ESMTPSA id l1sm1439120ljj.30.2018.04.14.09.27.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Apr 2018 09:27:10 -0700 (PDT) From: =?utf-8?B?UGF3ZcWC?= Chmiel To: Krzysztof Kozlowski Cc: Tomasz Figa , 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 Subject: Re: [PATCH] pinctrl/samsung: Correct EINTG banks order Date: Sat, 14 Apr 2018 18:27:09 +0200 Message-ID: <2132977.nF3rHrDWU5@acerlaptop> User-Agent: KMail/5.1.3 (Linux/4.13.0-38-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: References: <1523210867-3806-1-git-send-email-pawel.mikolaj.chmiel@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, April 11, 2018 11:52:44 AM CEST Krzysztof Kozlowski wrote: > On Wed, Apr 11, 2018 at 10:36 AM, Tomasz Figa wro= te: > > 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=C5=82 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. >=20 > Great! Thanks for checking. >=20 > Best regards, > Krzysztof >=20 Thanks for all comments. I'll prepare new version of patches, with all fixe= s and documentation. Best regards Pawe=C5=82