From patchwork Wed Feb 6 15:15:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 157643 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp6527227jaa; Wed, 6 Feb 2019 07:15:39 -0800 (PST) X-Google-Smtp-Source: AHgI3IZUefkp/Up7N1HXMPXbGYIDrUwmhexXwSslEr3ijznB9tbtzvJ/4yJes2PZW1+vcNR6a1Rk X-Received: by 2002:a65:520a:: with SMTP id o10mr10361509pgp.276.1549466139182; Wed, 06 Feb 2019 07:15:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549466139; cv=none; d=google.com; s=arc-20160816; b=tgmQGVGyp4yj2LcD0npTJ38sASRzVfkxJdsE30qaUEiEYuaZsI+SdaWNkULgn3dxcd 6c6zLE4rDBpEbU3F3poiACfzl+T5f+8RGLrH+SLVkmeq2jRcAEHbkMK+Ga+mTq+OM66U 1je67XAMjj0wmNp68NYkGt2iKhm1byD0ir1c0Dl4GhyWZjPJ77dPw3TBMdHqQ/jNQMW6 5BsbriB4uEvrb3CBOBqr6kuF/NNIvbKzlMxY9oXQXa6zGyvW6K+Xf+fO/jtFEZ/PQtoy iY6Ebb7YHs5fbQqXBKbNEhXmT6yceOtahxoALOuqHuIqczJjICOxiDAV/ZW1IlI1DjLy bd8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=7i5TG/t7krTxrSFOOeDg/EJWJxJIJAdFcbbzBw6va+M=; b=jiVKmPMpRLgi9+XgNO9Jd4xV9xAkjS13wGyFjgnmirJ8I9RzIryMgu+d99fDbD/9cE DT+cM/rqp0C+ixVksskRV64aT62CzrSbrCEBZ3JTjlKZHbSPQYSKJ2AYHePL4D9OknGB Y+9oq4oafsJ1Es0NRmxzCzsXeg4fpXY4qVM/rYMR22Y76Zc+WqqSxosue3itxy7G4DL/ vDSxz/vMSY+3zFrHhv4FId/6eIGQ2fsdQ42dLCLzKUi0VPz0F61VnimbUu5b7GYR2aHm XEIFbOnnTN9SdPzSZKKSSrgsBFK7CU7WhUqy5KIUGvpXSzptNCB6qF3YDD5cAa2waBYw If7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UTtXupSo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k2si6133303pgh.63.2019.02.06.07.15.38; Wed, 06 Feb 2019 07:15:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UTtXupSo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1731309AbfBFPPh (ORCPT + 31 others); Wed, 6 Feb 2019 10:15:37 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:44536 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731295AbfBFPPe (ORCPT ); Wed, 6 Feb 2019 10:15:34 -0500 Received: by mail-lf1-f65.google.com with SMTP id z13so5573495lfe.11 for ; Wed, 06 Feb 2019 07:15:32 -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:mime-version :content-transfer-encoding; bh=7i5TG/t7krTxrSFOOeDg/EJWJxJIJAdFcbbzBw6va+M=; b=UTtXupSolKIqRi6KFTrnqF2LTxc12e+dmHp5xHjFkhA4EKj3tdzCsLrDvRk8q5NKHd bzwmtEcFMFpWHweaurAnmTSLQmiraKMOuhnw6Gy/7dYK1hB93NeMUIfTeIyleWJDpWN9 bX4zCBz9I8O95xC3m/1F9pzSD13Nbyp+ZEptaL76vZ3BaDYvwyffVE11bPEOIdH9IKo2 7A1P43iAuB+UNmZROLvzEzLgnFx69Erd91KW21TvwzTTiWS39TzfIQDesSEdUd0UCq0y kXMiT4tFGNZ/NaJMvMGZjOhp2S7oBO98IfZd3iOW0lCzHVz0lCENDK60znEOhz9hU1Dr t+ww== 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:mime-version :content-transfer-encoding; bh=7i5TG/t7krTxrSFOOeDg/EJWJxJIJAdFcbbzBw6va+M=; b=AHKzX0Hv6mIwCzIkcwXYxkOGQjwtjY9UQxYP0Jsqzk6mv9bCmZjRXp7rnBA90GkdH9 oCWL2bdHop4pOR4PC14fHdrhZZPlCNBvuzYekkVvV9XnMYph1bOPi8F/XBjDlOBJpH+3 gI1q1YbYrHcbQc9ZKU6v4WwlTEnjBIVOKntecSbzYhXofS8BhOoOqdOU8Tn94qekAT+t Pco6dxDF9WtO0aFrMbZdXIpQ0C14jBWOR8uOz7tXFbWcJ9vHaC0mI5AvqynpFeXCdvPy lk0LswGwnkwaK5sM05luxBXZW/MzAZZak+5Z8JYai5W7zBi4GQEaCb0O9/oaROh+IVqB 671w== X-Gm-Message-State: AHQUAuaV7pz/xTeRVhq7d0LxsRdUqSVEFAHLibkSU1KhpI6mSb32gf9X jt0xgglHyqNVZ4UnzjFTerY48Q== X-Received: by 2002:ac2:520f:: with SMTP id a15mr921769lfl.110.1549466131488; Wed, 06 Feb 2019 07:15:31 -0800 (PST) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id e14-v6sm3793499ljl.43.2019.02.06.07.15.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Feb 2019 07:15:29 -0800 (PST) From: Linus Walleij To: Thomas Gleixner , Marc Zyngier , Jason Cooper Cc: linux-kernel@vger.kernel.org, Linus Walleij , Brian Masney Subject: [PATCH] genirq: introduce irq_chip_mask_ack_parent() Date: Wed, 6 Feb 2019 16:15:21 +0100 Message-Id: <20190206151521.6574-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The hierarchical irqchip never before ran into a situation where the parent is not "simple", i.e. does not implement .irq_ack() and .irq_mask() like most, but the qcom-pm8xxx.c happens to implement only .irq_mask_ack(). Since we want to make ssbi-gpio a hierarchical child of this irqchip, it must *also* only implement .irq_mask_ack() and call down to the parent, and for this we of course need irq_chip_mask_ack_parent(). Cc: Brian Masney Cc: Marc Zyngier Cc: Thomas Gleixner Signed-off-by: Linus Walleij --- Marc/Tglx: can you please ACK this so that I can include it when fixing up the SSBI GPIO hierarchy. Brian: please add this to your patch series so you can fix up the hierarchy on the SSBI GPIO (will send patch). --- include/linux/irq.h | 1 + kernel/irq/chip.c | 11 +++++++++++ 2 files changed, 12 insertions(+) -- 2.20.1 Acked-by: Marc Zyngier diff --git a/include/linux/irq.h b/include/linux/irq.h index def2b2aac8b1..9a1a67d2e07d 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -605,6 +605,7 @@ extern void irq_chip_disable_parent(struct irq_data *data); extern void irq_chip_ack_parent(struct irq_data *data); extern int irq_chip_retrigger_hierarchy(struct irq_data *data); extern void irq_chip_mask_parent(struct irq_data *data); +extern void irq_chip_mask_ack_parent(struct irq_data *data); extern void irq_chip_unmask_parent(struct irq_data *data); extern void irq_chip_eoi_parent(struct irq_data *data); extern int irq_chip_set_affinity_parent(struct irq_data *data, diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 4a30beb7ac2d..aeacd58ed7fb 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -1279,6 +1279,17 @@ void irq_chip_mask_parent(struct irq_data *data) } EXPORT_SYMBOL_GPL(irq_chip_mask_parent); +/** + * irq_chip_mask_ack_parent - Mask and acknowledge the parent interrupt + * @data: Pointer to interrupt specific data + */ +void irq_chip_mask_ack_parent(struct irq_data *data) +{ + data = data->parent_data; + data->chip->irq_mask_ack(data); +} +EXPORT_SYMBOL_GPL(irq_chip_mask_ack_parent); + /** * irq_chip_unmask_parent - Unmask the parent interrupt * @data: Pointer to interrupt specific data