mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-22 14:43:08 +00:00
proxy: Add smp_is_alive() thunk
Signed-off-by: Asahi Lina <lina@asahilina.net>
This commit is contained in:
parent
4a679b12bd
commit
0a05a0171e
3 changed files with 7 additions and 0 deletions
|
@ -548,6 +548,7 @@ class M1N1Proxy(Reloadable):
|
||||||
P_SMP_CALL_SYNC = 0x502
|
P_SMP_CALL_SYNC = 0x502
|
||||||
P_SMP_WAIT = 0x503
|
P_SMP_WAIT = 0x503
|
||||||
P_SMP_SET_WFE_MODE = 0x504
|
P_SMP_SET_WFE_MODE = 0x504
|
||||||
|
P_SMP_IS_ALIVE = 0x505
|
||||||
|
|
||||||
P_HEAPBLOCK_ALLOC = 0x600
|
P_HEAPBLOCK_ALLOC = 0x600
|
||||||
P_MALLOC = 0x601
|
P_MALLOC = 0x601
|
||||||
|
@ -940,6 +941,8 @@ class M1N1Proxy(Reloadable):
|
||||||
return self.request(self.P_SMP_WAIT, cpu)
|
return self.request(self.P_SMP_WAIT, cpu)
|
||||||
def smp_set_wfe_mode(self, mode):
|
def smp_set_wfe_mode(self, mode):
|
||||||
return self.request(self.P_SMP_SET_WFE_MODE, mode)
|
return self.request(self.P_SMP_SET_WFE_MODE, mode)
|
||||||
|
def smp_is_alive(self, cpu):
|
||||||
|
return self.request(self.P_SMP_IS_ALIVE, cpu)
|
||||||
|
|
||||||
def heapblock_alloc(self, size):
|
def heapblock_alloc(self, size):
|
||||||
return self.request(self.P_HEAPBLOCK_ALLOC, size)
|
return self.request(self.P_HEAPBLOCK_ALLOC, size)
|
||||||
|
|
|
@ -339,6 +339,9 @@ int proxy_process(ProxyRequest *request, ProxyReply *reply)
|
||||||
case P_SMP_SET_WFE_MODE:
|
case P_SMP_SET_WFE_MODE:
|
||||||
smp_set_wfe_mode(request->args[0]);
|
smp_set_wfe_mode(request->args[0]);
|
||||||
break;
|
break;
|
||||||
|
case P_SMP_IS_ALIVE:
|
||||||
|
reply->retval = smp_is_alive(request->args[0]);
|
||||||
|
break;
|
||||||
|
|
||||||
case P_HEAPBLOCK_ALLOC:
|
case P_HEAPBLOCK_ALLOC:
|
||||||
reply->retval = (u64)heapblock_alloc(request->args[0]);
|
reply->retval = (u64)heapblock_alloc(request->args[0]);
|
||||||
|
|
|
@ -83,6 +83,7 @@ typedef enum {
|
||||||
P_SMP_CALL_SYNC,
|
P_SMP_CALL_SYNC,
|
||||||
P_SMP_WAIT,
|
P_SMP_WAIT,
|
||||||
P_SMP_SET_WFE_MODE,
|
P_SMP_SET_WFE_MODE,
|
||||||
|
P_SMP_IS_ALIVE,
|
||||||
|
|
||||||
P_HEAPBLOCK_ALLOC = 0x600, // Heap and memory management ops
|
P_HEAPBLOCK_ALLOC = 0x600, // Heap and memory management ops
|
||||||
P_MALLOC,
|
P_MALLOC,
|
||||||
|
|
Loading…
Reference in a new issue