Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4377025rdh; Tue, 28 Nov 2023 22:32:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmgA4vFNL4f/6CKRbw0+7ayDzq71QGxW4dNe6VG8zBEi7iWoxAxeEjG5qW9ZFG4m8OAdz1 X-Received: by 2002:a05:6a20:3d85:b0:18b:af9d:438f with SMTP id s5-20020a056a203d8500b0018baf9d438fmr19602743pzi.49.1701239577604; Tue, 28 Nov 2023 22:32:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701239577; cv=none; d=google.com; s=arc-20160816; b=dY0GOa2F3sIeBjAaDnWe5FDj2S2LXr/Po0I1WmDjhSl/ZzE1uTHajm6RMbw1dtszDO ZETL2jwwZTETXUVqglm1FafEcVADlFHmBECbzHiOOjoZQCDXJdoOPu9AeI3OdqNMqR0M HU6AQ9f+HP2PKFCqvl35HTh3s/AAEYvj4JdahrYZMby+8yYvM3o86c3HTNVnXKoQSQx/ TlorrnQOhhA7YzP1uSKJFB38+zK13474ib5lYsymyePguSHYiYWRdKWipDRZ0J2kKZ7e 3nWqWzyZ07RZrA16SX9m9+05pHb8h1IZYJeg806/h13ZDNhhEHxw3sB5tArNXxLdlXYk 0LbA== 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=jbXIcm4Zl3g3KDRXg/oE73AVX6okTU2GFFeps8n2Aqo=; fh=/3gjuN7Pq1knTEHRPZGcPnZRb8BPnv3HdTPYhTeUYWw=; b=XB/2Ov1kwemgwA1n4Wd3DLhMzF3P2Vify8tkSlqqyFa7ytUHGogOFtLqLBnyf/H3mz KyAQ6vJvD1IA4hqj+3Pu+VMs93b1dUe+NPA3rbXDURCw7heYkiWxt8PxxCnfoybPjGck yRRiSsjZhKGJ8kvg8n/5tCjSaotkhL2ktzNdkYh15vye8SiRRoAeWuUSq3YL9/Fylbsa FEcQMw/a0r2U3G/BwPUmj9M2H32ZoElUUOaeFy5g7uxXWSR4OwNwnZHGnvYvSpZUbb3r XMeKUmwlK3y2cnwJQp/sgQL9t/erFsfAhtrV2V61z72ShwZ4CJdWAg+h2xiT9dx3Ajmr 54KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=IqcFh7lP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id d16-20020a17090ad99000b002851418f33esi683978pjv.163.2023.11.28.22.32.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 22:32:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=IqcFh7lP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 8DB64804EE52; Tue, 28 Nov 2023 22:32:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230314AbjK2Gch (ORCPT + 99 others); Wed, 29 Nov 2023 01:32:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229563AbjK2Gcf (ORCPT ); Wed, 29 Nov 2023 01:32:35 -0500 Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 176C5170B for ; Tue, 28 Nov 2023 22:32:39 -0800 (PST) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20231129063237epoutp030ff361cfc6f153b75938241edd1b27e4~cBF0rfSBr1354813548epoutp03V for ; Wed, 29 Nov 2023 06:32:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20231129063237epoutp030ff361cfc6f153b75938241edd1b27e4~cBF0rfSBr1354813548epoutp03V DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1701239557; bh=jbXIcm4Zl3g3KDRXg/oE73AVX6okTU2GFFeps8n2Aqo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=IqcFh7lPDZZmlADH9LDBeIrQRCAtaB1vcFY8qlfS66i+sSCSJ9F+0bZgz8oDQtSkT imOuGSmo3+O8KhQ95pDMTu0nK/VDr6R6u4lNuzjGfdPmziQND3xBvRqike7Ur8YyUz o53DfWSzr5YPjWjojIWbbE0Wgfx1gDQrP2gV4osQ= Received: from epsnrtp4.localdomain (unknown [182.195.42.165]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20231129063236epcas2p380a6b2e72371b96509168282bf744f2d~cBF0PMlIY1714217142epcas2p35; Wed, 29 Nov 2023 06:32:36 +0000 (GMT) Received: from epsmgec2p1-new.samsung.com (unknown [182.195.36.98]) by epsnrtp4.localdomain (Postfix) with ESMTP id 4Sg8dJ3K86z4x9Pv; Wed, 29 Nov 2023 06:32:36 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmgec2p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id 9E.67.18994.40BD6656; Wed, 29 Nov 2023 15:32:36 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20231129063235epcas2p32dfa05b1c137c8bb40cef1090c8fb855~cBFzIkjO71714217142epcas2p30; Wed, 29 Nov 2023 06:32:35 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20231129063235epsmtrp28cdb35ff8ec7cbf9a67dfda5e6c3ef3c~cBFzHvaL42573425734epsmtrp2l; Wed, 29 Nov 2023 06:32:35 +0000 (GMT) X-AuditID: b6c32a4d-9f7ff70000004a32-64-6566db04fe97 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id F0.47.08755.30BD6656; Wed, 29 Nov 2023 15:32:35 +0900 (KST) Received: from perf (unknown [10.229.95.91]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20231129063235epsmtip11c7f7982909a860d1365499c9c6f6ba3~cBFy8o8RE2155121551epsmtip1t; Wed, 29 Nov 2023 06:32:35 +0000 (GMT) Date: Wed, 29 Nov 2023 16:07:40 +0900 From: Youngmin Nam To: Sam Protsenko 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 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+NgFlrBJsWRmVeSWpSXmKPExsWy7bCmuS7L7bRUg5e/xCwezNvGZrH39VZ2 iyl/ljNZbHp8jdVi8/w/jBaXd81hs5hxfh+TxeE37awWz/uArFW7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J2cih1JSizFGYmGWsxFxYkAjP15HAsDAAA= X-CMS-MailID: 20231129063235epcas2p32dfa05b1c137c8bb40cef1090c8fb855 X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----OVq5TT9zsDSQAN86dWjJc6zPY8CEKIwxCZDtRM.ioT5ZEg4T=_35b7f_" 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> <1fd55b36-0837-4bf7-9fde-e573d6cb214a@linaro.org> 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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 28 Nov 2023 22:32:54 -0800 (PST) ------OVq5TT9zsDSQAN86dWjJc6zPY8CEKIwxCZDtRM.ioT5ZEg4T=_35b7f_ Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Disposition: inline On Tue, Nov 28, 2023 at 03:35:53PM -0600, Sam Protsenko wrote: > On Tue, Nov 28, 2023 at 1:29 AM Krzysztof Kozlowski > wrote: > > > > On 28/11/2023 02:01, Youngmin Nam wrote: > > > 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. > > > > Hm, fails all the time one mine. > > > > I tried to test this patch on E850-96, and an attempt to write into > smp_affinity (for some GPIO irq) also fails for me: > > # echo f0 > smp_affinity > -bash: echo: write error: Input/output error > > When I add some pr_err() to exynos_irq_set_affinity(), I can't see > those printed in dmesg. So I guess exynos_irq_set_affinity() doesn't > get called at all. So the error probably happens before > .irq_set_affinity callback gets called. > > Youngmin, can you please try and test this patch on E850-96? This > board is already supported in upstream kernel. For example you can use > "Volume Up" interrupt for the test, which is GPIO irq. > I intened this affinity setting would work only on *Non* Wakeup External Interrupt. The "Volume Up" on E850-96 board is connected with "gpa0-7" and that is Wakeup External interrupt so that we can't test the callback. I couldn't find out a pin for the test on E850-96 board yet. We can test if there is a usage of *Non" Wake up External Interrupt of GPIO on E850-96 board. Do you have any idea ? Thanks > > > > > >>> # 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. > > > > There is no such board upstream. How can we reproduce this issue? I am > > afraid we cannot test neither the bug nor the fix. > > > > > > > >>> + 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. > > > > Hm, so now I wonder why do we not have parent_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. > > > > > > > > > > > Best regards, > > Krzysztof > > > ------OVq5TT9zsDSQAN86dWjJc6zPY8CEKIwxCZDtRM.ioT5ZEg4T=_35b7f_ Content-Type: text/plain; charset="utf-8" ------OVq5TT9zsDSQAN86dWjJc6zPY8CEKIwxCZDtRM.ioT5ZEg4T=_35b7f_--