From: Antonios Motakis <[email protected]>

32 bits ought not be enough for anybody.

Signed-off-by: Antonios Motakis <[email protected]>
---
 hypervisor/arch/arm/lib.c                | 4 ++--
 hypervisor/arch/x86/apic.c               | 4 ++--
 hypervisor/arch/x86/control.c            | 2 +-
 hypervisor/include/jailhouse/printk.h    | 2 +-
 hypervisor/include/jailhouse/processor.h | 2 +-
 hypervisor/printk.c                      | 4 ++--
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/hypervisor/arch/arm/lib.c b/hypervisor/arch/arm/lib.c
index c96d18b..cf81117 100644
--- a/hypervisor/arch/arm/lib.c
+++ b/hypervisor/arch/arm/lib.c
@@ -15,9 +15,9 @@
 #include <jailhouse/types.h>
 #include <asm/sysregs.h>
 
-int phys_processor_id(void)
+unsigned long phys_processor_id(void)
 {
-       u32 mpidr;
+       unsigned long mpidr;
 
        arm_read_sysreg(MPIDR_EL1, mpidr);
        return mpidr & MPIDR_CPUID_MASK;
diff --git a/hypervisor/arch/x86/apic.c b/hypervisor/arch/x86/apic.c
index d3b4211..233927b 100644
--- a/hypervisor/arch/x86/apic.c
+++ b/hypervisor/arch/x86/apic.c
@@ -112,7 +112,7 @@ static u32 apic_ext_features(void)
                return 0;
 }
 
-int phys_processor_id(void)
+unsigned long phys_processor_id(void)
 {
        return apic_ops.read_id();
 }
@@ -121,7 +121,7 @@ int apic_cpu_init(struct per_cpu *cpu_data)
 {
        unsigned int xlc = MAX((apic_ext_features() >> 16) & 0xff,
                               APIC_REG_XLVT3 - APIC_REG_XLVT0 + 1);
-       unsigned int apic_id = phys_processor_id();
+       unsigned int apic_id = (unsigned int) phys_processor_id();
        unsigned int cpu_id = cpu_data->cpu_id;
        unsigned int n;
        u32 ldr;
diff --git a/hypervisor/arch/x86/control.c b/hypervisor/arch/x86/control.c
index fc8c5b8..c583649 100644
--- a/hypervisor/arch/x86/control.c
+++ b/hypervisor/arch/x86/control.c
@@ -300,7 +300,7 @@ x86_exception_handler(struct exception_frame *frame)
                     frame->vector);
        if (frame->error != -1)
                panic_printk("Error code: %x\n", frame->error);
-       panic_printk("Physical CPU ID: %d\n", phys_processor_id());
+       panic_printk("Physical CPU ID: %lu\n", phys_processor_id());
        panic_printk("RIP: %p RSP: %p FLAGS: %x\n", frame->rip, frame->rsp,
                     frame->flags);
        if (frame->vector == PF_VECTOR)
diff --git a/hypervisor/include/jailhouse/printk.h 
b/hypervisor/include/jailhouse/printk.h
index 891cd1b..c226352 100644
--- a/hypervisor/include/jailhouse/printk.h
+++ b/hypervisor/include/jailhouse/printk.h
@@ -13,7 +13,7 @@
 #include <jailhouse/types.h>
 
 extern volatile unsigned long panic_in_progress;
-extern unsigned int panic_cpu;
+extern unsigned long panic_cpu;
 
 void printk(const char *fmt, ...);
 
diff --git a/hypervisor/include/jailhouse/processor.h 
b/hypervisor/include/jailhouse/processor.h
index fd910f5..4b0d64c 100644
--- a/hypervisor/include/jailhouse/processor.h
+++ b/hypervisor/include/jailhouse/processor.h
@@ -12,4 +12,4 @@
 
 #include <asm/processor.h>
 
-int phys_processor_id(void);
+unsigned long phys_processor_id(void);
diff --git a/hypervisor/printk.c b/hypervisor/printk.c
index faa1326..8d17a9f 100644
--- a/hypervisor/printk.c
+++ b/hypervisor/printk.c
@@ -18,7 +18,7 @@
 #include <asm/spinlock.h>
 
 volatile unsigned long panic_in_progress;
-unsigned int panic_cpu = -1;
+unsigned long panic_cpu = -1;
 
 static DEFINE_SPINLOCK(printk_lock);
 
@@ -40,7 +40,7 @@ void printk(const char *fmt, ...)
 
 void panic_printk(const char *fmt, ...)
 {
-       unsigned int cpu_id = phys_processor_id();
+       unsigned long cpu_id = phys_processor_id();
        va_list ap;
 
        if (test_and_set_bit(0, &panic_in_progress) && panic_cpu != cpu_id)
-- 
2.8.0.rc3


-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to