Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp7259051imm; Tue, 28 Aug 2018 08:55:14 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZAzRYJaYDcnqP/02/aDjSWzYVqLbYImDrdds4yc0jphIdzRGH9wX3MAI4CgeBQDo1tka1N X-Received: by 2002:a17:902:8ec7:: with SMTP id x7-v6mr2171404plo.336.1535471713979; Tue, 28 Aug 2018 08:55:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535471713; cv=none; d=google.com; s=arc-20160816; b=hL2slwaUlINjcl25gYAM5aCURJAuxtQbXSA7espA5fEHeLQ6z41d3WM2Ftkijoc2CM vrMHuFfgGtpdMVm3tvREHpwgkpEdQrYqfnv0yenMXntWoqMR/CC7rsLPq797iEGA3Z5n Ze+49/w8CburGf12hEGEyvrPmpzphTvNo+wnB6M7GgqpSp41bkyfnVlxXb1FWxj7SxXO KMRh2RAXhZQ4m4PDdTsLGdMeT1apUaF8Y9rqiUFLs25UPROBrQjBQZ6rQKk6z+Y6VqwI ofydxgHFcr/CpY/imH7H3KGhu5AA04KRsdMiUQ/xy709wCF74cVpbfUFh2M8bMNBVYH7 bHsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=FMOPBe5pZMFPgag9y3MaF6Ms8/Ky9g3/l8IBFB93s1I=; b=rA9YGPEw/g6eJI9Q6zQ/0c2KWblan5WttKA3Gz4Zxp0GH7J1hijyNy2ve9t4Z9PWeg KWib0dC331eOGqG3EqOnygboph9DTtb6qXNdJ0qeKT0UBMQuKQFRd+g3j9+SeU6AjMY5 cdX4k/ARTh2EdhAUJ+u7e8CzPGJ7CKn+ayLsv75itRZAqkU1Xh56w+XJAhyDFrNelwg9 gg35DPVXxBv6slUrb+WhRJbPZP98MIos9dt+Hhq+7mmhccCY3dIIW+nbEarX2JWISKdo +/1XVJyURwzjMYmMV1PnqJag+6jPUmRvj03+TZbUIbVnahXfBcaoc5YQhN9pigr7Vj1e dv2w== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j125-v6si1297943pfc.243.2018.08.28.08.54.58; Tue, 28 Aug 2018 08:55:13 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728149AbeH1Tpq (ORCPT + 99 others); Tue, 28 Aug 2018 15:45:46 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:41226 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727986AbeH1TpG (ORCPT ); Tue, 28 Aug 2018 15:45:06 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0A1C580D; Tue, 28 Aug 2018 08:52:50 -0700 (PDT) Received: from e112298-lin.Emea.Arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C8EB33F557; Tue, 28 Aug 2018 08:52:47 -0700 (PDT) From: Julien Thierry To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, daniel.thompson@linaro.org, joel@joelfernandes.org, marc.zyngier@arm.com, mark.rutland@arm.com, christoffer.dall@arm.com, james.morse@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, Julien Thierry , Thomas Gleixner , Jason Cooper Subject: [PATCH v5 26/27] irqchip/gic: Add functions to access irq priorities Date: Tue, 28 Aug 2018 16:51:36 +0100 Message-Id: <1535471497-38854-27-git-send-email-julien.thierry@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535471497-38854-1-git-send-email-julien.thierry@arm.com> References: <1535471497-38854-1-git-send-email-julien.thierry@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add accessors to the GIC distributor/redistributors priority registers. Signed-off-by: Julien Thierry Cc: Thomas Gleixner Cc: Jason Cooper Cc: Marc Zyngier --- drivers/irqchip/irq-gic-common.c | 10 ++++++++++ drivers/irqchip/irq-gic-common.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/drivers/irqchip/irq-gic-common.c b/drivers/irqchip/irq-gic-common.c index 01e673c..910746f 100644 --- a/drivers/irqchip/irq-gic-common.c +++ b/drivers/irqchip/irq-gic-common.c @@ -98,6 +98,16 @@ int gic_configure_irq(unsigned int irq, unsigned int type, return ret; } +void gic_set_irq_prio(unsigned int irq, void __iomem *base, u8 prio) +{ + writeb_relaxed(prio, base + GIC_DIST_PRI + irq); +} + +u8 gic_get_irq_prio(unsigned int irq, void __iomem *base) +{ + return readb_relaxed(base + GIC_DIST_PRI + irq); +} + void gic_dist_config(void __iomem *base, int gic_irqs, void (*sync_access)(void)) { diff --git a/drivers/irqchip/irq-gic-common.h b/drivers/irqchip/irq-gic-common.h index 3919cd7..1586dbd 100644 --- a/drivers/irqchip/irq-gic-common.h +++ b/drivers/irqchip/irq-gic-common.h @@ -35,6 +35,8 @@ void gic_dist_config(void __iomem *base, int gic_irqs, void gic_cpu_config(void __iomem *base, void (*sync_access)(void)); void gic_enable_quirks(u32 iidr, const struct gic_quirk *quirks, void *data); +void gic_set_irq_prio(unsigned int irq, void __iomem *base, u8 prio); +u8 gic_get_irq_prio(unsigned int irq, void __iomem *base); void gic_set_kvm_info(const struct gic_kvm_info *info); -- 1.9.1