From: Mark Rutland <mark.rutland@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: alexandru.elisei@arm.com, catalin.marinas@arm.com,
maz@kernel.org, will@kernel.org
Subject: Re: [PATCH 2/4] irqchip/gic-v3: make distributor priorities variables
Date: Mon, 17 Jun 2024 11:39:48 +0100 [thread overview]
Message-ID: <ZnASdAeJzEHumPq4@J2N7QTR9R3> (raw)
In-Reply-To: <20240529172116.1313498-3-mark.rutland@arm.com>
On Wed, May 29, 2024 at 06:21:14PM +0100, Mark Rutland wrote:
> In subsequent patches the GICv3 driver will choose the regular interrupt
> priority at boot time.
>
> In preparation for using dynamic priorities, place the priorities in
> variables and update the code to pass these as parameters. Users of
> GICD_INT_DEF_PRI_X4 are modified to replicate the priority byte using
> REPEAT_BYTE().
>
> There should be no functional change as a result of this patch.
[...]
> - writel_relaxed(GICD_INT_DEF_PRI_X4, base + GIC_DIST_PRI + i);
> + writel_relaxed((u32)REPEAT_BYTE(priority),
> + base + GIC_DIST_PRI + i);
Sparse is unhappy that this throws away the upper 32 bits, and begins
producing warnings of the form:
cast truncates bits from constant value (a0a0a0a0a0a0a0a0 becomes a0a0a0a0)
I can fix this with:
writel_relaxed(lower_32_bits(REPEAT_BYTE(priority)),
base + GIC_DIST_PRI + i);
... but that gets a bit verbose, so I'm going to add a
REPEAT_BYTE_U32() to <linux/wordpart.h> and use that here and
elsewhere.
Mark.
next prev parent reply other threads:[~2024-06-17 10:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 17:21 [PATCH 0/4] irqchip/gic-v3: use compiletime constant PMR values Mark Rutland
2024-05-29 17:21 ` [PATCH 1/4] irqchip/gic-common: remove sync_access callback Mark Rutland
2024-05-29 17:21 ` [PATCH 2/4] irqchip/gic-v3: make distributor priorities variables Mark Rutland
2024-06-17 10:39 ` Mark Rutland [this message]
2024-05-29 17:21 ` [PATCH 3/4] irqchip/gic-v3: detect GICD_CTRL.DS and SCR_EL3.FIQ earlier Mark Rutland
2024-05-29 17:21 ` [PATCH 4/4] irqchip/gic-v3: select priorities at boot time Mark Rutland
2024-06-12 18:17 ` [PATCH 0/4] irqchip/gic-v3: use compiletime constant PMR values Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZnASdAeJzEHumPq4@J2N7QTR9R3 \
--to=mark.rutland@arm.com \
--cc=alexandru.elisei@arm.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox