]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commitdiff
Fix memguard and related syscalls tx2-joel
authorMichal Sojka <michal.sojka@cvut.cz>
Thu, 9 Apr 2020 09:35:25 +0000 (11:35 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Thu, 9 Apr 2020 09:35:25 +0000 (11:35 +0200)
Previous commit set them as not-implemented (sys_ni_syscall).

arch/arm64/kernel/prem.c
arch/arm64/kernel/sys.c
kernel/sys_ni.c

index da6c1952ff238c8d11d8c653053a714d69540618..fdc2693475022d951d526366865f08b3c0ce5c68 100644 (file)
@@ -27,15 +27,15 @@ extern void __flush_dcache_all(void);
 /*
  * Flush and invalidate entire cache (__NR_prem_flush)
  */
-asmlinkage long sys_prem_flush(void)
+SYSCALL_DEFINE0(prem_flush)
 {
        __flush_dcache_all();
        return 0;
 }
 
 /* Invoke prem_guard_set hypercall implemented in Jailhouse hypervisor */
-asmlinkage long sys_premguard(unsigned long phase, unsigned long budget,
-                             unsigned long timeout)
+SYSCALL_DEFINE3(premguard, unsigned long, phase, unsigned long, budget,
+               unsigned long, timeout)
 {
        register uint64_t num_result asm("x0") = 9;
        register uint64_t __arg1 asm("x1") = phase;
@@ -51,9 +51,10 @@ asmlinkage long sys_premguard(unsigned long phase, unsigned long budget,
        return num_result;
 }
 
-/* Invoke prem_memguard_check hypercall implemented in Jailhouse hypervisor */
-asmlinkage long sys_memguard(unsigned long budget_time, unsigned long budget_memory,
-                            unsigned long flags)
+/* Invoke memguard hypercall implemented in the Jailhouse hypervisor */
+SYSCALL_DEFINE3(memguard, unsigned long, budget_time,
+               unsigned long, budget_memory,
+               unsigned long, flags)
 {
        register uint64_t num_result asm("x0") = 10;
        register uint64_t __arg1 asm("x1") = budget_time;
index d710c43d1ed67b61c6bb71c0e3ce78f760bc4596..46afb77ae93dc7f52e3505353bc5b948e2ac5270 100644 (file)
@@ -44,12 +44,6 @@ asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
 asmlinkage long sys_rt_sigreturn_wrapper(void);
 #define sys_rt_sigreturn       sys_rt_sigreturn_wrapper
 
-cond_syscall(sys_prem_irq_disable);
-cond_syscall(sys_prem_irq_enable);
-cond_syscall(sys_prem_flush);
-cond_syscall(sys_premguard);
-cond_syscall(sys_memguard);
-
 #undef __SYSCALL
 #define __SYSCALL(nr, sym)     [nr] = sym,
 
index 0623787ec67af5fb95f505b55c1577a2f56ce0f4..a5e70c5bf154e1bca5e6345a339fd3b557018630 100644 (file)
@@ -249,3 +249,10 @@ cond_syscall(sys_execveat);
 
 /* membarrier */
 cond_syscall(sys_membarrier);
+
+/* prem */
+cond_syscall(sys_prem_irq_disable);
+cond_syscall(sys_prem_irq_enable);
+cond_syscall(sys_prem_flush);
+cond_syscall(sys_premguard);
+cond_syscall(sys_memguard);