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: <CAJZ5v0hX+HyNB5Xqwr6Q44rgAThNLqp5PUQXN-uTC+cDqdjpqA@mail.gmail.com>
Date: Wed, 31 Jul 2024 16:32:10 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Ido Schimmel <idosch@...dia.com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>, Linux PM <linux-pm@...r.kernel.org>, 
	LKML <linux-kernel@...r.kernel.org>, Linux ACPI <linux-acpi@...r.kernel.org>, 
	Daniel Lezcano <daniel.lezcano@...aro.org>, Lukasz Luba <lukasz.luba@....com>, 
	Zhang Rui <rui.zhang@...el.com>, Petr Machata <petrm@...dia.com>, netdev@...r.kernel.org
Subject: Re: [PATCH v1 13/17] mlxsw: core_thermal: Use the .should_bind()
 thermal zone callback

On Wed, Jul 31, 2024 at 3:01 PM Rafael J. Wysocki <rafael@...nel.org> wrote:
>
> On Wed, Jul 31, 2024 at 2:43 PM Ido Schimmel <idosch@...dia.com> wrote:
> >
> > On Tue, Jul 30, 2024 at 08:34:45PM +0200, Rafael J. Wysocki wrote:
> > > From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> > >
> > > Make the mlxsw core_thermal driver use the .should_bind() thermal zone
> > > callback to provide the thermal core with the information on whether or
> > > not to bind the given cooling device to the given trip point in the
> > > given thermal zone.  If it returns 'true', the thermal core will bind
> > > the cooling device to the trip and the corresponding unbinding will be
> > > taken care of automatically by the core on the removal of the involved
> > > thermal zone or cooling device.
> > >
> > > It replaces the .bind() and .unbind() thermal zone callbacks (in 3
> > > places) which assumed the same trip points ordering in the driver
> > > and in the thermal core (that may not be true any more in the
> > > future).  The .bind() callbacks used loops over trip point indices
> > > to call thermal_zone_bind_cooling_device() for the same cdev (once
> > > it had been verified) and all of the trip points, but they passed
> > > different 'upper' and 'lower' values to it for each trip.
> > >
> > > To retain the original functionality, the .should_bind() callbacks
> > > need to use the same 'upper' and 'lower' values that would be used
> > > by the corresponding .bind() callbacks when they are about about to
> >
> > Nit: s/about about/about/
>
> Yes, thanks!
>
> > > return 'true'.  To that end, the 'priv' field of each trip is set
> > > during the thermal zone initialization to point to the corresponding
> > > 'state' object containing the maximum and minimum cooling states of
> > > the cooling device.
> > >
> > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> >
> > Please see more comments below, but this patch is going to conflict with
> > the series at [1] which is currently under review. How do you want to
> > handle that?
> >
> > https://lore.kernel.org/netdev/cover.1722345311.git.petrm@nvidia.com/
>
> I may be missing something, but I don't see conflicts between this
> patch and the series above that would be hard to resolve at merge
> time.
>
> Anyway, I'll try to apply the above series locally and merge it with
> this patch, thanks for the heads up!

So there is only one merge conflict that's straightforward to resolve
(as far as I'm concerned).  My resolution of it is attached, FWIW.

In my view the changes in the series above and this patch are mostly
independent of each other.

Thanks!

View attachment "merge.patch" of type "text/x-patch" (1076 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ