Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp191892imm; Mon, 21 May 2018 04:37:02 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoZUvED1OraiejkUGQo6SRhOj73lHepJKbB/eIPfrq4VqU4lp+yaBfoPExuK3s6C6KfuSfZ X-Received: by 2002:a62:2197:: with SMTP id o23-v6mr19830640pfj.202.1526902622003; Mon, 21 May 2018 04:37:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526902621; cv=none; d=google.com; s=arc-20160816; b=R0iexabCMvxktri3bKHlcbKWnXI02CuzI40Noc9nrd51ZLp/8HXtFm2XLzK5ulRciQ e4whO389gFKfr89o0heubUvgspwdt55ZTKs15H8d9rjmCvB8+GQzMsF5OHJ62HGF/rJ8 2yQjHdgtsqxV7GFJWs0HNZzh/bCUzgcd2herQ/yqb2+Gk8NZtalo1ht2ps9MUvBW6JLS g81UYgz7Gt7BNbQBIzXXLlVa3UWO1uWAzEp5qxU0k//9f48CS1OB3S/3d2xCxshAYjpJ rb/yJaQ6qbOFgjGruCbZsPqqs45q2FvPxDgXOu9msawRLg0wsSx08lljHx/vw3RWThBR u5Tw== 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=N9uHuvkd+KjFr3CCfBDB1v7i0mowdinqLTXfH2zvH1g=; b=XpfgXHI6r7Cy1e3rizlxHENWbSQXVGELDX7v9yyuIPtiQaon5Rpz5dZoBqTJTxJHR8 1ww7+fbm+oJ8hwZhtTrzGGZLjjQqlG08JlqZ3xx2dIGuA3nSNoe8kivlBMZTIA/CrY3M Bw6pLQHumcgeEPMVHKU0WqwUELyG9ompSS5wG9cW+EXDvgWBTSuh3DsbkEw7xX6eVRaQ VT5F2kaCjbcVDCHyti0QkcgHka3xcp/7PBOQx/bXuSiT9O0vp4TskPjyU5TVZtjjhl2n kQosSEVwaVHe916yKWOLa57Y2jGkvqDFcjW0gzy9loFqMszj7nVUwAtzXlofsOBNDJ2u cFTw== 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 r76-v6si13672248pfb.65.2018.05.21.04.36.47; Mon, 21 May 2018 04:37:01 -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 S1752906AbeEULfz (ORCPT + 99 others); Mon, 21 May 2018 07:35:55 -0400 Received: from foss.arm.com ([217.140.101.70]:47600 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752851AbeEULfr (ORCPT ); Mon, 21 May 2018 07:35:47 -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 55D0B168F; Mon, 21 May 2018 04:35:47 -0700 (PDT) Received: from e112298-lin.cambridge.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 F30F83F25D; Mon, 21 May 2018 04:35:44 -0700 (PDT) From: Julien Thierry To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, marc.zyngier@arm.com, mark.rutland@arm.com, christoffer.dall@arm.com, james.morse@arm.com, joelaf@google.com, joel.opensrc@gmail.com, daniel.thompson@linaro.org, catalin.marinas@arm.com, will.deacon@arm.com, Julien Thierry , Thomas Gleixner , Jason Cooper Subject: [PATCH v3 4/6] irqchip/gic: Add functions to access irq priorities Date: Mon, 21 May 2018 12:35:13 +0100 Message-Id: <1526902515-13769-5-git-send-email-julien.thierry@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1526902515-13769-1-git-send-email-julien.thierry@arm.com> References: <1526902515-13769-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 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