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: <ZcZSeVjuYuL4mGCT@linux.intel.com>
Date: Fri, 9 Feb 2024 17:27:37 +0100
From: Stanislaw Gruszka <stanislaw.gruszka@...ux.intel.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>,
	Linux PM <linux-pm@...r.kernel.org>,
	Miri Korenblit <miriam.rachel.korenblit@...el.com>,
	Lukasz Luba <lukasz.luba@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
	Zhang Rui <rui.zhang@...el.com>, netdev@...r.kernel.org,
	Ido Schimmel <idosch@...dia.com>, Petr Machata <petrm@...dia.com>,
	linux-wireless@...r.kernel.org, Shawn Guo <shawnguo@...nel.org>,
	Sascha Hauer <s.hauer@...gutronix.de>,
	Pengutronix Kernel Team <kernel@...gutronix.de>,
	Manaf Meethalavalappu Pallikunhi <quic_manafm@...cinc.com>
Subject: Re: [PATCH v1 6/9] iwlwifi: mvm: Set THERMAL_TRIP_WRITABLE_TEMP
 directly

On Fri, Feb 09, 2024 at 05:15:41PM +0100, Rafael J. Wysocki wrote:
> On Fri, Feb 9, 2024 at 3:50 PM Stanislaw Gruszka
> <stanislaw.gruszka@...ux.intel.com> wrote:
> >
> > On Fri, Feb 09, 2024 at 03:10:24PM +0100, Rafael J. Wysocki wrote:
> > > From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> > >
> > > It is now possible to flag trip points with THERMAL_TRIP_WRITABLE_TEMP
> > > to allow their temperature to be set from user space via sysfs instead
> > > of using a nonzero writable trips mask during thermal zone registration,
> > > so make the iwlwifi code do that.
> > >
> > > No intentional functional impact.
> > >
> > > Note that this change is requisite for dropping the mask argument from
> > > thermal_zone_device_register_with_trips() going forward.
> > >
> > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> > > ---
> > >
> > > This patch obviously depends on
> > >
> > > https://patchwork.kernel.org/project/linux-pm/patch/8346768.T7Z3S40VBb@kreacher/
> > >
> > > which has been queued up for 6.9 already.
> > >
> > > ---
> > >  drivers/net/wireless/intel/iwlwifi/mvm/tt.c |    6 ++----
> > >  1 file changed, 2 insertions(+), 4 deletions(-)
> > >
> > > Index: linux-pm/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
> > > ===================================================================
> > > --- linux-pm.orig/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
> > > +++ linux-pm/drivers/net/wireless/intel/iwlwifi/mvm/tt.c
> > > @@ -667,9 +667,6 @@ static  struct thermal_zone_device_ops t
> > >       .set_trip_temp = iwl_mvm_tzone_set_trip_temp,
> > >  };
> > >
> > > -/* make all trips writable */
> > > -#define IWL_WRITABLE_TRIPS_MSK (BIT(IWL_MAX_DTS_TRIPS) - 1)
> > > -
> > >  static void iwl_mvm_thermal_zone_register(struct iwl_mvm *mvm)
> > >  {
> > >       int i, ret;
> > > @@ -692,11 +689,12 @@ static void iwl_mvm_thermal_zone_registe
> > >       for (i = 0 ; i < IWL_MAX_DTS_TRIPS; i++) {
> > >               mvm->tz_device.trips[i].temperature = THERMAL_TEMP_INVALID;
> > >               mvm->tz_device.trips[i].type = THERMAL_TRIP_PASSIVE;
> > > +             mvm->tz_device.trips[i].type = THERMAL_TRIP_WRITABLE_TEMP;
> >
> >                 mvm->tz_device.trips[i].flags = THERMAL_TRIP_WRITABLE_TEMP;
> >
> > Consider using diffrent prefix for constants to diffrenciate flags and types.
> 
> Well, I can use THERMAL_TRIP_FLAG_RW_TEMP or similar, but is it really
> so confusing?

It's not, it was just suggestion, if you don't want to, don't do it.

Regards
Stanislaw

> I'm wondering what others think.
> 
> > >       }
> > >       mvm->tz_device.tzone = thermal_zone_device_register_with_trips(name,
> > >                                                       mvm->tz_device.trips,
> > >                                                       IWL_MAX_DTS_TRIPS,
> > > -                                                     IWL_WRITABLE_TRIPS_MSK,
> > > +                                                     0,
> > >                                                       mvm, &tzone_ops,
> > >                                                       NULL, 0, 0);
> > >       if (IS_ERR(mvm->tz_device.tzone)) {
> > >
> > >
> > >
> >
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ