Skip to contentSkip to conversation

xen: random: Add missing include xen/cache.h

PATCH In review Julien Grall 2 participants 2 messages Jan 29, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: random: Add missing include xen/cache.h

The commit f6c9698 " x86: allow reading MSR_IA32_TSC with XENPF_resource_op" introduced a built regression on ARM platform.

random.c:8:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘boot_random’

 unsigned int __read_mostly boot_random;
                            ^

The define __read_mostly is defined in asm/cache.h which is included by other headers on x86 but not on ARM. Include xen/cache.h to fix the build.

Cc Chao Peng <[email protected]>
Cc Ian Jackson <[email protected]>
Cc Jan Beulich <[email protected]>
Cc Keir Fraser <[email protected]>
---
 xen/common/random.c | 1 +
 1 file changed, 1 insertion(+)
xen/common/random.c +1 -0
index cb9187c..fb805b0 100644
@@ -1,3 +1,4 @@
+#include <xen/cache.h>
 #include <xen/init.h>
 #include <xen/percpu.h>
 #include <xen/random.h>
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Julien Grall

The commit f6c9698 " x86: allow reading MSR_IA32_TSC with XENPF_resource_op" introduced a built regression on ARM platform.

random.c:8:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘boot_random’

 unsigned int __read_mostly boot_random;
                            ^

The define __read_mostly is defined in asm/cache.h which is included by other headers on x86 but not on ARM. Include xen/cache.h to fix the build.

Quoted 5 lines
Cc Chao Peng <[email protected]>
Cc Ian Jackson <[email protected]>
Cc Jan Beulich <[email protected]>
Cc Keir Fraser <[email protected]>

xen/common/random.c line 4

Quoted 13 lines
---
 xen/common/random.c | 1 +
 1 file changed, 1 insertion(+)
xen/common/random.c +1 -0
index cb9187c..fb805b0 100644
@@ -1,3 +1,4 @@
+#include <xen/cache.h>
 #include <xen/init.h>
 #include <xen/percpu.h>
 #include <xen/random.h>

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel