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: <66353d60.050a0220.df862.761f@mx.google.com>
Date: Fri, 3 May 2024 21:39:11 +0200
From: Christian Marangi <ansuelsmth@...il.com>
To: Florian Fainelli <florian.fainelli@...adcom.com>
Cc: Hauke Mehrtens <hauke@...ke-m.de>,
	Rafał Miłecki <zajec5@...il.com>,
	Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Broadcom internal kernel review list <bcm-kernel-feedback-list@...adcom.com>,
	Álvaro Fernández Rojas <noltari@...il.com>,
	linux-mips@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Daniel González Cabanelas <dgcbueu@...il.com>
Subject: Re: [PATCH 6/6] bmips: dma: drop redundant boot_cpu_type in
 arch_dma_sync

On Fri, May 03, 2024 at 12:07:45PM -0700, Florian Fainelli wrote:
> On 5/3/24 06:54, Christian Marangi wrote:
> > Drop redundant boot_cpu_type in arch_sync_dma_for_cpu_all. These needs
> > to be parsed only once and we can make use of bmips_rac_flush_disable to
> > disable RAC flush on unsupported CPU.
> > 
> > Set this value in bmips_cpu_setup for unsupported CPU to skip this
> > redundant check every time DMA needs to be synced.
> > 
> > Signed-off-by: Christian Marangi <ansuelsmth@...il.com>
> 
> You are taking a shortcut that is reasonable in premise, but keying off the
> bmips_rac_flush_disable is IMHO misleading. The RAC is enabled in the
> BMIPS5000 and BMIPS5200 cores, just it does not need SW management unlike
> earlier cores.
> 
> If you renamed it to bmips_rac_flush_needed that might be more compelling.
> Also, the other reason is that on a kernel that was configured for
> supporting only BMIPS5000 and BMIPS5200 CPUs, I think we could get some
> decent dead code elimination of the boot_cpu_type() check, which would not
> be the case.

I was a bit confused by the last part, should I drop this or just rename
the variable? Cause I think for kernel that support ONLY those CPU I
guess the DMA function will be optimized anyway since the bool will
always be false I guess?

-- 
	Ansuel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ