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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2288a9a9-f9d0-4414-80a2-e11ba66fad50@lunn.ch>
Date: Fri, 25 Oct 2024 15:22:00 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Meghana Malladi <m-malladi@...com>
Cc: vigneshr@...com, horms@...nel.org, jan.kiszka@...mens.com,
	diogo.ivo@...mens.com, pabeni@...hat.com, kuba@...nel.org,
	edumazet@...gle.com, davem@...emloft.net, andrew+netdev@...n.ch,
	linux-kernel@...r.kernel.org, vadim.fedorenko@...ux.dev,
	netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	srk@...com, Roger Quadros <rogerq@...nel.org>, danishanwar@...com
Subject: Re: [PATCH net v2] net: ti: icssg-prueth: Fix 1 PPS sync

On Fri, Oct 25, 2024 at 11:17:44AM +0530, Meghana Malladi wrote:
> 
> 
> On 25/10/24 01:25, Andrew Lunn wrote:
> > > +static inline u64 icssg_readq(const void __iomem *addr)
> > > +{
> > > +	return readl(addr) + ((u64)readl(addr + 4) << 32);
> > > +}
> > > +
> > > +static inline void icssg_writeq(u64 val, void __iomem *addr)
> > > +{
> > > +	writel(lower_32_bits(val), addr);
> > > +	writel(upper_32_bits(val), addr + 4);
> > > +}
> > 
> > Could readq() and writeq() be used, rather than your own helpers?
> > 
> > 	Andrew
> > 
> The addresses we are trying to read here are not 64-bit aligned, hence using
> our own helpers to read the 64-bit value.

Ah, you should document this, because somebody might do a drive by
patch converting this to readq()/write(q).

Alternatively, i think hi_lo_writeq() would work.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ