xen: Use __has_include() in xen/percpu.h

Only x86 has an asm/percpu.h.  Have the compiler only include it if it's
present, rather than symlinking an empty file.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
This commit is contained in:
Andrew Cooper committed 2026-09-11 18:24:25 +01:00
1 parent 221f87ad39
commit 6bdb8d45b7
5 files changed
+3 -18

No files matched your search

-1
View File
@@ -5,7 +5,6 @@ generic-y += hardirq.h
generic-y += iocap.h
generic-y += irq-dt.h
generic-y += paging.h
generic-y += percpu.h
generic-y += random.h
generic-y += softirq.h
generic-y += vm_event.h
-1
View File
@@ -6,7 +6,6 @@ generic-y += hardirq.h
generic-y += hypercall.h
generic-y += iocap.h
generic-y += paging.h
generic-y += percpu.h
generic-y += perfc_defn.h
generic-y += random.h
generic-y += softirq.h
-1
View File
@@ -6,7 +6,6 @@ generic-y += hardirq.h
generic-y += hypercall.h
generic-y += iocap.h
generic-y += irq-dt.h
generic-y += percpu.h
generic-y += random.h
generic-y += softirq.h
generic-y += vm_event.h
-14
View File
@@ -1,14 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __ASM_GENERIC_PERCPU_H__
#define __ASM_GENERIC_PERCPU_H__
#endif /* __ASM_GENERIC_PERCPU_H__ */
/*
* Local variables:
* mode: C
* c-file-style: "BSD"
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*/
+3 -1
View File
@@ -27,7 +27,9 @@
#define get_per_cpu_var(var) (per_cpu__##var)
#include <asm/percpu.h>
#if __has_include(<asm/percpu.h>)
# include <asm/percpu.h>
#endif
#ifndef __ASSEMBLER__
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.