From patchwork Wed Nov 11 14:06:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 322928 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp420547ils; Wed, 11 Nov 2020 06:10:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9qZy+1JQCNGXkiDPeoi4wH0c1wdF1D8xNL840rE8Xa1bJn9C+5DwPHyB9wMde6ImwIfce X-Received: by 2002:a05:6402:1115:: with SMTP id u21mr5133999edv.148.1605103839281; Wed, 11 Nov 2020 06:10:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605103839; cv=none; d=google.com; s=arc-20160816; b=cz9ypCL+Me0Rr7aJq5P9la/c1OPBU4fb4f0Ypg8AryJE2otmxGHeSQ+4COD+ylqdhe qJfzoW6EfiRd2r06GdSMmEv5bNaudapxwHo9tDHn/XIoEfhZTriFnFNjT+/8NGJZVT33 O5sPS+fCGyuHCxhNRgOW6kXWUYsia76L79ws4gqdev/SrgoDP/zptGf8Nqm3qZCvS8Qc 3RfZu9CMekH72blc7SCRtDnpRtBiFaCD+6KGiksHdJQa/qjCLLxNFUKy7XftgoDq0qnQ uCeDKkkpYvYhcJxaPfiMe5PVLi5+TQ8/NU0GZ7oTo5fNK++k2aS1OK6DqXzmW4F135+G SO4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iI8bwpzFdeqCWrAP5di3B5BnMpGL0V/sXol352J96LQ=; b=h4bHP3bIGRVU40jYHZnqpvXoQNNlQTqyIrIEcXo2x2ATqWzQ6ArtsuBG15Ty3U1RDX F+nXlP6sKOmZ1UmgD7vGuqduFp8PEbQi6ZrkfH6UPqI9s7Gen7p5cR8J5yFGgo5JyV2a ecAzp3kdEl1rqq+2c/wbkIY4LMR5BljIP94Nydu0lwyCYl9MEV/4eKZw3obMJBropHbn VmCqb1F7rHxnnQDx3PUL1MCUQ3CDbwsBRvzc7uu1seKEDhjtBI5oAnRIo8UYCKGf5uQF syLNXMq9l9Yj6d7TPRAGlXn/fMSnR6tm1KU3pkPpCJpPC5AD5gK96AJ29gKtcJJbMt4x Rerg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XZfJNMHG; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o11si1579895edz.483.2020.11.11.06.10.39; Wed, 11 Nov 2020 06:10:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XZfJNMHG; spf=pass (google.com: domain of linux-gpio-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-gpio-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726807AbgKKOJ6 (ORCPT + 4 others); 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-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 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(+) -- 2.26.2 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;