Received: by 10.192.165.156 with SMTP id m28csp450858imm; Wed, 11 Apr 2018 01:40:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx48N60TENoPhzOkkcOsISf5DVf6qRwJf4RgdmZLhchnM7myQX+oXbzG0jMf1qTRk8jxXZZXY X-Received: by 10.98.7.152 with SMTP id 24mr3222862pfh.94.1523436058282; Wed, 11 Apr 2018 01:40:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523436058; cv=none; d=google.com; s=arc-20160816; b=RnCfe77iPou/Kg+bgiBMaaCp4Hl0+oN8UVk06IQIYvZcBpX9tRFeDvUIaTqJN7/XpI JAWD2bIESyaJPpe1Tz/KlhZtiy1FVwwTK9kehmcOOWnGbgrr84fVlnLC4lJZ22PBePN8 /xxzpMlo6RiOt6aQKbLFT4EseNJKxak134ubg87RKlbfB+kBN+uUEIYOA1zD1j9KcWSq dobsR6QCOeeMTTV1cDi+w2ZVPAjYiupe0I/QhQ+bDoh7SmstEeJxXkl2SDMNXkYzZsua +/sppWL1tUfs93i0cvVP2/H+lsY5heBt4XmKuZrtR3rgGkTd9IbCikyDMBia5DAMUyjS AtwA== 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 :dkim-signature:arc-authentication-results; bh=4+ign9zUBqV9Z08uW2fAyfl24XGNRzsOPVkvWDXd9iw=; b=Vls+iT0m8BC46dYF6iyfByyji+49vHzL2a/dnLecSm65XHRT9pWpIuNzJfj5kQkpqx 0Xr0fdAsBORER7R1lVBiq8nrr3nAQlxmNDnm/LZcKFb8+uW4WRg1XuEdstPzwNQheIaw ZV3IMLIU9TPGaK3y7XEPS/HRXPPOwnfL8IADggveKStaWaM2jwris7NVh1VW9IOkl9Sl yyFqgk5wqVMceZ/iLddU64cfjdEne6qG9qNjisasLdSDcPDpJMbQECP1kX8VWeuZLLVU DdPqPdB+QbQQOD8fT/YbGr8jl+cSsVEsjPkwXG4SRHSQI00X/F/kq+3jiu4Z0sCCkzO7 YKGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=a9H6BXbv; 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 n7-v6si663979plk.531.2018.04.11.01.40.21; Wed, 11 Apr 2018 01:40:58 -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=a9H6BXbv; 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 S1752639AbeDKIhD (ORCPT + 99 others); Wed, 11 Apr 2018 04:37:03 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:34179 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750785AbeDKIg7 (ORCPT ); Wed, 11 Apr 2018 04:36:59 -0400 Received: by mail-io0-f194.google.com with SMTP id d6so1502690iog.1; Wed, 11 Apr 2018 01:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=4+ign9zUBqV9Z08uW2fAyfl24XGNRzsOPVkvWDXd9iw=; b=a9H6BXbvOcat82iyOS4mEVDajZzEFTvAfIjZBUkqRa7IednBKvCUO5eoLmBqiKwd/h MIFltwOUm2bCiXmtn5GiEm0xvnAwk2SXc9pvEQARJfsKpNxoQ0f6O+3GKC6ET6+/FI4S NEPY4NSA9e6VwqyyXsBL5WJOOauUv4UNbaH+dy5i/J4l1pPe0x1vee0/LAM8v8x1kJNo cht5x08SOECVkymvF+yRF9+8NBsEzDfwPzk28JLImL2n1Hi7mGwdr/HnQpychJModDb7 8F+I3hVWRN939kYILvFsKquQKAs29c9a5Q+0hixcp+Ohe8VcLgmukNeUYQWRgrGJa22F HKXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=4+ign9zUBqV9Z08uW2fAyfl24XGNRzsOPVkvWDXd9iw=; b=WpecNK88WhZjfPoqNlEoQiuKoEvIRWh3j5d+MjcjZgLp15YZdP4t9+zezTnPY5hkWb mlvvSizPMb+34AifXXNes0/gzzy/6Tg9ddn6mUr0v4eNHVINlJhbSeJz/yyjOAc4xkdE cdje4pFb4AnWgVMV5VHt5OJ5KuNyJl500Fpyxvys2z/xGVqqBy0Yr9XOHGXAgwVORhE9 OZqvBWMKIaMm+MPFGDyiHE8pKxPaqnj8EwIH6V5ZIxsSAxHqfAs6h9nF6+jTGDPp0fdT kOlH2LoLDoM1Of5Q4xDqSSqW9kTsJJ5yP2M7E12yS80GCBUyLP5qXlTTsH28WmXU3gGh 805w== X-Gm-Message-State: ALQs6tDQZemV2SRFcsoisa3BRE4ROyM6mNv95tKFcP1ztbkCWobYC+kh nkp2qqag+wB+WywgvH7pTuyxlt9AX7dqPgRcBvw= X-Received: by 10.107.20.88 with SMTP id 85mr3649374iou.218.1523435818210; Wed, 11 Apr 2018 01:36:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.179.8 with HTTP; Wed, 11 Apr 2018 01:36:57 -0700 (PDT) In-Reply-To: References: <1523210867-3806-1-git-send-email-pawel.mikolaj.chmiel@gmail.com> From: Tomasz Figa Date: Wed, 11 Apr 2018 17:36:57 +0900 Message-ID: Subject: Re: [PATCH] pinctrl/samsung: Correct EINTG banks order To: Krzysztof Kozlowski , =?UTF-8?Q?Pawe=C5=82_Chmiel?= Cc: 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: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Best regards, Tomasz