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: <cbf497a2aa3c1dcb83fde103b231c31b791ccb26.camel@xry111.site>
Date: Wed, 22 Nov 2023 12:02:57 +0800
From: Xi Ruoyao <xry111@...111.site>
To: Andrew Lunn <andrew@...n.ch>, Yanteng Si <siyanteng@...ngson.cn>
Cc: hkallweit1@...il.com, peppe.cavallaro@...com,
 alexandre.torgue@...s.st.com,  joabreu@...opsys.com,
 fancer.lancer@...il.com, Jose.Abreu@...opsys.com,  chenhuacai@...ngson.cn,
 linux@...linux.org.uk, dongbiao@...ngson.cn,  guyinggang@...ngson.cn,
 netdev@...r.kernel.org, loongarch@...ts.linux.dev, 
 chris.chenfeiyang@...il.com
Subject: Re: [PATCH v5 3/9] net: stmmac: Add Loongson DWGMAC definitions

On Wed, 2023-11-22 at 04:39 +0100, Andrew Lunn wrote:
> On Tue, Nov 21, 2023 at 05:55:24PM +0800, Yanteng Si wrote:
> > Hi Andrew,
> > 
> > 在 2023/11/12 04:07, Andrew Lunn 写道:
> > > > +#ifdef	CONFIG_DWMAC_LOONGSON
> > > > +#define DMA_INTR_ABNORMAL	(DMA_INTR_ENA_AIE_LOONGSON | DMA_INTR_ENA_AIE | \
> > > > +				DMA_INTR_ENA_FBE | DMA_INTR_ENA_UNE)
> > > > +#else
> > > >    #define DMA_INTR_ABNORMAL	(DMA_INTR_ENA_AIE | DMA_INTR_ENA_FBE | \
> > > >    				DMA_INTR_ENA_UNE)
> > > > +#endif
> > > The aim is to produce one kernel which runs on all possible
> > > variants. So we don't like to see this sort of #ifdef. Please try to
> > > remove them.
> > 
> > We now run into a tricky problem: we only have a few register
> > definitions(DMA_XXX_LOONGSON)
> > 
> > that are not the same as the dwmac1000 register definition.

You need to determine to use Loongson register or general dwmac1000
register definition at *runtime*, not *compile time*.

Or when people enable CONFIG_DWMAC_LOONGSON (for a release build of
kernel in a mainstream distro the maintainers often enable as many
drivers as possible) they'll suddenly find their dwmac1000's are broken
and we'll get many bug reports.

-- 
Xi Ruoyao <xry111@...111.site>
School of Aerospace Science and Technology, Xidian University

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ