Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3502886rdh; Mon, 27 Nov 2023 16:26:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IENaqRiywC5T0AIvQBHXrTALwFpYz/UVsEcRhMsAix2baW6ROHchT/Kyj5s3JtOEqjagQaI X-Received: by 2002:a17:903:234c:b0:1cf:edd5:f780 with SMTP id c12-20020a170903234c00b001cfedd5f780mr1975649plh.8.1701131201963; Mon, 27 Nov 2023 16:26:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701131201; cv=none; d=google.com; s=arc-20160816; b=wD1pN4ndGxTKA7Z17ENQl48CdT5Gd5KT1Thu1O1hfTJuNknjoInhzX4INagRCRGziJ NuJJg0kM/hnZ8mfTVodynnZ4bR0m0Ziya7QzKwObGinac0tfwMsg0pxPI7lL1BBjLsNc eejPLbYvK50I9DqO63LOmUOq0V4OuSWeJiRbVCZZJCB03f5rKzrSJptKAMtEbGdCAzgj VWunBqUw6xFB66Mr92HRghCMjbqH91JE3GVA7+jXiSQ3UoEgQK1xnChCA1dCg+AW16Bm eaeKB6+sgdYSkjGfK1+8obWATeu92CmGWwAm2TmCOOYMSGM6NqrEuRq/A5SKqodgB8Jl qKJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:in-reply-to :mime-version:message-id:subject:cc:to:from:date:dkim-signature :dkim-filter; bh=EVAydPHb+iuI0oFgKT1lEvM3GpdgPhV7iSj5fS7WTjc=; fh=2ccSm2eJ/KvXdfx+GJufJ22uI8qGWn3q3cf7N8nT2N8=; b=LqMXbcEMKFUHN7j/RbZqXInSKCezwJ1slTupJ/30jn/LXZZyWXti5yUryNUr7mvIbE qelBbrE/rbNQpj76MC1n39amzJEn8+0iIy2UBOipscyU3LgM12+ehfN2d+oabv4IBvhU QmMCbUAeJzWz+fVRDuV05WvTsHYxjmiZ6C4klSxGUubJbrxDIpu83KR8rXDY6NH9mwlu 9ePYcaqI/Zl8il371u7EbnfYxtyVmCv1FydXa74L5E3mQwIy8TZytTBgupzPuBAehY/t Ss/C/Ik7JhTKn7IZrdRnjwxB7qMbf4HHvcHKahsDc1vaEkL7NWFUSOG+qHdIxJRORQ45 ICcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=bYewLQmi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id e18-20020a17090301d200b001cfb4a42d9dsi7082250plh.512.2023.11.27.16.26.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 16:26:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=bYewLQmi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 35528818FBF7; Mon, 27 Nov 2023 16:26:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234088AbjK1A0X (ORCPT + 99 others); Mon, 27 Nov 2023 19:26:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231391AbjK1A0W (ORCPT ); Mon, 27 Nov 2023 19:26:22 -0500 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DE8F1B1 for ; Mon, 27 Nov 2023 16:26:27 -0800 (PST) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20231128002623epoutp01e8557e344df2551789723fb48029aa1f~bocxjptl23190531905epoutp01Q for ; Tue, 28 Nov 2023 00:26:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20231128002623epoutp01e8557e344df2551789723fb48029aa1f~bocxjptl23190531905epoutp01Q DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1701131183; bh=EVAydPHb+iuI0oFgKT1lEvM3GpdgPhV7iSj5fS7WTjc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bYewLQmiQNvtpEScwNoYGjvs2UJGAMClVYNuGnx3ytjqKSbHgJlN13tWdQaSguUB0 s7IPU1twvcI+rlTie+jydV1j62HMla1DcCDWCmgOh5EP527BY5U3MDG7PxjmwFmKk8 UFc5vHRRMbE0WUDLZCqz7rhsxJyPGrFphNzDKIeE= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20231128002622epcas2p43775dc1c952c850b7974c430e21b3b43~bocw8NHzj1420714207epcas2p4h; Tue, 28 Nov 2023 00:26:22 +0000 (GMT) Received: from epsmges2p1.samsung.com (unknown [182.195.36.68]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4SfNYB1z9Gz4x9QB; Tue, 28 Nov 2023 00:26:22 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 5A.C2.10006.EA335656; Tue, 28 Nov 2023 09:26:22 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20231128002621epcas2p4379a53cc57d9d26bce92fe0de4722982~bocv8kgXI1420814208epcas2p4r; Tue, 28 Nov 2023 00:26:21 +0000 (GMT) Received: from epsmgmc1p1new.samsung.com (unknown [182.195.42.40]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20231128002621epsmtrp2d2067952c91203253bb2b1f13175bffe~bocv75cfD0710707107epsmtrp2A; Tue, 28 Nov 2023 00:26:21 +0000 (GMT) X-AuditID: b6c32a45-179ff70000002716-02-656533ae0957 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgmc1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id A0.3A.07368.DA335656; Tue, 28 Nov 2023 09:26:21 +0900 (KST) Received: from perf (unknown [10.229.95.91]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20231128002621epsmtip14a29ac44b55d090894695741d02bfa17~bocvtqbao0187501875epsmtip1M; Tue, 28 Nov 2023 00:26:21 +0000 (GMT) Date: Tue, 28 Nov 2023 10:01:25 +0900 From: Youngmin Nam To: Krzysztof Kozlowski Cc: tomasz.figa@gmail.com, krzysztof.kozlowski@linaro.org, s.nawrocki@samsung.com, alim.akhtar@samsung.com, linus.walleij@linaro.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, semen.protsenko@linaro.org Subject: Re: [PATCH v2] pinctrl: samsung: add irq_set_affinity() for non wake up external gpio interrupt Message-ID: MIME-Version: 1.0 In-Reply-To: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprFJsWRmVeSWpSXmKPExsWy7bCmhe4649RUg66fvBYP5m1js9j7eiu7 xZQ/y5ksNj2+xmqxef4fRovLu+awWcw4v4/J4vCbdlaL531A1qpdfxgduDx2zrrL7nHn2h42 j81L6j36tqxi9Pi8SS6ANSrbJiM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ewbytHgdbK5RYijMSDbWYi4oTAQNz9qEtBAAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPLMWRmVeSWpSXmKPExsWy7bCSnO5a49RUg8azqhYP5m1js9j7eiu7 xZQ/y5ksNj2+xmqxef4fRovLu+awWcw4v4/J4vCbdlaL531A1qpdfxgduDx2zrrL7nHn2h42 j81L6j36tqxi9Pi8SS6ANYrLJiU1J7MstUjfLoErY9e5eWwFfwUrftxQamCcwNvFyMkhIWAi 8fzDR5YuRi4OIYHdjBKX3u1mhUjISNxeeRnKFpa433KEFaLoPqPE771TmEASLAKqEkcPT2IG sdkEdCW2nfjHCGKLCFhILN6wEKyBWWA1k8Tmx+/BioQFsiQePjzPBmLzCihL9HfMYAGxhQSO M0oceKoOEReUODnzCVicWUBL4sa/l0DLOIBsaYnl/zhAwpwCdhKv7zUyTmAUmIWkYxaSjlkI HQsYmVcxSqYWFOem5yYbFhjmpZbrFSfmFpfmpesl5+duYgTHgZbGDsZ78//pHWJk4mA8xCjB wawkwqv3MTlViDclsbIqtSg/vqg0J7X4EKM0B4uSOK/hjNkpQgLpiSWp2ampBalFMFkmDk6p Bqbnoe/U/jXE/3p/SrM2duMis8jvV/zYwtrlZySsiwyv2nKy86n2AalFaWLnZ8T3m26RTzj5 2O9oO9Pxr28PZIl7ySikXah48/HRh7NpTFztuacyZl5rDbsz7RrvLdX3f/2jPROZ3J8WBlyR nOYzz2RJoav9j2ls7//4Pnes2qLJ8XLmQfXJHRFT3art3t2rznEPka/8euHhRbbL0759sb4X fXlu5K6gullVh47tmPHTto318FIRMWU9Ta8dZrXT1/ZuWcGjfZvfZe2lWf0CCqu7j/C+/Flj vfQ2O/OP5PY6feM5/CX3t0d52L7mij21ptH2Y7X/uUX35Ixbqq5dk5/VOVk1SWnlbWm+zZvT GncrsRRnJBpqMRcVJwIAkEdKm/ICAAA= X-CMS-MailID: 20231128002621epcas2p4379a53cc57d9d26bce92fe0de4722982 X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----SiQCcQFW9qxZh2i62NcUcvIKWR48NBmCWce5.T0aiy9ACrIF=_24d13_" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20231126091120epcas2p4a1320e3b0f9be8f8a0f575a322981d38 References: <20231126094618.2545116-1-youngmin.nam@samsung.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 27 Nov 2023 16:26:38 -0800 (PST) ------SiQCcQFW9qxZh2i62NcUcvIKWR48NBmCWce5.T0aiy9ACrIF=_24d13_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline On Mon, Nov 27, 2023 at 10:54:56AM +0100, Krzysztof Kozlowski wrote: > On 26/11/2023 10:46, Youngmin Nam wrote: > > To support affinity setting for non wake up external gpio interrupt, > > add irq_set_affinity callback using irq number from pinctrl driver data. > > > > Before this patch, changing the irq affinity of gpio interrupt is not possible: > > > > # cat /proc/irq/418/smp_affinity > > 3ff > > # echo 00f > /proc/irq/418/smp_affinity > > Does this command succeed on your board? > Yes. > > # cat /proc/irq/418/smp_affinity > > 3ff > > # cat /proc/interrupts > > CPU0 CPU1 CPU2 CPU3 ... > > 418: 3631 0 0 0 ... > > > > With this patch applied, it's possible to change irq affinity of gpio interrupt: > > ... > > On which board did you test it? > > I tested on S5E9945 ERD(Exynos Reference Development) board. > > + if (parent) > > + return parent->chip->irq_set_affinity(parent, dest, force); > > + > > I think there is a helper for it: irq_chip_set_affinity_parent(). > > The irq_chip_set_affinity_parent() requires parent_data of irq_data. But when I tested as below, exynos's irqd->parent_data was null. So we should use irqchip's affinity function instead of the helper function. --- a/drivers/pinctrl/samsung/pinctrl-exynos.c +++ b/drivers/pinctrl/samsung/pinctrl-exynos.c @@ -153,14 +153,12 @@ static int exynos_irq_set_type(struct irq_data *irqd, unsigned int type) static int exynos_irq_set_affinity(struct irq_data *irqd, const struct cpumask *dest, bool force) { - struct samsung_pin_bank *bank = irq_data_get_irq_chip_data(irqd); - struct samsung_pinctrl_drv_data *d = bank->drvdata; - struct irq_data *parent = irq_get_irq_data(d->irq); - - if (parent) - return parent->chip->irq_set_affinity(parent, dest, force); + if (!irqd->parent_data) { + pr_err("irqd->parent_data is null!!\n"); + return -EINVAL; + } - return -EINVAL; + return irq_chip_set_affinity_parent(irqd, dest, force); } [ 149.658395] irqd->parent_data is null!! > Best regards, > Krzysztof > > ------SiQCcQFW9qxZh2i62NcUcvIKWR48NBmCWce5.T0aiy9ACrIF=_24d13_ Content-Type: text/plain; charset="utf-8" ------SiQCcQFW9qxZh2i62NcUcvIKWR48NBmCWce5.T0aiy9ACrIF=_24d13_--