microblaze: use generic headers
Subsystems (4)
Arnd Bergmann
maintainercover microblaze: use generic headers
This series changes the microblaze architecture to just fall back on generic headers. This is especially important for those header files that define the user space ABI.
While there has already been a release (2.6.30) with a different ABI, I hope that changing it now will still simplify life in the future.
The unistd.h file still defines a lof of the legacy system calls by setting __ARCH_WANT_SYSCALL_* macros. These should be removed once the C libraries have been adapted to work without them. Unfortunately, doing that will change the ABI one more time in a forward-compatible
way: new C libraries and applications will still work on older kernels, but old applications may not run on new kernels after that change.
Michal, please apply for 2.6.31 or pull fromgit://git.kernel.org:/pub/scm/linux/kernel/git/arnd/asm-generic.git microblaze
Arnd <><
Arnd Bergmann (8):
ipc: use __ARCH_WANT_IPC_PARSE_VERSION in ipc/util.h
microblaze: remove init_mm
microblaze: fall back on generic header files for the ABI
microblaze: use generic unistd.h syscall list
microblaze: clean up signal handling
microblaze: use generic syscalls.h
microblaze: make syscall_table implementation generic
microblaze: remove sys_ipc
Remis Lima Baima (3):
microblaze: use the generic lib/checksum.c
microblaze: convert all simple headers to use asm-generic
microblaze: use generic system.h
arch/microblaze/Kconfig | 6 + arch/microblaze/include/asm/atomic.h | 124 +-------- arch/microblaze/include/asm/bitops.h | 28 +-- arch/microblaze/include/asm/bug.h | 14 - arch/microblaze/include/asm/bugs.h | 18 +- arch/microblaze/include/asm/checksum.h | 134 ++------ arch/microblaze/include/asm/cmpxchg-local.h | 1 + arch/microblaze/include/asm/fb.h | 1 + arch/microblaze/include/asm/hardirq.h | 14 +- arch/microblaze/include/asm/ioctls.h | 92 +------ arch/microblaze/include/asm/ipcbuf.h | 37 +--- arch/microblaze/include/asm/irq.h | 6 +- arch/microblaze/include/asm/irqflags.h | 2 +- arch/microblaze/include/asm/mman.h | 26 +-- arch/microblaze/include/asm/mmu.h | 7 +- arch/microblaze/include/asm/mmu_context.h | 2 +- arch/microblaze/include/asm/mmu_context_no.h | 23 -- arch/microblaze/include/asm/module.h | 10 +- arch/microblaze/include/asm/msgbuf.h | 32 +-- arch/microblaze/include/asm/param.h | 31 +-- arch/microblaze/include/asm/parport.h | 1 + arch/microblaze/include/asm/pci.h | 2 +- arch/microblaze/include/asm/posix_types.h | 94 ++----- arch/microblaze/include/asm/scatterlist.h | 29 +-- arch/microblaze/include/asm/sembuf.h | 35 +-- arch/microblaze/include/asm/serial.h | 15 +- arch/microblaze/include/asm/shmbuf.h | 43 +--- arch/microblaze/include/asm/shmparam.h | 7 +- arch/microblaze/include/asm/siginfo.h | 14 - arch/microblaze/include/asm/signal.h | 166 +---------- arch/microblaze/include/asm/socket.h | 70 +---- arch/microblaze/include/asm/sockios.h | 24 +-- arch/microblaze/include/asm/stat.h | 69 +---- arch/microblaze/include/asm/swab.h | 9 +- arch/microblaze/include/asm/syscalls.h | 56 +--- arch/microblaze/include/asm/system.h | 121 ++------ arch/microblaze/include/asm/termbits.h | 204 +------------ arch/microblaze/include/asm/termios.h | 89 +------ arch/microblaze/include/asm/timex.h | 6 +- arch/microblaze/include/asm/types.h | 39 +--- arch/microblaze/include/asm/ucontext.h | 23 +-- arch/microblaze/include/asm/unistd.h | 435 +------------------------- arch/microblaze/include/asm/vga.h | 2 +- arch/microblaze/kernel/entry-nommu.S | 35 +-- arch/microblaze/kernel/init_task.c | 2 - arch/microblaze/kernel/signal.c | 178 +++-------- arch/microblaze/kernel/sys_microblaze.c | 109 +------ arch/microblaze/kernel/syscall_table.S | 371 ---------------------- arch/microblaze/lib/Makefile | 2 +- arch/microblaze/lib/checksum.c | 172 ---------- ipc/util.h | 2 +- kernel/Makefile | 1 + kernel/syscall_table.c | 12 + 53 files changed, 218 insertions(+), 2827 deletions(-) rewrite arch/microblaze/include/asm/atomic.h (100%) rewrite arch/microblaze/include/asm/bitops.h (95%) rewrite arch/microblaze/include/asm/checksum.h (69%) create mode 100644 arch/microblaze/include/asm/cmpxchg-local.h create mode 100644 arch/microblaze/include/asm/fb.h rewrite arch/microblaze/include/asm/ioctls.h (100%) rewrite arch/microblaze/include/asm/ipcbuf.h (100%) rewrite arch/microblaze/include/asm/mman.h (96%) delete mode 100644 arch/microblaze/include/asm/mmu_context_no.h rewrite arch/microblaze/include/asm/msgbuf.h (100%) rewrite arch/microblaze/include/asm/param.h (100%) create mode 100644 arch/microblaze/include/asm/parport.h rewrite arch/microblaze/include/asm/posix_types.h (96%) rewrite arch/microblaze/include/asm/scatterlist.h (100%) rewrite arch/microblaze/include/asm/sembuf.h (100%) rewrite arch/microblaze/include/asm/shmbuf.h (100%) rewrite arch/microblaze/include/asm/signal.h (100%) rewrite arch/microblaze/include/asm/socket.h (100%) rewrite arch/microblaze/include/asm/sockios.h (100%) rewrite arch/microblaze/include/asm/stat.h (100%) rewrite arch/microblaze/include/asm/syscalls.h (95%) rewrite arch/microblaze/include/asm/system.h (66%) rewrite arch/microblaze/include/asm/termbits.h (100%) rewrite arch/microblaze/include/asm/termios.h (100%) rewrite arch/microblaze/include/asm/types.h (100%) rewrite arch/microblaze/include/asm/ucontext.h (100%) rewrite arch/microblaze/include/asm/unistd.h (99%) delete mode 100644 arch/microblaze/kernel/syscall_table.S delete mode 100644 arch/microblaze/lib/checksum.c create mode 100644 kernel/syscall_table.c
Arnd Bergmann
maintainerPATCH 3/11 microblaze: fall back on generic header files for the ABI
Almost all of the ABI relevant header files now have generic versions, so use those now in order to reduce the amount of architecture specific code.
--- arch/microblaze/include/asm/ioctls.h | 92 +------------- arch/microblaze/include/asm/ipcbuf.h | 37 +----- arch/microblaze/include/asm/mman.h | 26 +---- arch/microblaze/include/asm/msgbuf.h | 32 +----- arch/microblaze/include/asm/param.h | 31 +----- arch/microblaze/include/asm/posix_types.h | 94 +++---------- arch/microblaze/include/asm/sembuf.h | 35 +----- arch/microblaze/include/asm/shmbuf.h | 43 +------ arch/microblaze/include/asm/siginfo.h | 14 -- arch/microblaze/include/asm/socket.h | 70 +---------- arch/microblaze/include/asm/sockios.h | 24 +---- arch/microblaze/include/asm/stat.h | 69 +---------- arch/microblaze/include/asm/swab.h | 9 +- arch/microblaze/include/asm/termbits.h | 204 +---------------------------- arch/microblaze/include/asm/termios.h | 89 +------------- arch/microblaze/include/asm/types.h | 39 +------ arch/microblaze/include/asm/ucontext.h | 23 +--- 17 files changed, 36 insertions(+), 895 deletions(-)
rewrite arch/microblaze/include/asm/ioctls.h (100%) rewrite arch/microblaze/include/asm/ipcbuf.h (100%) rewrite arch/microblaze/include/asm/mman.h (96%) rewrite arch/microblaze/include/asm/msgbuf.h (100%) rewrite arch/microblaze/include/asm/param.h (100%) rewrite arch/microblaze/include/asm/posix_types.h (96%) rewrite arch/microblaze/include/asm/sembuf.h (100%) rewrite arch/microblaze/include/asm/shmbuf.h (100%) rewrite arch/microblaze/include/asm/socket.h (100%) rewrite arch/microblaze/include/asm/sockios.h (100%) rewrite arch/microblaze/include/asm/stat.h (100%) rewrite arch/microblaze/include/asm/termbits.h (100%) rewrite arch/microblaze/include/asm/termios.h (100%) rewrite arch/microblaze/include/asm/types.h (100%) rewrite arch/microblaze/include/asm/ucontext.h (100%)
arch/microblaze/include/asm/ioctls.h +1 -91
@@ -1,91 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_IOCTLS_H -#define _ASM_MICROBLAZE_IOCTLS_H - -#include <linux/ioctl.h> - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402 -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425/* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426/* For debugging only */ -#define TIOCSBRK 0x5427/* BSD compatibility */ -#define TIOCCBRK 0x5428/* BSD compatibility */ -#define TIOCGSID 0x5429/* Return the session ID of FD */ -/* Get Pty Number (of pty-mux device) */ -#define TIOCGPTN _IOR('T', 0x30, unsigned int) -#define TIOCSPTLCK _IOW('T', 0x31, int)/* Lock/unlock Pty */ - -#define FIONCLEX 0x5450/* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458/* For debugging only */ -#define TIOCSERGETLSR 0x5459/* Get line status register */ -#define TIOCSERGETMULTI 0x545A/* Get multiport config */ -#define TIOCSERSETMULTI 0x545B/* Set multiport config */ - -#define TIOCMIWAIT 0x545C/* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D/* read serial port inline interrupt counts */ - -#define FIOQSIZE 0x545E - -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 - -#define TIOCSER_TEMT 0x01/* Transmitter physically empty */ - -#endif /* _ASM_MICROBLAZE_IOCTLS_H */ +#include <asm-generic/ioctls.h>
arch/microblaze/include/asm/ipcbuf.h +1 -36
@@ -1,36 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_IPCBUF_H -#define _ASM_MICROBLAZE_IPCBUF_H - -/* -* The user_ipc_perm structure for microblaze architecture. -* Note extra padding because this structure is passed back and forth -* between kernel and user space. -* -* Pad space is left for: -* - 32-bit mode_t and seq -* - 2 miscellaneous 32-bit values -*/ - -struct ipc64_perm { -__kernel_key_t key; -__kernel_uid32_t uid; -__kernel_gid32_t gid; -__kernel_uid32_t cuid; -__kernel_gid32_t cgid; -__kernel_mode_t mode; -unsigned short __pad1; -unsigned short seq; -unsigned short __pad2; -unsigned long __unused1; -unsigned long __unused2; -}; - -#endif /* _ASM_MICROBLAZE_IPCBUF_H */ +#include <asm-generic/ipcbuf.h>
arch/microblaze/include/asm/mman.h +1 -25
@@ -1,25 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_MMAN_H -#define _ASM_MICROBLAZE_MMAN_H - -#include <asm-generic/mman.h> - -#define MAP_GROWSDOWN 0x0100/* stack-like segment */ -#define MAP_DENYWRITE 0x0800/* ETXTBSY */ -#define MAP_EXECUTABLE 0x1000/* mark it as an executable */ -#define MAP_LOCKED 0x2000/* pages are locked */ -#define MAP_NORESERVE 0x4000/* don't check for reservations */ -#define MAP_POPULATE 0x8000/* populate (prefault) pagetables */ -#define MAP_NONBLOCK 0x10000/* do not block on IO */ - -#define MCL_CURRENT 1/* lock all current mappings */ -#define MCL_FUTURE 2/* lock all future mappings */ - -#endif /* _ASM_MICROBLAZE_MMAN_H */ +#include <asm-generic/mman.h>
arch/microblaze/include/asm/msgbuf.h +1 -31
@@ -1,31 +1 @@ -#ifndef _ASM_MICROBLAZE_MSGBUF_H -#define _ASM_MICROBLAZE_MSGBUF_H - -/* -* The msqid64_ds structure for microblaze architecture. -* Note extra padding because this structure is passed back and forth -* between kernel and user space. -* -* Pad space is left for: -* - 64-bit time_t to solve y2038 problem -* - 2 miscellaneous 32-bit values -*/ - -struct msqid64_ds { -struct ipc64_perm msg_perm; -__kernel_time_t msg_stime;/* last msgsnd time */ -unsigned long __unused1; -__kernel_time_t msg_rtime;/* last msgrcv time */ -unsigned long __unused2; -__kernel_time_t msg_ctime;/* last change time */ -unsigned long __unused3; -unsigned long msg_cbytes;/* current number of bytes on queue */ -unsigned long msg_qnum;/* number of messages in queue */ -unsigned long msg_qbytes;/* max number of bytes on queue */ -__kernel_pid_t msg_lspid;/* pid of last msgsnd */ -__kernel_pid_t msg_lrpid;/* last receive pid */ -unsigned long __unused4; -unsigned long __unused5; -}; - -#endif /* _ASM_MICROBLAZE_MSGBUF_H */ +#include <asm-generic/msgbuf.h>
arch/microblaze/include/asm/param.h +1 -30
@@ -1,30 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_PARAM_H -#define _ASM_MICROBLAZE_PARAM_H - -#ifdef __KERNEL__ -#define HZ CONFIG_HZ/* internal kernel timer frequency */ -#define USER_HZ 100/* for user interfaces in "ticks" */ -#define CLOCKS_PER_SEC (USER_HZ)/* frequency at which times() counts */ -#endif /* __KERNEL__ */ - -#ifndef HZ -#define HZ 100 -#endif - -#define EXEC_PAGESIZE 4096 - -#ifndef NOGROUP -#define NOGROUP (-1) -#endif - -#define MAXHOSTNAMELEN 64/* max length of hostname */ - -#endif /* _ASM_MICROBLAZE_PARAM_H */ +#include <asm-generic/param.h>
arch/microblaze/include/asm/posix_types.h +21 -73
94 lines not on this page · raw message
arch/microblaze/include/asm/sembuf.h +1 -34
@@ -1,34 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_SEMBUF_H -#define _ASM_MICROBLAZE_SEMBUF_H - -/* -* The semid64_ds structure for microblaze architecture. -* Note extra padding because this structure is passed back and forth -* between kernel and user space. -* -* Pad space is left for: -* - 64-bit time_t to solve y2038 problem -* - 2 miscellaneous 32-bit values -*/ - -struct semid64_ds { -struct ipc64_perm sem_perm;/* permissions .. see ipc.h */ -__kernel_time_t sem_otime;/* last semop time */ -unsigned long __unused1; -__kernel_time_t sem_ctime;/* last change time */ -unsigned long __unused2; -unsigned long sem_nsems;/* no. of semaphores in array */ -unsigned long __unused3; -unsigned long __unused4; -}; - - -#endif /* _ASM_MICROBLAZE_SEMBUF_H */ +#include <asm-generic/sembuf.h>
arch/microblaze/include/asm/shmbuf.h +1 -42
43 lines not on this page · raw message
arch/microblaze/include/asm/siginfo.h +0 -14
@@ -1,15 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_SIGINFO_H -#define _ASM_MICROBLAZE_SIGINFO_H - -#include <linux/types.h> #include <asm-generic/siginfo.h> - -#endif /* _ASM_MICROBLAZE_SIGINFO_H */
arch/microblaze/include/asm/socket.h +1 -69
70 lines not on this page · raw message
arch/microblaze/include/asm/sockios.h +1 -23
@@ -1,23 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_SOCKIOS_H -#define _ASM_MICROBLAZE_SOCKIOS_H - -#include <linux/ioctl.h> - -/* Socket-level I/O control calls. */ -#define FIOSETOWN 0x8901 -#define SIOCSPGRP 0x8902 -#define FIOGETOWN 0x8903 -#define SIOCGPGRP 0x8904 -#define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906/* Get stamp (timeval) */ -#define SIOCGSTAMPNS 0x8907/* Get stamp (timespec) */ - -#endif /* _ASM_MICROBLAZE_SOCKIOS_H */ +#include <asm-generic/sockios.h>
arch/microblaze/include/asm/stat.h +1 -68
69 lines not on this page · raw message
arch/microblaze/include/asm/swab.h +1 -8
@@ -1,8 +1 @@ -#ifndef _ASM_MICROBLAZE_SWAB_H -#define _ASM_MICROBLAZE_SWAB_H - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) -#define __SWAB_64_THRU_32__ -#endif - -#endif /* _ASM_MICROBLAZE_SWAB_H */ +#include <asm-generic/swab.h>
arch/microblaze/include/asm/termbits.h +1 -203
204 lines not on this page · raw message
arch/microblaze/include/asm/termios.h +1 -88
89 lines not on this page · raw message
arch/microblaze/include/asm/types.h +1 -38
@@ -1,38 +1 @@ -/* -* Copyright (C) Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_TYPES_H -#define _ASM_MICROBLAZE_TYPES_H - -/* -* This file is never included by application software unless -* explicitly requested (e.g., via linux/types.h) in which case the -* application is Linux specific so (user-) name space pollution is -* not a major issue. However, for interoperability, libraries still -* need to be careful to avoid a name clashes. -*/ - -#include <asm-generic/int-ll64.h> - -# ifndef __ASSEMBLY__ - -typedef unsigned short umode_t ; - -/* -* These aren't exported outside the kernel to avoid name space clashes -*/ -# ifdef __KERNEL__ -# define BITS_PER_LONG 32 - -/* Dma addresses are 32-bits wide. */ - -typedef u32 dma_addr_t ; - -# endif /* __KERNEL__ */ -# endif /* __ASSEMBLY__ */ -#endif /* _ASM_MICROBLAZE_TYPES_H */ +#include <asm-generic/types.h>
arch/microblaze/include/asm/ucontext.h +1 -22
@@ -1,22 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_UCONTEXT_H -#define _ASM_MICROBLAZE_UCONTEXT_H - -#include <asm/sigcontext.h> - -struct ucontext { -unsigned long uc_flags; -struct ucontext *uc_link; -stack_t uc_stack; -struct sigcontext uc_mcontext; -sigset_t uc_sigmask;/* mask last for extensibility */ -}; - -#endif /* _ASM_MICROBLAZE_UCONTEXT_H */ +#include <asm-generic/ucontext.h>
Signature · 1 line
1.6.3.1
Arnd Bergmann
maintainerPATCH 6/11 microblaze: use generic syscalls.h
In reply to Arnd BergmannThe prototypes in syscalls.h all make sense for microblaze, but for some of them, the actual implementation in sys_microblaze.c needs to be adapted.
--- arch/microblaze/include/asm/syscalls.h | 49 +++++-------------------------- arch/microblaze/kernel/sys_microblaze.c | 12 ++++---- 2 files changed, 14 insertions(+), 47 deletions(-)
rewrite arch/microblaze/include/asm/syscalls.h (94%)
arch/microblaze/include/asm/syscalls.h +8 -41
@@ -1,41 +1,8 @@ -#ifndef __ASM_MICROBLAZE_SYSCALLS_H -#define __ASM_MICROBLAZE_SYSCALLS_H -#ifdef __KERNEL__ - -#include <linux/compiler.h> -#include <linux/linkage.h> -#include <linux/types.h> -#include <linux/signal.h> - -/* FIXME will be removed */ -asmlinkage int sys_ipc(uint call, int first, int second, -int third,void *ptr,long fifth); - -struct pt_regs ; -asmlinkage int sys_vfork(struct pt_regs *regs); -asmlinkage int sys_clone(int flags, unsigned long stack, struct pt_regs *regs); -asmlinkage int sys_execve(char __user *filenamei, char __user *__user *argv, -char __user *__user *envp,struct pt_regs *regs); - -asmlinkage unsigned long sys_mmap2 (unsigned long addr,size_t len, -unsigned long prot,unsigned long flags, -unsigned long fd,unsigned long pgoff); - -asmlinkage unsigned long sys_mmap (unsigned long addr,size_t len, -unsigned long prot,unsigned long flags, -unsigned long fd,off_t offset); - -/* from signal.c */ -asmlinkage long sys_rt_sigsuspend (sigset_t __user *unewset,size_t sigsetsize, -struct pt_regs *regs); - -asmlinkage long sys_rt_sigaction (int sig,const struct sigaction __user *act, -struct sigaction __user *oact,size_t sigsetsize); - -asmlinkage int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, -struct pt_regs *regs); - -asmlinkage long sys_rt_sigreturn (struct pt_regs *regs); - -#endif /* __KERNEL__ */ -#endif /* __ASM_MICROBLAZE_SYSCALLS_H */ +#ifndef __ASM_MICROBLAZE_SYSCALLS_H + +asmlinkage long sys_clone (int flags,unsigned long stack,struct pt_regs *regs); +#define sys_clone sys_clone + +#include <asm-generic/syscalls.h> + +#endif /* __ASM_MICROBLAZE_SYSCALLS_H */
arch/microblaze/kernel/sys_microblaze.c +6 -6
@@ -39,7 +39,7 @@* * This is really horribly ugly. This will be remove with new toolchain. */ -asmlinkage int +asmlinkage long sys_ipc (uint call,int first,int second,int third,void *ptr,long fifth) {int version, ret;
@@ -134,20 +134,20 @@ sys_ipc(uint call, int first, int second, int third, void *ptr, long fifth)return ret; } -asmlinkage int microblaze_vfork(struct pt_regs *regs) +asmlinkage long microblaze_vfork (struct pt_regs *regs) {return do_fork (CLONE_VFORK |CLONE_VM |SIGCHLD , regs->r1, regs,0 ,NULL ,NULL ); } -asmlinkage int microblaze_clone(int flags, unsigned long stack, struct pt_regs *regs) +asmlinkage long microblaze_clone (int flags,unsigned long stack,struct pt_regs *regs) {if (!stack) stack = regs->r1;return do_fork (flags, stack, regs,0 ,NULL ,NULL ); } -asmlinkage int microblaze_execve(char __user *filenamei, char __user *__user *argv, +asmlinkage long microblaze_execve (char __user *filenamei,char __user *__user *argv,char __user *__user *envp,struct pt_regs *regs) {int error;
@@ -163,7 +163,7 @@ out:return error; } -asmlinkage unsigned long +asmlinkage long sys_mmap2 (unsigned long addr,size_t len,unsigned long prot,unsigned long flags,unsigned long fd,unsigned long pgoff)
@@ -189,7 +189,7 @@ out:return ret; } -asmlinkage unsigned long sys_mmap (unsigned long addr,size_t len, +asmlinkage long sys_mmap (unsigned long addr,size_t len,unsigned long prot,unsigned long flags,unsigned long fd,off_t offset) {
Signature · 1 line
1.6.3.1
Arnd Bergmann
maintainerPATCH 9/11 microblaze: convert all simple headers to use asm-generic
In reply to Arnd BergmannFrom: Remis Lima Baima <[email protected]>
All the simple microblaze header files were adapted to use their asm-generic implementations. These files are more simple and were quite straightforward to change.
fb.h, vga.h and parport.h previously did not exist, using the generic version makes it possible to build more drivers successfully in allyesonfig.
--- arch/microblaze/include/asm/atomic.h | 147 ++++--------------------- arch/microblaze/include/asm/bitops.h | 28 +----- arch/microblaze/include/asm/bug.h | 14 --- arch/microblaze/include/asm/bugs.h | 18 +--- arch/microblaze/include/asm/fb.h | 1 + arch/microblaze/include/asm/hardirq.h | 14 +-- arch/microblaze/include/asm/irq.h | 6 +- arch/microblaze/include/asm/mmu.h | 7 +- arch/microblaze/include/asm/mmu_context.h | 2 +- arch/microblaze/include/asm/mmu_context_no.h | 23 ---- arch/microblaze/include/asm/module.h | 10 +-- arch/microblaze/include/asm/parport.h | 1 + arch/microblaze/include/asm/pci.h | 2 +- arch/microblaze/include/asm/scatterlist.h | 29 +----- arch/microblaze/include/asm/serial.h | 15 +--- arch/microblaze/include/asm/shmparam.h | 7 +- arch/microblaze/include/asm/system.h | 3 + arch/microblaze/include/asm/timex.h | 6 +- arch/microblaze/include/asm/vga.h | 2 +- 19 files changed, 45 insertions(+), 290 deletions(-) rewrite arch/microblaze/include/asm/atomic.h (84%) rewrite arch/microblaze/include/asm/bitops.h (95%) create mode 100644 arch/microblaze/include/asm/fb.h delete mode 100644 arch/microblaze/include/asm/mmu_context_no.h create mode 100644 arch/microblaze/include/asm/parport.h
rewrite arch/microblaze/include/asm/scatterlist.h (100%)
arch/microblaze/include/asm/atomic.h +24 -123
@@ -1,123 +1,24 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_ATOMIC_H -#define _ASM_MICROBLAZE_ATOMIC_H - -#include <linux/types.h> -#include <linux/compiler.h> /* likely */ -#include <asm/system.h> /* local_irq_XXX and friends */ - -#define ATOMIC_INIT (i) { (i) } -#define atomic_read (v) ((v)->counter) -#define atomic_set (v, i) (((v)->counter) = (i)) - -#define atomic_inc (v) (atomic_add_return(1, (v))) -#define atomic_dec (v) (atomic_sub_return(1, (v))) - -#define atomic_add (i, v) (atomic_add_return(i, (v))) -#define atomic_sub (i, v) (atomic_sub_return(i, (v))) - -#define atomic_inc_return (v) (atomic_add_return(1, (v))) -#define atomic_dec_return (v) (atomic_sub_return(1, (v))) - -#define atomic_inc_and_test (v) (atomic_add_return(1, (v)) == 0) -#define atomic_dec_and_test (v) (atomic_sub_return(1, (v)) == 0) - -#define atomic_inc_not_zero (v) (atomic_add_unless((v), 1, 0)) - -#define atomic_sub_and_test (i, v) (atomic_sub_return((i), (v)) == 0) - -static inline int atomic_cmpxchg (atomic_t *v,int old,int new) -{ -int ret; -unsigned long flags; - -local_irq_save (flags); - ret = v->counter; -if (likely (ret == old)) - v->counter = new; -local_irq_restore (flags); - -return ret; -} - -static inline int atomic_add_unless (atomic_t *v,int a,int u) -{ -int c, old; - - c =atomic_read (v); -while (c != u && (old =atomic_cmpxchg ((v), c, c + a)) != c) - c = old; -return c != u; -} - -static inline void atomic_clear_mask (unsigned long mask,unsigned long *addr) -{ -unsigned long flags; - -local_irq_save (flags); - *addr &= ~mask; -local_irq_restore (flags); -} - -/** -* atomic_add_return - add and return -* @i: integer value to add -* @v: pointer of type atomic_t -* -* Atomically adds @i to @v and returns @i + @v -*/ -static inline int atomic_add_return (int i,atomic_t *v) -{ -unsigned long flags; -int val; - -local_irq_save (flags); - val = v->counter; - v->counter = val += i; -local_irq_restore (flags); - -return val; -} - -static inline int atomic_sub_return (int i,atomic_t *v) -{ -return atomic_add_return (-i, v); -} - -/* -* Atomically test *v and decrement if it is greater than 0. -* The function returns the old value of *v minus 1. -*/ -static inline int atomic_dec_if_positive (atomic_t *v) -{ -unsigned long flags; -int res; - -local_irq_save (flags); - res = v->counter -1 ; -if (res >=0 ) - v->counter = res; -local_irq_restore (flags); - -return res; -} - -#define atomic_add_negative (a, v) (atomic_add_return((a), (v)) < 0) -#define atomic_xchg (v, new) (xchg(&((v)->counter), new)) - -/* Atomic operations are already serializing */ -#define smp_mb__before_atomic_dec () barrier() -#define smp_mb__after_atomic_dec () barrier() -#define smp_mb__before_atomic_inc () barrier() -#define smp_mb__after_atomic_inc () barrier() - -#include <asm-generic/atomic-long.h> - -#endif /* _ASM_MICROBLAZE_ATOMIC_H */ +#ifndef _ASM_MICROBLAZE_ATOMIC_H +#define _ASM_MICROBLAZE_ATOMIC_H + +#include <asm-generic/atomic.h> + +/* +* Atomically test *v and decrement if it is greater than 0. +* The function returns the old value of *v minus 1. +*/ +static inline int atomic_dec_if_positive (atomic_t *v) +{ +unsigned long flags; +int res; + +local_irq_save (flags); + res = v->counter -1 ; +if (res >=0 ) + v->counter = res; +local_irq_restore (flags); + +return res; +} + +#endif /* _ASM_MICROBLAZE_ATOMIC_H */
arch/microblaze/include/asm/bitops.h +1 -27
@@ -1,27 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_BITOPS_H -#define _ASM_MICROBLAZE_BITOPS_H - -/* -* Copyright 1992, Linus Torvalds. -*/ - -#include <asm/byteorder.h> /* swab32 */ -#include <asm/system.h> /* save_flags */ - -/* -* clear_bit() doesn't provide any barrier for the compiler. -*/ -#define smp_mb__before_clear_bit () barrier() -#define smp_mb__after_clear_bit () barrier() -#include <asm-generic/bitops.h> -#include <asm-generic/bitops/__fls.h> - -#endif /* _ASM_MICROBLAZE_BITOPS_H */ +#include <asm-generic/bitops.h>
arch/microblaze/include/asm/bug.h +0 -14
@@ -1,15 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_BUG_H -#define _ASM_MICROBLAZE_BUG_H - -#include <linux/kernel.h> #include <asm-generic/bug.h> - -#endif /* _ASM_MICROBLAZE_BUG_H */
arch/microblaze/include/asm/bugs.h +1 -17
@@ -1,17 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_BUGS_H -#define _ASM_MICROBLAZE_BUGS_H - -static inline void check_bugs (void ) -{ -/* nothing to do */ -} - -#endif /* _ASM_MICROBLAZE_BUGS_H */ +#include <asm-generic/bugs.h>
arch/microblaze/include/asm/fb.h new file +1 -0
@@ -0,0 +1 @@ +#include <asm-generic/fb.h>
arch/microblaze/include/asm/hardirq.h +2 -12
@@ -9,21 +9,11 @@#ifndef _ASM_MICROBLAZE_HARDIRQ_H#define _ASM_MICROBLAZE_HARDIRQ_H -#include <linux/cache.h> -#include <linux/irq.h> -#include <asm/irq.h> -#include <asm/current.h> -#include <linux/ptrace.h> -/* should be defined in each interrupt controller driver */ extern unsigned int get_irq (struct pt_regs *regs); -typedef struct { -unsigned int __softirq_pending; -}____cacheline_aligned irq_cpustat_t ; - +#define ack_bad_irq ack_bad_irqvoid ack_bad_irq (unsigned int irq); - -#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ +#include <asm-generic/hardirq.h> #endif /* _ASM_MICROBLAZE_HARDIRQ_H */
arch/microblaze/include/asm/irq.h +1 -5
@@ -10,6 +10,7 @@#define _ASM_MICROBLAZE_IRQ_H#define NR_IRQS 32 +#include <asm-generic/irq.h> #include <linux/interrupt.h>
@@ -17,11 +18,6 @@ extern unsigned int nr_irq;#define NO_IRQ (-1) -static inline int irq_canonicalize (int irq) -{ -return irq; -} -struct pt_regs ;extern void do_IRQ (struct pt_regs *regs);
arch/microblaze/include/asm/mmu.h +1 -6
@@ -12,12 +12,7 @@#define _ASM_MICROBLAZE_MMU_H# ifndef CONFIG_MMU -# ifndef __ASSEMBLY__ -typedef struct { -struct vm_list_struct *vmlist; -unsigned long end_brk; -}mm_context_t ; -# endif /* __ASSEMBLY__ */ +# include <asm-generic/mmu.h> # else /* CONFIG_MMU */ # ifdef __KERNEL__# ifndef __ASSEMBLY__
arch/microblaze/include/asm/mmu_context.h +1 -1
@@ -1,5 +1,5 @@#ifdef CONFIG_MMU # include "mmu_context_mm.h" #else -# include "mmu_context_no.h" +# include <asm-generic/mmu_context.h> #endif
arch/microblaze/include/asm/mmu_context_no.h deleted +0 -23
@@ -1,23 +0,0 @@ -/* -* Copyright (C) 2008-2009 Michal Simek <[email protected]> -* Copyright (C) 2008-2009 PetaLogix -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_MMU_CONTEXT_H -#define _ASM_MICROBLAZE_MMU_CONTEXT_H - -# define init_new_context (tsk, mm) ({ 0; }) - -# define enter_lazy_tlb (mm, tsk) do {} while (0) -# define change_mm_context (old, ctx, _pml4) do {} while (0) -# define destroy_context (mm) do {} while (0) -# define deactivate_mm (tsk, mm) do {} while (0) -# define switch_mm (prev, next, tsk) do {} while (0) -# define activate_mm (prev, next) do {} while (0) - -#endif /* _ASM_MICROBLAZE_MMU_CONTEXT_H */
arch/microblaze/include/asm/module.h +2 -8
@@ -9,6 +9,8 @@#ifndef _ASM_MICROBLAZE_MODULE_H#define _ASM_MICROBLAZE_MODULE_H +#include <asm-generic/module.h> +/* Microblaze Relocations */ #define R_MICROBLAZE_NONE 0#define R_MICROBLAZE_32 1
@@ -24,14 +26,6 @@/* Keep this the last entry. */ #define R_MICROBLAZE_NUM 11 -struct mod_arch_specific { -int foo; -}; - -#define Elf_Shdr Elf32_Shdr -#define Elf_Sym Elf32_Sym -#define Elf_Ehdr Elf32_Ehdr -typedef struct {volatile int counter; }module_t ;#endif /* _ASM_MICROBLAZE_MODULE_H */
arch/microblaze/include/asm/parport.h new file +1 -0
@@ -0,0 +1 @@ +#include <asm-generic/parport.h>
arch/microblaze/include/asm/pci.h +1 -1
@@ -1 +1 @@ -#include <linux/io.h> +#include <asm-generic/pci.h>
arch/microblaze/include/asm/scatterlist.h +1 -28
@@ -1,28 +1 @@ -/* -* Copyright (C) 2008 Michal Simek <[email protected]> -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_SCATTERLIST_H -#define _ASM_MICROBLAZE_SCATTERLIST_H - -struct scatterlist { -#ifdef CONFIG_DEBUG_SG -unsigned long sg_magic; -#endif -unsigned long page_link; -dma_addr_t dma_address; -unsigned int offset; -unsigned int length; -}; - -#define sg_dma_address (sg) ((sg)->dma_address) -#define sg_dma_len (sg) ((sg)->length) - -#define ISA_DMA_THRESHOLD (~0UL) - -#endif /* _ASM_MICROBLAZE_SCATTERLIST_H */ +#include <asm-generic/scatterlist.h>
arch/microblaze/include/asm/serial.h +1 -14
@@ -1,14 +1 @@ -/* -* Copyright (C) 2009 Michal Simek <[email protected]> -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_SERIAL_H -#define _ASM_MICROBLAZE_SERIAL_H - -# define BASE_BAUD (1843200 / 16) - -#endif /* _ASM_MICROBLAZE_SERIAL_H */ +#include <asm-generic/serial.h>
arch/microblaze/include/asm/shmparam.h +1 -6
@@ -1,6 +1 @@ -#ifndef _ASM_MICROBLAZE_SHMPARAM_H -#define _ASM_MICROBLAZE_SHMPARAM_H - -#define SHMLBA PAGE_SIZE/* attach addr a multiple of this */ - -#endif /* _ASM_MICROBLAZE_SHMPARAM_H */ +#include <asm-generic/shmparam.h>
arch/microblaze/include/asm/system.h +3 -0
@@ -13,6 +13,9 @@#include <asm/setup.h> #include <asm/irqflags.h> +#include <asm-generic/cmpxchg.h> +#include <asm-generic/cmpxchg-local.h> +struct task_struct ;struct thread_info ;
arch/microblaze/include/asm/timex.h +2 -4
@@ -9,10 +9,8 @@#ifndef _ASM_MICROBLAZE_TIMEX_H#define _ASM_MICROBLAZE_TIMEX_H -#define CLOCK_TICK_RATE 1000/* Timer input freq. */ - -typedef unsigned long cycles_t ; +#include <asm-generic/timex.h> -#define get_cycles () (0) +#define CLOCK_TICK_RATE 1000/* Timer input freq. */ #endif /* _ASM_TIMEX_H */
arch/microblaze/include/asm/vga.h +1 -1
@@ -1 +1 @@ - +#include <asm-generic/vga.h>
Signature · 1 line
1.6.3.1
Arnd Bergmann
maintainerPATCH 5/11 microblaze: clean up signal handling
In reply to Arnd BergmannWhen legacy signal handling is disabled, the arch/microblaze/kernel/signal.c implementation can be much simpler, as most of it is handled generically from kernel/signal.c.
This is also a prerequisite for using the generic asm/unistd.h, which does not provide __NR_sigreturn, because this macro is referenced by the current signal.c implementation.
--- arch/microblaze/include/asm/signal.h | 166 +------------------------------ arch/microblaze/include/asm/syscalls.h | 11 +-- arch/microblaze/include/asm/unistd.h | 2 - arch/microblaze/kernel/signal.c | 172 +++++++------------------------- 4 files changed, 39 insertions(+), 312 deletions(-)
rewrite arch/microblaze/include/asm/signal.h (100%)
arch/microblaze/include/asm/signal.h +1 -165
@@ -1,165 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* Yasushi SHOJI <[email protected]> -* Tetsuya OHKAWA <[email protected]> -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_SIGNAL_H -#define _ASM_MICROBLAZE_SIGNAL_H - -#define SIGHUP 1 -#define SIGINT 2 -#define SIGQUIT 3 -#define SIGILL 4 -#define SIGTRAP 5 -#define SIGABRT 6 -#define SIGIOT 6 -#define SIGBUS 7 -#define SIGFPE 8 -#define SIGKILL 9 -#define SIGUSR1 10 -#define SIGSEGV 11 -#define SIGUSR2 12 -#define SIGPIPE 13 -#define SIGALRM 14 -#define SIGTERM 15 -#define SIGSTKFLT 16 -#define SIGCHLD 17 -#define SIGCONT 18 -#define SIGSTOP 19 -#define SIGTSTP 20 -#define SIGTTIN 21 -#define SIGTTOU 22 -#define SIGURG 23 -#define SIGXCPU 24 -#define SIGXFSZ 25 -#define SIGVTALRM 26 -#define SIGPROF 27 -#define SIGWINCH 28 -#define SIGIO 29 -#define SIGPOLL SIGIO -/* -#define SIGLOST 29 -*/ -#define SIGPWR 30 -#define SIGSYS 31 -#define SIGUNUSED 31 - -/* These should not be considered constants from userland. */ -#define SIGRTMIN 32 -#define SIGRTMAX _NSIG - -/* -* SA_FLAGS values: -* -* SA_ONSTACK indicates that a registered stack_t will be used. -* SA_RESTART flag to get restarting signals (which were the default long ago) -* SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. -* SA_RESETHAND clears the handler when the signal is delivered. -* SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. -* SA_NODEFER prevents the current signal from being masked in the handler. -* -* SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single -* Unix names RESETHAND and NODEFER respectively. -*/ -#define SA_NOCLDSTOP 0x00000001 -#define SA_NOCLDWAIT 0x00000002 -#define SA_SIGINFO 0x00000004 -#define SA_ONSTACK 0x08000000 -#define SA_RESTART 0x10000000 -#define SA_NODEFER 0x40000000 -#define SA_RESETHAND 0x80000000 - -#define SA_NOMASK SA_NODEFER -#define SA_ONESHOT SA_RESETHAND - -#define SA_RESTORER 0x04000000 - -/* -* sigaltstack controls -*/ -#define SS_ONSTACK 1 -#define SS_DISABLE 2 - -#define MINSIGSTKSZ 2048 -#define SIGSTKSZ 8192 - -# ifndef __ASSEMBLY__ -# include <linux/types.h> -# include <asm-generic/signal-defs.h> - -/* Avoid too many header ordering problems. */ -struct siginfo ; - -# ifdef __KERNEL__ -/* -* Most things should be clean enough to redefine this at will, if care -* is taken to make libc match. -*/ -# define _NSIG 64 -# define _NSIG_BPW 32 -# define _NSIG_WORDS (_NSIG / _NSIG_BPW) - -typedef unsigned long old_sigset_t ;/* at least 32 bits */ - -typedef struct { -unsigned long sig[_NSIG_WORDS]; -}sigset_t ; - -struct old_sigaction { -__sighandler_t sa_handler; -old_sigset_t sa_mask; -unsigned long sa_flags; -void (*sa_restorer)(void ); -}; - -struct sigaction { -__sighandler_t sa_handler; -unsigned long sa_flags; -void (*sa_restorer)(void ); -sigset_t sa_mask;/* mask last for extensibility */ -}; - -struct k_sigaction { -struct sigaction sa; -}; - -# include <asm/sigcontext.h> -# undef __HAVE_ARCH_SIG_BITOPS - -# define ptrace_signal_deliver (regs, cookie) do { } while (0) - -# else /* !__KERNEL__ */ - -/* Here we must cater to libcs that poke about in kernel headers. */ - -# define NSIG 32 -typedef unsigned long sigset_t ; - -struct sigaction { -union { -__sighandler_t _sa_handler; -void (*_sa_sigaction)(int ,struct siginfo *,void *); - } _u; -sigset_t sa_mask; -unsigned long sa_flags; -void (*sa_restorer)(void ); -}; - -# define sa_handler _u._sa_handler -# define sa_sigaction _u._sa_sigaction - -# endif /* __KERNEL__ */ - -typedef struct sigaltstack { -void *ss_sp; -int ss_flags; -size_t ss_size; -}stack_t ; - -# endif /* __ASSEMBLY__ */ -#endif /* _ASM_MICROBLAZE_SIGNAL_H */ +#include <asm-generic/signal.h>
arch/microblaze/include/asm/syscalls.h +2 -9
@@ -26,23 +26,16 @@ asmlinkage unsigned long sys_mmap(unsigned long addr, size_t len, unsigned long fd, off_t offset);/* from signal.c */ -asmlinkage int sys_sigsuspend(old_sigset_t mask, struct pt_regs *regs); - -asmlinkage int sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize, +asmlinkage long sys_rt_sigsuspend (sigset_t __user *unewset,size_t sigsetsize,struct pt_regs *regs); -asmlinkage int sys_sigaction(int sig, const struct old_sigaction *act, -struct old_sigaction *oact); -asmlinkage long sys_rt_sigaction (int sig,const struct sigaction __user *act,struct sigaction __user *oact,size_t sigsetsize); asmlinkage int sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,struct pt_regs *regs); -asmlinkage int sys_sigreturn(struct pt_regs *regs); - -asmlinkage int sys_rt_sigreturn(struct pt_regs *regs); +asmlinkage long sys_rt_sigreturn (struct pt_regs *regs);#endif /* __KERNEL__ */ #endif /* __ASM_MICROBLAZE_SYSCALLS_H */
arch/microblaze/include/asm/unistd.h +0 -2
@@ -10,5 +10,3 @@#endif /* __MICROBLAZE_UNISTD_H */ #include <asm-generic/unistd.h> - -#undef __ARCH_WANT_SYS_RT_SIGSUSPEND
arch/microblaze/kernel/signal.c +36 -136
232 lines not on this page · raw message
Signature · 1 line
1.6.3.1
Arnd Bergmann
maintainerPATCH 11/11 microblaze: remove sys_ipc
In reply to Arnd BergmannThe ipc system call is now unused in microblaze,
as the system call table points directly to the
indidual system calls for IPC.
--- arch/microblaze/kernel/sys_microblaze.c | 99 ------------------------------- 1 files changed, 0 insertions(+), 99 deletions(-)
arch/microblaze/kernel/sys_microblaze.c +0 -99
@@ -34,105 +34,6 @@#include <linux/unistd.h> #include <asm/syscalls.h> -/* -* sys_ipc() is the de-multiplexer for the SysV IPC calls.. -* -* This is really horribly ugly. This will be remove with new toolchain. -*/ -asmlinkage long -sys_ipc (uint call,int first,int second,int third,void *ptr,long fifth) -{ -int version, ret; - - version = call >>16 ;/* hack for backward compatibility */ - call &=0xffff ; - - ret = -EINVAL ; -switch (call) { -case SEMOP : - ret =sys_semop (first, (struct sembuf *)ptr, second); -break ; -case SEMGET : - ret =sys_semget (first, second, third); -break ; -case SEMCTL : - { -union semun fourth; - -if (!ptr) -break ; - ret = (access_ok (VERIFY_READ , ptr,sizeof (long )) ?0 : -EFAULT ) - || (get_user (fourth.__pad, (void **)ptr)) ; -if (ret) -break ; - ret =sys_semctl (first, second, third, fourth); -break ; - } -case MSGSND : - ret =sys_msgsnd (first, (struct msgbuf *) ptr, second, third); -break ; -case MSGRCV : -switch (version) { -case 0 : { -struct ipc_kludge tmp; - -if (!ptr) -break ; - ret = (access_ok (VERIFY_READ , ptr,sizeof (tmp)) - ?0 : -EFAULT ) ||copy_from_user (&tmp, - (struct ipc_kludge *) ptr,sizeof (tmp)); -if (ret) -break ; - ret =sys_msgrcv (first, tmp.msgp, second, tmp.msgtyp, - third); -break ; - } -default : - ret =sys_msgrcv (first, (struct msgbuf *) ptr, - second, fifth, third); -break ; - } -break ; -case MSGGET : - ret =sys_msgget ((key_t ) first, second); -break ; -case MSGCTL : - ret =sys_msgctl (first, second, (struct msqid_ds *) ptr); -break ; -case SHMAT : -switch (version) { -default : { -ulong raddr; - ret =access_ok (VERIFY_WRITE , (ulong *) third, -sizeof (ulong)) ?0 : -EFAULT ; -if (ret) -break ; - ret =do_shmat (first, (char *) ptr, second, &raddr); -if (ret) -break ; - ret =put_user (raddr, (ulong *) third); -break ; - } -case 1 :/* iBCS2 emulator entry point */ -if (!segment_eq (get_fs (),get_ds ())) -break ; - ret =do_shmat (first, (char *) ptr, second, - (ulong *) third); -break ; - } -break ; -case SHMDT : - ret =sys_shmdt ((char *)ptr); -break ; -case SHMGET : - ret =sys_shmget (first, second, third); -break ; -case SHMCTL : - ret =sys_shmctl (first, second, (struct shmid_ds *) ptr); -break ; - } -return ret; -}asmlinkage long microblaze_vfork (struct pt_regs *regs) {
Signature · 1 line
1.6.3.1
Arnd Bergmann
maintainerPATCH 2/11 microblaze: remove init_mm
In reply to Arnd BergmannAlexey removed the definition for init_mm from all architectures but forgot microblaze, which was only recently added. This fixes the microblaze build by dropping it there as well.
--- arch/microblaze/kernel/init_task.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
arch/microblaze/kernel/init_task.c +0 -2
@@ -18,8 +18,6 @@static struct signal_struct init_signals =INIT_SIGNALS (init_signals);static struct sighand_struct init_sighand =INIT_SIGHAND (init_sighand); -struct mm_struct init_mm =INIT_MM (init_mm); -EXPORT_SYMBOL (init_mm); union thread_union init_thread_union __attribute__((__section__(".data.init_task"))) =
Signature · 1 line
1.6.3.1
Arnd Bergmann
maintainerPATCH 7/11 microblaze: make syscall_table implementation generic
In reply to Arnd BergmannThe syscall table as added to the microblaze architecture is entirely generic and can be used by all future architectures as well, so move it to kernel/syscall_table.c.
---
arch/microblaze/Kconfig | 3 +++
arch/microblaze/kernel/Makefile | 2 +-
kernel/Makefile | 1 +
{arch/microblaze/kernel => kernel}/syscall_table.c | 0
4 files changed, 5 insertions(+), 1 deletions(-)
rename {arch/microblaze/kernel => kernel}/syscall_table.c (100%)arch/microblaze/Kconfig +3 -0
@@ -53,6 +53,9 @@ config GENERIC_HARDIRQS_NO__DO_IRQ config GENERIC_GPIO def_bool y +config GENERIC_SYSCALL_TABLE + def_bool y + config PCI def_bool n
arch/microblaze/kernel/Makefile +1 -1
@@ -7,7 +7,7 @@ extra-y := head.o vmlinux.lds obj-y += exceptions.o \ hw_exception_handler.o init_task.o intc.o irq.o of_device.o \ of_platform.o process.o prom.o prom_parse.o ptrace.o \ - setup.o signal.o sys_microblaze.o timer.o traps.o syscall_table.o + setup.o signal.o sys_microblaze.o timer.o traps.o obj-y += cpu/
kernel/Makefile +1 -0
@@ -98,6 +98,7 @@ obj-$(CONFIG_X86_DS) += trace/ obj-$(CONFIG_SMP) += sched_cpupri.o obj-$(CONFIG_SLOW_WORK) += slow-work.o obj-$(CONFIG_PERF_COUNTERS) += perf_counter.o +obj-$(CONFIG_GENERIC_SYSCALL_TABLE) += syscall_table.o ifneq ($(CONFIG_SCHED_OMIT_FRAME_POINTER),y) # According to Alan Modra <[email protected]>, the -fno-omit-frame-pointer is
kernel/syscall_table.c renamed from arch/microblaze/kernel/syscall_table.c +0 -0
Signature · 1 line
1.6.3.1
Arnd Bergmann
maintainerPATCH 1/11 ipc: use __ARCH_WANT_IPC_PARSE_VERSION in ipc/util.h
In reply to Arnd BergmannThe definition of ipc_parse_version depends on __ARCH_WANT_IPC_PARSE_VERSION, but the header file declares it conditionally based on the architecture.
Use the macro consistently to make it easier to add new architectures.
--- ipc/util.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
ipc/util.h +1 -1
@@ -128,7 +128,7 @@ void ipc_update_perm(struct ipc64_perm *in, struct kern_ipc_perm *out);struct kern_ipc_perm *ipcctl_pre_down (struct ipc_ids *ids,int id,int cmd,struct ipc64_perm *perm,int extra_perm); -#if defined(__ia64__) || defined(__x86_64__) || defined(__hppa__) || defined(__XTENSA__) +#ifndef __ARCH_WANT_IPC_PARSE_VERSION/* On IA-64, we always use the "64-bit version" of the IPC structures. */ # define ipc_parse_version (cmd) IPC_64#else
Signature · 1 line
1.6.3.1
Arnd Bergmann
maintainerPATCH 8/11 microblaze: use the generic lib/checksum.c
In reply to Arnd BergmannFrom: Remis Lima Baima <[email protected]>
The microblaze checksum code is mostly identical to the asm-generic+lib version, so use that instead.
--- arch/microblaze/Kconfig | 3 + arch/microblaze/include/asm/checksum.h | 134 ++++++------------------ arch/microblaze/lib/Makefile | 2 +- arch/microblaze/lib/checksum.c | 172 -------------------------------- 4 files changed, 38 insertions(+), 273 deletions(-) rewrite arch/microblaze/include/asm/checksum.h (69%) delete mode 100644 arch/microblaze/lib/checksum.c
arch/microblaze/Kconfig +3 -0
@@ -56,6 +56,9 @@ config GENERIC_GPIO config GENERIC_SYSCALL_TABLE def_bool y +config GENERIC_CSUM + def_bool y + config PCI def_bool n
arch/microblaze/include/asm/checksum.h +34 -100
134 lines not on this page · raw message
arch/microblaze/lib/Makefile +1 -1
@@ -2,7 +2,7 @@ # Makefile # -lib-y := memset.o checksum.o +lib-y := memset.o ifeq ($(CONFIG_OPT_LIB_ASM),y) lib-y += fastcopy.o
arch/microblaze/lib/checksum.c deleted +0 -172
172 lines not on this page · raw message
Signature · 1 line
1.6.3.1
Arnd Bergmann
maintainerPATCH 10/11 microblaze: use generic system.h
In reply to Arnd BergmannFrom: Remis Lima Baima <[email protected]>
Parts of the microblaze system.h can be removed by falling back to the asm-generic version.
--- arch/microblaze/include/asm/cmpxchg-local.h | 1 + arch/microblaze/include/asm/irqflags.h | 2 +- arch/microblaze/include/asm/system.h | 124 +++++++-------------------- 3 files changed, 32 insertions(+), 95 deletions(-) create mode 100644 arch/microblaze/include/asm/cmpxchg-local.h
rewrite arch/microblaze/include/asm/system.h (67%)
arch/microblaze/include/asm/cmpxchg-local.h new file +1 -0
@@ -0,0 +1 @@ +#include <asm-generic/cmpxchg-local.h>
arch/microblaze/include/asm/irqflags.h +1 -1
@@ -9,7 +9,7 @@#ifndef _ASM_MICROBLAZE_IRQFLAGS_H#define _ASM_MICROBLAZE_IRQFLAGS_H -#include <linux/irqflags.h> +#include <asm/registers.h> # if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR
arch/microblaze/include/asm/system.h +30 -94
124 lines not on this page · raw message
Signature · 1 line
1.6.3.1
Arnd Bergmann
maintainerPATCH 4/11 microblaze: use generic unistd.h syscall list
In reply to Arnd BergmannThis makes use of the generic system call list from asm-generic/unistd.h, and uses the same table to generate syscall_table.o.
The code is kept in microblaze for now, but could
easily be moved to kernel/syscall_table.c at a
later time when more architectures want to share
it.
--- arch/microblaze/include/asm/unistd.h | 437 +------------------------------ arch/microblaze/kernel/Makefile | 2 +- arch/microblaze/kernel/entry-nommu.S | 35 +-- arch/microblaze/kernel/entry.S | 6 - arch/microblaze/kernel/signal.c | 6 +- arch/microblaze/kernel/sys_microblaze.c | 6 +- arch/microblaze/kernel/syscall_table.S | 371 -------------------------- arch/microblaze/kernel/syscall_table.c | 12 + 8 files changed, 44 insertions(+), 831 deletions(-) rewrite arch/microblaze/include/asm/unistd.h (99%) delete mode 100644 arch/microblaze/kernel/syscall_table.S create mode 100644 arch/microblaze/kernel/syscall_table.c
arch/microblaze/include/asm/unistd.h +14 -423
@@ -1,423 +1,14 @@ -/* -* Copyright (C) 2007-2008 Michal Simek <[email protected]> -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_UNISTD_H -#define _ASM_MICROBLAZE_UNISTD_H - -#define __NR_restart_syscall 0/* ok */ -#define __NR_exit 1/* ok */ -#define __NR_fork 2/* not for no MMU - weird */ -#define __NR_read 3/* ok */ -#define __NR_write 4/* ok */ -#define __NR_open 5/* openat */ -#define __NR_close 6/* ok */ -#define __NR_waitpid 7/* waitid */ -#define __NR_creat 8/* openat */ -#define __NR_link 9/* linkat */ -#define __NR_unlink 10/* unlinkat */ -#define __NR_execve 11/* ok */ -#define __NR_chdir 12/* ok */ -#define __NR_time 13/* obsolete -> sys_gettimeofday */ -#define __NR_mknod 14/* mknodat */ -#define __NR_chmod 15/* fchmodat */ -#define __NR_lchown 16/* ok */ -#define __NR_break 17/* don't know */ -#define __NR_oldstat 18/* remove */ -#define __NR_lseek 19/* ok */ -#define __NR_getpid 20/* ok */ -#define __NR_mount 21/* ok */ -#define __NR_umount 22/* ok */ /* use only umount2 */ -#define __NR_setuid 23/* ok */ -#define __NR_getuid 24/* ok */ -#define __NR_stime 25/* obsolete -> sys_settimeofday */ -#define __NR_ptrace 26/* ok */ -#define __NR_alarm 27/* obsolete -> sys_setitimer */ -#define __NR_oldfstat 28/* remove */ -#define __NR_pause 29/* obsolete -> sys_rt_sigtimedwait */ -#define __NR_utime 30/* obsolete -> sys_utimesat */ -#define __NR_stty 31/* remove */ -#define __NR_gtty 32/* remove */ -#define __NR_access 33/* faccessat */ -/* can be implemented by sys_setpriority */ -#define __NR_nice 34 -#define __NR_ftime 35/* remove */ -#define __NR_sync 36/* ok */ -#define __NR_kill 37/* ok */ -#define __NR_rename 38/* renameat */ -#define __NR_mkdir 39/* mkdirat */ -#define __NR_rmdir 40/* unlinkat */ -#define __NR_dup 41/* ok */ -#define __NR_pipe 42/* ok */ -#define __NR_times 43/* ok */ -#define __NR_prof 44/* remove */ -#define __NR_brk 45/* ok -mmu, nommu specific */ -#define __NR_setgid 46/* ok */ -#define __NR_getgid 47/* ok */ -#define __NR_signal 48/* obsolete -> sys_rt_sigaction */ -#define __NR_geteuid 49/* ok */ -#define __NR_getegid 50/* ok */ -#define __NR_acct 51/* add it and then I can disable it */ -#define __NR_umount2 52/* remove */ -#define __NR_lock 53/* remove */ -#define __NR_ioctl 54/* ok */ -#define __NR_fcntl 55/* ok -> 64bit version*/ -#define __NR_mpx 56/* remove */ -#define __NR_setpgid 57/* ok */ -#define __NR_ulimit 58/* remove */ -#define __NR_oldolduname 59/* remove */ -#define __NR_umask 60/* ok */ -#define __NR_chroot 61/* ok */ -#define __NR_ustat 62/* obsolete -> statfs64 */ -#define __NR_dup2 63/* ok */ -#define __NR_getppid 64/* ok */ -#define __NR_getpgrp 65/* obsolete -> sys_getpgid */ -#define __NR_setsid 66/* ok */ -#define __NR_sigaction 67/* obsolete -> rt_sigaction */ -#define __NR_sgetmask 68/* obsolete -> sys_rt_sigprocmask */ -#define __NR_ssetmask 69/* obsolete ->sys_rt_sigprocmask */ -#define __NR_setreuid 70/* ok */ -#define __NR_setregid 71/* ok */ -#define __NR_sigsuspend 72/* obsolete -> rt_sigsuspend */ -#define __NR_sigpending 73/* obsolete -> sys_rt_sigpending */ -#define __NR_sethostname 74/* ok */ -#define __NR_setrlimit 75/* ok */ -#define __NR_getrlimit 76/* ok Back compatible 2G limited rlimit */ -#define __NR_getrusage 77/* ok */ -#define __NR_gettimeofday 78/* ok */ -#define __NR_settimeofday 79/* ok */ -#define __NR_getgroups 80/* ok */ -#define __NR_setgroups 81/* ok */ -#define __NR_select 82/* obsolete -> sys_pselect7 */ -#define __NR_symlink 83/* symlinkat */ -#define __NR_oldlstat 84/* remove */ -#define __NR_readlink 85/* obsolete -> sys_readlinkat */ -#define __NR_uselib 86/* remove */ -#define __NR_swapon 87/* ok */ -#define __NR_reboot 88/* ok */ -#define __NR_readdir 89/* remove ? */ -#define __NR_mmap 90/* obsolete -> sys_mmap2 */ -#define __NR_munmap 91/* ok - mmu and nommu */ -#define __NR_truncate 92/* ok or truncate64 */ -#define __NR_ftruncate 93/* ok or ftruncate64 */ -#define __NR_fchmod 94/* ok */ -#define __NR_fchown 95/* ok */ -#define __NR_getpriority 96/* ok */ -#define __NR_setpriority 97/* ok */ -#define __NR_profil 98/* remove */ -#define __NR_statfs 99/* ok or statfs64 */ -#define __NR_fstatfs 100/* ok or fstatfs64 */ -#define __NR_ioperm 101/* remove */ -#define __NR_socketcall 102/* remove */ -#define __NR_syslog 103/* ok */ -#define __NR_setitimer 104/* ok */ -#define __NR_getitimer 105/* ok */ -#define __NR_stat 106/* remove */ -#define __NR_lstat 107/* remove */ -#define __NR_fstat 108/* remove */ -#define __NR_olduname 109/* remove */ -#define __NR_iopl 110/* remove */ -#define __NR_vhangup 111/* ok */ -#define __NR_idle 112/* remove */ -#define __NR_vm86old 113/* remove */ -#define __NR_wait4 114/* obsolete -> waitid */ -#define __NR_swapoff 115/* ok */ -#define __NR_sysinfo 116/* ok */ -#define __NR_ipc 117/* remove - direct call */ -#define __NR_fsync 118/* ok */ -#define __NR_sigreturn 119/* obsolete -> sys_rt_sigreturn */ -#define __NR_clone 120/* ok */ -#define __NR_setdomainname 121/* ok */ -#define __NR_uname 122/* remove */ -#define __NR_modify_ldt 123/* remove */ -#define __NR_adjtimex 124/* ok */ -#define __NR_mprotect 125/* remove */ -#define __NR_sigprocmask 126/* obsolete -> sys_rt_sigprocmask */ -#define __NR_create_module 127/* remove */ -#define __NR_init_module 128/* ok */ -#define __NR_delete_module 129/* ok */ -#define __NR_get_kernel_syms 130/* remove */ -#define __NR_quotactl 131/* ok */ -#define __NR_getpgid 132/* ok */ -#define __NR_fchdir 133/* ok */ -#define __NR_bdflush 134/* remove */ -#define __NR_sysfs 135/* needed for busybox */ -#define __NR_personality 136/* ok */ -#define __NR_afs_syscall 137/* Syscall for Andrew File System */ -#define __NR_setfsuid 138/* ok */ -#define __NR_setfsgid 139/* ok */ -#define __NR__llseek 140/* remove only lseek */ -#define __NR_getdents 141/* ok or getdents64 */ -#define __NR__newselect 142/* remove */ -#define __NR_flock 143/* ok */ -#define __NR_msync 144/* remove */ -#define __NR_readv 145/* ok */ -#define __NR_writev 146/* ok */ -#define __NR_getsid 147/* ok */ -#define __NR_fdatasync 148/* ok */ -#define __NR__sysctl 149/* remove */ -#define __NR_mlock 150/* ok - nommu or mmu */ -#define __NR_munlock 151/* ok - nommu or mmu */ -#define __NR_mlockall 152/* ok - nommu or mmu */ -#define __NR_munlockall 153/* ok - nommu or mmu */ -#define __NR_sched_setparam 154/* ok */ -#define __NR_sched_getparam 155/* ok */ -#define __NR_sched_setscheduler 156/* ok */ -#define __NR_sched_getscheduler 157/* ok */ -#define __NR_sched_yield 158/* ok */ -#define __NR_sched_get_priority_max 159/* ok */ -#define __NR_sched_get_priority_min 160/* ok */ -#define __NR_sched_rr_get_interval 161/* ok */ -#define __NR_nanosleep 162/* ok */ -#define __NR_mremap 163/* ok - nommu or mmu */ -#define __NR_setresuid 164/* ok */ -#define __NR_getresuid 165/* ok */ -#define __NR_vm86 166/* remove */ -#define __NR_query_module 167/* ok */ -#define __NR_poll 168/* obsolete -> sys_ppoll */ -#define __NR_nfsservctl 169/* ok */ -#define __NR_setresgid 170/* ok */ -#define __NR_getresgid 171/* ok */ -#define __NR_prctl 172/* ok */ -#define __NR_rt_sigreturn 173/* ok */ -#define __NR_rt_sigaction 174/* ok */ -#define __NR_rt_sigprocmask 175/* ok */ -#define __NR_rt_sigpending 176/* ok */ -#define __NR_rt_sigtimedwait 177/* ok */ -#define __NR_rt_sigqueueinfo 178/* ok */ -#define __NR_rt_sigsuspend 179/* ok */ -#define __NR_pread64 180/* ok */ -#define __NR_pwrite64 181/* ok */ -#define __NR_chown 182/* obsolete -> fchownat */ -#define __NR_getcwd 183/* ok */ -#define __NR_capget 184/* ok */ -#define __NR_capset 185/* ok */ -#define __NR_sigaltstack 186/* remove */ -#define __NR_sendfile 187/* ok -> exist 64bit version*/ -#define __NR_getpmsg 188/* remove */ -/* remove - some people actually want streams */ -#define __NR_putpmsg 189 -/* for noMMU - group with clone -> maybe remove */ -#define __NR_vfork 190 -#define __NR_ugetrlimit 191/* remove - SuS compliant getrlimit */ -#define __NR_mmap2 192/* ok */ -#define __NR_truncate64 193/* ok */ -#define __NR_ftruncate64 194/* ok */ -#define __NR_stat64 195/* remove _ARCH_WANT_STAT64 */ -#define __NR_lstat64 196/* remove _ARCH_WANT_STAT64 */ -#define __NR_fstat64 197/* remove _ARCH_WANT_STAT64 */ -#define __NR_lchown32 198/* ok - without 32 */ -#define __NR_getuid32 199/* ok - without 32 */ -#define __NR_getgid32 200/* ok - without 32 */ -#define __NR_geteuid32 201/* ok - without 32 */ -#define __NR_getegid32 202/* ok - without 32 */ -#define __NR_setreuid32 203/* ok - without 32 */ -#define __NR_setregid32 204/* ok - without 32 */ -#define __NR_getgroups32 205/* ok - without 32 */ -#define __NR_setgroups32 206/* ok - without 32 */ -#define __NR_fchown32 207/* ok - without 32 */ -#define __NR_setresuid32 208/* ok - without 32 */ -#define __NR_getresuid32 209/* ok - without 32 */ -#define __NR_setresgid32 210/* ok - without 32 */ -#define __NR_getresgid32 211/* ok - without 32 */ -#define __NR_chown32 212/* ok - without 32 -obsolete -> fchownat */ -#define __NR_setuid32 213/* ok - without 32 */ -#define __NR_setgid32 214/* ok - without 32 */ -#define __NR_setfsuid32 215/* ok - without 32 */ -#define __NR_setfsgid32 216/* ok - without 32 */ -#define __NR_pivot_root 217/* ok */ -#define __NR_mincore 218/* ok */ -#define __NR_madvise 219/* ok */ -#define __NR_getdents64 220/* ok */ -#define __NR_fcntl64 221/* ok */ -/* 223 is unused */ -#define __NR_gettid 224/* ok */ -#define __NR_readahead 225/* ok */ -#define __NR_setxattr 226/* ok */ -#define __NR_lsetxattr 227/* ok */ -#define __NR_fsetxattr 228/* ok */ -#define __NR_getxattr 229/* ok */ -#define __NR_lgetxattr 230/* ok */ -#define __NR_fgetxattr 231/* ok */ -#define __NR_listxattr 232/* ok */ -#define __NR_llistxattr 233/* ok */ -#define __NR_flistxattr 234/* ok */ -#define __NR_removexattr 235/* ok */ -#define __NR_lremovexattr 236/* ok */ -#define __NR_fremovexattr 237/* ok */ -#define __NR_tkill 238/* ok */ -#define __NR_sendfile64 239/* ok */ -#define __NR_futex 240/* ok */ -#define __NR_sched_setaffinity 241/* ok */ -#define __NR_sched_getaffinity 242/* ok */ -#define __NR_set_thread_area 243/* remove */ -#define __NR_get_thread_area 244/* remove */ -#define __NR_io_setup 245/* ok */ -#define __NR_io_destroy 246/* ok */ -#define __NR_io_getevents 247/* ok */ -#define __NR_io_submit 248/* ok */ -#define __NR_io_cancel 249/* ok */ -#define __NR_fadvise64 250/* remove -> sys_fadvise64_64 */ -/* 251 is available for reuse (was briefly sys_set_zone_reclaim) */ -#define __NR_exit_group 252/* ok */ -#define __NR_lookup_dcookie 253/* ok */ -#define __NR_epoll_create 254/* ok */ -#define __NR_epoll_ctl 255/* ok */ -#define __NR_epoll_wait 256/* obsolete -> sys_epoll_pwait */ -#define __NR_remap_file_pages 257/* only for mmu */ -#define __NR_set_tid_address 258/* ok */ -#define __NR_timer_create 259/* ok */ -#define __NR_timer_settime (__NR_timer_create+1)/* 260 */ /* ok */ -#define __NR_timer_gettime (__NR_timer_create+2)/* 261 */ /* ok */ -#define __NR_timer_getoverrun (__NR_timer_create+3)/* 262 */ /* ok */ -#define __NR_timer_delete (__NR_timer_create+4)/* 263 */ /* ok */ -#define __NR_clock_settime (__NR_timer_create+5)/* 264 */ /* ok */ -#define __NR_clock_gettime (__NR_timer_create+6)/* 265 */ /* ok */ -#define __NR_clock_getres (__NR_timer_create+7)/* 266 */ /* ok */ -#define __NR_clock_nanosleep (__NR_timer_create+8)/* 267 */ /* ok */ -#define __NR_statfs64 268/* ok */ -#define __NR_fstatfs64 269/* ok */ -#define __NR_tgkill 270/* ok */ -#define __NR_utimes 271/* obsolete -> sys_futimesat */ -#define __NR_fadvise64_64 272/* ok */ -#define __NR_vserver 273/* ok */ -#define __NR_mbind 274/* only for mmu */ -#define __NR_get_mempolicy 275/* only for mmu */ -#define __NR_set_mempolicy 276/* only for mmu */ -#define __NR_mq_open 277/* ok */ -#define __NR_mq_unlink (__NR_mq_open+1)/* 278 */ /* ok */ -#define __NR_mq_timedsend (__NR_mq_open+2)/* 279 */ /* ok */ -#define __NR_mq_timedreceive (__NR_mq_open+3)/* 280 */ /* ok */ -#define __NR_mq_notify (__NR_mq_open+4)/* 281 */ /* ok */ -#define __NR_mq_getsetattr (__NR_mq_open+5)/* 282 */ /* ok */ -#define __NR_kexec_load 283/* ok */ -#define __NR_waitid 284/* ok */ -/* #define __NR_sys_setaltroot 285 */ -#define __NR_add_key 286/* ok */ -#define __NR_request_key 287/* ok */ -#define __NR_keyctl 288/* ok */ -#define __NR_ioprio_set 289/* ok */ -#define __NR_ioprio_get 290/* ok */ -#define __NR_inotify_init 291/* ok */ -#define __NR_inotify_add_watch 292/* ok */ -#define __NR_inotify_rm_watch 293/* ok */ -#define __NR_migrate_pages 294/* mmu */ -#define __NR_openat 295/* ok */ -#define __NR_mkdirat 296/* ok */ -#define __NR_mknodat 297/* ok */ -#define __NR_fchownat 298/* ok */ -#define __NR_futimesat 299/* obsolete -> sys_utimesat */ -#define __NR_fstatat64 300/* stat64 */ -#define __NR_unlinkat 301/* ok */ -#define __NR_renameat 302/* ok */ -#define __NR_linkat 303/* ok */ -#define __NR_symlinkat 304/* ok */ -#define __NR_readlinkat 305/* ok */ -#define __NR_fchmodat 306/* ok */ -#define __NR_faccessat 307/* ok */ -#define __NR_pselect6 308/* obsolete -> sys_pselect7 */ -#define __NR_ppoll 309/* ok */ -#define __NR_unshare 310/* ok */ -#define __NR_set_robust_list 311/* ok */ -#define __NR_get_robust_list 312/* ok */ -#define __NR_splice 313/* ok */ -#define __NR_sync_file_range 314/* ok */ -#define __NR_tee 315/* ok */ -#define __NR_vmsplice 316/* ok */ -#define __NR_move_pages 317/* mmu */ -#define __NR_getcpu 318/* ok */ -#define __NR_epoll_pwait 319/* ok */ -#define __NR_utimensat 320/* ok */ -#define __NR_signalfd 321/* ok */ -#define __NR_timerfd_create 322/* ok */ -#define __NR_eventfd 323/* ok */ -#define __NR_fallocate 324/* ok */ -#define __NR_semtimedop 325/* ok - semaphore group */ -#define __NR_timerfd_settime 326/* ok */ -#define __NR_timerfd_gettime 327/* ok */ -/* sysv ipc syscalls */ -#define __NR_semctl 328/* ok */ -#define __NR_semget 329/* ok */ -#define __NR_semop 330/* ok */ -#define __NR_msgctl 331/* ok */ -#define __NR_msgget 332/* ok */ -#define __NR_msgrcv 333/* ok */ -#define __NR_msgsnd 334/* ok */ -#define __NR_shmat 335/* ok */ -#define __NR_shmctl 336/* ok */ -#define __NR_shmdt 337/* ok */ -#define __NR_shmget 338/* ok */ - - -#define __NR_signalfd4 339/* new */ -#define __NR_eventfd2 340/* new */ -#define __NR_epoll_create1 341/* new */ -#define __NR_dup3 342/* new */ -#define __NR_pipe2 343/* new */ -#define __NR_inotify_init1 344/* new */ -#define __NR_socket 345/* new */ -#define __NR_socketpair 346/* new */ -#define __NR_bind 347/* new */ -#define __NR_listen 348/* new */ -#define __NR_accept 349/* new */ -#define __NR_connect 350/* new */ -#define __NR_getsockname 351/* new */ -#define __NR_getpeername 352/* new */ -#define __NR_sendto 353/* new */ -#define __NR_send 354/* new */ -#define __NR_recvfrom 355/* new */ -#define __NR_recv 356/* new */ -#define __NR_setsockopt 357/* new */ -#define __NR_getsockopt 358/* new */ -#define __NR_shutdown 359/* new */ -#define __NR_sendmsg 360/* new */ -#define __NR_recvmsg 361/* new */ -#define __NR_accept04 362/* new */ -#define __NR_preadv 363/* new */ -#define __NR_pwritev 364/* new */ - -#define __NR_syscalls 365 - -#ifdef __KERNEL__ -#ifndef __ASSEMBLY__ - -#define __ARCH_WANT_IPC_PARSE_VERSION -/* #define __ARCH_WANT_OLD_READDIR */ -/* #define __ARCH_WANT_OLD_STAT */ -#define __ARCH_WANT_STAT64 -#define __ARCH_WANT_SYS_ALARM -#define __ARCH_WANT_SYS_GETHOSTNAME -#define __ARCH_WANT_SYS_PAUSE -#define __ARCH_WANT_SYS_SGETMASK -#define __ARCH_WANT_SYS_SIGNAL -#define __ARCH_WANT_SYS_TIME -#define __ARCH_WANT_SYS_UTIME -#define __ARCH_WANT_SYS_WAITPID -#define __ARCH_WANT_SYS_SOCKETCALL -#define __ARCH_WANT_SYS_FADVISE64 -#define __ARCH_WANT_SYS_GETPGRP -#define __ARCH_WANT_SYS_LLSEEK -#define __ARCH_WANT_SYS_NICE -/* #define __ARCH_WANT_SYS_OLD_GETRLIMIT */ -#define __ARCH_WANT_SYS_OLDUMOUNT -#define __ARCH_WANT_SYS_SIGPENDING -#define __ARCH_WANT_SYS_SIGPROCMASK -#define __ARCH_WANT_SYS_RT_SIGACTION -/* #define __ARCH_WANT_SYS_RT_SIGSUSPEND */ - -/* -* "Conditional" syscalls -* -* What we want is __attribute__((weak,alias("sys_ni_syscall"))), -* but it doesn't work on all toolchains, so we just do it by hand -*/ -#define cond_syscall (x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall"); - -#endif /* __ASSEMBLY__ */ -#endif /* __KERNEL__ */ -#endif /* _ASM_MICROBLAZE_UNISTD_H */ +#ifndef __MICROBLAZE_UNISTD_H +#define __MICROBLAZE_UNISTD_H + +#define __ARCH_HAVE_MMU +#define __ARCH_WANT_SYSCALL_NO_AT +#define __ARCH_WANT_SYSCALL_NO_FLAGS +#define __ARCH_WANT_SYSCALL_OFF_T +#define __ARCH_WANT_SYSCALL_DEPRECATED + +#endif /* __MICROBLAZE_UNISTD_H */ + +#include <asm-generic/unistd.h> + +#undef __ARCH_WANT_SYS_RT_SIGSUSPEND
arch/microblaze/kernel/Makefile +1 -1
@@ -7,7 +7,7 @@ extra-y := head.o vmlinux.lds obj-y += exceptions.o \ hw_exception_handler.o init_task.o intc.o irq.o of_device.o \ of_platform.o process.o prom.o prom_parse.o ptrace.o \ - setup.o signal.o sys_microblaze.o timer.o traps.o + setup.o signal.o sys_microblaze.o timer.o traps.o syscall_table.o obj-y += cpu/
arch/microblaze/kernel/entry-nommu.S +11 -24
@@ -551,34 +551,26 @@ no_work_pending: rtid r14, 0 nop -sys_vfork_wrapper: - brid sys_vfork +ENTRY(sys_vfork) + brid microblaze_vfork addk r5, r1, r0 -sys_clone_wrapper: - brid sys_clone +ENTRY(sys_clone) + brid microblaze_clone addk r7, r1, r0 -sys_execve_wrapper: - brid sys_execve +ENTRY(sys_execve) + brid microblaze_execve addk r8, r1, r0 -sys_sigreturn_wrapper: - brid sys_sigreturn - addk r5, r1, r0 +ENTRY(sys_sigaltstack) + brid microblaze_sigaltstack + addk r7, r1, r0 -sys_rt_sigreturn_wrapper: - brid sys_rt_sigreturn +ENTRY(sys_rt_sigreturn) + brid microblaze_rt_sigreturn addk r5, r1, r0 -sys_sigsuspend_wrapper: - brid sys_rt_sigsuspend - addk r6, r1, r0 - -sys_rt_sigsuspend_wrapper: - brid sys_rt_sigsuspend - addk r7, r1, r0 - /* Interrupt vector table */ .section .init.ivt, "ax" .org 0x0
@@ -589,8 +581,3 @@ sys_rt_sigsuspend_wrapper: brai _hw_exception_handler .org 0x60 brai _debug_exception - -.section .rodata,"a" -#include "syscall_table.S" - -syscall_table_size=(.-sys_call_table)
arch/microblaze/kernel/entry.S +0 -6
@@ -1108,9 +1108,3 @@ ENTRY(_break) .org 0x60 brai TOPHYS(_debug_exception); /* debug trap handler*/ - -.section .rodata,"a" -#include "syscall_table.S" - -syscall_table_size=(.-sys_call_table) -
arch/microblaze/kernel/signal.c +3 -3
@@ -129,8 +129,8 @@ sys_sigaction(int sig, const struct old_sigaction *act,return ret; } -asmlinkage int -sys_sigaltstack (const stack_t __user *uss,stack_t __user *uoss, +asmlinkage long +microblaze_sigaltstack (const stack_t __user *uss,stack_t __user *uoss,struct pt_regs *regs) {return do_sigaltstack (uss, uoss, regs->r1);
@@ -209,7 +209,7 @@ badframe:return 0 ; } -asmlinkage int sys_rt_sigreturn(struct pt_regs *regs) +asmlinkage long microblaze_rt_sigreturn (struct pt_regs *regs) {struct rt_sigframe __user *frame = (struct rt_sigframe __user *)(regs->r1 +STATE_SAVE_ARG_SPACE );
arch/microblaze/kernel/sys_microblaze.c +3 -3
@@ -134,20 +134,20 @@ sys_ipc(uint call, int first, int second, int third, void *ptr, long fifth)return ret; } -asmlinkage int sys_vfork(struct pt_regs *regs) +asmlinkage int microblaze_vfork(struct pt_regs *regs) {return do_fork (CLONE_VFORK |CLONE_VM |SIGCHLD , regs->r1, regs,0 ,NULL ,NULL ); } -asmlinkage int sys_clone(int flags, unsigned long stack, struct pt_regs *regs) +asmlinkage int microblaze_clone(int flags, unsigned long stack, struct pt_regs *regs) {if (!stack) stack = regs->r1;return do_fork (flags, stack, regs,0 ,NULL ,NULL ); } -asmlinkage int sys_execve(char __user *filenamei, char __user *__user *argv, +asmlinkage int microblaze_execve(char __user *filenamei, char __user *__user *argv,char __user *__user *envp,struct pt_regs *regs) {int error;
arch/microblaze/kernel/syscall_table.S deleted +0 -371
371 lines not on this page · raw message
arch/microblaze/kernel/syscall_table.c new file +12 -0
@@ -0,0 +1,12 @@ +#include <linux/syscalls.h> +#include <linux/signal.h> +#include <linux/unistd.h> + +#include <asm/syscalls.h> + +#undef __SYSCALL +#define __SYSCALL (nr, call) [nr] = (call), + +void *sys_call_table[__NR_syscalls] = { +#include <asm/unistd.h> +};
Signature · 1 line
1.6.3.1
Arnd Bergmann
maintainerRe: [PATCH 01/11] ipc: use __ARCH_WANT_IPC_PARSE_VERSION in ipc/util.h
In reply to Arnd BergmannQuoted 9 lines · Arnd Bergmann
The definition of
ipc_parse_versiondepends on__ARCH_WANT_IPC_PARSE_VERSION, but the header file declares it conditionally based on the architecture.Use the macro consistently to make it easier to add new architectures.
Signed-off-by Arnd Bergmann <[email protected]>Acked-by Serge Hallyn <[email protected]>
Michal, you can ignore this one now, it just went in.
Arnd <><
PATCH 1/1 ipc: unbreak 32-bit shmctl/semctl/msgctl
31a985f "ipc: use __ARCH_WANT_IPC_PARSE_VERSION in ipc/util.h" would choose the implementation of ipc_parse_version() based on a symbol defined in <asm/unistd.h>.
But it failed to also include this header and thus broke IPC_64-passing 32-bit userspace because the flag wasn't masked out properly anymore and the command not understood.
Include <linux/unistd.h> to give the architecture a chance to ask for the no-no-op ipc_parse_version().
--- ipc/util.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
ipc/util.h +1 -0
@@ -10,6 +10,7 @@#ifndef _IPC_UTIL_H#define _IPC_UTIL_H +#include <linux/unistd.h> #include <linux/err.h> #define SEQ_MULTIPLIER (IPCMNI)
Signature · 1 line
1.6.3.2
Re: [patch] ipc: unbreak 32-bit shmctl/semctl/msgctl
Quoted 4 lines · Johannes Weiner
31a985f "ipc: use
__ARCH_WANT_IPC_PARSE_VERSIONinipc/util.h" would choose the implementation ofipc_parse_version()based on a symbol defined in <asm/unistd.h>.
Quoted 8 lines
But it failed to also include this header and thus broke IPC_64-passing 32-bit userspace because the flag wasn't masked out properly anymore and the command not understood.
Include <
linux/unistd.h> to give the architecture a chance to ask for the no-no-opipc_parse_version().Signed-off-by Johannes Weiner <[email protected]>
Obviously fixes the bug I introduced, sorry for the trouble and thanks for fixing it!
Johannes Weiner
Acked-by Arnd BergmannRe: [patch] ipc: unbreak 32-bit shmctl/semctl/msgctl
Quoted 12 lines · Arnd Bergmann
Quoted 11 lines · Johannes Weiner
31a985f "ipc: use
__ARCH_WANT_IPC_PARSE_VERSIONinipc/util.h" would choose the implementation ofipc_parse_version()based on a symbol defined in <asm/unistd.h>.But it failed to also include this header and thus broke IPC_64-passing 32-bit userspace because the flag wasn't masked out properly anymore and the command not understood.
Include <
linux/unistd.h> to give the architecture a chance to ask for the no-no-opipc_parse_version().
Quoted 6 lines
Quoted 1 line
Signed-off-by Johannes Weiner <[email protected]>Acked-by Arnd Bergmann <[email protected]>Obviously fixes the bug I introduced, sorry for the trouble and thanks for fixing it!
Linus, could you apply this patch?
OTOH, breaking mplayer on x86_32 is probably the way to push 64-bit as the driving factor in adoption of new technology seems to be porn.
Hannes
---
From: Johannes Weiner <[email protected]>
Date: Sat, 20 Jun 2009 02:23:29 +0200
Subject: [PATCH] ipc: unbreak 32-bit shmctl/semctl/msgctl
31a985f "ipc: use __ARCH_WANT_IPC_PARSE_VERSION in ipc/util.h" would choose the implementation of ipc_parse_version() based on a symbol defined in <asm/unistd.h>.
But it failed to also include this header and thus broke IPC_64-passing 32-bit userspace because the flag wasn't masked out properly anymore and the command not understood.
Include <linux/unistd.h> to give the architecture a chance to ask for the no-no-op ipc_parse_version().
--- ipc/util.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
ipc/util.h +1 -0
@@ -10,6 +10,7 @@#ifndef _IPC_UTIL_H#define _IPC_UTIL_H +#include <linux/unistd.h> #include <linux/err.h> #define SEQ_MULTIPLIER (IPCMNI)
Signature · 1 line
1.6.3.2
Michal Simek
maintainerRe: [microblaze-uclinux] [PATCH 10/11] microblaze: use generic system.h
In reply to Arnd BergmannHi,
this patch can't be applied because generic implementation expect pointer to task struct but microblaze low level code expect thread_info. I have one patch for MMU kernel which fixed it but I don't have it for noMMU kernel.
Thanks,
Michal
Quoted 165 lines · Arnd Bergmann
From: Remis Lima Baima <[email protected]>
Parts of the microblaze
system.hcan be removed by falling back to the asm-generic version.Signed-off-by Remis Lima Baima <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>--- arch/microblaze/include/asm/cmpxchg-local.h | 1 + arch/microblaze/include/asm/irqflags.h | 2 +- arch/microblaze/include/asm/system.h | 124 +++++++-------------------- 3 files changed, 32 insertions(+), 95 deletions(-) create mode 100644 arch/microblaze/include/asm/cmpxchg-local.hrewrite
arch/microblaze/include/asm/system.h(67%)arch/microblaze/include/asm/cmpxchg-local.h new file +1
-0@@ -0,0 +1 @@ +#include <asm-generic/cmpxchg-local.h> arch/microblaze/include/asm/irqflags.h +1
-1@@ -9,7 +9,7 @@#ifndef _ASM_MICROBLAZE_IRQFLAGS_H#define _ASM_MICROBLAZE_IRQFLAGS_H -#include <linux/irqflags.h> +#include <asm/registers.h> # if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR arch/microblaze/include/asm/system.h +30
-94@@ -1,94 +1,30 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_SYSTEM_H -#define _ASM_MICROBLAZE_SYSTEM_H - -#include <asm/registers.h> -#include <asm/setup.h> -#include <asm/irqflags.h> - -#include <asm-generic/cmpxchg.h> -#include <asm-generic/cmpxchg-local.h> - -struct task_struct ; -struct thread_info ; - -extern struct task_struct *_switch_to (struct thread_info *prev, -struct thread_info *next); - -#define switch_to (prev, next, last) \ - do { \ - (last) = _switch_to(task_thread_info(prev), \ - task_thread_info(next)); \ - } while (0) - -#define smp_read_barrier_depends () do {} while (0) -#define read_barrier_depends () do {} while (0) - -#define nop () asm volatile ("nop") -#define mb () barrier() -#define rmb () mb() -#define wmb () mb() -#define set_mb (var, value) do { var = value; mb(); } while (0) -#define set_wmb (var, value) do { var = value; wmb(); } while (0) - -#define smp_mb () mb() -#define smp_rmb () rmb() -#define smp_wmb () wmb() - -void show_trace (struct task_struct *task,unsigned long *stack); -void __bad_xchg (volatile void *ptr,int size); - -static inline unsigned long __xchg (unsigned long x,volatile void *ptr, -int size) -{ -unsigned long ret; -unsigned long flags; - -switch (size) { -case 1 : -local_irq_save (flags); - ret = *(volatile unsigned char *)ptr; - *(volatile unsigned char *)ptr = x; -local_irq_restore (flags); -break ; - -case 4 : -local_irq_save (flags); - ret = *(volatile unsigned long *)ptr; - *(volatile unsigned long *)ptr = x; -local_irq_restore (flags); -break ; -default : -__bad_xchg (ptr, size), ret =0 ; -break ; - } - -return ret; -} - -void disable_hlt (void ); -void enable_hlt (void ); -void default_idle (void ); - -#define xchg (ptr, x) \ - ((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) - -void free_init_pages (char *what,unsigned long begin,unsigned long end); -void free_initmem (void ); -extern char *klimit; -extern void ret_from_fork (void ); - -#ifdef CONFIG_DEBUG_FS -extern struct dentry *of_debugfs_root; -#endif - -#define arch_align_stack (x) (x) - -#endif /* _ASM_MICROBLAZE_SYSTEM_H */ +/* +* Copyright (C) 2006 Atmark Techno, Inc. +* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +*/ +#ifndef _ASM_MICROBLAZE_SYSTEM_H +#define _ASM_MICROBLAZE_SYSTEM_H + +#define __switch_to _switch_to + +#include <asm/irqflags.h> +#include <asm-generic/system.h> + +#ifdef CONFIG_DEBUG_FS +extern struct dentry *of_debugfs_root; +#endif + +void show_trace (struct task_struct *task,unsigned long *stack); +void disable_hlt (void ); +void enable_hlt (void ); +void default_idle (void ); +void free_init_pages (char *what,unsigned long begin,unsigned long end); +void free_initmem (void ); + +extern char *klimit; +extern void ret_from_fork (void ); + +#endif /* _ASM_MICROBLAZE_SYSTEM_H */
Signature · 2 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854
Michal Simek
maintainerRe: [microblaze-uclinux] [PATCH 03/11] microblaze: fall back on generic header files for the ABI
In reply to Arnd BergmannAdded to next branch for test.
I had to do one change.
Microblaze needs __kernel_mode_t as short.
+ I removed __kernel_size_t and I'll recompile toolchain for removing warning messages
Thanks,
Michal
Quoted 1,072 lines · Arnd Bergmann
Almost all of the ABI relevant header files now have generic versions, so use those now in order to reduce the amount of architecture specific code.
Signed-off-by Arnd Bergmann <[email protected]>--- arch/microblaze/include/asm/ioctls.h | 92 +------------- arch/microblaze/include/asm/ipcbuf.h | 37 +----- arch/microblaze/include/asm/mman.h | 26 +---- arch/microblaze/include/asm/msgbuf.h | 32 +----- arch/microblaze/include/asm/param.h | 31 +----- arch/microblaze/include/asm/posix_types.h | 94 +++---------- arch/microblaze/include/asm/sembuf.h | 35 +----- arch/microblaze/include/asm/shmbuf.h | 43 +------ arch/microblaze/include/asm/siginfo.h | 14 -- arch/microblaze/include/asm/socket.h | 70 +---------- arch/microblaze/include/asm/sockios.h | 24 +---- arch/microblaze/include/asm/stat.h | 69 +---------- arch/microblaze/include/asm/swab.h | 9 +- arch/microblaze/include/asm/termbits.h | 204 +---------------------------- arch/microblaze/include/asm/termios.h | 89 +------------- arch/microblaze/include/asm/types.h | 39 +------ arch/microblaze/include/asm/ucontext.h | 23 +--- 17 files changed, 36 insertions(+), 895 deletions(-)rewrite
arch/microblaze/include/asm/ioctls.h(100%) rewritearch/microblaze/include/asm/ipcbuf.h(100%) rewritearch/microblaze/include/asm/mman.h(96%) rewritearch/microblaze/include/asm/msgbuf.h(100%) rewritearch/microblaze/include/asm/param.h(100%) rewritearch/microblaze/include/asm/posix_types.h(96%) rewritearch/microblaze/include/asm/sembuf.h(100%) rewritearch/microblaze/include/asm/shmbuf.h(100%) rewritearch/microblaze/include/asm/socket.h(100%) rewritearch/microblaze/include/asm/sockios.h(100%) rewritearch/microblaze/include/asm/stat.h(100%) rewritearch/microblaze/include/asm/termbits.h(100%) rewritearch/microblaze/include/asm/termios.h(100%) rewritearch/microblaze/include/asm/types.h(100%) rewritearch/microblaze/include/asm/ucontext.h(100%)arch/microblaze/include/asm/ioctls.h +1
-91@@ -1,91 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_IOCTLS_H -#define _ASM_MICROBLAZE_IOCTLS_H - -#include <linux/ioctl.h> - -/* 0x54 is just a magic number to make these relatively unique ('T') */ - -#define TCGETS 0x5401 -#define TCSETS 0x5402 -#define TCSETSW 0x5403 -#define TCSETSF 0x5404 -#define TCGETA 0x5405 -#define TCSETA 0x5406 -#define TCSETAW 0x5407 -#define TCSETAF 0x5408 -#define TCSBRK 0x5409 -#define TCXONC 0x540A -#define TCFLSH 0x540B -#define TIOCEXCL 0x540C -#define TIOCNXCL 0x540D -#define TIOCSCTTY 0x540E -#define TIOCGPGRP 0x540F -#define TIOCSPGRP 0x5410 -#define TIOCOUTQ 0x5411 -#define TIOCSTI 0x5412 -#define TIOCGWINSZ 0x5413 -#define TIOCSWINSZ 0x5414 -#define TIOCMGET 0x5415 -#define TIOCMBIS 0x5416 -#define TIOCMBIC 0x5417 -#define TIOCMSET 0x5418 -#define TIOCGSOFTCAR 0x5419 -#define TIOCSSOFTCAR 0x541A -#define FIONREAD 0x541B -#define TIOCINQ FIONREAD -#define TIOCLINUX 0x541C -#define TIOCCONS 0x541D -#define TIOCGSERIAL 0x541E -#define TIOCSSERIAL 0x541F -#define TIOCPKT 0x5420 -#define FIONBIO 0x5421 -#define TIOCNOTTY 0x5422 -#define TIOCSETD 0x5423 -#define TIOCGETD 0x5424 -#define TCSBRKP 0x5425/* Needed for POSIX tcsendbreak() */ -#define TIOCTTYGSTRUCT 0x5426/* For debugging only */ -#define TIOCSBRK 0x5427/* BSD compatibility */ -#define TIOCCBRK 0x5428/* BSD compatibility */ -#define TIOCGSID 0x5429/* Return the session ID of FD */ -/* Get Pty Number (of pty-mux device) */ -#define TIOCGPTN _IOR('T', 0x30, unsigned int) -#define TIOCSPTLCK _IOW('T', 0x31, int)/* Lock/unlock Pty */ - -#define FIONCLEX 0x5450/* these numbers need to be adjusted. */ -#define FIOCLEX 0x5451 -#define FIOASYNC 0x5452 -#define TIOCSERCONFIG 0x5453 -#define TIOCSERGWILD 0x5454 -#define TIOCSERSWILD 0x5455 -#define TIOCGLCKTRMIOS 0x5456 -#define TIOCSLCKTRMIOS 0x5457 -#define TIOCSERGSTRUCT 0x5458/* For debugging only */ -#define TIOCSERGETLSR 0x5459/* Get line status register */ -#define TIOCSERGETMULTI 0x545A/* Get multiport config */ -#define TIOCSERSETMULTI 0x545B/* Set multiport config */ - -#define TIOCMIWAIT 0x545C/* wait for a change on serial input line(s) */ -#define TIOCGICOUNT 0x545D/* read serial port inline interrupt counts */ - -#define FIOQSIZE 0x545E - -/* Used for packet mode */ -#define TIOCPKT_DATA 0 -#define TIOCPKT_FLUSHREAD 1 -#define TIOCPKT_FLUSHWRITE 2 -#define TIOCPKT_STOP 4 -#define TIOCPKT_START 8 -#define TIOCPKT_NOSTOP 16 -#define TIOCPKT_DOSTOP 32 - -#define TIOCSER_TEMT 0x01/* Transmitter physically empty */ - -#endif /* _ASM_MICROBLAZE_IOCTLS_H */ +#include <asm-generic/ioctls.h> arch/microblaze/include/asm/ipcbuf.h +1
-36@@ -1,36 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_IPCBUF_H -#define _ASM_MICROBLAZE_IPCBUF_H - -/* -* The user_ipc_perm structure for microblaze architecture. -* Note extra padding because this structure is passed back and forth -* between kernel and user space. -* -* Pad space is left for: -* - 32-bit mode_t and seq -* - 2 miscellaneous 32-bit values -*/ - -struct ipc64_perm { -__kernel_key_t key; -__kernel_uid32_t uid; -__kernel_gid32_t gid; -__kernel_uid32_t cuid; -__kernel_gid32_t cgid; -__kernel_mode_t mode; -unsigned short __pad1; -unsigned short seq; -unsigned short __pad2; -unsigned long __unused1; -unsigned long __unused2; -}; - -#endif /* _ASM_MICROBLAZE_IPCBUF_H */ +#include <asm-generic/ipcbuf.h> arch/microblaze/include/asm/mman.h +1
-25@@ -1,25 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_MMAN_H -#define _ASM_MICROBLAZE_MMAN_H - -#include <asm-generic/mman.h> - -#define MAP_GROWSDOWN 0x0100/* stack-like segment */ -#define MAP_DENYWRITE 0x0800/* ETXTBSY */ -#define MAP_EXECUTABLE 0x1000/* mark it as an executable */ -#define MAP_LOCKED 0x2000/* pages are locked */ -#define MAP_NORESERVE 0x4000/* don't check for reservations */ -#define MAP_POPULATE 0x8000/* populate (prefault) pagetables */ -#define MAP_NONBLOCK 0x10000/* do not block on IO */ - -#define MCL_CURRENT 1/* lock all current mappings */ -#define MCL_FUTURE 2/* lock all future mappings */ - -#endif /* _ASM_MICROBLAZE_MMAN_H */ +#include <asm-generic/mman.h> arch/microblaze/include/asm/msgbuf.h +1
-31@@ -1,31 +1 @@ -#ifndef _ASM_MICROBLAZE_MSGBUF_H -#define _ASM_MICROBLAZE_MSGBUF_H - -/* -* The msqid64_ds structure for microblaze architecture. -* Note extra padding because this structure is passed back and forth -* between kernel and user space. -* -* Pad space is left for: -* - 64-bit time_t to solve y2038 problem -* - 2 miscellaneous 32-bit values -*/ - -struct msqid64_ds { -struct ipc64_perm msg_perm; -__kernel_time_t msg_stime;/* last msgsnd time */ -unsigned long __unused1; -__kernel_time_t msg_rtime;/* last msgrcv time */ -unsigned long __unused2; -__kernel_time_t msg_ctime;/* last change time */ -unsigned long __unused3; -unsigned long msg_cbytes;/* current number of bytes on queue */ -unsigned long msg_qnum;/* number of messages in queue */ -unsigned long msg_qbytes;/* max number of bytes on queue */ -__kernel_pid_t msg_lspid;/* pid of last msgsnd */ -__kernel_pid_t msg_lrpid;/* last receive pid */ -unsigned long __unused4; -unsigned long __unused5; -}; - -#endif /* _ASM_MICROBLAZE_MSGBUF_H */ +#include <asm-generic/msgbuf.h> arch/microblaze/include/asm/param.h +1
-30@@ -1,30 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_PARAM_H -#define _ASM_MICROBLAZE_PARAM_H - -#ifdef __KERNEL__ -#define HZ CONFIG_HZ/* internal kernel timer frequency */ -#define USER_HZ 100/* for user interfaces in "ticks" */ -#define CLOCKS_PER_SEC (USER_HZ)/* frequency at which times() counts */ -#endif /* __KERNEL__ */ - -#ifndef HZ -#define HZ 100 -#endif - -#define EXEC_PAGESIZE 4096 - -#ifndef NOGROUP -#define NOGROUP (-1) -#endif - -#define MAXHOSTNAMELEN 64/* max length of hostname */ - -#endif /* _ASM_MICROBLAZE_PARAM_H */ +#include <asm-generic/param.h> arch/microblaze/include/asm/posix_types.h +21
-73@@ -1,73 +1,21 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_POSIX_TYPES_H -#define _ASM_MICROBLAZE_POSIX_TYPES_H - -/* -* This file is generally used by user-level software, so you need to -* be a little careful about namespace pollution etc. Also, we cannot -* assume GCC is being used. -*/ - -typedef unsigned long __kernel_ino_t ; -typedef unsigned short __kernel_mode_t ; -typedef unsigned int __kernel_nlink_t ; -typedef long __kernel_off_t ; -typedef int __kernel_pid_t ; -typedef unsigned int __kernel_ipc_pid_t ; -typedef unsigned int __kernel_uid_t ; -typedef unsigned int __kernel_gid_t ; -typedef unsigned long __kernel_size_t ; -typedef long __kernel_ssize_t ; -typedef int __kernel_ptrdiff_t ; -typedef long __kernel_time_t ; -typedef long __kernel_suseconds_t ; -typedef long __kernel_clock_t ; -typedef int __kernel_timer_t ; -typedef int __kernel_clockid_t ; -typedef int __kernel_daddr_t ; -typedef char *__kernel_caddr_t ; -typedef unsigned short __kernel_uid16_t ; -typedef unsigned short __kernel_gid16_t ; -typedef unsigned int __kernel_uid32_t ; -typedef unsigned int __kernel_gid32_t ; - -typedef unsigned int __kernel_old_uid_t ; -typedef unsigned int __kernel_old_gid_t ; -typedef unsigned int __kernel_old_dev_t ; - -#ifdef __GNUC__ -typedef long long __kernel_loff_t ; -#endif - -typedef struct { -#if defined(__KERNEL__) || defined(__USE_ALL) -int val[2 ]; -#else /* !defined(__KERNEL__) && !defined(__USE_ALL) */ -int __val[2 ]; -#endif /* !defined(__KERNEL__) && !defined(__USE_ALL) */ -}__kernel_fsid_t ; - -#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ <2 ) - -#undef __FD_SET -#define __FD_SET (d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) - -#undef __FD_CLR -#define __FD_CLR (d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) - -#undef __FD_ISSET -#define __FD_ISSET (d, set) (!!((set)->fds_bits[__FDELT(d)] & __FDMASK(d))) - -#undef __FD_ZERO -#define __FD_ZERO (fdsetp) (memset(fdsetp, 0, sizeof(*(fd_set *)fdsetp))) - -#endif /* defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) */ - -#endif /* _ASM_MICROBLAZE_POSIX_TYPES_H */ +#ifndef __ASM_MICRBLAZE_POSIX_TYPES_H +#define __ASM_MICRBLAZE_POSIX_TYPES_H + +/* +* Our tool chain uses 'unsigned long' for size_t, +* so the kernel should too. If there is a chance +* to update the tool chain, that should probably +* be done so it does the same as most of the +* other architectures. +* +* Overriding this mostly has the effect of +* avoiding compiler warnings. +*/ +typedef unsigned long __kernel_size_t ; +typedef long __kernel_ssize_t ; +typedef long __kernel_ptrdiff_t ; +#define __kernel_size_t __kernel_size_t + +#include <asm-generic/posix_types.h> + +#endif /* __ASM_MICRBLAZE_POSIX_TYPES_H */ arch/microblaze/include/asm/sembuf.h +1
-34@@ -1,34 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_SEMBUF_H -#define _ASM_MICROBLAZE_SEMBUF_H - -/* -* The semid64_ds structure for microblaze architecture. -* Note extra padding because this structure is passed back and forth -* between kernel and user space. -* -* Pad space is left for: -* - 64-bit time_t to solve y2038 problem -* - 2 miscellaneous 32-bit values -*/ - -struct semid64_ds { -struct ipc64_perm sem_perm;/* permissions .. see ipc.h */ -__kernel_time_t sem_otime;/* last semop time */ -unsigned long __unused1; -__kernel_time_t sem_ctime;/* last change time */ -unsigned long __unused2; -unsigned long sem_nsems;/* no. of semaphores in array */ -unsigned long __unused3; -unsigned long __unused4; -}; - - -#endif /* _ASM_MICROBLAZE_SEMBUF_H */ +#include <asm-generic/sembuf.h> arch/microblaze/include/asm/shmbuf.h +1
-42@@ -1,42 +1 @@ -#ifndef _ASM_MICROBLAZE_SHMBUF_H -#define _ASM_MICROBLAZE_SHMBUF_H - -/* -* The shmid64_ds structure for microblaze architecture. -* Note extra padding because this structure is passed back and forth -* between kernel and user space. -* -* Pad space is left for: -* - 64-bit time_t to solve y2038 problem -* - 2 miscellaneous 32-bit values -*/ - -struct shmid64_ds { -struct ipc64_perm shm_perm;/* operation perms */ -size_t shm_segsz;/* size of segment (bytes) */ -__kernel_time_t shm_atime;/* last attach time */ -unsigned long __unused1; -__kernel_time_t shm_dtime;/* last detach time */ -unsigned long __unused2; -__kernel_time_t shm_ctime;/* last change time */ -unsigned long __unused3; -__kernel_pid_t shm_cpid;/* pid of creator */ -__kernel_pid_t shm_lpid;/* pid of last operator */ -unsigned long shm_nattch;/* no. of current attaches */ -unsigned long __unused4; -unsigned long __unused5; -}; - -struct shminfo64 { -unsigned long shmmax; -unsigned long shmmin; -unsigned long shmmni; -unsigned long shmseg; -unsigned long shmall; -unsigned long __unused1; -unsigned long __unused2; -unsigned long __unused3; -unsigned long __unused4; -}; - -#endif /* _ASM_MICROBLAZE_SHMBUF_H */ +#include <asm-generic/shmbuf.h> arch/microblaze/include/asm/siginfo.h +0
-14@@ -1,15 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_SIGINFO_H -#define _ASM_MICROBLAZE_SIGINFO_H - -#include <linux/types.h> #include <asm-generic/siginfo.h> - -#endif /* _ASM_MICROBLAZE_SIGINFO_H */ arch/microblaze/include/asm/socket.h +1
-69@@ -1,69 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_SOCKET_H -#define _ASM_MICROBLAZE_SOCKET_H - -#include <asm/sockios.h> - -/* For setsockoptions(2) */ -#define SOL_SOCKET 1 - -#define SO_DEBUG 1 -#define SO_REUSEADDR 2 -#define SO_TYPE 3 -#define SO_ERROR 4 -#define SO_DONTROUTE 5 -#define SO_BROADCAST 6 -#define SO_SNDBUF 7 -#define SO_RCVBUF 8 -#define SO_SNDBUFFORCE 32 -#define SO_RCVBUFFORCE 33 -#define SO_KEEPALIVE 9 -#define SO_OOBINLINE 10 -#define SO_NO_CHECK 11 -#define SO_PRIORITY 12 -#define SO_LINGER 13 -#define SO_BSDCOMPAT 14 -/* To add :#define SO_REUSEPORT 15 */ -#define SO_PASSCRED 16 -#define SO_PEERCRED 17 -#define SO_RCVLOWAT 18 -#define SO_SNDLOWAT 19 -#define SO_RCVTIMEO 20 -#define SO_SNDTIMEO 21 - -/* Security levels - as per NRL IPv6 - don't actually do anything */ -#define SO_SECURITY_AUTHENTICATION 22 -#define SO_SECURITY_ENCRYPTION_TRANSPORT 23 -#define SO_SECURITY_ENCRYPTION_NETWORK 24 - -#define SO_BINDTODEVICE 25 - -/* Socket filtering */ -#define SO_ATTACH_FILTER 26 -#define SO_DETACH_FILTER 27 - -#define SO_PEERNAME 28 -#define SO_TIMESTAMP 29 -#define SCM_TIMESTAMP SO_TIMESTAMP - -#define SO_ACCEPTCONN 30 - -#define SO_PEERSEC 31 -#define SO_PASSSEC 34 - -#define SO_TIMESTAMPNS 35 -#define SCM_TIMESTAMPNS SO_TIMESTAMPNS - -#define SO_MARK 36 - -#define SO_TIMESTAMPING 37 -#define SCM_TIMESTAMPING SO_TIMESTAMPING - -#endif /* _ASM_MICROBLAZE_SOCKET_H */ +#include <asm-generic/socket.h> arch/microblaze/include/asm/sockios.h +1
-23@@ -1,23 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_SOCKIOS_H -#define _ASM_MICROBLAZE_SOCKIOS_H - -#include <linux/ioctl.h> - -/* Socket-level I/O control calls. */ -#define FIOSETOWN 0x8901 -#define SIOCSPGRP 0x8902 -#define FIOGETOWN 0x8903 -#define SIOCGPGRP 0x8904 -#define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906/* Get stamp (timeval) */ -#define SIOCGSTAMPNS 0x8907/* Get stamp (timespec) */ - -#endif /* _ASM_MICROBLAZE_SOCKIOS_H */ +#include <asm-generic/sockios.h> arch/microblaze/include/asm/stat.h +1
-68@@ -1,68 +1 @@ -/* -* Microblaze stat structure -* -* Copyright (C) 2001,02,03 NEC Electronics Corporation -* Copyright (C) 2001,02,03 Miles Bader <[email protected]> -* -* This file is subject to the terms and conditions of the GNU General -* Public License. See the file COPYING in the main directory of this -* archive for more details. -* -* Written by Miles Bader <[email protected]> -*/ - -#ifndef _ASM_MICROBLAZE_STAT_H -#define _ASM_MICROBLAZE_STAT_H - -#include <linux/posix_types.h> - -#define STAT_HAVE_NSEC 1 - -struct stat { -unsigned long st_dev; -unsigned long st_ino; -unsigned int st_mode; -unsigned int st_nlink; -unsigned int st_uid; -unsigned int st_gid; -unsigned long st_rdev; -unsigned long __pad1; -long st_size; -int st_blksize; -int __pad2; -long st_blocks; -int st_atime; -unsigned int st_atime_nsec; -int st_mtime; -unsigned int st_mtime_nsec; -int st_ctime; -unsigned int st_ctime_nsec; -unsigned long __unused4; -unsigned long __unused5; -}; - -struct stat64 { -unsigned long long st_dev;/* Device. */ -unsigned long long st_ino;/* File serial number. */ -unsigned int st_mode;/* File mode. */ -unsigned int st_nlink;/* Link count. */ -unsigned int st_uid;/* User ID of the file's owner. */ -unsigned int st_gid;/* Group ID of the file's group. */ -unsigned long long st_rdev;/* Device number, if device. */ -unsigned long long __pad1; -long long st_size;/* Size of file, in bytes. */ -int st_blksize;/* Optimal block size for I/O. */ -int __pad2; -long long st_blocks;/* Number 512-byte blocks allocated. */ -int st_atime;/* Time of last access. */ -unsigned int st_atime_nsec; -int st_mtime;/* Time of last modification. */ -unsigned int st_mtime_nsec; -int st_ctime;/* Time of last status change. */ -unsigned int st_ctime_nsec; -unsigned int __unused4; -unsigned int __unused5; -}; - -#endif /* _ASM_MICROBLAZE_STAT_H */ - +#include <asm-generic/stat.h> arch/microblaze/include/asm/swab.h +1
-8@@ -1,8 +1 @@ -#ifndef _ASM_MICROBLAZE_SWAB_H -#define _ASM_MICROBLAZE_SWAB_H - -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) -#define __SWAB_64_THRU_32__ -#endif - -#endif /* _ASM_MICROBLAZE_SWAB_H */ +#include <asm-generic/swab.h> arch/microblaze/include/asm/termbits.h +1
-203@@ -1,203 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_TERMBITS_H -#define _ASM_MICROBLAZE_TERMBITS_H - -#include <linux/posix_types.h> - -typedef unsigned char cc_t ; -typedef unsigned int speed_t ; -typedef unsigned int tcflag_t ; - -#define NCCS 19 -struct termios { -tcflag_t c_iflag;/* input mode flags */ -tcflag_t c_oflag;/* output mode flags */ -tcflag_t c_cflag;/* control mode flags */ -tcflag_t c_lflag;/* local mode flags */ -cc_t c_line;/* line discipline */ -cc_t c_cc[NCCS ];/* control characters */ -}; - -struct ktermios { -tcflag_t c_iflag;/* input mode flags */ -tcflag_t c_oflag;/* output mode flags */ -tcflag_t c_cflag;/* control mode flags */ -tcflag_t c_lflag;/* local mode flags */ -cc_t c_line;/* line discipline */ -cc_t c_cc[NCCS ];/* control characters */ -speed_t c_ispeed;/* input speed */ -speed_t c_ospeed;/* output speed */ -}; - -/* c_cc characters */ - -#define VINTR 0 -#define VQUIT 1 -#define VERASE 2 -#define VKILL 3 -#define VEOF 4 -#define VTIME 5 -#define VMIN 6 -#define VSWTC 7 -#define VSTART 8 -#define VSTOP 9 -#define VSUSP 10 -#define VEOL 11 -#define VREPRINT 12 -#define VDISCARD 13 -#define VWERASE 14 -#define VLNEXT 15 -#define VEOL2 16 - -/* c_iflag bits */ - -#define IGNBRK 0000001 -#define BRKINT 0000002 -#define IGNPAR 0000004 -#define PARMRK 0000010 -#define INPCK 0000020 -#define ISTRIP 0000040 -#define INLCR 0000100 -#define IGNCR 0000200 -#define ICRNL 0000400 -#define IUCLC 0001000 -#define IXON 0002000 -#define IXANY 0004000 -#define IXOFF 0010000 -#define IMAXBEL 0020000 -#define IUTF8 0040000 - -/* c_oflag bits */ - -#define OPOST 0000001 -#define OLCUC 0000002 -#define ONLCR 0000004 -#define OCRNL 0000010 -#define ONOCR 0000020 -#define ONLRET 0000040 -#define OFILL 0000100 -#define OFDEL 0000200 -#define NLDLY 0000400 -#define NL0 0000000 -#define NL1 0000400 -#define CRDLY 0003000 -#define CR0 0000000 -#define CR1 0001000 -#define CR2 0002000 -#define CR3 0003000 -#define TABDLY 0014000 -#define TAB0 0000000 -#define TAB1 0004000 -#define TAB2 0010000 -#define TAB3 0014000 -#define XTABS 0014000 -#define BSDLY 0020000 -#define BS0 0000000 -#define BS1 0020000 -#define VTDLY 0040000 -#define VT0 0000000 -#define VT1 0040000 -#define FFDLY 0100000 -#define FF0 0000000 -#define FF1 0100000 - -/* c_cflag bit meaning */ - -#define CBAUD 0010017 -#define B0 0000000/* hang up */ -#define B50 0000001 -#define B75 0000002 -#define B110 0000003 -#define B134 0000004 -#define B150 0000005 -#define B200 0000006 -#define B300 0000007 -#define B600 0000010 -#define B1200 0000011 -#define B1800 0000012 -#define B2400 0000013 -#define B4800 0000014 -#define B9600 0000015 -#define B19200 0000016 -#define B38400 0000017 -#define EXTA B19200 -#define EXTB B38400 -#define CSIZE 0000060 -#define CS5 0000000 -#define CS6 0000020 -#define CS7 0000040 -#define CS8 0000060 -#define CSTOPB 0000100 -#define CREAD 0000200 -#define PARENB 0000400 -#define PARODD 0001000 -#define HUPCL 0002000 -#define CLOCAL 0004000 -#define CBAUDEX 0010000 -#define B57600 0010001 -#define B115200 0010002 -#define B230400 0010003 -#define B460800 0010004 -#define B500000 0010005 -#define B576000 0010006 -#define B921600 0010007 -#define BOTHER 0010000 -#define B1000000 0010010 -#define B1152000 0010011 -#define B1500000 0010012 -#define B2000000 0010013 -#define B2500000 0010014 -#define B3000000 0010015 -#define B3500000 0010016 -#define B4000000 0010017 -#define CIBAUD 002003600000/* input baud rate (not used) */ -#define CMSPAR 010000000000/* mark or space (stick) parity */ -#define CRTSCTS 020000000000/* flow control */ - -#define IBSHIFT 16/* Shift from CBAUD to CIBAUD */ - -/* c_lflag bits */ - -#define ISIG 0000001 -#define ICANON 0000002 -#define XCASE 0000004 -#define ECHO 0000010 -#define ECHOE 0000020 -#define ECHOK 0000040 -#define ECHONL 0000100 -#define NOFLSH 0000200 -#define TOSTOP 0000400 -#define ECHOCTL 0001000 -#define ECHOPRT 0002000 -#define ECHOKE 0004000 -#define FLUSHO 0010000 -#define PENDIN 0040000 -#define IEXTEN 0100000 - -/* tcflow() and TCXONC use these */ - -#define TCOOFF 0 -#define TCOON 1 -#define TCIOFF 2 -#define TCION 3 - -/* tcflush() and TCFLSH use these */ - -#define TCIFLUSH 0 -#define TCOFLUSH 1 -#define TCIOFLUSH 2 - -/* tcsetattr uses these */ - -#define TCSANOW 0 -#define TCSADRAIN 1 -#define TCSAFLUSH 2 - -#endif /* _ASM_MICROBLAZE_TERMBITS_H */ +#include <asm-generic/termbits.h> arch/microblaze/include/asm/termios.h +1
-88@@ -1,88 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_TERMIOS_H -#define _ASM_MICROBLAZE_TERMIOS_H - -#include <linux/string.h> -#include <asm/termbits.h> -#include <asm/ioctls.h> - -struct winsize { -unsigned short ws_row; -unsigned short ws_col; -unsigned short ws_xpixel; -unsigned short ws_ypixel; -}; - -#define NCC 8 -struct termio { -unsigned short c_iflag;/* input mode flags */ -unsigned short c_oflag;/* output mode flags */ -unsigned short c_cflag;/* control mode flags */ -unsigned short c_lflag;/* local mode flags */ -unsigned char c_line;/* line discipline */ -unsigned char c_cc[NCC ];/* control characters */ -}; - -#ifdef __KERNEL__ -/* intr=^C quit=^| erase=del kill=^U -eof=^D vtime=\0 vmin=\1 sxtc=\0 -start=^Q stop=^S susp=^Z eol=\0 -reprint=^R discard=^U werase=^W lnext=^V -eol2=\0 -*/ -#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" -#endif - -/* Modem lines */ - -#define TIOCM_LE 0x001 -#define TIOCM_DTR 0x002 -#define TIOCM_RTS 0x004 -#define TIOCM_ST 0x008 -#define TIOCM_SR 0x010 -#define TIOCM_CTS 0x020 -#define TIOCM_CAR 0x040 -#define TIOCM_RNG 0x080 -#define TIOCM_DSR 0x100 -#define TIOCM_CD TIOCM_CAR -#define TIOCM_RI TIOCM_RNG -#define TIOCM_OUT1 0x2000 -#define TIOCM_OUT2 0x4000 -#define TIOCM_LOOP 0x8000 - -/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ - -/* Line disciplines */ - -#define N_TTY 0 -#define N_SLIP 1 -#define N_MOUSE 2 -#define N_PPP 3 -#define N_STRIP 4 -#define N_AX25 5 -#define N_X25 6/* X.25 async */ -#define N_6PACK 7 -#define N_MASC 8/* Reserved for Mobitex module <[email protected]> */ -#define N_R3964 9/* Reserved for Simatic R3964 module */ -#define N_PROFIBUS_FDL 10/* Reserved for Profibus <[email protected]> */ -#define N_IRDA 11/* Linux IR - http://irda.sourceforge.net/ */ -#define N_SMSBLOCK 12/* SMS block mode - for talking to GSM data cards -about SMS messages */ -#define N_HDLC 13/* synchronous HDLC */ -#define N_SYNC_PPP 14 -#define N_HCI 15/* Bluetooth HCI UART */ - -#ifdef __KERNEL__ - -#include <asm-generic/termios-base.h> - -#endif /* __KERNEL__ */ - -#endif /* _ASM_MICROBLAZE_TERMIOS_H */ +#include <asm-generic/termios.h> arch/microblaze/include/asm/types.h +1
-38@@ -1,38 +1 @@ -/* -* Copyright (C) Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_TYPES_H -#define _ASM_MICROBLAZE_TYPES_H - -/* -* This file is never included by application software unless -* explicitly requested (e.g., via linux/types.h) in which case the -* application is Linux specific so (user-) name space pollution is -* not a major issue. However, for interoperability, libraries still -* need to be careful to avoid a name clashes. -*/ - -#include <asm-generic/int-ll64.h> - -# ifndef __ASSEMBLY__ - -typedef unsigned short umode_t ; - -/* -* These aren't exported outside the kernel to avoid name space clashes -*/ -# ifdef __KERNEL__ -# define BITS_PER_LONG 32 - -/* Dma addresses are 32-bits wide. */ - -typedef u32 dma_addr_t ; - -# endif /* __KERNEL__ */ -# endif /* __ASSEMBLY__ */ -#endif /* _ASM_MICROBLAZE_TYPES_H */ +#include <asm-generic/types.h> arch/microblaze/include/asm/ucontext.h +1
-22@@ -1,22 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_UCONTEXT_H -#define _ASM_MICROBLAZE_UCONTEXT_H - -#include <asm/sigcontext.h> - -struct ucontext { -unsigned long uc_flags; -struct ucontext *uc_link; -stack_t uc_stack; -struct sigcontext uc_mcontext; -sigset_t uc_sigmask;/* mask last for extensibility */ -}; - -#endif /* _ASM_MICROBLAZE_UCONTEXT_H */ +#include <asm-generic/ucontext.h>
Signature · 2 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854
Michal Simek
maintainerRe: [microblaze-uclinux] [PATCH 08/11] microblaze: use the generic lib/checksum.c
In reply to Arnd Bergmannadded to next branch for test.
Thanks,
Michal
Quoted 360 lines · Arnd Bergmann
From: Remis Lima Baima <[email protected]>
The microblaze checksum code is mostly identical to the asm-generic+lib version, so use that instead.
Signed-off-by Remis Lima Baima <[email protected]>--- arch/microblaze/Kconfig | 3 + arch/microblaze/include/asm/checksum.h | 134 ++++++------------------ arch/microblaze/lib/Makefile | 2 +- arch/microblaze/lib/checksum.c | 172 -------------------------------- 4 files changed, 38 insertions(+), 273 deletions(-) rewrite arch/microblaze/include/asm/checksum.h (69%) delete mode 100644 arch/microblaze/lib/checksum.carch/microblaze/Kconfig +3
-0@@ -56,6 +56,9 @@ config GENERIC_GPIO config GENERIC_SYSCALL_TABLE def_bool y +config GENERIC_CSUM + def_bool y + config PCI def_bool narch/microblaze/include/asm/checksum.h +34
-100@@ -1,100 +1,34 @@ -/* -* Copyright (C) 2008 Michal Simek <[email protected]> -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_CHECKSUM_H -#define _ASM_MICROBLAZE_CHECKSUM_H - -#include <linux/in6.h> - -/* -* computes the checksum of the TCP/UDP pseudo-header -* returns a 16-bit checksum, already complemented -*/ -static inline __wsum -csum_tcpudp_nofold (__be32 saddr,__be32 daddr,unsigned short len, -unsigned short proto,__wsum sum) -{ - __asm__("add %0, %0, %1\n\t" -"addc %0, %0, %2\n\t" -"addc %0, %0, %3\n\t" -"addc %0, %0, r0\n\t" - :"+&d" (sum) - :"d" (saddr),"d" (daddr),"d" (len + proto)); - -return sum; -} - -/* -* computes the checksum of a memory block at buff, length len, -* and adds in "sum" (32-bit) -* -* returns a 32-bit number suitable for feeding into itself -* or csum_tcpudp_magic -* -* this function must be called with even lengths, except -* for the last fragment, which may be odd -* -* it's best to have buff aligned on a 32-bit boundary -*/ -extern __wsum csum_partial (const void *buff,int len,__wsum sum); - -/* -* the same as csum_partial, but copies from src while it -* checksums -* -* here even more important to align src and dst on a 32-bit (or even -* better 64-bit) boundary -*/ -extern __wsum csum_partial_copy (const void *src,void *dst,int len, -__wsum sum); - -/* -* the same as csum_partial_copy, but copies from user space. -* -* here even more important to align src and dst on a 32-bit (or even -* better 64-bit) boundary -*/ -extern __wsum csum_partial_copy_from_user (const void __user *src,void *dst, -int len,__wsum sum,int *csum_err); - -#define csum_partial_copy_nocheck (src, dst, len, sum) \ - csum_partial_copy((src), (dst), (len), (sum)) - -/* -* This is a version of ip_compute_csum() optimized for IP headers, -* which always checksum on 4 octet boundaries. -* -*/ -extern __sum16 ip_fast_csum (const void *iph,unsigned int ihl); - -/* -* Fold a partial checksum -*/ -static inline __sum16 csum_fold (__wsum csum) -{ -u32 sum = (__force u32 )csum; - sum = (sum &0xffff ) + (sum >>16 ); - sum = (sum &0xffff ) + (sum >>16 ); -return (__force __sum16 )~sum; -} - -static inline __sum16 -csum_tcpudp_magic (__be32 saddr,__be32 daddr,unsigned short len, -unsigned short proto,__wsum sum) -{ -return csum_fold (csum_tcpudp_nofold (saddr, daddr, len, proto, sum)); -} - -/* -* this routine is used for miscellaneous IP-like checksums, mainly -* in icmp.c -*/ -extern __sum16 ip_compute_csum (const void *buff,int len); - -#endif /* _ASM_MICROBLAZE_CHECKSUM_H */ +/* +* Copyright (C) 2008 Michal Simek <[email protected]> +* Copyright (C) 2006 Atmark Techno, Inc. +* +* This file is subject to the terms and conditions of the GNU General Public +* License. See the file "COPYING" in the main directory of this archive +* for more details. +*/ + +#ifndef _ASM_MICROBLAZE_CHECKSUM_H +#define _ASM_MICROBLAZE_CHECKSUM_H + +/* +* computes the checksum of the TCP/UDP pseudo-header +* returns a 16-bit checksum, already complemented +*/ +#define csum_tcpudp_nofold csum_tcpudp_nofold +static inline __wsum +csum_tcpudp_nofold (__be32 saddr,__be32 daddr,unsigned short len, +unsigned short proto,__wsum sum) +{ + __asm__("add %0, %0, %1\n\t" +"addc %0, %0, %2\n\t" +"addc %0, %0, %3\n\t" +"addc %0, %0, r0\n\t" + :"+&d" (sum) + :"d" (saddr),"d" (daddr),"d" (len + proto)); + +return sum; +} + +#include <asm-generic/checksum.h> + +#endif /* _ASM_MICROBLAZE_CHECKSUM_H */ arch/microblaze/lib/Makefile +1
-1@@ -2,7 +2,7 @@ # Makefile # -lib-y := memset.o checksum.o +lib-y := memset.o ifeq ($(CONFIG_OPT_LIB_ASM),y) lib-y += fastcopy.oarch/microblaze/lib/checksum.c deleted +0
-172@@ -1,172 +0,0 @@ -/* -* -* INET An implementation of the TCP/IP protocol suite for the LINUX -* operating system. INET is implemented using the BSD Socket -* interface as the means of communication with the user level. -* -* IP/TCP/UDP checksumming routines -* -* Authors: Jorge Cwik, <[email protected]> -* Arnt Gulbrandsen, <[email protected]> -* Tom May, <[email protected]> -* Andreas Schwab, <[email protected]> -* Lots of code moved from tcp.c and ip.c; see those files -* for more names. -* -* 03/02/96 Jes Sorensen, Andreas Schwab, Roman Hodek: -* Fixed some nasty bugs, causing some horrible crashes. -* A: At some points, the sum (%0) was used as -* length-counter instead of the length counter -* (%1). Thanks to Roman Hodek for pointing this out. -* B: GCC seems to mess up if one uses too many -* data-registers to hold input values and one tries to -* specify d0 and d1 as scratch registers. Letting gcc -* choose these registers itself solves the problem. -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version -* 2 of the License, or (at your option) any later version. -*/ - -/* Revised by Kenneth Albanowski for m68knommu. Basic problem: unaligned access -kills, so most of the assembly has to go. */ - -#include <linux/module.h> -#include <net/checksum.h> - -#include <asm/byteorder.h> - -static inline unsigned short from32to16 (unsigned long x) -{ -/* add up 16-bit and 16-bit for 16+c bit */ - x = (x &0xffff ) + (x >>16 ); -/* add up carry.. */ - x = (x &0xffff ) + (x >>16 ); -return x; -} - -static unsigned int do_csum (const unsigned char *buff,int len) -{ -int odd, count; -unsigned long result =0 ; - -if (len <=0 ) - goto out; - odd =1 & (unsigned long ) buff; -if (odd) { - result = *buff; - len--; - buff++; - } - count = len >>1 ;/* nr of 16-bit words.. */ -if (count) { -if (2 & (unsigned long ) buff) { - result += *(unsigned short *) buff; - count--; - len -=2 ; - buff +=2 ; - } - count >>=1 ;/* nr of 32-bit words.. */ -if (count) { -unsigned long carry =0 ; -do { -unsigned long w = *(unsigned long *) buff; - count--; - buff +=4 ; - result += carry; - result += w; - carry = (w > result); - }while (count); - result += carry; - result = (result &0xffff ) + (result >>16 ); - } -if (len &2 ) { - result += *(unsigned short *) buff; - buff +=2 ; - } - } -if (len &1 ) - result += (*buff <<8 ); - result =from32to16 (result); -if (odd) - result = ((result >>8 ) &0xff ) | ((result &0xff ) <<8 ); -out: -return result; -} - -/* -* This is a version of ip_compute_csum() optimized for IP headers, -* which always checksum on 4 octet boundaries. -*/ -__sum16 ip_fast_csum (const void *iph,unsigned int ihl) -{ -return (__force __sum16 )~do_csum (iph, ihl*4 ); -} -EXPORT_SYMBOL (ip_fast_csum); - -/* -* computes the checksum of a memory block at buff, length len, -* and adds in "sum" (32-bit) -* -* returns a 32-bit number suitable for feeding into itself -* or csum_tcpudp_magic -* -* this function must be called with even lengths, except -* for the last fragment, which may be odd -* -* it's best to have buff aligned on a 32-bit boundary -*/ -__wsum csum_partial (const void *buff,int len,__wsum wsum) -{ -unsigned int sum = (__force unsigned int )wsum; -unsigned int result =do_csum (buff, len); - -/* add in old sum, and carry.. */ - result += sum; -if (sum > result) - result +=1 ; -return (__force __wsum )result; -} -EXPORT_SYMBOL (csum_partial); - -/* -* this routine is used for miscellaneous IP-like checksums, mainly -* in icmp.c -*/ -__sum16 ip_compute_csum (const void *buff,int len) -{ -return (__force __sum16 )~do_csum (buff, len); -} -EXPORT_SYMBOL (ip_compute_csum); - -/* -* copy from fs while checksumming, otherwise like csum_partial -*/ -__wsum -csum_partial_copy_from_user (const void __user *src,void *dst,int len, -__wsum sum,int *csum_err) -{ -int missing; - - missing =__copy_from_user (dst, src, len); -if (missing) { -memset (dst + len - missing,0 , missing); - *csum_err = -EFAULT ; - }else - *csum_err =0 ; - -return csum_partial (dst, len, sum); -} -EXPORT_SYMBOL (csum_partial_copy_from_user); - -/* -* copy from ds while checksumming, otherwise like csum_partial -*/ -__wsum -csum_partial_copy (const void *src,void *dst,int len,__wsum sum) -{ -memcpy (dst, src, len); -return csum_partial (dst, len, sum); -} -EXPORT_SYMBOL (csum_partial_copy);
Signature · 2 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854
Michal Simek
maintainerRe: [microblaze-uclinux] [PATCH 09/11] microblaze: convert all simple headers to use asm-generic
In reply to Arnd BergmannAdded to next branch for testing.
Thanks,
Michal
Quoted 534 lines · Arnd Bergmann
From: Remis Lima Baima <[email protected]>
All the simple microblaze header files were adapted to use their asm-generic implementations. These files are more simple and were quite straightforward to change.
fb.h,vga.handparport.hpreviously did not exist, using the generic version makes it possible to build more drivers successfully in allyesonfig.Signed-off-by Remis Lima Baima <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>--- arch/microblaze/include/asm/atomic.h | 147 ++++--------------------- arch/microblaze/include/asm/bitops.h | 28 +----- arch/microblaze/include/asm/bug.h | 14 --- arch/microblaze/include/asm/bugs.h | 18 +--- arch/microblaze/include/asm/fb.h | 1 + arch/microblaze/include/asm/hardirq.h | 14 +-- arch/microblaze/include/asm/irq.h | 6 +- arch/microblaze/include/asm/mmu.h | 7 +- arch/microblaze/include/asm/mmu_context.h | 2 +- arch/microblaze/include/asm/mmu_context_no.h | 23 ---- arch/microblaze/include/asm/module.h | 10 +-- arch/microblaze/include/asm/parport.h | 1 + arch/microblaze/include/asm/pci.h | 2 +- arch/microblaze/include/asm/scatterlist.h | 29 +----- arch/microblaze/include/asm/serial.h | 15 +--- arch/microblaze/include/asm/shmparam.h | 7 +- arch/microblaze/include/asm/system.h | 3 + arch/microblaze/include/asm/timex.h | 6 +- arch/microblaze/include/asm/vga.h | 2 +- 19 files changed, 45 insertions(+), 290 deletions(-) rewrite arch/microblaze/include/asm/atomic.h (84%) rewrite arch/microblaze/include/asm/bitops.h (95%) create mode 100644 arch/microblaze/include/asm/fb.h delete mode 100644 arch/microblaze/include/asm/mmu_context_no.h create mode 100644 arch/microblaze/include/asm/parport.hrewrite
arch/microblaze/include/asm/scatterlist.h(100%)arch/microblaze/include/asm/atomic.h +24
-123@@ -1,123 +1,24 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_ATOMIC_H -#define _ASM_MICROBLAZE_ATOMIC_H - -#include <linux/types.h> -#include <linux/compiler.h> /* likely */ -#include <asm/system.h> /* local_irq_XXX and friends */ - -#define ATOMIC_INIT (i) { (i) } -#define atomic_read (v) ((v)->counter) -#define atomic_set (v, i) (((v)->counter) = (i)) - -#define atomic_inc (v) (atomic_add_return(1, (v))) -#define atomic_dec (v) (atomic_sub_return(1, (v))) - -#define atomic_add (i, v) (atomic_add_return(i, (v))) -#define atomic_sub (i, v) (atomic_sub_return(i, (v))) - -#define atomic_inc_return (v) (atomic_add_return(1, (v))) -#define atomic_dec_return (v) (atomic_sub_return(1, (v))) - -#define atomic_inc_and_test (v) (atomic_add_return(1, (v)) == 0) -#define atomic_dec_and_test (v) (atomic_sub_return(1, (v)) == 0) - -#define atomic_inc_not_zero (v) (atomic_add_unless((v), 1, 0)) - -#define atomic_sub_and_test (i, v) (atomic_sub_return((i), (v)) == 0) - -static inline int atomic_cmpxchg (atomic_t *v,int old,int new) -{ -int ret; -unsigned long flags; - -local_irq_save (flags); - ret = v->counter; -if (likely (ret == old)) - v->counter = new; -local_irq_restore (flags); - -return ret; -} - -static inline int atomic_add_unless (atomic_t *v,int a,int u) -{ -int c, old; - - c =atomic_read (v); -while (c != u && (old =atomic_cmpxchg ((v), c, c + a)) != c) - c = old; -return c != u; -} - -static inline void atomic_clear_mask (unsigned long mask,unsigned long *addr) -{ -unsigned long flags; - -local_irq_save (flags); - *addr &= ~mask; -local_irq_restore (flags); -} - -/** -* atomic_add_return - add and return -* @i: integer value to add -* @v: pointer of type atomic_t -* -* Atomically adds @i to @v and returns @i + @v -*/ -static inline int atomic_add_return (int i,atomic_t *v) -{ -unsigned long flags; -int val; - -local_irq_save (flags); - val = v->counter; - v->counter = val += i; -local_irq_restore (flags); - -return val; -} - -static inline int atomic_sub_return (int i,atomic_t *v) -{ -return atomic_add_return (-i, v); -} - -/* -* Atomically test *v and decrement if it is greater than 0. -* The function returns the old value of *v minus 1. -*/ -static inline int atomic_dec_if_positive (atomic_t *v) -{ -unsigned long flags; -int res; - -local_irq_save (flags); - res = v->counter -1 ; -if (res >=0 ) - v->counter = res; -local_irq_restore (flags); - -return res; -} - -#define atomic_add_negative (a, v) (atomic_add_return((a), (v)) < 0) -#define atomic_xchg (v, new) (xchg(&((v)->counter), new)) - -/* Atomic operations are already serializing */ -#define smp_mb__before_atomic_dec () barrier() -#define smp_mb__after_atomic_dec () barrier() -#define smp_mb__before_atomic_inc () barrier() -#define smp_mb__after_atomic_inc () barrier() - -#include <asm-generic/atomic-long.h> - -#endif /* _ASM_MICROBLAZE_ATOMIC_H */ +#ifndef _ASM_MICROBLAZE_ATOMIC_H +#define _ASM_MICROBLAZE_ATOMIC_H + +#include <asm-generic/atomic.h> + +/* +* Atomically test *v and decrement if it is greater than 0. +* The function returns the old value of *v minus 1. +*/ +static inline int atomic_dec_if_positive (atomic_t *v) +{ +unsigned long flags; +int res; + +local_irq_save (flags); + res = v->counter -1 ; +if (res >=0 ) + v->counter = res; +local_irq_restore (flags); + +return res; +} + +#endif /* _ASM_MICROBLAZE_ATOMIC_H */ arch/microblaze/include/asm/bitops.h +1
-27@@ -1,27 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_BITOPS_H -#define _ASM_MICROBLAZE_BITOPS_H - -/* -* Copyright 1992, Linus Torvalds. -*/ - -#include <asm/byteorder.h> /* swab32 */ -#include <asm/system.h> /* save_flags */ - -/* -* clear_bit() doesn't provide any barrier for the compiler. -*/ -#define smp_mb__before_clear_bit () barrier() -#define smp_mb__after_clear_bit () barrier() -#include <asm-generic/bitops.h> -#include <asm-generic/bitops/__fls.h> - -#endif /* _ASM_MICROBLAZE_BITOPS_H */ +#include <asm-generic/bitops.h> arch/microblaze/include/asm/bug.h +0
-14@@ -1,15 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_BUG_H -#define _ASM_MICROBLAZE_BUG_H - -#include <linux/kernel.h> #include <asm-generic/bug.h> - -#endif /* _ASM_MICROBLAZE_BUG_H */ arch/microblaze/include/asm/bugs.h +1
-17@@ -1,17 +1 @@ -/* -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_BUGS_H -#define _ASM_MICROBLAZE_BUGS_H - -static inline void check_bugs (void ) -{ -/* nothing to do */ -} - -#endif /* _ASM_MICROBLAZE_BUGS_H */ +#include <asm-generic/bugs.h> arch/microblaze/include/asm/fb.h new file +1
-0@@ -0,0 +1 @@ +#include <asm-generic/fb.h> arch/microblaze/include/asm/hardirq.h +2
-12@@ -9,21 +9,11 @@#ifndef _ASM_MICROBLAZE_HARDIRQ_H#define _ASM_MICROBLAZE_HARDIRQ_H -#include <linux/cache.h> -#include <linux/irq.h> -#include <asm/irq.h> -#include <asm/current.h> -#include <linux/ptrace.h> -/* should be defined in each interrupt controller driver */ extern unsigned int get_irq (struct pt_regs *regs); -typedef struct { -unsigned int __softirq_pending; -}____cacheline_aligned irq_cpustat_t ; - +#define ack_bad_irq ack_bad_irqvoid ack_bad_irq (unsigned int irq); - -#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ +#include <asm-generic/hardirq.h> #endif /* _ASM_MICROBLAZE_HARDIRQ_H */ arch/microblaze/include/asm/irq.h +1
-5@@ -10,6 +10,7 @@#define _ASM_MICROBLAZE_IRQ_H#define NR_IRQS 32 +#include <asm-generic/irq.h> #include <linux/interrupt.h> @@ -17,11 +18,6 @@ extern unsigned int nr_irq;#define NO_IRQ (-1) -static inline int irq_canonicalize (int irq) -{ -return irq; -} -struct pt_regs ;extern void do_IRQ (struct pt_regs *regs);arch/microblaze/include/asm/mmu.h +1
-6@@ -12,12 +12,7 @@#define _ASM_MICROBLAZE_MMU_H# ifndef CONFIG_MMU -# ifndef __ASSEMBLY__ -typedef struct { -struct vm_list_struct *vmlist; -unsigned long end_brk; -}mm_context_t ; -# endif /* __ASSEMBLY__ */ +# include <asm-generic/mmu.h> # else /* CONFIG_MMU */ # ifdef __KERNEL__# ifndef __ASSEMBLY__arch/microblaze/include/asm/mmu_context.h +1
-1@@ -1,5 +1,5 @@#ifdef CONFIG_MMU # include "mmu_context_mm.h" #else -# include "mmu_context_no.h" +# include <asm-generic/mmu_context.h> #endif arch/microblaze/include/asm/mmu_context_no.h deleted +0
-23@@ -1,23 +0,0 @@ -/* -* Copyright (C) 2008-2009 Michal Simek <[email protected]> -* Copyright (C) 2008-2009 PetaLogix -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_MMU_CONTEXT_H -#define _ASM_MICROBLAZE_MMU_CONTEXT_H - -# define init_new_context (tsk, mm) ({ 0; }) - -# define enter_lazy_tlb (mm, tsk) do {} while (0) -# define change_mm_context (old, ctx, _pml4) do {} while (0) -# define destroy_context (mm) do {} while (0) -# define deactivate_mm (tsk, mm) do {} while (0) -# define switch_mm (prev, next, tsk) do {} while (0) -# define activate_mm (prev, next) do {} while (0) - -#endif /* _ASM_MICROBLAZE_MMU_CONTEXT_H */ arch/microblaze/include/asm/module.h +2
-8@@ -9,6 +9,8 @@#ifndef _ASM_MICROBLAZE_MODULE_H#define _ASM_MICROBLAZE_MODULE_H +#include <asm-generic/module.h> +/* Microblaze Relocations */ #define R_MICROBLAZE_NONE 0#define R_MICROBLAZE_32 1@@ -24,14 +26,6 @@/* Keep this the last entry. */ #define R_MICROBLAZE_NUM 11 -struct mod_arch_specific { -int foo; -}; - -#define Elf_Shdr Elf32_Shdr -#define Elf_Sym Elf32_Sym -#define Elf_Ehdr Elf32_Ehdr -typedef struct {volatile int counter; }module_t ;#endif /* _ASM_MICROBLAZE_MODULE_H */ arch/microblaze/include/asm/parport.h new file +1
-0@@ -0,0 +1 @@ +#include <asm-generic/parport.h> arch/microblaze/include/asm/pci.h +1
-1@@ -1 +1 @@ -#include <linux/io.h> +#include <asm-generic/pci.h> arch/microblaze/include/asm/scatterlist.h +1
-28@@ -1,28 +1 @@ -/* -* Copyright (C) 2008 Michal Simek <[email protected]> -* Copyright (C) 2006 Atmark Techno, Inc. -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_SCATTERLIST_H -#define _ASM_MICROBLAZE_SCATTERLIST_H - -struct scatterlist { -#ifdef CONFIG_DEBUG_SG -unsigned long sg_magic; -#endif -unsigned long page_link; -dma_addr_t dma_address; -unsigned int offset; -unsigned int length; -}; - -#define sg_dma_address (sg) ((sg)->dma_address) -#define sg_dma_len (sg) ((sg)->length) - -#define ISA_DMA_THRESHOLD (~0UL) - -#endif /* _ASM_MICROBLAZE_SCATTERLIST_H */ +#include <asm-generic/scatterlist.h> arch/microblaze/include/asm/serial.h +1
-14@@ -1,14 +1 @@ -/* -* Copyright (C) 2009 Michal Simek <[email protected]> -* -* This file is subject to the terms and conditions of the GNU General Public -* License. See the file "COPYING" in the main directory of this archive -* for more details. -*/ - -#ifndef _ASM_MICROBLAZE_SERIAL_H -#define _ASM_MICROBLAZE_SERIAL_H - -# define BASE_BAUD (1843200 / 16) - -#endif /* _ASM_MICROBLAZE_SERIAL_H */ +#include <asm-generic/serial.h> arch/microblaze/include/asm/shmparam.h +1
-6@@ -1,6 +1 @@ -#ifndef _ASM_MICROBLAZE_SHMPARAM_H -#define _ASM_MICROBLAZE_SHMPARAM_H - -#define SHMLBA PAGE_SIZE/* attach addr a multiple of this */ - -#endif /* _ASM_MICROBLAZE_SHMPARAM_H */ +#include <asm-generic/shmparam.h> arch/microblaze/include/asm/system.h +3
-0@@ -13,6 +13,9 @@#include <asm/setup.h> #include <asm/irqflags.h> +#include <asm-generic/cmpxchg.h> +#include <asm-generic/cmpxchg-local.h> +struct task_struct ;struct thread_info ;arch/microblaze/include/asm/timex.h +2
-4@@ -9,10 +9,8 @@#ifndef _ASM_MICROBLAZE_TIMEX_H#define _ASM_MICROBLAZE_TIMEX_H -#define CLOCK_TICK_RATE 1000/* Timer input freq. */ - -typedef unsigned long cycles_t ; +#include <asm-generic/timex.h> -#define get_cycles () (0) +#define CLOCK_TICK_RATE 1000/* Timer input freq. */ #endif /* _ASM_TIMEX_H */ arch/microblaze/include/asm/vga.h +1
-1@@ -1 +1 @@ - +#include <asm-generic/vga.h>
Signature · 2 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854
Arnd Bergmann
maintainerRe: [microblaze-uclinux] [PATCH 10/11] microblaze: use generic system.h
In reply to Michal SimekQuoted 3 lines · Michal Simek
this patch can't be applied because generic implementation expect pointer to task struct but microblaze low level code expect
thread_info. I have one patch for MMU kernel which fixed it but I don't have it for noMMU kernel.
Ok, just leave it out for now then, it's not important because it does not impact the ABI.
Maybe I should allow overriding switch_to() in the generic file?
Arnd <><
---
asm-generic: make parts of system.h optional
The asm-generic/system.h file was originally meant as an example, but by letting the architecture override some of its contents, it immediately becomes much more useful.
include/asm-generic/system.h +8 -0
@@ -24,6 +24,7 @@struct task_struct ; +#ifndef switch_to/* context switching is now performed out-of-line in switch_to.S */ extern struct task_struct *__switch_to (struct task_struct *,struct task_struct *);
@@ -31,10 +32,15 @@ extern struct task_struct *__switch_to(struct task_struct *,do { \ ((last) =__switch_to ((prev), (next))); \ } while (0) +#endif +#ifndef arch_align_stack#define arch_align_stack (x) (x) +#endif +#ifndef nop#define nop () asm volatile ("nop") +#define nop#endif /* !__ASSEMBLY__ */
@@ -46,9 +52,11 @@ extern struct task_struct *__switch_to(struct task_struct *,* This implementation only contains a compiler barrier. */ +#ifndef mb()#define mb () asm volatile ("": : :"memory")#define rmb () mb()#define wmb () asm volatile ("": : :"memory") +#endif #ifdef CONFIG_SMP #define smp_mb () mb()
Arnd Bergmann
maintainerRe: [microblaze-uclinux] [PATCH 03/11] microblaze: fall back on generic header files for the ABI
In reply to Michal SimekQuoted 4 lines · Michal Simek
Added to next branch for test.
I had to do one change.
Microblaze needs__kernel_mode_tas short.
Can you explain why that is needed? Should I change the default in the generic file?
Quoted 2 lines
+ I removed
__kernel_size_tand I'll recompile toolchain for removing warning messages
Ah, good.
Arnd <><
Michal Simek
maintainerRe: [microblaze-uclinux] [PATCH 10/11] microblaze: use generic system.h
In reply to Arnd BergmannQuoted 8 lines · Arnd Bergmann
Quoted 3 lines · Michal Simek
this patch can't be applied because generic implementation expect pointer to task struct but microblaze low level code expect
thread_info. I have one patch for MMU kernel which fixed it but I don't have it for noMMU kernel.Ok, just leave it out for now then, it's not important because it does not impact the ABI.
Maybe I should allow overriding
switch_to()in the generic file?
I thought about too. Some archs use task pointer some of them thread pointer.
Michal
Quoted 56 lines
Arnd <><---
asm-generic: make parts ofsystem.hoptionalThe
asm-generic/system.hfile was originally meant as an example, but by letting the architecture override some of its contents, it immediately becomes much more useful.Signed-off-by Arnd Bergmann <[email protected]>include/asm-generic/system.h +8
-0@@ -24,6 +24,7 @@struct task_struct ; +#ifndef switch_to/* context switching is now performed out-of-line in switch_to.S */ extern struct task_struct *__switch_to (struct task_struct *,struct task_struct *);@@ -31,10 +32,15 @@ extern struct task_struct *__switch_to(struct task_struct *,do { \ ((last) =__switch_to ((prev), (next))); \ } while (0) +#endif +#ifndef arch_align_stack#define arch_align_stack (x) (x) +#endif +#ifndef nop#define nop () asm volatile ("nop") +#define nop#endif /* !__ASSEMBLY__ */ @@ -46,9 +52,11 @@ extern struct task_struct *__switch_to(struct task_struct *,* This implementation only contains a compiler barrier. */ +#ifndef mb()#define mb () asm volatile ("": : :"memory")#define rmb () mb()#define wmb () asm volatile ("": : :"memory") +#endif #ifdef CONFIG_SMP #define smp_mb () mb()___________________________
microblaze-uclinux mailing list
[email protected]
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
Signature · 2 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854
Michal Simek
maintainerRe: [microblaze-uclinux] [PATCH 03/11] microblaze: fall back on generic header files for the ABI
In reply to Arnd BergmannQuoted 7 lines · Arnd Bergmann
Quoted 4 lines · Michal Simek
Added to next branch for test.
I had to do one change.
Microblaze needs__kernel_mode_tas short.Can you explain why that is needed? Should I change the default in the generic file?
I did this change because of problem with inconsistency between kernel/glibc.
Current our glibc ipc_perm struct - mode is short - that's why I have setup kernel_mode_t to short too.
/* Data structure used to pass permission information to IPC operations. */ struct ipc_perm
{
__key_t __key; /* Key. */
__uid_t uid; /* Owner's user ID. */
__gid_t gid; /* Owner's group ID. */
__uid_t cuid; /* Creator's user ID. */
__gid_t cgid; /* Creator's group ID. */
unsigned short int mode; /* Read/write permission. */
unsigned short int __seq; /* Sequence number. */
unsigned short int __pad1;
unsigned long int __unused1;
unsigned long int __unused2;};
Does it make more sense to define it as int?
Michal
Quoted 14 lines
Quoted 3 lines
+ I removed
__kernel_size_tand I'll recompile toolchain for removing warning messagesAh, good.
Arnd <><___________________________
microblaze-uclinux mailing list
[email protected]
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
Signature · 2 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854
Arnd Bergmann
maintainerRe: [microblaze-uclinux] [PATCH 03/11] microblaze: fall back on generic header files for the ABI
Quoted 17 lines · Michal Simek
I did this change because of problem with inconsistency between kernel/glibc.
Current our glibc
ipc_permstruct - mode is short - that's why I have setupkernel_mode_tto short too./* Data structure used to pass permission information to IPC operations. */ struct
ipc_perm
{__key_t __key; /* Key. */ __uid_t uid; /* Owner's user ID. */ __gid_t gid; /* Owner's group ID. */ __uid_t cuid; /* Creator's user ID. */ __gid_t cgid; /* Creator's group ID. */ unsigned short int mode; /* Read/write permission. */ unsigned short int __seq; /* Sequence number. */ unsigned short int __pad1; unsigned long int __unused1; unsigned long int __unused2;
Quoted 3 lines
};
Does it make more sense to define it as int?
It's more complex than this.
AFAICT, it does not matter at all whether you define it as 16 or 32 bits, as long as it all fits together. For the generic ABI, I used 32 bits where they were commonly used by some architectures, because there are processors that can more efficiently access 32 bit words than 16 bit words.
One major reason for starting the asm-generic ABI definitions was to make sure that all architectures that don't have their ABI set in stone can use the exact same ABI, and if you change just a small thing, you would still diverge from the common ABI.
Now the definition you give above matches neither the one from your current kernel header nor the one from the asm-generic file, because of the location of the padding. Worse, the __pad1 field actually causes implicit padding instead of preventing it.
I think you should just update your glibc files to match the generic kernel headers, because changing the ABI means that you have to change other parts of glibc anyway and to recompile every single user space program anyway. Doing one more change won't hurt that much either.
Arnd <><
Re: [microblaze-uclinux] [PATCH 03/11] microblaze: fall back on generic header files for the ABI
In reply to Michal SimekHi Michal, Arnd,
Quoted 7 lines · Michal Simek
Added to next branch for test.
I had to do one change.
Microblaze needs__kernel_mode_tas short.+ I removed
__kernel_size_tand I'll recompile toolchain for removing warning messages
We need to be a little bit mindful here regarding which of the asm-generic changes we merge immediately.
Ones that do not change the ABI at all, but simply pull from asm-generic instead of asm-microblaze are obviously fine (identical structures, bitfields etc).
However, we've just "broken" the ABI in 2.6.31, if we merge further ABI breakage in 2.6.32 it's more pain and confusion.
So, unless we can merge and validate this ABI breakage during the 2.6.31-rc cycle, I think we need to hold on changes that would break the ABI again, so soon.
Longer term there will be a complete redo of glibc up to the latest version, which will obviously require a new toolchain for users - I think that is the right place to do the next round of ABI breakage.
Any thoughts?
John
Signature · 3 lines
John Williams, PhD, B.Eng, B.IT PetaLogix - Linux Solutions for a Reconfigurable World w: www.petalogix.com p: +61-7-30090663 f: +61-7-30090663
Arnd Bergmann
maintainerRe: [microblaze-uclinux] [PATCH 03/11] microblaze: fall back on generic header files for the ABI
Quoted 7 lines · John Williams
However, we've just "broken" the ABI in 2.6.31, if we merge further ABI breakage in 2.6.32 it's more pain and confusion.
So, unless we can merge and validate this ABI breakage during the 2.6.31-rc cycle, I think we need to hold on changes that would break the ABI again, so soon.
Quoted 5 lines
Longer term there will be a complete redo of glibc up to the latest version, which will obviously require a new toolchain for users - I think that is the right place to do the next round of ABI breakage.
Any thoughts?
Normally the rule is to never break the ABI at all, even in a major update of glibc.
Initially I had hoped that we could do the change before 2.6.30 and I worked hard on getting the ABI patches to you early enough for that. After that failed, I made sure that you had everything in place for 2.6.31 and I believed that Michal said he would integrate that in the microblaze-mmu merge, before you actually start seeing users on the mainline kernel.
If we don't get that into 2.6.31 any more (and the chances have slimmed down a lot after the end of the merge window), I think we should just declare complete failure and not touch the ABI any more, however broken it may be.
In over 14 months, not even the most basic fixes to the ABI that I mentioned in the first review have been applied:
Quoted 16 lines · Michal Simek
Quoted 6 lines · Arnd Bergmann
* Your syscall ABI is largely obsolete. A third of the syscalls you define should not even be there in the first place as they have been replaced by newer versions. E.g. you have select,
_newselectand pselect6, where just pselect6 would be sufficient -- you don't need to worry about backwards compatibility if you don't have existing code. A good start would be to take thearch/blackfinsyscall list and further reduce itQuoted 8 lines
from there. Further examples are:
- replace socketcall with separate syscall entry points
- replace ipc with a separate entry points
- remove all the legacy signal handling fromarch/microblaze/kernel/signal.c
- removesys_mmap,sys_oldunameandsys_vfork
- finally define a genericsys_mmap2andsys_unameinkernel/so you don't need another copy inarch/microblaze/kernel
- Use 64 bitoff_t, and 32 bituid_t,gid_tetc.
Quoted 2 lines
This kernel don't need to keep backward compatibility. No one will port to previous version. I'll look at your points and I'll send you what I do.
Arnd <><
Michal Simek
maintainerRe: [microblaze-uclinux] [PATCH 03/11] microblaze: fall back on generic header files for the ABI
Quoted 17 lines · Arnd Bergmann
Quoted 7 lines · John Williams
However, we've just "broken" the ABI in 2.6.31, if we merge further ABI breakage in 2.6.32 it's more pain and confusion.
So, unless we can merge and validate this ABI breakage during the 2.6.31-rc cycle, I think we need to hold on changes that would break the ABI again, so soon.
Quoted 5 lines
Longer term there will be a complete redo of glibc up to the latest version, which will obviously require a new toolchain for users - I think that is the right place to do the next round of ABI breakage.
Any thoughts?
Normally the rule is to never break the ABI at all, even in a major update of glibc.
Quoted 6 lines
Initially I had hoped that we could do the change before 2.6.30 and I worked hard on getting the ABI patches to you early enough for that. After that failed, I made sure that you had everything in place for 2.6.31 and I believed that Michal said he would integrate that in the microblaze-mmu merge, before you actually start seeing users on the mainline kernel.
we are talking about minor change - I know it break ABI a little bit
but don't be scared with it.
Two changes - first ssize_t is no problem - just warning messages
Second change kernel_mode_t from short to int breaks only ipc structures.
We are working on solving problem about another IPC trouble. I found a problem with some syscalls which needs to be fixed in kernel and glibc - we will need newest toolchain for it in any case. John just wanted to be sure that we will have working correct version. I added most of your patches to my next branch for testing. I expect that Stephen merge it to next soon.
Thanks for your work,
Michal
Quoted 36 lines
If we don't get that into 2.6.31 any more (and the chances have slimmed down a lot after the end of the merge window), I think we should just declare complete failure and not touch the ABI any more, however broken it may be.
In over 14 months, not even the most basic fixes to the ABI that I mentioned in the first review have been applied:
Quoted 15 lines · Michal Simek
Quoted 6 lines · Arnd Bergmann
* Your syscall ABI is largely obsolete. A third of the syscalls you define should not even be there in the first place as they have been replaced by newer versions. E.g. you have select,
_newselectand pselect6, where just pselect6 would be sufficient -- you don't need to worry about backwards compatibility if you don't have existing code. A good start would be to take thearch/blackfinsyscall list and further reduce itQuoted 8 lines
from there. Further examples are:
- replace socketcall with separate syscall entry points
- replace ipc with a separate entry points
- remove all the legacy signal handling fromarch/microblaze/kernel/signal.c
- removesys_mmap,sys_oldunameandsys_vfork
- finally define a genericsys_mmap2andsys_unameinkernel/so you don't need another copy inarch/microblaze/kernel
- Use 64 bitoff_t, and 32 bituid_t,gid_tetc.Quoted 2 lines
This kernel don't need to keep backward compatibility. No one will port to previous version. I'll look at your points and I'll send you what I do.
Arnd <><___________________________
microblaze-uclinux mailing list
[email protected]
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
Signature · 2 lines
Michal Simek, Ing. (M.Eng) w: www.monstr.eu p: +42-0-721842854
Arnd Bergmann
maintainerRe: [microblaze-uclinux] [PATCH 03/11] microblaze: fall back on generic header files for the ABI
Quoted 10 lines · Michal Simek
Quoted 7 lines
Initially I had hoped that we could do the change before 2.6.30 and I worked hard on getting the ABI patches to you early enough for that. After that failed, I made sure that you had everything in place for 2.6.31 and I believed that Michal said he would integrate that in the microblaze-mmu merge, before you actually start seeing users on the mainline kernel.
we are talking about minor change - I know it break ABI a little bit but don't be scared with it.
The data structures are all compatible by now, with this one exception. __kernel_mode_t is easy enough to fix in the generic headers if it really helps.
My frustration is only about the system call list, which has not been fixed, and which will cause a significant ABI break once you change it. If you are lucky, most applications will still work after you install a matching libc, but you still get a cross-dependency between libc and the kernel.
This means you may not want to really use the generic syscall numbers, but at least you should make sure that your table is consistent. FWIW, below you find a list of inconsistencies.
Arnd <><
System calls that have a number but are missing an entry in your sys_call_table:
sys_preadvsys_pwritevsys_pselect6sys_ppollsys_sigaltstacksys_migrate_pages /* not needed */sys_futimesat /* not needed */
System call numbers you might need for binary compatiblily and should have removed earlier:__NR_waitpid__NR_stime__NR_nice__NR_oldstat__NR_oldfstat__NR_oldlstat__NR_sigaction__NR_sgetmask__NR_ssetmask__NR_sigsuspend__NR_sigpending__NR_socketcall__NR_readdir__NR_sigreturn__NR_sigprocmask__NR_ipc__NR_sysfs
Numbers that you really really should simply not #define, with no chance of breaking anything:__NR_break__NR_stty__NR_gtty__NR_ftime__NR_prof__NR_lock__NR_mpx__NR_ulimit__NR_oldolduname__NR_profil__NR_ioperm__NR_olduname__NR_iopl__NR_idle__NR_vm86old__NR_modify_ldt__NR_create_module__NR_get_kernel_syms__NR_afs_syscall__NR__newselect__NR_vm86__NR_query_module__NR_getpmsg__NR_putpmsg__NR_ugetrlimit__NR_set_thread_area__NR_get_thread_area__NR_vserver__NR_accept04 /* typo? */
Duplicate system call numbers:__NR_lchown32__NR_getuid32__NR_getgid32__NR_geteuid32__NR_getegid32__NR_setreuid32__NR_setregid32__NR_getgroups32__NR_setgroups32__NR_fchown32__NR_setresuid32__NR_getresuid32__NR_setresgid32__NR_getresgid32__NR_chown32__NR_setuid32__NR_setgid32__NR_setfsuid32__NR_setfsgid32
Arnd <><