32 bits ought not be enough for anybody.
Signed-off-by: Antonios Motakis <antonios.motakis@huawei.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
#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;
return 0;
}
-int phys_processor_id(void)
+unsigned long phys_processor_id(void)
{
return apic_ops.read_id();
}
{
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;
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)
#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, ...);
#include <asm/processor.h>
-int phys_processor_id(void);
+unsigned long phys_processor_id(void);
#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);
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)