Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4160206rdh; Tue, 28 Nov 2023 13:36:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IGvCi7EQO2xOxBDUDEus3PLWuRF88yLsf0g6khIL5tIAu4g+MmxY7EQEsCownMx5rbu8MdZ X-Received: by 2002:a05:6a20:8e26:b0:18c:abeb:b0db with SMTP id y38-20020a056a208e2600b0018cabebb0dbmr8051592pzj.49.1701207390520; Tue, 28 Nov 2023 13:36:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701207390; cv=none; d=google.com; s=arc-20160816; b=bXdrtewfEkzC8esboJoykDbcUm41OTTNeA81HfZ5yFO+a2maz0i6ZnSZ2wT56YxVhr 5dpVKI3togvUJbyH3Jb4A1CqlQSkB26HfR/tmG6fFYziH065CAu3bCgCCIQKBaYPF6Eo aFgOJeviqF6Jma9pRQ7fhA+nxhRLgZwRRwpKih68r+KX0VSczolb8AxYA4cIf4IcIoDQ dr9LIJRlDi2oohtL6floYja7NfPxeo664/+3oQvxScgrBwOP9C1qX01oPv2gltySoMF7 o6omJq3Dt5fza/55R+cEekVrNmKAGcPJweH7LbN77JbPNK/gVpEDumNWXrjVCG5tgyo4 F1hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=oTVlLTZZmikOeFqoqYLREHBTF55+gG2wuAmC6HPrHN4=; fh=JCPj91or0e68KyPaXw58CL7LjGuLKi5/lyMT+vdBVII=; b=mbvMI16rBUiMhwRwgjVjNS70PRC9+OlseHKYJw3ZOynMPa4NaLLmxKUvYnmMJ/ksld X1TYuccoaVRgxnghTBPCvzN8j8btsngZXeUKtw+cbbg93hvc627+dQ9ptg8NXmuecfBS 3In01moxXD8K972NR0Mc1JQv09DGCZ6fcmxUm2F1C/UO6QrKFmloQ7eIy7BpYn3fz+Ef ACf35dJspoIG0caofz/WlYj+7QPn4tMWAh1muboIGgOKm9XY0C+VMI1Wfr6hwURyLVF2 BBhnrrDi7xrzJ/wAZIipoO+dfnwor0BuuLJ8jPERvkeQnvswt111McCjvZEBggBQeSK8 GyiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kuDwZIAS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id g11-20020a63fa4b000000b005bdbd32d09bsi349767pgk.436.2023.11.28.13.36.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 13:36:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kuDwZIAS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C68C280B045C; Tue, 28 Nov 2023 13:36:26 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345321AbjK1VgL (ORCPT + 99 others); Tue, 28 Nov 2023 16:36:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234863AbjK1VgD (ORCPT ); Tue, 28 Nov 2023 16:36:03 -0500 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E15E2D60 for ; Tue, 28 Nov 2023 13:36:05 -0800 (PST) Received: by mail-pg1-x52e.google.com with SMTP id 41be03b00d2f7-5c60026e8dbso213903a12.0 for ; Tue, 28 Nov 2023 13:36:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701207365; x=1701812165; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=oTVlLTZZmikOeFqoqYLREHBTF55+gG2wuAmC6HPrHN4=; b=kuDwZIASyagCsGZh2bDS2mH2gp0JyH33VXzAd9Rm35vw2Ra5iIGviyl+nJZvg7oHVg kN2ccJKravFu28T/akIlvY2W9+Ag1AETWWBSP6gg3B7HC8JRt4/THHUXANXZJYedS53R cx4MBxmEpR821F4t1/DmZzOyVAYbxxBQvKGwbwPI6B+YJQiShzoffkyHskkRlSSmp5PK alIirvakrTNByJ0sLqMwC5WOq2TmE27QQYpizSznyZ8+CKLvHRzWWoX3msnQWZR02JOZ 0NlA+jrfoCTW6Y3ULy0bxebdmJYzOlxP+cCYWvPiGSUer2QtB9N2vCRqNSp2HvfHg+Gu bkZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701207365; x=1701812165; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oTVlLTZZmikOeFqoqYLREHBTF55+gG2wuAmC6HPrHN4=; b=ejm0LM5NO6PesF5PDmFJ521gKo0mFfL9QFNKfj0oAeGIWOr7ky8/5NqaLcteUJFiSa A2j+/cAICXY3cW+SC/fRoQEahs1cybl3HcnJabmJ0E91xBSFgEJbRiCkc/Ka1FBQ58Ue Xv/YyghmA0MZeI1jdEJNwj56JgvbQ7s5Gd/rQ8FNnHDiU0nA02AXqT1Ie6g6LSfRYH0S 5PqwOwla+7h9pY0sx7Q6uEg5V8ou2fkxKoSoH0vQYZ7YA9eF3lPRE2/cV4XTcamAvsW+ WtvNnmbJf5lW/7OIKkxyC86Vxy3m7Cep6I1psyOPGEnnJEQGVSNJvxZ6piJ9UAceUUws /DLA== X-Gm-Message-State: AOJu0YyRZqp4yLRbLa6928sTHLAHxY4eu8y7pNPL6XHt0aysSkxNBi16 4QFPU/NtC3+hyrDMheLVCzqn666vY0HBpEbQTecWGA== X-Received: by 2002:a17:90b:390d:b0:285:da91:69a2 with SMTP id ob13-20020a17090b390d00b00285da9169a2mr7861663pjb.31.1701207364753; Tue, 28 Nov 2023 13:36:04 -0800 (PST) MIME-Version: 1.0 References: <20231126094618.2545116-1-youngmin.nam@samsung.com> <1fd55b36-0837-4bf7-9fde-e573d6cb214a@linaro.org> In-Reply-To: <1fd55b36-0837-4bf7-9fde-e573d6cb214a@linaro.org> From: Sam Protsenko Date: Tue, 28 Nov 2023 15:35:53 -0600 Message-ID: Subject: Re: [PATCH v2] pinctrl: samsung: add irq_set_affinity() for non wake up external gpio interrupt To: Youngmin Nam Cc: tomasz.figa@gmail.com, 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, Krzysztof Kozlowski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Tue, 28 Nov 2023 13:36:27 -0800 (PST) On Tue, Nov 28, 2023 at 1:29=E2=80=AFAM 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 da= ta. > >>> > >>> 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. > > > >>> # 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 func= tion. > > > > > > Best regards, > Krzysztof >