|
@@ -97,11 +97,27 @@ static void flat_send_IPI_all(int vector)
|
|
__send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL);
|
|
__send_IPI_shortcut(APIC_DEST_ALLINC, vector, APIC_DEST_LOGICAL);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+static unsigned int get_apic_id(unsigned long x)
|
|
|
|
+{
|
|
|
|
+ unsigned int id;
|
|
|
|
+
|
|
|
|
+ id = (((x)>>24) & 0xFFu);
|
|
|
|
+ return id;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+static unsigned long set_apic_id(unsigned int id)
|
|
|
|
+{
|
|
|
|
+ unsigned long x;
|
|
|
|
+
|
|
|
|
+ x = ((id & 0xFFu)<<24);
|
|
|
|
+ return x;
|
|
|
|
+}
|
|
|
|
+
|
|
static unsigned int read_xapic_id(void)
|
|
static unsigned int read_xapic_id(void)
|
|
{
|
|
{
|
|
unsigned int id;
|
|
unsigned int id;
|
|
|
|
|
|
- id = GET_APIC_ID(apic_read(APIC_ID));
|
|
|
|
|
|
+ id = get_apic_id(apic_read(APIC_ID));
|
|
return id;
|
|
return id;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -134,7 +150,9 @@ struct genapic apic_flat = {
|
|
.send_IPI_self = apic_send_IPI_self,
|
|
.send_IPI_self = apic_send_IPI_self,
|
|
.cpu_mask_to_apicid = flat_cpu_mask_to_apicid,
|
|
.cpu_mask_to_apicid = flat_cpu_mask_to_apicid,
|
|
.phys_pkg_id = phys_pkg_id,
|
|
.phys_pkg_id = phys_pkg_id,
|
|
- .read_apic_id = read_xapic_id,
|
|
|
|
|
|
+ .get_apic_id = get_apic_id,
|
|
|
|
+ .set_apic_id = set_apic_id,
|
|
|
|
+ .apic_id_mask = (0xFFu<<24),
|
|
};
|
|
};
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -200,5 +218,7 @@ struct genapic apic_physflat = {
|
|
.send_IPI_self = apic_send_IPI_self,
|
|
.send_IPI_self = apic_send_IPI_self,
|
|
.cpu_mask_to_apicid = physflat_cpu_mask_to_apicid,
|
|
.cpu_mask_to_apicid = physflat_cpu_mask_to_apicid,
|
|
.phys_pkg_id = phys_pkg_id,
|
|
.phys_pkg_id = phys_pkg_id,
|
|
- .read_apic_id = read_xapic_id,
|
|
|
|
|
|
+ .get_apic_id = get_apic_id,
|
|
|
|
+ .set_apic_id = set_apic_id,
|
|
|
|
+ .apic_id_mask = (0xFFu<<24),
|
|
};
|
|
};
|