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]
Message-ID: <Y+/OJzzdkqbd6LEC@smile.fi.intel.com>
Date:   Fri, 17 Feb 2023 20:57:43 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     William Breathitt Gray <william.gray@...aro.org>
Cc:     linus.walleij@...aro.org, brgl@...ev.pl, broonie@...nel.org,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/6] regmap-irq: Add no_status support

On Wed, Feb 08, 2023 at 12:18:16PM -0500, William Breathitt Gray wrote:
> Some devices lack status registers, yet expect to handle interrupts.
> Introduce a no_status flag to indicate such a configuration, where
> rather than read a status register to verify, all interrupts received
> are assumed to be active.

...

> +		/* no status register so default to all active */
> +		memset(data->status_buf, 0xFF,
> +		       chip->num_regs * sizeof(*data->status_buf));

memset32()? As we know the sizeof()...

...

> +			/* no status register so default to all active */
> +			d->status_buf[i] = -1;

-1 for unsigned?!
Can we simply use GENMASK() just plain value?

...

>   * @status_invert: Inverted status register: cleared bits are active interrupts.
> + * @no_status: No status register: all interrupts assumed generated by device.
>   * @runtime_pm:  Hold a runtime PM lock on the device when accessing it.
>   *
>   * @num_regs:    Number of registers in each control bank.
> @@ -1630,6 +1631,7 @@ struct regmap_irq_chip {
>  	unsigned int clear_on_unmask:1;
>  	unsigned int not_fixed_stride:1;
>  	unsigned int status_invert:1;
> +	unsigned int no_status:1;
>  
>  	int num_regs;

Seems a bit unordered, I have just sent a patch to fix ordering of the couple
of fields and their respective kernel doc.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ