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: <20240130094804.GD83288@thinkpad>
Date: Tue, 30 Jan 2024 15:18:04 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Manivannan Sadhasivam <mani@...nel.org>,
	Krishna chaitanya chundru <quic_krichai@...cinc.com>,
	Bjorn Andersson <andersson@...nel.org>,
	Konrad Dybcio <konrad.dybcio@...aro.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Lorenzo Pieralisi <lpieralisi@...nel.org>,
	Krzysztof Wilczyński <kw@...ux.com>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Rob Herring <robh+dt@...nel.org>,
	Johan Hovold <johan+linaro@...nel.org>,
	Brian Masney <bmasney@...hat.com>,
	Georgi Djakov <djakov@...nel.org>, linux-arm-msm@...r.kernel.org,
	vireshk@...nel.org, quic_vbadigan@...cinc.com,
	quic_skananth@...cinc.com, quic_nitegupt@...cinc.com,
	linux-pci@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 5/6] arm64: dts: qcom: sm8450: Add opp table support
 to PCIe

On Tue, Jan 30, 2024 at 02:06:19PM +0530, Viresh Kumar wrote:
> On 30-01-24, 12:44, Manivannan Sadhasivam wrote:
> > On Tue, Jan 30, 2024 at 11:41:11AM +0530, Viresh Kumar wrote:
> > > I don't have any issues with a new callback for bw. But, AFAIU, the DT
> > > is required to represent the hardware irrespective of what any OS
> > > would do with it. So DT should ideally have these values here, right ?
> > > 
> > 
> > Not necessarily. Because, right now the bandwidth values of the all peripherals
> > are encoded within the drivers. Only OPP has the requirement to define the
> > values in DT.
> 
> I have a bit different argument here. I am saying that it doesn't
> matter if we have OPP framework or something else using these values.
> The hardware must be represented properly by the DT, so Linux or any
> other firmware/OS can program the device. So DT should have bandwidth
> values anyway. And that's the way we have designed things in Linux
> now.
> 

So you are saying that the ICC core itself should get the bw values from DT
instead of hardcoding in the driver? If so, I'd like to get the opinion from
Georgi/Bjorn.

> > > Also, the driver has already moved away from using those macros now
> > > and depend on the OPP core to do the right thing. It only uses the
> > > macro for the cases where the DT OPP table isn't available. And as
> > > said by few others as well already, the driver really should try to
> > > add OPPs dynamically in that case to avoid multiple code paths and
> > > stick to a single OPP based solution.
> > > 
> > 
> > Still I prefer to use OPP for bandwidth control because both the voltage and
> > bandwidth values need to be updated at the same time. My only point here is, if
> > OPP exposes a callback for bw, then we can keep the DT behavior consistent.
> 
> Feels like we are going a bit backward on this. The current view, as
> per me, is that driver shouldn't need to micromanage all these
> configurations and the OPP core should be able to handle them. That's
> why we want to handle all configurations from there.
> 
> This also means that the DT needs to contain all this information and
> drivers shouldn't use special math functions to calculate these
> values. Drivers need to move away from them, instead of getting more
> of those.
> 
> I don't see how a callback would be helpful here, if the driver relies
> on DT values only. Or am I confusing things here ??
> 

No, there is no confusion here, but a difference in perspective. Let's get the
thoughts of Georgi/Bjorn on this. I just want to avoid the confusion in DT since
some peripherals with OPP support will have bw defined in DT, while rest of the
peripherals will have them in drivers.

- Mani

> -- 
> viresh

-- 
மணிவண்ணன் சதாசிவம்

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ