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

Merge tag 'microblaze-3.17-rc1' of git://git.monstr.eu/linux-2.6-microblaze

Pull microblaze updates from Michal Simek:
- add new syscall and fix comment
- fix udelay implementation
- fix libgcc for modules

* tag 'microblaze-3.17-rc1' of git://git.monstr.eu/linux-2.6-microblaze:
microblaze: Change libgcc-style functions from lib-y to obj-y
microblaze: Wire-up renameat2 syscall
microblaze: Add syscall number comment
microblaze: delay.h fix udelay and ndelay for 8 bit args

+28 -18
+22 -6
arch/microblaze/include/asm/delay.h
··· 61 61 extern void __bad_udelay(void); /* deliberately undefined */ 62 62 extern void __bad_ndelay(void); /* deliberately undefined */ 63 63 64 - #define udelay(n) (__builtin_constant_p(n) ? \ 65 - ((n) > __MAX_UDELAY ? __bad_udelay() : __udelay((n) * (19 * HZ))) : \ 66 - __udelay((n) * (19 * HZ))) 64 + #define udelay(n) \ 65 + ({ \ 66 + if (__builtin_constant_p(n)) { \ 67 + if ((n) / __MAX_UDELAY >= 1) \ 68 + __bad_udelay(); \ 69 + else \ 70 + __udelay((n) * (19 * HZ)); \ 71 + } else { \ 72 + __udelay((n) * (19 * HZ)); \ 73 + } \ 74 + }) 67 75 68 - #define ndelay(n) (__builtin_constant_p(n) ? \ 69 - ((n) > __MAX_NDELAY ? __bad_ndelay() : __udelay((n) * HZ)) : \ 70 - __udelay((n) * HZ)) 76 + #define ndelay(n) \ 77 + ({ \ 78 + if (__builtin_constant_p(n)) { \ 79 + if ((n) / __MAX_NDELAY >= 1) \ 80 + __bad_ndelay(); \ 81 + else \ 82 + __udelay((n) * HZ); \ 83 + } else { \ 84 + __udelay((n) * HZ); \ 85 + } \ 86 + }) 71 87 72 88 #define muldiv(a, b, c) (((a)*(b))/(c)) 73 89
+1
arch/microblaze/include/uapi/asm/unistd.h
··· 398 398 #define __NR_finit_module 380 399 399 #define __NR_sched_setattr 381 400 400 #define __NR_sched_getattr 382 401 + #define __NR_renameat2 383 401 402 402 403 #endif /* _UAPI_ASM_MICROBLAZE_UNISTD_H */
+2 -1
arch/microblaze/kernel/syscall_table.S
··· 380 380 .long sys_process_vm_readv 381 381 .long sys_process_vm_writev 382 382 .long sys_kcmp 383 - .long sys_finit_module 383 + .long sys_finit_module /* 380 */ 384 384 .long sys_sched_setattr 385 385 .long sys_sched_getattr 386 + .long sys_renameat2
+3 -11
arch/microblaze/lib/Makefile
··· 18 18 19 19 lib-y += uaccess_old.o 20 20 21 - lib-y += ashldi3.o 22 - lib-y += ashrdi3.o 23 - lib-y += cmpdi2.o 24 - lib-y += divsi3.o 25 - lib-y += lshrdi3.o 26 - lib-y += modsi3.o 27 - lib-y += muldi3.o 28 - lib-y += mulsi3.o 29 - lib-y += ucmpdi2.o 30 - lib-y += udivsi3.o 31 - lib-y += umodsi3.o 21 + # libgcc-style stuff needed in the kernel 22 + obj-y += ashldi3.o ashrdi3.o cmpdi2.o divsi3.o lshrdi3.o modsi3.o 23 + obj-y += muldi3.o mulsi3.o ucmpdi2.o udivsi3.o umodsi3.o