Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xtensa: switch to generic kernel_execve()

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>

authored by

Max Filippov and committed by
Chris Zankel
f0a1bf08 3306a726

+2 -17
+1
arch/xtensa/Kconfig
··· 14 14 select MODULES_USE_ELF_RELA 15 15 select GENERIC_PCI_IOMAP 16 16 select GENERIC_KERNEL_THREAD 17 + select GENERIC_KERNEL_EXECVE 17 18 select ARCH_WANT_OPTIONAL_GPIOLIB 18 19 help 19 20 Xtensa processors are 32-bit RISC machines designed by Tensilica
+1 -17
arch/xtensa/kernel/entry.S
··· 1833 1833 1834 1834 1835 1835 /* 1836 - * Do a system call from kernel instead of calling sys_execve, so we end up 1837 - * with proper pt_regs. 1838 - * 1839 - * int kernel_execve(const char *fname, char *const argv[], charg *const envp[]) 1840 - * a2 a2 a3 a4 1841 - */ 1842 - 1843 - ENTRY(kernel_execve) 1844 - entry a1, 16 1845 - mov a6, a2 # arg0 is in a6 1846 - movi a2, __NR_execve 1847 - syscall 1848 - 1849 - retw 1850 - 1851 - /* 1852 1836 * Task switch. 1853 1837 * 1854 1838 * struct task* _switch_to (struct task* prev, struct task* next) ··· 1924 1940 call4 schedule_tail 1925 1941 mov a6, a3 1926 1942 callx4 a2 1927 - call4 do_exit 1943 + j common_exception_return 1928 1944 1929 1945 ENDPROC(ret_from_kernel_thread)