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: <4fae1a96-ac19-46b8-8eff-2a38d28414fc@lunn.ch>
Date: Thu, 24 Apr 2025 18:34:29 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Ivan Vecera <ivecera@...hat.com>
Cc: netdev@...r.kernel.org, Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
	Arkadiusz Kubalewski <arkadiusz.kubalewski@...el.com>,
	Jiri Pirko <jiri@...nulli.us>, Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Prathosh Satish <Prathosh.Satish@...rochip.com>,
	Lee Jones <lee@...nel.org>, Kees Cook <kees@...nel.org>,
	Andy Shevchenko <andy@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Michal Schmidt <mschmidt@...hat.com>, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Re: [PATCH net-next v4 3/8] mfd: Add Microchip ZL3073x support

> +++ b/drivers/mfd/zl3073x-regs.h
> @@ -0,0 +1,74 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +
> +#ifndef __ZL3073X_REGS_H
> +#define __ZL3073X_REGS_H
> +
> +#include <linux/bitfield.h>
> +#include <linux/bits.h>
> +
> +/*
> + * Register address structure:
> + * ===========================
> + *  25        19 18   16 15     7 6           0
> + * +-------------------------------------------+
> + * | max_offset | width |  page  | page_offset |
> + * +-------------------------------------------+
> + *
> + * page_offset ... <0x00..0x7F>
> + * page .......... HW page number
> + * size .......... register byte size (1, 2, 4 or 6)
> + * max_offset .... maximal offset for indexed registers
> + *                 (for non-indexed regs max_offset == page_offset)
> + */

Something i missed earlier. This does not really describe
hardware. The upper half is meta data about the register, which you
encode into the register number.

How many other Linux drivers do you know about which does this?

Also width vs size.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ