Thread (106 messages) flat view 106 messages, 16 authors, 2015-03-10

[PATCH v9 14/21] ACPI / processor: Make it possible to get CPU hardware ID via GICC

From: rafael@kernel.org (Rafael J. Wysocki)
Date: 2015-03-05 13:14:02
Also in: linux-acpi, lkml

On Thu, Mar 5, 2015 at 12:27 PM, Catalin Marinas
[off-list ref] wrote:
On Thu, Mar 05, 2015 at 04:03:21PM +0800, Hanjun Guo wrote:
quoted
On 2015/3/5 6:46, Rafael J. Wysocki wrote:
quoted
IMO, you really need to define phys_cpuid_t in a common place or people will
forget that it may be 64-bit, because they'll only be looking at their arch.
Since x86 and ARM64 are using different types for phys_cpuid_t, we need to
introduce something like following if define it in common place:

in linux/acpi.h,

#if defined(CONFIG_X86) || defined(CONFIG_IA64)
typedef u32 phys_cpuid_t;
#define PHYS_CPUID_INVALID (phys_cpuid_t)(-1)
#else if defined(CONFIG_ARM64)
typedef u64 phys_cpuid_t;
#define PHYS_CPUID_INVALID INVALID_HWID
#endif

I think it's awful, did I miss something?
Well, you can define the type and PHYS_CPUID_INVALID in the arch
code and then do this in a common header:

#ifndef PHYS_CPUID_INVALID
typedef u32 phys_cpuid_t;
#define PHYS_CPUID_INVALID (phys_cpuid_t)(-1)
#endif

That would allow you to avoid the need to duplicate the
definitions where it is not necessary.
I also think that's awful. I'm rather in favour of a per-arch
phys_cpuid_t.
OK, so what about the above?

Rafael
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help