lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 08 Dec 2023 14:55:51 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Max Filippov <jcmvbkbc@...il.com>, linux-kernel@...r.kernel.org
Cc:     Chris Zankel <chris@...kel.net>, Max Filippov <jcmvbkbc@...il.com>
Subject: Re: [PATCH] irqchip/irq-xtensa-pic: clean up

On Tue, Dec 05 2023 at 02:13, Max Filippov wrote:
> - get rid of the cached_irq_mask variable
> - make mask/unmask operations atomic
> - use BIT() macro instead of bit shifts
> - drop .disable and .enable as they are equivalent to the default
>   implementations
>  static void xtensa_irq_mask(struct irq_data *d)
>  {
> -	cached_irq_mask &= ~(1 << d->hwirq);
> -	xtensa_set_sr(cached_irq_mask, intenable);
> -}
> +	unsigned long flags;
> +	u32 irq_mask;
>  
> -static void xtensa_irq_unmask(struct irq_data *d)
> -{
> -	cached_irq_mask |= 1 << d->hwirq;
> -	xtensa_set_sr(cached_irq_mask, intenable);
> +	local_irq_save(flags);

All of these callbacks are invoked with interrupts disabled already. No
point in disabling them some more.

> +	irq_mask = xtensa_get_sr(intenable);
> +	irq_mask &= ~BIT(d->hwirq);
> +	xtensa_set_sr(irq_mask, intenable);
> +	local_irq_restore(flags);
>  }

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ