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]
Date: Tue, 25 Jun 2024 11:43:06 +0530
From: "Nysal Jan K.A." <nysal@...ux.ibm.com>
To: Shrikanth Hegde <sshegde@...ux.ibm.com>
Cc: Tyrel Datwyler <tyreld@...ux.ibm.com>, Michal Suchanek <msuchanek@...e.de>,
        Nicholas Piggin <npiggin@...il.com>,
        Christophe Leroy <christophe.leroy@...roup.eu>,
        "Naveen N. Rao" <naveen.n.rao@...ux.ibm.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Laurent Dufour <ldufour@...ux.ibm.com>, linuxppc-dev@...ts.ozlabs.org,
        linux-kernel@...r.kernel.org, Michael Ellerman <mpe@...erman.id.au>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH 2/2] powerpc/topology: Check if a core is online

On Tue, Jun 25, 2024 at 12:36:33AM GMT, Shrikanth Hegde wrote:
> > --- a/arch/powerpc/include/asm/topology.h
> > +++ b/arch/powerpc/include/asm/topology.h
> > @@ -145,6 +145,7 @@ static inline int cpu_to_coregroup_id(int cpu)
> >  
> >  #ifdef CONFIG_HOTPLUG_SMT
> >  #include <linux/cpu_smt.h>
> > +#include <linux/cpumask.h>
> 
> Is this header file needed? 
> I don't see any reference to cpumask related code. 
> 

cpu_online() is defined in that header.

> >  #include <asm/cputhreads.h>
> >  
> >  static inline bool topology_is_primary_thread(unsigned int cpu)
> > @@ -156,6 +157,18 @@ static inline bool topology_smt_thread_allowed(unsigned int cpu)
> >  {
> >  	return cpu_thread_in_core(cpu) < cpu_smt_num_threads;
> >  }
> > +
> 
> This is defined only if CONFIG_HOTPLUG_SMT is true. But this could be 
> generic function which might be used to check if a core is offline in other cases. 
> Would that make sense to keep it out of CONFIG_HOTPLUG_SMT ?
> 

I'm not opposed to the idea, it would also be easy to do that later if there is
another consumer of this function.

Regards
--Nysal


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ