Changed ICI data argument types from uint32 to addr_t.
Since ICI arguments are used to send addresses in some places, uint32 is not sufficient on x86_64. addr_t still refers to the same type as uint32 (unsigned long) on other platforms, so this change only really affects x86_64.
This commit is contained in:
parent
ced5037133
commit
11d3892d28
@ -34,7 +34,7 @@ enum {
|
||||
|
||||
typedef uint32 cpu_mask_t;
|
||||
|
||||
typedef void (*smp_call_func)(uint32 data1, int32 currentCPU, uint32 data2, uint32 data3);
|
||||
typedef void (*smp_call_func)(addr_t data1, int32 currentCPU, addr_t data2, addr_t data3);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -49,14 +49,14 @@ status_t smp_init_post_generic_syscalls(void);
|
||||
bool smp_trap_non_boot_cpus(int32 cpu, uint32* rendezVous);
|
||||
void smp_wake_up_non_boot_cpus(void);
|
||||
void smp_cpu_rendezvous(volatile uint32 *var, int current_cpu);
|
||||
void smp_send_ici(int32 targetCPU, int32 message, uint32 data, uint32 data2, uint32 data3,
|
||||
void smp_send_ici(int32 targetCPU, int32 message, addr_t data, addr_t data2, addr_t data3,
|
||||
void *data_ptr, uint32 flags);
|
||||
void smp_send_multicast_ici(cpu_mask_t cpuMask, int32 message, uint32 data,
|
||||
uint32 data2, uint32 data3, void *data_ptr, uint32 flags);
|
||||
void smp_send_broadcast_ici(int32 message, uint32 data, uint32 data2, uint32 data3,
|
||||
void smp_send_multicast_ici(cpu_mask_t cpuMask, int32 message, addr_t data,
|
||||
addr_t data2, addr_t data3, void *data_ptr, uint32 flags);
|
||||
void smp_send_broadcast_ici(int32 message, addr_t data, addr_t data2, addr_t data3,
|
||||
void *data_ptr, uint32 flags);
|
||||
void smp_send_broadcast_ici_interrupts_disabled(int32 currentCPU, int32 message,
|
||||
uint32 data, uint32 data2, uint32 data3, void *data_ptr, uint32 flags);
|
||||
addr_t data, addr_t data2, addr_t data3, void *data_ptr, uint32 flags);
|
||||
|
||||
int32 smp_get_num_cpus(void);
|
||||
void smp_set_num_cpus(int32 numCPUs);
|
||||
|
@ -128,7 +128,7 @@ ARMVMTranslationMap::Flush()
|
||||
|
||||
if (fIsKernelMap) {
|
||||
smp_send_broadcast_ici(SMP_MSG_INVALIDATE_PAGE_LIST,
|
||||
(uint32)fInvalidPages, fInvalidPagesCount, 0, NULL,
|
||||
(addr_t)fInvalidPages, fInvalidPagesCount, 0, NULL,
|
||||
SMP_MSG_FLAG_SYNC);
|
||||
} else {
|
||||
int cpu = smp_get_current_cpu();
|
||||
@ -136,7 +136,7 @@ ARMVMTranslationMap::Flush()
|
||||
& ~((uint32)1 << cpu);
|
||||
if (cpuMask != 0) {
|
||||
smp_send_multicast_ici(cpuMask, SMP_MSG_INVALIDATE_PAGE_LIST,
|
||||
(uint32)fInvalidPages, fInvalidPagesCount, 0, NULL,
|
||||
(addr_t)fInvalidPages, fInvalidPagesCount, 0, NULL,
|
||||
SMP_MSG_FLAG_SYNC);
|
||||
}
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ M68KVMTranslationMap::Flush()
|
||||
|
||||
if (fIsKernelMap) {
|
||||
smp_send_broadcast_ici(SMP_MSG_INVALIDATE_PAGE_LIST,
|
||||
(uint32)fInvalidPages, fInvalidPagesCount, 0, NULL,
|
||||
(addr_t)fInvalidPages, fInvalidPagesCount, 0, NULL,
|
||||
SMP_MSG_FLAG_SYNC);
|
||||
} else {
|
||||
int cpu = smp_get_current_cpu();
|
||||
@ -136,7 +136,7 @@ M68KVMTranslationMap::Flush()
|
||||
& ~((uint32)1 << cpu);
|
||||
if (cpuMask != 0) {
|
||||
smp_send_multicast_ici(cpuMask, SMP_MSG_INVALIDATE_PAGE_LIST,
|
||||
(uint32)fInvalidPages, fInvalidPagesCount, 0, NULL,
|
||||
(addr_t)fInvalidPages, fInvalidPagesCount, 0, NULL,
|
||||
SMP_MSG_FLAG_SYNC);
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ get_cpuid(cpuid_info *info, uint32 eaxRegister, uint32 forCPU)
|
||||
// that the CPU supports cpuid.
|
||||
|
||||
if (!get_cpuid_for(info, smp_get_current_cpu(), eaxRegister, forCPU)) {
|
||||
smp_send_broadcast_ici(SMP_MSG_CALL_FUNCTION, (uint32)info,
|
||||
smp_send_broadcast_ici(SMP_MSG_CALL_FUNCTION, (addr_t)info,
|
||||
eaxRegister, forCPU, (void *)get_cpuid_for, SMP_MSG_FLAG_SYNC);
|
||||
}
|
||||
|
||||
|
@ -128,7 +128,7 @@ X86VMTranslationMap::Flush()
|
||||
|
||||
if (fIsKernelMap) {
|
||||
smp_send_broadcast_ici(SMP_MSG_INVALIDATE_PAGE_LIST,
|
||||
(uint32)fInvalidPages, fInvalidPagesCount, 0, NULL,
|
||||
(addr_t)fInvalidPages, fInvalidPagesCount, 0, NULL,
|
||||
SMP_MSG_FLAG_SYNC);
|
||||
} else {
|
||||
int cpu = smp_get_current_cpu();
|
||||
@ -136,7 +136,7 @@ X86VMTranslationMap::Flush()
|
||||
& ~((uint32)1 << cpu);
|
||||
if (cpuMask != 0) {
|
||||
smp_send_multicast_ici(cpuMask, SMP_MSG_INVALIDATE_PAGE_LIST,
|
||||
(uint32)fInvalidPages, fInvalidPagesCount, 0, NULL,
|
||||
(addr_t)fInvalidPages, fInvalidPagesCount, 0, NULL,
|
||||
SMP_MSG_FLAG_SYNC);
|
||||
}
|
||||
}
|
||||
|
@ -58,9 +58,9 @@
|
||||
struct smp_msg {
|
||||
struct smp_msg *next;
|
||||
int32 message;
|
||||
uint32 data;
|
||||
uint32 data2;
|
||||
uint32 data3;
|
||||
addr_t data;
|
||||
addr_t data2;
|
||||
addr_t data3;
|
||||
void *data_ptr;
|
||||
uint32 flags;
|
||||
int32 ref_count;
|
||||
@ -272,9 +272,9 @@ dump_ici_message(int argc, char** argv)
|
||||
kprintf("ICI message %p:\n", message);
|
||||
kprintf(" next: %p\n", message->next);
|
||||
kprintf(" message: %" B_PRId32 "\n", message->message);
|
||||
kprintf(" data: %" B_PRIu32 "\n", message->data);
|
||||
kprintf(" data2: %" B_PRIu32 "\n", message->data2);
|
||||
kprintf(" data3: %" B_PRIu32 "\n", message->data3);
|
||||
kprintf(" data: 0x%lx\n", message->data);
|
||||
kprintf(" data2: 0x%lx\n", message->data2);
|
||||
kprintf(" data3: 0x%lx\n", message->data3);
|
||||
kprintf(" data_ptr: %p\n", message->data_ptr);
|
||||
kprintf(" flags: %" B_PRIx32 "\n", message->flags);
|
||||
kprintf(" ref_count: %" B_PRIx32 "\n", message->ref_count);
|
||||
@ -716,8 +716,7 @@ process_pending_ici(int32 currentCPU)
|
||||
|
||||
switch (msg->message) {
|
||||
case SMP_MSG_INVALIDATE_PAGE_RANGE:
|
||||
arch_cpu_invalidate_TLB_range((addr_t)msg->data,
|
||||
(addr_t)msg->data2);
|
||||
arch_cpu_invalidate_TLB_range(msg->data, msg->data2);
|
||||
break;
|
||||
case SMP_MSG_INVALIDATE_PAGE_LIST:
|
||||
arch_cpu_invalidate_TLB_list((addr_t*)msg->data, (int)msg->data2);
|
||||
@ -755,8 +754,8 @@ process_pending_ici(int32 currentCPU)
|
||||
}
|
||||
|
||||
default:
|
||||
dprintf("smp_intercpu_int_handler: got unknown message %" B_PRId32
|
||||
"\n", msg->message);
|
||||
dprintf("smp_intercpu_int_handler: got unknown message %" B_PRId32 "\n",
|
||||
msg->message);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -861,8 +860,8 @@ smp_intercpu_int_handler(int32 cpu)
|
||||
|
||||
|
||||
void
|
||||
smp_send_ici(int32 targetCPU, int32 message, uint32 data, uint32 data2,
|
||||
uint32 data3, void* dataPointer, uint32 flags)
|
||||
smp_send_ici(int32 targetCPU, int32 message, addr_t data, addr_t data2,
|
||||
addr_t data3, void* dataPointer, addr_t flags)
|
||||
{
|
||||
struct smp_msg *msg;
|
||||
|
||||
@ -921,8 +920,8 @@ smp_send_ici(int32 targetCPU, int32 message, uint32 data, uint32 data2,
|
||||
|
||||
|
||||
void
|
||||
smp_send_multicast_ici(cpu_mask_t cpuMask, int32 message, uint32 data,
|
||||
uint32 data2, uint32 data3, void *dataPointer, uint32 flags)
|
||||
smp_send_multicast_ici(cpu_mask_t cpuMask, int32 message, addr_t data,
|
||||
addr_t data2, addr_t data3, void *dataPointer, uint32 flags)
|
||||
{
|
||||
if (!sICIEnabled)
|
||||
return;
|
||||
@ -984,7 +983,7 @@ smp_send_multicast_ici(cpu_mask_t cpuMask, int32 message, uint32 data,
|
||||
|
||||
|
||||
void
|
||||
smp_send_broadcast_ici(int32 message, uint32 data, uint32 data2, uint32 data3,
|
||||
smp_send_broadcast_ici(int32 message, addr_t data, addr_t data2, addr_t data3,
|
||||
void *dataPointer, uint32 flags)
|
||||
{
|
||||
struct smp_msg *msg;
|
||||
@ -1052,7 +1051,7 @@ smp_send_broadcast_ici(int32 message, uint32 data, uint32 data2, uint32 data3,
|
||||
|
||||
void
|
||||
smp_send_broadcast_ici_interrupts_disabled(int32 currentCPU, int32 message,
|
||||
uint32 data, uint32 data2, uint32 data3, void *dataPointer, uint32 flags)
|
||||
addr_t data, addr_t data2, addr_t data3, void *dataPointer, uint32 flags)
|
||||
{
|
||||
if (!sICIEnabled)
|
||||
return;
|
||||
@ -1276,7 +1275,7 @@ call_all_cpus(void (*func)(void*, int), void* cookie)
|
||||
}
|
||||
|
||||
if (smp_get_num_cpus() > 1) {
|
||||
smp_send_broadcast_ici(SMP_MSG_CALL_FUNCTION, (uint32)cookie,
|
||||
smp_send_broadcast_ici(SMP_MSG_CALL_FUNCTION, (addr_t)cookie,
|
||||
0, 0, (void*)func, SMP_MSG_FLAG_ASYNC);
|
||||
}
|
||||
|
||||
@ -1300,7 +1299,7 @@ call_all_cpus_sync(void (*func)(void*, int), void* cookie)
|
||||
}
|
||||
|
||||
if (smp_get_num_cpus() > 1) {
|
||||
smp_send_broadcast_ici(SMP_MSG_CALL_FUNCTION, (uint32)cookie,
|
||||
smp_send_broadcast_ici(SMP_MSG_CALL_FUNCTION, (addr_t)cookie,
|
||||
0, 0, (void*)func, SMP_MSG_FLAG_SYNC);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user