Skip to content

Conversation

kartben
Copy link
Contributor

@kartben kartben commented Jun 7, 2025

The IRER registers are write-only and clear the enable bit for the provided interrupt. Use a direct write instead of a read/modify/write sequence to avoid generating a bogus read access and improve performance

image

The IRER registers are write-only and clear the enable bit for the
provided interrupt. Use a direct write instead of a read/modify/write
sequence to avoid generating a bogus read access and improve performance

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
@kartben kartben marked this pull request as ready for review June 7, 2025 19:46
@github-actions github-actions bot added platform: WinChipHead WCH size: XS A PR changing only a single line of code area: Interrupt Controller labels Jun 7, 2025
nzmichaelh
nzmichaelh previously approved these changes Jun 9, 2025
void arch_irq_disable(unsigned int irq)
{
PFIC->IRER[irq / 32] |= 1 << (irq % 32);
PFIC->IRER[irq / 32] = 1 << (irq % 32);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! While you're here, could you also change this to BIT(irq % 32)

Updated intc_wch_pfic driver to use BIT() macro for clarity.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Copy link

sonarqubecloud bot commented Jun 9, 2025

@kartben kartben merged commit aa83869 into zephyrproject-rtos:main Jun 11, 2025
26 checks passed
@kartben kartben deleted the wch_intc branch June 11, 2025 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Interrupt Controller platform: WinChipHead WCH size: XS A PR changing only a single line of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants