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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ed8l7byy.ffs@tglx>
Date: Tue, 25 Jun 2024 08:50:13 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Yazen Ghannam <yazen.ghannam@....com>, linux-edac@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, tony.luck@...el.com, x86@...nel.org,
 avadhut.naik@....com, john.allen@....com, Yazen Ghannam
 <yazen.ghannam@....com>
Subject: Re: [PATCH v2 1/5] x86/topology: Export helper to get CPU number
 from APIC ID

On Mon, Jun 24 2024 at 16:20, Yazen Ghannam wrote:

> The need to look up a CPU number from an APIC ID is done in at least one
> other place outside of APIC/topology code:
> apei_smca_report_x86_error().

The need .... is done?

>  #ifdef CONFIG_X86_LOCAL_APIC
>  int topology_get_logical_id(u32 apicid, enum x86_topology_domains at_level);
> +int topology_get_cpunr(u32 apic_id);
>  #else
>  static inline int topology_get_logical_id(u32 apicid, enum x86_topology_domains at_level)
>  {
>  	return 0;
>  }
> +
> +static inline int topology_get_cpunr(u32 apic_id)
> +{
> +	return -ENODEV;

Why ENODEV and not 0?

> +}
>  #endif

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ