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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 26 Apr 2017 11:10:09 +0800
From:   Hanjun Guo <hanjun.guo@...aro.org>
To:     Majun <majun258@...wei.com>, linux-kernel@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, marc.zyngier@....com,
        tglx@...utronix.de, dingtianhong@...wei.com, guohanjun@...wei.com
Subject: Re: [PATCH] irqchip/mbigen: Fix the clear register offset

Hi Majun,

On 2017/4/25 10:16, Majun wrote:
> From: MaJun <majun258@...wei.com>
>
> Don't minus reserved interrupts (64) when get the clear register offset,because
> the clear register space includes the space of these 64 interrupts.

Could you mention the background that there is a timeout mechanism
to clear the register in the mbigen to make the code work even we clear
the wrong (and noneffective) register? that will help for review I
think.

>
> Signed-off-by: MaJun <majun258@...wei.com>
> ---
>  drivers/irqchip/irq-mbigen.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-mbigen.c b/drivers/irqchip/irq-mbigen.c
> index 061cdb8..75818a5 100644
> --- a/drivers/irqchip/irq-mbigen.c
> +++ b/drivers/irqchip/irq-mbigen.c
> @@ -108,7 +108,6 @@ static inline void get_mbigen_clear_reg(irq_hw_number_t hwirq,
>  {
>  	unsigned int ofst;
>
> -	hwirq -= RESERVED_IRQ_PER_MBIGEN_CHIP;
>  	ofst = hwirq / 32 * 4;
>
>  	*mask = 1 << (hwirq % 32);

How about following to save more lines of code:

--- a/drivers/irqchip/irq-mbigen.c
+++ b/drivers/irqchip/irq-mbigen.c
@@ -106,10 +106,7 @@ static inline void 
get_mbigen_type_reg(irq_hw_number_t hwirq,
  static inline void get_mbigen_clear_reg(irq_hw_number_t hwirq,
                                         u32 *mask, u32 *addr)
  {
-       unsigned int ofst;
-
-       hwirq -= RESERVED_IRQ_PER_MBIGEN_CHIP;
-       ofst = hwirq / 32 * 4;
+       unsigned int ofst = hwirq / 32 * 4;

         *mask = 1 << (hwirq % 32);
         *addr = ofst + REG_MBIGEN_CLEAR_OFFSET;

Thanks
Hanjun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ