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: <34652b37-9e71-8f23-bd0b-12b6a8faa81b@roeck-us.net>
Date:   Mon, 24 Jul 2023 10:53:05 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Thomas Gleixner <tglx@...utronix.de>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     x86@...nel.org, Tom Lendacky <thomas.lendacky@....com>,
        Andrew Cooper <andrew.cooper3@...rix.com>,
        Arjan van de Ven <arjan@...ux.intel.com>,
        linux-hwmon@...r.kernel.org, Jean Delvare <jdelvare@...e.com>,
        Huang Rui <ray.huang@....com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        Dick Kennedy <dick.kennedy@...adcom.com>,
        James Smart <james.smart@...adcom.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org, Steve Wahl <steve.wahl@....com>,
        Mike Travis <mike.travis@....com>,
        Dimitri Sivanich <dimitri.sivanich@....com>,
        Russ Anderson <russ.anderson@....com>
Subject: Re: [patch 05/29] hwmon: (fam15h_power) Use topology_core_id()

On 7/24/23 10:43, Thomas Gleixner wrote:
> Use the provided topology helper function instead of fiddling in cpu_data.
> 
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: linux-hwmon@...r.kernel.org
> Cc: Jean Delvare <jdelvare@...e.com>
> Cc: Huang Rui <ray.huang@....com>
> Cc: Guenter Roeck <linux@...ck-us.net>

Assuming this will be applied as part of the series:

Acked-by: Guenter Roeck <linux@...ck-us.net>

Please let me know if you want me to apply the patch through
the hardware monitoring branch.

Thanks,
Guenter

> ---
>   drivers/hwmon/fam15h_power.c |    7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
> 
> --- a/drivers/hwmon/fam15h_power.c
> +++ b/drivers/hwmon/fam15h_power.c
> @@ -17,6 +17,7 @@
>   #include <linux/cpumask.h>
>   #include <linux/time.h>
>   #include <linux/sched.h>
> +#include <linux/topology.h>
>   #include <asm/processor.h>
>   #include <asm/msr.h>
>   
> @@ -134,15 +135,13 @@ static DEVICE_ATTR_RO(power1_crit);
>   static void do_read_registers_on_cu(void *_data)
>   {
>   	struct fam15h_power_data *data = _data;
> -	int cpu, cu;
> -
> -	cpu = smp_processor_id();
> +	int cu;
>   
>   	/*
>   	 * With the new x86 topology modelling, cpu core id actually
>   	 * is compute unit id.
>   	 */
> -	cu = cpu_data(cpu).cpu_core_id;
> +	cu = topology_core_id(smp_processor_id());
>   
>   	rdmsrl_safe(MSR_F15H_CU_PWR_ACCUMULATOR, &data->cu_acc_power[cu]);
>   	rdmsrl_safe(MSR_F15H_PTSC, &data->cpu_sw_pwr_ptsc[cu]);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ