From ad1d4358e0fdc16017a809ed54f532e68e3c26b6 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 9 Jul 2014 13:23:55 +0200 Subject: microblaze: delay.h fix udelay and ndelay for 8 bit args Based on: "asm-generic: delay.h fix udelay and ndelay for 8 bit args" (sha1: a87e553fabe8ceadc6f90889066559234cf194c7) Signed-off-by: Michal Simek --- arch/microblaze/include/asm/delay.h | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'arch/microblaze') diff --git a/arch/microblaze/include/asm/delay.h b/arch/microblaze/include/asm/delay.h index 66fc24c24238..60cb39deb533 100644 --- a/arch/microblaze/include/asm/delay.h +++ b/arch/microblaze/include/asm/delay.h @@ -61,13 +61,29 @@ extern inline void __udelay(unsigned int x) extern void __bad_udelay(void); /* deliberately undefined */ extern void __bad_ndelay(void); /* deliberately undefined */ -#define udelay(n) (__builtin_constant_p(n) ? \ - ((n) > __MAX_UDELAY ? __bad_udelay() : __udelay((n) * (19 * HZ))) : \ - __udelay((n) * (19 * HZ))) +#define udelay(n) \ + ({ \ + if (__builtin_constant_p(n)) { \ + if ((n) / __MAX_UDELAY >= 1) \ + __bad_udelay(); \ + else \ + __udelay((n) * (19 * HZ)); \ + } else { \ + __udelay((n) * (19 * HZ)); \ + } \ + }) -#define ndelay(n) (__builtin_constant_p(n) ? \ - ((n) > __MAX_NDELAY ? __bad_ndelay() : __udelay((n) * HZ)) : \ - __udelay((n) * HZ)) +#define ndelay(n) \ + ({ \ + if (__builtin_constant_p(n)) { \ + if ((n) / __MAX_NDELAY >= 1) \ + __bad_ndelay(); \ + else \ + __udelay((n) * HZ); \ + } else { \ + __udelay((n) * HZ); \ + } \ + }) #define muldiv(a, b, c) (((a)*(b))/(c)) -- cgit From cfa1481a4073760aeaf83f4cd5e9602a35f8082f Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 9 Jul 2014 13:25:52 +0200 Subject: microblaze: Add syscall number comment Trivial fix. Signed-off-by: Michal Simek --- arch/microblaze/kernel/syscall_table.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/microblaze') diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S index 329dfbad810b..941929fa662f 100644 --- a/arch/microblaze/kernel/syscall_table.S +++ b/arch/microblaze/kernel/syscall_table.S @@ -380,6 +380,6 @@ ENTRY(sys_call_table) .long sys_process_vm_readv .long sys_process_vm_writev .long sys_kcmp - .long sys_finit_module + .long sys_finit_module /* 380 */ .long sys_sched_setattr .long sys_sched_getattr -- cgit From 08e6bbda0b483268822e3461f1bb82d6c80d2de5 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 9 Jul 2014 13:27:07 +0200 Subject: microblaze: Wire-up renameat2 syscall Add new renameat2 syscall. Signed-off-by: Michal Simek --- arch/microblaze/include/uapi/asm/unistd.h | 1 + arch/microblaze/kernel/syscall_table.S | 1 + 2 files changed, 2 insertions(+) (limited to 'arch/microblaze') diff --git a/arch/microblaze/include/uapi/asm/unistd.h b/arch/microblaze/include/uapi/asm/unistd.h index 8d0791b49b31..4e1ddc930a68 100644 --- a/arch/microblaze/include/uapi/asm/unistd.h +++ b/arch/microblaze/include/uapi/asm/unistd.h @@ -398,5 +398,6 @@ #define __NR_finit_module 380 #define __NR_sched_setattr 381 #define __NR_sched_getattr 382 +#define __NR_renameat2 383 #endif /* _UAPI_ASM_MICROBLAZE_UNISTD_H */ diff --git a/arch/microblaze/kernel/syscall_table.S b/arch/microblaze/kernel/syscall_table.S index 941929fa662f..1a23d5d5480c 100644 --- a/arch/microblaze/kernel/syscall_table.S +++ b/arch/microblaze/kernel/syscall_table.S @@ -383,3 +383,4 @@ ENTRY(sys_call_table) .long sys_finit_module /* 380 */ .long sys_sched_setattr .long sys_sched_getattr + .long sys_renameat2 -- cgit From ef264cf0c490cc9d46edb3b6aa082d23a9506e2d Mon Sep 17 00:00:00 2001 From: David Holsgrove Date: Thu, 27 Feb 2014 16:42:42 -0800 Subject: microblaze: Change libgcc-style functions from lib-y to obj-y Following precedence set by MIPs: "[MIPS] Change libgcc-style functions from lib-y to obj-y" (sha1: f7c2778151f32581ea9ec567d01d5d85209fcfe6), switch the goal definition for kbuild to obj-y to ensure object files linked in vmlinux if only modules were users of these functions. Signed-off-by: David Holsgrove Signed-off-by: Michal Simek --- arch/microblaze/lib/Makefile | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'arch/microblaze') diff --git a/arch/microblaze/lib/Makefile b/arch/microblaze/lib/Makefile index 844960e8ae18..70c7ae6a3fb5 100644 --- a/arch/microblaze/lib/Makefile +++ b/arch/microblaze/lib/Makefile @@ -18,14 +18,6 @@ endif lib-y += uaccess_old.o -lib-y += ashldi3.o -lib-y += ashrdi3.o -lib-y += cmpdi2.o -lib-y += divsi3.o -lib-y += lshrdi3.o -lib-y += modsi3.o -lib-y += muldi3.o -lib-y += mulsi3.o -lib-y += ucmpdi2.o -lib-y += udivsi3.o -lib-y += umodsi3.o +# libgcc-style stuff needed in the kernel +obj-y += ashldi3.o ashrdi3.o cmpdi2.o divsi3.o lshrdi3.o modsi3.o +obj-y += muldi3.o mulsi3.o ucmpdi2.o udivsi3.o umodsi3.o -- cgit