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] [day] [month] [year] [list]
Message-ID: <d7eufnszflhujjyx2opw52qsi2tmr4euivxhpttoxhsgzg4f6v@jch7fy4ca4ao>
Date: Tue, 3 Sep 2024 17:23:35 +0200
From: Markus Schneider-Pargmann <msp@...libre.com>
To: Nishanth Menon <nm@...com>
Cc: Nathan Chancellor <nathan@...nel.org>, Tero Kristo <kristo@...nel.org>, 
	Santosh Shilimkar <ssantosh@...nel.org>, Vibhore Vardhan <vibhore@...com>, 
	Kevin Hilman <khilman@...libre.com>, Dhruva Gole <d-gole@...com>, 
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v11 4/4] firmware: ti_sci: add CPU latency constraint
 management

Hi,

On Tue, Sep 03, 2024 at 07:45:40AM GMT, Nishanth Menon wrote:
> On 17:54-20240902, Nathan Chancellor wrote:
> [...]
> 
> > > @@ -3669,7 +3671,27 @@ static int ti_sci_prepare_system_suspend(struct ti_sci_info *info)
> > >  static int __maybe_unused ti_sci_suspend(struct device *dev)
> > >  {
> > >  	struct ti_sci_info *info = dev_get_drvdata(dev);
> > > -	int ret;
> > > +	struct device *cpu_dev, *cpu_dev_max = NULL;
> > > +	s32 val, cpu_lat = 0;
> > > +	int i, ret;
> > > +
> > > +	if (info->fw_caps & MSG_FLAG_CAPS_LPM_DM_MANAGED) {
> > > +		for_each_possible_cpu(i) {
> > > +			cpu_dev = get_cpu_device(i);
> > > +			val = dev_pm_qos_read_value(cpu_dev, DEV_PM_QOS_RESUME_LATENCY);
> > 
> > This change is now in -next as commit 458d22d2e064 ("firmware: ti_sci:
> > add CPU latency constraint management"), where it breaks the build
> > when this driver is built as a module because dev_pm_qos_read_value() is
> > not exported to modules:
> > 
> >   ERROR: modpost: "dev_pm_qos_read_value" [drivers/firmware/ti_sci.ko] undefined!
> > 
> > Obviously exporting it would fix the build but sometimes that is
> > controversial, hence just the report.
> 
> Thank you for the report. I will drop the series from my queue for now.
> That should give us some time to sort things out properly for the next
> window.

Thanks as well for reporting. I looked into this issue and it looks like
many of the dev_pm_qos_* functions are already exported.
Documentation/power/pm_qos_interface.rst also already lists the function
for kernel-internal use along with many others. So I think adding the
export is the right way and I prepared a patch for that.

Also from what I saw and tested, I was only able to reproduce this issue
with ARCH_KEYSTONE when the TI_SCI_PROTOCOL is selected as module.
multi_v7_defconfig and keystone_defconfig both select it as built-in as
well as ARCH_K3. For all other architectures, TI_SCI_PROTOCOL can not be
selected as it depends on TI_MESSAGE_MANAGER which depends on KEYSTONE
or K3.

Best
Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ