[PATCH 1/4] unicore32-oldabi: add CONFIG_UNICORE32_OLDABI for distinguishing two ABIs
From: Guan Xuetao Signed-off-by: Guan Xuetao Signed-off-by: Qin Rui --- arch/unicore32/Kconfig | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index 928237a..e5d25b4 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig @@ -72,6 +72,17 @@ source "kernel/Kconfig.freezer" menu "System Type" +config UNICORE32_OLDABI + bool "Allow old ABI binaries to run with this kernel" + default y + help + This option preserves the old syscall interface instead of the + asm-generic one. It also provides a compatibility layer to + intercept syscalls that have structure arguments which layout + in memory differs between the asm-generic ABI and this old one. + + If in doubt, say Y. + config MMU def_bool y -- 2.0.0.GIT -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/4] unicore32-oldabi: add sigcontext.h support for UNICORE32_OLDABI
From: Guan Xuetao Signed-off-by: Guan Xuetao Signed-off-by: Qin Rui --- arch/unicore32/include/uapi/asm/sigcontext.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/unicore32/include/uapi/asm/sigcontext.h b/arch/unicore32/include/uapi/asm/sigcontext.h index 6a2d767..cbc3446 100644 --- a/arch/unicore32/include/uapi/asm/sigcontext.h +++ b/arch/unicore32/include/uapi/asm/sigcontext.h @@ -18,6 +18,7 @@ * before the signal handler was invoked. Note: only add new entries * to the end of the structure. */ +#ifndef CONFIG_UNICORE32_OLDABI struct sigcontext { unsigned long trap_no; unsigned long error_code; @@ -25,5 +26,18 @@ struct sigcontext { unsigned long fault_address; struct pt_regs regs; }; +#else +struct pt_regs_sigcontext { + unsigned long uregs[33]; +}; + +struct sigcontext { + unsigned long trap_no; + unsigned long error_code; + unsigned long oldmask; + struct pt_regs_sigcontext regs; + unsigned long fault_address; +}; +#endif /* CONFIG_UNICORE32_OLDABI */ #endif -- 2.0.0.GIT -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 4/4] unicore32-oldabi: add oldabi syscall interface
From: Qin Rui Define unicore32 oldabi syscall in arch/unicore32/include/uapi/asm/unistd-oldabi.h. And implement some architecture related syscalls. Signed-off-by: Guan Xuetao Signed-off-by: Qin Rui --- arch/unicore32/Kconfig | 3 + arch/unicore32/include/asm/Kbuild | 2 - arch/unicore32/include/asm/signal.h | 21 + arch/unicore32/include/asm/syscalls.h | 25 + arch/unicore32/include/uapi/asm/unistd-oldabi.h | 770 arch/unicore32/include/uapi/asm/unistd.h| 8 + arch/unicore32/kernel/entry.S | 17 + arch/unicore32/kernel/signal.c | 41 ++ 8 files changed, 885 insertions(+), 2 deletions(-) create mode 100644 arch/unicore32/include/asm/signal.h create mode 100644 arch/unicore32/include/asm/syscalls.h create mode 100644 arch/unicore32/include/uapi/asm/unistd-oldabi.h diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index e5d25b4..7301bd4 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig @@ -75,6 +75,9 @@ menu "System Type" config UNICORE32_OLDABI bool "Allow old ABI binaries to run with this kernel" default y + select CLONE_BACKWARDS + select OLD_SIGACTION + select OLD_SIGSUSPEND3 help This option preserves the old syscall interface instead of the asm-generic one. It also provides a compatibility layer to diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild index 78cf393..c6f8670 100644 --- a/arch/unicore32/include/asm/Kbuild +++ b/arch/unicore32/include/asm/Kbuild @@ -45,13 +45,11 @@ generic-y += setup.h generic-y += shmbuf.h generic-y += shmparam.h generic-y += siginfo.h -generic-y += signal.h generic-y += sizes.h generic-y += socket.h generic-y += sockios.h generic-y += statfs.h generic-y += swab.h -generic-y += syscalls.h generic-y += termbits.h generic-y += termios.h generic-y += topology.h diff --git a/arch/unicore32/include/asm/signal.h b/arch/unicore32/include/asm/signal.h new file mode 100644 index 000..a875198 --- /dev/null +++ b/arch/unicore32/include/asm/signal.h @@ -0,0 +1,21 @@ +/* + * linux/arch/unicore32/include/asm/signal.h + * + * Code specific to UniCore ISA + * + * Copyright (C) 2014 GUAN Xuetao + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __UNICORE32_ASM_SIGNAL_H__ +#define __UNICORE32_ASM_SIGNAL_H__ + +#ifdef CONFIG_UNICORE32_OLDABI +#define SA_RESTORER0x0400 +#endif + +#include + +#endif /* __UNICORE32_ASM_SIGNAL_H__ */ diff --git a/arch/unicore32/include/asm/syscalls.h b/arch/unicore32/include/asm/syscalls.h new file mode 100644 index 000..362cf4d --- /dev/null +++ b/arch/unicore32/include/asm/syscalls.h @@ -0,0 +1,25 @@ +/* + * linux/arch/unicore32/include/asm/syscalls.h + * + * Code specific to UniCore ISA + * + * Copyright (C) 2014 GUAN Xuetao + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __UNICORE32_ASM_SYSCALLS_H__ +#define __UNICORE32_ASM_SYSCALLS_H__ + +#include + +#ifdef CONFIG_UNICORE32_OLDABI +/* Wrapper functions */ +extern asmlinkage long sys_clone_wrapper(unsigned long clone_flags, + unsigned long newsp, int __user *parent_tidptr, + int tls_val, int __user *child_tidptr); +extern asmlinkage long sys_sigreturn_wrapper(struct pt_regs *regs); +#endif /* CONFIG_UNICORE32_OLDABI */ + +#endif /* __UNICORE32_ASM_SYSCALLS_H__ */ diff --git a/arch/unicore32/include/uapi/asm/unistd-oldabi.h b/arch/unicore32/include/uapi/asm/unistd-oldabi.h new file mode 100644 index 000..0c24fcf --- /dev/null +++ b/arch/unicore32/include/uapi/asm/unistd-oldabi.h @@ -0,0 +1,770 @@ +#ifndef CONFIG_UNICORE32_OLDABI +#error unistd-oldabi.h is ONLY used when CONFIG_UNICORE32_OLDABI defined +#endif + +#define __NR_SYSCALL_BASE 0x90 + +#ifndef __SYSCALL +#define __SYSCALL(x, y) +#endif + +#define __NR_restart_syscall 0 +__SYSCALL(__NR_restart_syscall, sys_restart_syscall) +#define __NR_exit 1 +__SYSCALL(__NR_exit, sys_exit) +#define __NR_fork 2 +__SYSCALL(__NR_fork, sys_fork) +#define __NR_read 3 +__SYSCALL(__NR_read, sys_read) +#define __NR_write 4 +__SYSCALL(__NR_write, sys_write) +#define __NR_open 5 +__SYSCALL(__NR_open, sys_open) +#define __NR_close 6 +__SYSCALL(__NR_close, sys_close) + /* 7 was sys_waitpid */ +#define __NR_creat 8 +__SYSCALL(__NR_creat, sys_creat) +#define __NR_link 9 +__SYSCALL(__NR_link, sys_link) +#define __NR_unlink 10 +__SYSCALL(__NR_unlink, sys_unlink) +#define __NR_execve 11 +__SYSCALL(__NR_execve, sys_execve) +#define __NR_chdir 12 +__SYSCALL(__NR_chdir, sys_chdir) +#define
[PATCH 2/4] unicore32-oldabi: add stat.h support for UNICORE32_OLDABI
From: Guan Xuetao Remove generated code in arch/unicore32/include/asm/Kbuild, and restore asm/stat.h for UNICORE32_OLDABI. Signed-off-by: Guan Xuetao Signed-off-by: Qin Rui --- arch/unicore32/include/asm/Kbuild | 1 - arch/unicore32/include/uapi/asm/stat-oldabi.h | 71 +++ arch/unicore32/include/uapi/asm/stat.h| 19 +++ 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 arch/unicore32/include/uapi/asm/stat-oldabi.h create mode 100644 arch/unicore32/include/uapi/asm/stat.h diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild index 1e5fb87..78cf393 100644 --- a/arch/unicore32/include/asm/Kbuild +++ b/arch/unicore32/include/asm/Kbuild @@ -49,7 +49,6 @@ generic-y += signal.h generic-y += sizes.h generic-y += socket.h generic-y += sockios.h -generic-y += stat.h generic-y += statfs.h generic-y += swab.h generic-y += syscalls.h diff --git a/arch/unicore32/include/uapi/asm/stat-oldabi.h b/arch/unicore32/include/uapi/asm/stat-oldabi.h new file mode 100644 index 000..d36ce13 --- /dev/null +++ b/arch/unicore32/include/uapi/asm/stat-oldabi.h @@ -0,0 +1,71 @@ +/* + * Code specific to UniCore32 ISA + * + * Copyright (C) 2014 GUAN Xuetao + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __UNICORE32_ASM_STAT_OLDABI_H__ +#define __UNICORE32_ASM_STAT_OLDABI_H__ + +#define STAT_HAVE_NSEC 1 + +struct stat { + unsigned long st_dev; /* Device. */ + unsigned long st_ino; /* File serial number. */ + unsigned intst_mode;/* File mode. */ + unsigned intst_nlink; /* Link count. */ + unsigned intst_uid; /* User ID of the file's owner. */ + unsigned intst_gid; /* Group ID of the file's group. */ + unsigned long st_rdev;/* Device number, if device. */ + unsigned long __pad1; + longst_size;/* Size of file, in bytes. */ + int st_blksize; /* Optimal block size for I/O. */ + int __pad2; + longst_blocks; /* Number 512-byte blocks allocated. */ + int st_atime; /* Time of last access. */ + unsigned intst_atime_nsec; + int st_mtime; /* Time of last modification. */ + unsigned intst_mtime_nsec; + int st_ctime; /* Time of last status change. */ + unsigned intst_ctime_nsec; + unsigned int__unused4; + unsigned int__unused5; +}; + +/* + * This matches struct stat64 in glibc2.1, hence the absolutely + * insane amounts of padding around dev_t's. + * Note: The kernel zero's the padded region because glibc might read them + * in the hope that the kernel has stretched to using larger sizes. + */ +#define STAT64_HAS_BROKEN_ST_INO + +struct stat64 { + unsigned long long st_dev; /* Device. */ + unsigned char __pad0[4]; + unsigned long __st_ino; + unsigned intst_mode;/* File mode. */ + unsigned intst_nlink; /* Link count. */ + unsigned intst_uid; /* UID of the file's owner. */ + unsigned intst_gid; /* GID of the file's group. */ + unsigned long long st_rdev;/* Device number, if device. */ + + unsigned char __pad3[4]; + + long long st_size;/* Size of file, in bytes. */ + int st_blksize; /* Optimal block size for I/O. */ + long long st_blocks; /* Number 512-byte blocks allocated. */ + int st_atime; /* Time of last access. */ + unsigned intst_atime_nsec; + int st_mtime; /* Time of last modification. */ + unsigned intst_mtime_nsec; + int st_ctime; /* Time of last status change. */ + unsigned intst_ctime_nsec; + + unsigned long long st_ino; +}; + +#endif /* __UNICORE32_ASM_STAT_OLDABI_H__ */ diff --git a/arch/unicore32/include/uapi/asm/stat.h b/arch/unicore32/include/uapi/asm/stat.h new file mode 100644 index 000..2cff377d --- /dev/null +++ b/arch/unicore32/include/uapi/asm/stat.h @@ -0,0 +1,19 @@ +/* + * Code specific to UniCore32 ISA + * + * Copyright (C) 2014 GUAN Xuetao + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __UNICORE32_ASM_STAT_H__ +#define __UNICORE32_ASM_STAT_H__ + +#ifndef CONFIG_UNICORE32_OLDABI +#include +#else +#include +#endif /* CONFIG_UNICORE32_OLDABI */ + +#endif /* __UNICORE32_ASM_STAT_H__ */ -- 2.0.0.GIT
[PATCH 2/4] unicore32-oldabi: add stat.h support for UNICORE32_OLDABI
From: Guan Xuetao g...@mprc.pku.edu.cn Remove generated code in arch/unicore32/include/asm/Kbuild, and restore asm/stat.h for UNICORE32_OLDABI. Signed-off-by: Guan Xuetao g...@mprc.pku.edu.cn Signed-off-by: Qin Rui qin...@pku.edu.cn --- arch/unicore32/include/asm/Kbuild | 1 - arch/unicore32/include/uapi/asm/stat-oldabi.h | 71 +++ arch/unicore32/include/uapi/asm/stat.h| 19 +++ 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 arch/unicore32/include/uapi/asm/stat-oldabi.h create mode 100644 arch/unicore32/include/uapi/asm/stat.h diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild index 1e5fb87..78cf393 100644 --- a/arch/unicore32/include/asm/Kbuild +++ b/arch/unicore32/include/asm/Kbuild @@ -49,7 +49,6 @@ generic-y += signal.h generic-y += sizes.h generic-y += socket.h generic-y += sockios.h -generic-y += stat.h generic-y += statfs.h generic-y += swab.h generic-y += syscalls.h diff --git a/arch/unicore32/include/uapi/asm/stat-oldabi.h b/arch/unicore32/include/uapi/asm/stat-oldabi.h new file mode 100644 index 000..d36ce13 --- /dev/null +++ b/arch/unicore32/include/uapi/asm/stat-oldabi.h @@ -0,0 +1,71 @@ +/* + * Code specific to UniCore32 ISA + * + * Copyright (C) 2014 GUAN Xuetao + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __UNICORE32_ASM_STAT_OLDABI_H__ +#define __UNICORE32_ASM_STAT_OLDABI_H__ + +#define STAT_HAVE_NSEC 1 + +struct stat { + unsigned long st_dev; /* Device. */ + unsigned long st_ino; /* File serial number. */ + unsigned intst_mode;/* File mode. */ + unsigned intst_nlink; /* Link count. */ + unsigned intst_uid; /* User ID of the file's owner. */ + unsigned intst_gid; /* Group ID of the file's group. */ + unsigned long st_rdev;/* Device number, if device. */ + unsigned long __pad1; + longst_size;/* Size of file, in bytes. */ + int st_blksize; /* Optimal block size for I/O. */ + int __pad2; + longst_blocks; /* Number 512-byte blocks allocated. */ + int st_atime; /* Time of last access. */ + unsigned intst_atime_nsec; + int st_mtime; /* Time of last modification. */ + unsigned intst_mtime_nsec; + int st_ctime; /* Time of last status change. */ + unsigned intst_ctime_nsec; + unsigned int__unused4; + unsigned int__unused5; +}; + +/* + * This matches struct stat64 in glibc2.1, hence the absolutely + * insane amounts of padding around dev_t's. + * Note: The kernel zero's the padded region because glibc might read them + * in the hope that the kernel has stretched to using larger sizes. + */ +#define STAT64_HAS_BROKEN_ST_INO + +struct stat64 { + unsigned long long st_dev; /* Device. */ + unsigned char __pad0[4]; + unsigned long __st_ino; + unsigned intst_mode;/* File mode. */ + unsigned intst_nlink; /* Link count. */ + unsigned intst_uid; /* UID of the file's owner. */ + unsigned intst_gid; /* GID of the file's group. */ + unsigned long long st_rdev;/* Device number, if device. */ + + unsigned char __pad3[4]; + + long long st_size;/* Size of file, in bytes. */ + int st_blksize; /* Optimal block size for I/O. */ + long long st_blocks; /* Number 512-byte blocks allocated. */ + int st_atime; /* Time of last access. */ + unsigned intst_atime_nsec; + int st_mtime; /* Time of last modification. */ + unsigned intst_mtime_nsec; + int st_ctime; /* Time of last status change. */ + unsigned intst_ctime_nsec; + + unsigned long long st_ino; +}; + +#endif /* __UNICORE32_ASM_STAT_OLDABI_H__ */ diff --git a/arch/unicore32/include/uapi/asm/stat.h b/arch/unicore32/include/uapi/asm/stat.h new file mode 100644 index 000..2cff377d --- /dev/null +++ b/arch/unicore32/include/uapi/asm/stat.h @@ -0,0 +1,19 @@ +/* + * Code specific to UniCore32 ISA + * + * Copyright (C) 2014 GUAN Xuetao + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __UNICORE32_ASM_STAT_H__ +#define __UNICORE32_ASM_STAT_H__ + +#ifndef CONFIG_UNICORE32_OLDABI +#include asm-generic/stat.h +#else +#include asm/stat-oldabi.h
[PATCH 4/4] unicore32-oldabi: add oldabi syscall interface
From: Qin Rui qinru...@mprc.pku.edu.cn Define unicore32 oldabi syscall in arch/unicore32/include/uapi/asm/unistd-oldabi.h. And implement some architecture related syscalls. Signed-off-by: Guan Xuetao g...@mprc.pku.edu.cn Signed-off-by: Qin Rui qin...@pku.edu.cn --- arch/unicore32/Kconfig | 3 + arch/unicore32/include/asm/Kbuild | 2 - arch/unicore32/include/asm/signal.h | 21 + arch/unicore32/include/asm/syscalls.h | 25 + arch/unicore32/include/uapi/asm/unistd-oldabi.h | 770 arch/unicore32/include/uapi/asm/unistd.h| 8 + arch/unicore32/kernel/entry.S | 17 + arch/unicore32/kernel/signal.c | 41 ++ 8 files changed, 885 insertions(+), 2 deletions(-) create mode 100644 arch/unicore32/include/asm/signal.h create mode 100644 arch/unicore32/include/asm/syscalls.h create mode 100644 arch/unicore32/include/uapi/asm/unistd-oldabi.h diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index e5d25b4..7301bd4 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig @@ -75,6 +75,9 @@ menu System Type config UNICORE32_OLDABI bool Allow old ABI binaries to run with this kernel default y + select CLONE_BACKWARDS + select OLD_SIGACTION + select OLD_SIGSUSPEND3 help This option preserves the old syscall interface instead of the asm-generic one. It also provides a compatibility layer to diff --git a/arch/unicore32/include/asm/Kbuild b/arch/unicore32/include/asm/Kbuild index 78cf393..c6f8670 100644 --- a/arch/unicore32/include/asm/Kbuild +++ b/arch/unicore32/include/asm/Kbuild @@ -45,13 +45,11 @@ generic-y += setup.h generic-y += shmbuf.h generic-y += shmparam.h generic-y += siginfo.h -generic-y += signal.h generic-y += sizes.h generic-y += socket.h generic-y += sockios.h generic-y += statfs.h generic-y += swab.h -generic-y += syscalls.h generic-y += termbits.h generic-y += termios.h generic-y += topology.h diff --git a/arch/unicore32/include/asm/signal.h b/arch/unicore32/include/asm/signal.h new file mode 100644 index 000..a875198 --- /dev/null +++ b/arch/unicore32/include/asm/signal.h @@ -0,0 +1,21 @@ +/* + * linux/arch/unicore32/include/asm/signal.h + * + * Code specific to UniCore ISA + * + * Copyright (C) 2014 GUAN Xuetao + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __UNICORE32_ASM_SIGNAL_H__ +#define __UNICORE32_ASM_SIGNAL_H__ + +#ifdef CONFIG_UNICORE32_OLDABI +#define SA_RESTORER0x0400 +#endif + +#include asm-generic/signal.h + +#endif /* __UNICORE32_ASM_SIGNAL_H__ */ diff --git a/arch/unicore32/include/asm/syscalls.h b/arch/unicore32/include/asm/syscalls.h new file mode 100644 index 000..362cf4d --- /dev/null +++ b/arch/unicore32/include/asm/syscalls.h @@ -0,0 +1,25 @@ +/* + * linux/arch/unicore32/include/asm/syscalls.h + * + * Code specific to UniCore ISA + * + * Copyright (C) 2014 GUAN Xuetao + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#ifndef __UNICORE32_ASM_SYSCALLS_H__ +#define __UNICORE32_ASM_SYSCALLS_H__ + +#include asm-generic/syscalls.h + +#ifdef CONFIG_UNICORE32_OLDABI +/* Wrapper functions */ +extern asmlinkage long sys_clone_wrapper(unsigned long clone_flags, + unsigned long newsp, int __user *parent_tidptr, + int tls_val, int __user *child_tidptr); +extern asmlinkage long sys_sigreturn_wrapper(struct pt_regs *regs); +#endif /* CONFIG_UNICORE32_OLDABI */ + +#endif /* __UNICORE32_ASM_SYSCALLS_H__ */ diff --git a/arch/unicore32/include/uapi/asm/unistd-oldabi.h b/arch/unicore32/include/uapi/asm/unistd-oldabi.h new file mode 100644 index 000..0c24fcf --- /dev/null +++ b/arch/unicore32/include/uapi/asm/unistd-oldabi.h @@ -0,0 +1,770 @@ +#ifndef CONFIG_UNICORE32_OLDABI +#error unistd-oldabi.h is ONLY used when CONFIG_UNICORE32_OLDABI defined +#endif + +#define __NR_SYSCALL_BASE 0x90 + +#ifndef __SYSCALL +#define __SYSCALL(x, y) +#endif + +#define __NR_restart_syscall 0 +__SYSCALL(__NR_restart_syscall, sys_restart_syscall) +#define __NR_exit 1 +__SYSCALL(__NR_exit, sys_exit) +#define __NR_fork 2 +__SYSCALL(__NR_fork, sys_fork) +#define __NR_read 3 +__SYSCALL(__NR_read, sys_read) +#define __NR_write 4 +__SYSCALL(__NR_write, sys_write) +#define __NR_open 5 +__SYSCALL(__NR_open, sys_open) +#define __NR_close 6 +__SYSCALL(__NR_close, sys_close) + /* 7 was sys_waitpid */ +#define __NR_creat 8 +__SYSCALL(__NR_creat, sys_creat) +#define __NR_link 9 +__SYSCALL(__NR_link, sys_link) +#define __NR_unlink 10 +__SYSCALL(__NR_unlink, sys_unlink) +#define __NR_execve 11
[PATCH 1/4] unicore32-oldabi: add CONFIG_UNICORE32_OLDABI for distinguishing two ABIs
From: Guan Xuetao g...@mprc.pku.edu.cn Signed-off-by: Guan Xuetao g...@mprc.pku.edu.cn Signed-off-by: Qin Rui qin...@pku.edu.cn --- arch/unicore32/Kconfig | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index 928237a..e5d25b4 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig @@ -72,6 +72,17 @@ source kernel/Kconfig.freezer menu System Type +config UNICORE32_OLDABI + bool Allow old ABI binaries to run with this kernel + default y + help + This option preserves the old syscall interface instead of the + asm-generic one. It also provides a compatibility layer to + intercept syscalls that have structure arguments which layout + in memory differs between the asm-generic ABI and this old one. + + If in doubt, say Y. + config MMU def_bool y -- 2.0.0.GIT -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 3/4] unicore32-oldabi: add sigcontext.h support for UNICORE32_OLDABI
From: Guan Xuetao g...@mprc.pku.edu.cn Signed-off-by: Guan Xuetao g...@mprc.pku.edu.cn Signed-off-by: Qin Rui qin...@pku.edu.cn --- arch/unicore32/include/uapi/asm/sigcontext.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/unicore32/include/uapi/asm/sigcontext.h b/arch/unicore32/include/uapi/asm/sigcontext.h index 6a2d767..cbc3446 100644 --- a/arch/unicore32/include/uapi/asm/sigcontext.h +++ b/arch/unicore32/include/uapi/asm/sigcontext.h @@ -18,6 +18,7 @@ * before the signal handler was invoked. Note: only add new entries * to the end of the structure. */ +#ifndef CONFIG_UNICORE32_OLDABI struct sigcontext { unsigned long trap_no; unsigned long error_code; @@ -25,5 +26,18 @@ struct sigcontext { unsigned long fault_address; struct pt_regs regs; }; +#else +struct pt_regs_sigcontext { + unsigned long uregs[33]; +}; + +struct sigcontext { + unsigned long trap_no; + unsigned long error_code; + unsigned long oldmask; + struct pt_regs_sigcontext regs; + unsigned long fault_address; +}; +#endif /* CONFIG_UNICORE32_OLDABI */ #endif -- 2.0.0.GIT -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] UniCore32: Change git tree location information in MAINTAINERS
From: Guan Xuetao UniCore32 git repo has moved to github. Branch 'unicore32' is used for prepared patches, and automatically merged to linux-next. Branch 'unicore32-working' is used for development. Signed-off-by: Guan Xuetao --- MAINTAINERS |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 764075d..6d59899 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6885,7 +6885,7 @@ PKUNITY SOC DRIVERS M: Guan Xuetao W: http://mprc.pku.edu.cn/~guanxuetao/linux S: Maintained -T: git git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32.git +T: git git://github.com/gxt/linux.git F: drivers/input/serio/i8042-unicore32io.h F: drivers/i2c/busses/i2c-puv3.c F: drivers/video/fb-puv3.c @@ -9165,7 +9165,7 @@ UNICORE32 ARCHITECTURE: M: Guan Xuetao W: http://mprc.pku.edu.cn/~guanxuetao/linux S: Maintained -T: git git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32.git +T: git git://github.com/gxt/linux.git F: arch/unicore32/ UNIFDEF -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] UniCore32: Change git tree location information in MAINTAINERS
From: Guan Xuetao g...@mprc.pku.edu.cn UniCore32 git repo has moved to github. Branch 'unicore32' is used for prepared patches, and automatically merged to linux-next. Branch 'unicore32-working' is used for development. Signed-off-by: Guan Xuetao g...@mprc.pku.edu.cn --- MAINTAINERS |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 764075d..6d59899 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6885,7 +6885,7 @@ PKUNITY SOC DRIVERS M: Guan Xuetao g...@mprc.pku.edu.cn W: http://mprc.pku.edu.cn/~guanxuetao/linux S: Maintained -T: git git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32.git +T: git git://github.com/gxt/linux.git F: drivers/input/serio/i8042-unicore32io.h F: drivers/i2c/busses/i2c-puv3.c F: drivers/video/fb-puv3.c @@ -9165,7 +9165,7 @@ UNICORE32 ARCHITECTURE: M: Guan Xuetao g...@mprc.pku.edu.cn W: http://mprc.pku.edu.cn/~guanxuetao/linux S: Maintained -T: git git://git.kernel.org/pub/scm/linux/kernel/git/epip/linux-2.6-unicore32.git +T: git git://github.com/gxt/linux.git F: arch/unicore32/ UNIFDEF -- 1.7.0.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[GIT PULL] unicore32 fixes for v3.7-rc1
are available in the git repository at: git://github.com/gxt/linux.git unicore32 Al Viro (2): unicore32: switch to generic kernel_thread()/kernel_execve() unicore32: switch to generic sys_execve() David Howells (1): UAPI: (Scripted) Disintegrate arch/unicore32/include/asm Guan Xuetao (4): UniCore32 bugfix: add missed CONFIG_ZONE_DMA UniCore32-bugfix: fix mismatch return value of __xchg_bad_pointer UniCore32-bugfix: Remove definitions in asm/bug.h to solve difference between native and cross compiler unicore32: Use Kbuild infrastructure for kvm_para.h Kautuk Consul (1): unicore32/mm/fault.c: Port OOM changes to do_pf arch/unicore32/Kconfig |5 + arch/unicore32/include/asm/Kbuild |1 - arch/unicore32/include/asm/bug.h |5 - arch/unicore32/include/asm/cmpxchg.h |2 +- arch/unicore32/include/asm/kvm_para.h |1 - arch/unicore32/include/asm/processor.h |5 - arch/unicore32/include/asm/ptrace.h| 76 + arch/unicore32/include/uapi/asm/Kbuild |7 ++ arch/unicore32/include/{ => uapi}/asm/byteorder.h |0 arch/unicore32/include/uapi/asm/ptrace.h | 90 arch/unicore32/include/{ => uapi}/asm/sigcontext.h |0 arch/unicore32/include/{ => uapi}/asm/unistd.h |1 + arch/unicore32/kernel/entry.S | 20 ++--- arch/unicore32/kernel/process.c| 58 +++-- arch/unicore32/kernel/setup.h |6 ++ arch/unicore32/kernel/sys.c| 63 -- arch/unicore32/mm/fault.c | 37 ++-- 17 files changed, 159 insertions(+), 218 deletions(-) delete mode 100644 arch/unicore32/include/asm/kvm_para.h rename arch/unicore32/include/{ => uapi}/asm/byteorder.h (100%) create mode 100644 arch/unicore32/include/uapi/asm/ptrace.h rename arch/unicore32/include/{ => uapi}/asm/sigcontext.h (100%) rename arch/unicore32/include/{ => uapi}/asm/unistd.h (92%) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[GIT PULL] unicore32 fixes for v3.7-rc1
are available in the git repository at: git://github.com/gxt/linux.git unicore32 Al Viro (2): unicore32: switch to generic kernel_thread()/kernel_execve() unicore32: switch to generic sys_execve() David Howells (1): UAPI: (Scripted) Disintegrate arch/unicore32/include/asm Guan Xuetao (4): UniCore32 bugfix: add missed CONFIG_ZONE_DMA UniCore32-bugfix: fix mismatch return value of __xchg_bad_pointer UniCore32-bugfix: Remove definitions in asm/bug.h to solve difference between native and cross compiler unicore32: Use Kbuild infrastructure for kvm_para.h Kautuk Consul (1): unicore32/mm/fault.c: Port OOM changes to do_pf arch/unicore32/Kconfig |5 + arch/unicore32/include/asm/Kbuild |1 - arch/unicore32/include/asm/bug.h |5 - arch/unicore32/include/asm/cmpxchg.h |2 +- arch/unicore32/include/asm/kvm_para.h |1 - arch/unicore32/include/asm/processor.h |5 - arch/unicore32/include/asm/ptrace.h| 76 + arch/unicore32/include/uapi/asm/Kbuild |7 ++ arch/unicore32/include/{ = uapi}/asm/byteorder.h |0 arch/unicore32/include/uapi/asm/ptrace.h | 90 arch/unicore32/include/{ = uapi}/asm/sigcontext.h |0 arch/unicore32/include/{ = uapi}/asm/unistd.h |1 + arch/unicore32/kernel/entry.S | 20 ++--- arch/unicore32/kernel/process.c| 58 +++-- arch/unicore32/kernel/setup.h |6 ++ arch/unicore32/kernel/sys.c| 63 -- arch/unicore32/mm/fault.c | 37 ++-- 17 files changed, 159 insertions(+), 218 deletions(-) delete mode 100644 arch/unicore32/include/asm/kvm_para.h rename arch/unicore32/include/{ = uapi}/asm/byteorder.h (100%) create mode 100644 arch/unicore32/include/uapi/asm/ptrace.h rename arch/unicore32/include/{ = uapi}/asm/sigcontext.h (100%) rename arch/unicore32/include/{ = uapi}/asm/unistd.h (92%) -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/