From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6617EC55ABD for ; Wed, 11 Nov 2020 14:10:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E8C472074B for ; Wed, 11 Nov 2020 14:10:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XZfJNMHG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726807AbgKKOJ6 (ORCPT ); Wed, 11 Nov 2020 09:09:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726149AbgKKOJZ (ORCPT ); Wed, 11 Nov 2020 09:09:25 -0500 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4CC0C0613D1 for ; Wed, 11 Nov 2020 06:09:24 -0800 (PST) Received: by mail-lj1-x243.google.com with SMTP id o24so2228217ljj.6 for ; Wed, 11 Nov 2020 06:09:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iI8bwpzFdeqCWrAP5di3B5BnMpGL0V/sXol352J96LQ=; b=XZfJNMHGOS81Kx1vLVlNszA5M5RBAHIcReAg44YuXb+qoGnPphM+3mwpkRenHQsw0c HQyn/6zfC1plygZ5XriWNV2ZFT84qAlQtdgwVtQ/UjYfDd9uYKYDJs9T+3CdEyq2ozWH r9pG4EpT+MOzi2CeKUYzy0jF/xe/39dauPECX+tMleXaEBNgzkD28P47kH3aWSFcoIFM TRLifNT81SspoG14pOnobbao+4kwsm3p1MLu44vOxZ8QsvGw5Ef5NZ8iS/YuRxY3qOAr bubPbCIcM9Rz/ohrXVZMLnkTeDL5B1AIMRb1WiqMtF9GSJHJesd8cNupgkWEln8Putee hQOg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=iI8bwpzFdeqCWrAP5di3B5BnMpGL0V/sXol352J96LQ=; b=IAXjUR4JaITqGEjYfX1Lgq1KjGP37joFAvwjr1kUjz+4fmSfQ6mcUjJILClQGn64wH 8K5zITzyPai5KDu+qNql9u4TSCJ9paTpXDNO5BdE4h6hcpXSq7bT9A3HfqvUjmAuQEjV 2zylXtw0wC4CWwXqiKs2ANz9kpTm5/QZzzIu0j4+wYjHoZk0dEICq9CHA7ri1R7anhgi SeR0wzZCUYJ8hdcv5p66NNZAhyBxTg+N+VbPfFHNMxq95i1LKs3WHlh9HCvueEfA4DJN TNkYGOYdJzXEcJpNp6NHTsQ/24gZFRsQYQNLv1bByQkqswnjwHlqxy0TPWQtVB9YRrtZ 4kKA== X-Gm-Message-State: AOAM530n60BI6mx6yu1AcHYqvxBWETOH5SRe16TWr7lsgp7FOmOFgFc3 5sjhQJlKykdbulh3VE9A7dqysA1jsu6CRX3H X-Google-Smtp-Source: ABdhPJw2T21sifqMhsPOJeTf+J2yEINCcTkoaWL5CPJwyhEM83+VTgxj9zbgV9MY7/93ZncmxQ4etg== X-Received: by 2002:a2e:b5a8:: with SMTP id f8mr1248842ljn.174.1605103762981; Wed, 11 Nov 2020 06:09:22 -0800 (PST) Received: from localhost.localdomain (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id w10sm245437ljo.130.2020.11.11.06.09.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Nov 2020 06:09:22 -0800 (PST) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski , Linus Walleij , Thierry Reding , Vidya Sagar , Marc Zyngier Subject: [PATCH 2/2] RFT: gpio: tegra186: Set affinity callback to parent Date: Wed, 11 Nov 2020 15:06:28 +0100 Message-Id: <20201111140628.24067-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201111140628.24067-1-linus.walleij@linaro.org> References: <20201111140628.24067-1-linus.walleij@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org This assigns the .irq_set_affinity to the parent callback. I assume the Tegra186 is an SMP system so this would be beneficial. I used the pattern making the hirerarchy tolerant for missing parent as in Marc's earlier patch. Cc: Thierry Reding Cc: Vidya Sagar Suggested-by: Marc Zyngier Signed-off-by: Linus Walleij --- drivers/gpio/gpio-tegra186.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c index 9500074b1f1b..5060e81f5f49 100644 --- a/drivers/gpio/gpio-tegra186.c +++ b/drivers/gpio/gpio-tegra186.c @@ -444,6 +444,16 @@ static int tegra186_irq_set_wake(struct irq_data *data, unsigned int on) return 0; } +static int tegra186_irq_set_affinity(struct irq_data *data, + const struct cpumask *dest, + bool force) +{ + if (data->parent_data) + return irq_chip_set_affinity_parent(data, dest, force); + + return 0; +} + static void tegra186_gpio_irq(struct irq_desc *desc) { struct tegra_gpio *gpio = irq_desc_get_handler_data(desc); @@ -690,6 +700,7 @@ static int tegra186_gpio_probe(struct platform_device *pdev) gpio->intc.irq_unmask = tegra186_irq_unmask; gpio->intc.irq_set_type = tegra186_irq_set_type; gpio->intc.irq_set_wake = tegra186_irq_set_wake; + gpio->intc.irq_set_affinity = tegra186_irq_set_affinity; irq = &gpio->gpio.irq; irq->chip = &gpio->intc; -- 2.26.2