Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3982847imu; Mon, 12 Nov 2018 03:59:33 -0800 (PST) X-Google-Smtp-Source: AJdET5cBOvVfSRC4Bgj7GVnIxC/RjB/ukszH5/VBbaiNf2i3ZxWrUEepFm5aCRiKxgjPgKG3pd6H X-Received: by 2002:a62:b615:: with SMTP id j21-v6mr603451pff.199.1542023973498; Mon, 12 Nov 2018 03:59:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542023973; cv=none; d=google.com; s=arc-20160816; b=Rd+5GAccODH0X2+UDsY/nzOiGmKq2dxsUXLehUEbai7x/3JLu9jwMjTrYOlyMtM9T4 iDSwrS+s0sfU0X8RXnjhVAT5yY9etLqjjZUh7AOCr/dLJOZVgT50QKFrIpqLbF2cWyXO qcYAmxfIjhYSyE9MQIsvtNMnK1k1hmfTOZg1cb+ZWgngExfkDjbdDAKysVebDujRI/2E q1AWt2soBL5hteY+NrKwTZUweiUbBkB63L4sRy8nkBqdjMGSs2SrroqjlEetZl5zibqz k+ZuF00njsyl+tU2mac0+hsWGUrrafzCTTlWxY8ReE1bKnzv4N5ZelsUGC1akAUJm0jc wOCg== 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; bh=FMOPBe5pZMFPgag9y3MaF6Ms8/Ky9g3/l8IBFB93s1I=; b=BYlpn0V9BtKSb2+rOBj+tVy3gluLXF9UFxdTmPsfnF+ObHN4i64HeALkkB8FHUxraU 4hOA99sL3gEtZ3fPDS/eFfgJT+fKAVuQ6H6OcXalo2GkPgwYbToSNK8DnqJqzOPyP+nI Sw/H4lQFpiJvQXY/Xqnkd0qP02rSOUhgITrzcKgQG03Ft3tNHvvt/X2PhEDHYe3Y05/5 w4hI+R2lAiD6CCzLxwis4L+uuBMZAN45Km05pDO9iRXIikRIjnwMLNm+FdJFyWoR5v4j xgdQ/YqQw/XmGAluovYrV3TVhy9FKbTXCBeU+5cF5axDwy3Y6dBwotHV+kjcdkO0MMpo skQw== 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 y10-v6si17388863plt.145.2018.11.12.03.59.18; Mon, 12 Nov 2018 03:59:33 -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; 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 S1730042AbeKLVvH (ORCPT + 99 others); Mon, 12 Nov 2018 16:51:07 -0500 Received: from foss.arm.com ([217.140.101.70]:34762 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729293AbeKLVvG (ORCPT ); Mon, 12 Nov 2018 16:51:06 -0500 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 47BD31650; Mon, 12 Nov 2018 03:58:09 -0800 (PST) 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 34A083F5A0; Mon, 12 Nov 2018 03:58:07 -0800 (PST) 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, christoffer.dall@arm.com, james.morse@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, Julien Thierry , Thomas Gleixner , Jason Cooper Subject: [PATCH v6 19/24] irqchip/gic: Add functions to access irq priorities Date: Mon, 12 Nov 2018 11:57:10 +0000 Message-Id: <1542023835-21446-20-git-send-email-julien.thierry@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1542023835-21446-1-git-send-email-julien.thierry@arm.com> References: <1542023835-21446-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