m68k patches
cover m68k patches
Hi,
Here a few miscellaneous fixes for m68k, including the lost timeadj due the ntp patches, which affected also other archs.
bye, Roman
PATCH 1/5 provide tickadj define
Provide a tickadj compatibility define for archs still using it.
--- include/linux/timex.h | 3 +++ 1 file changed, 3 insertions(+)
include/linux/timex.h +3 -0
@@ -293,6 +293,9 @@ extern void second_overflow(void);extern void update_ntp_one_tick (void );extern int do_adjtimex (struct timex *); +/* Don't use! Compatibility define for existing users. */ +#define tickadj (500/HZ ? : 1) +#endif /* KERNEL */ #endif /* LINUX_TIMEX_H */
--
PATCH 2/5 m68k: cleanup string functions
In reply to [email protected]- cleanup asm of string functions
- deinline strncat()/strncmp()
- provide non-inlined strcpy()
--- arch/m68k/kernel/m68k_ksyms.c | 4 arch/m68k/lib/string.c | 15 +++ include/asm-m68k/string.h | 194 ++++++++++++++++++------------------------ 3 files changed, 100 insertions(+), 113 deletions(-)
arch/m68k/kernel/m68k_ksyms.c +0 -4
@@ -1,7 +1,6 @@#include <linux/module.h> #include <linux/linkage.h> #include <linux/sched.h> -#include <linux/string.h> #include <linux/mm.h> #include <linux/user.h> #include <linux/elfcore.h>
@@ -53,9 +52,6 @@ EXPORT_SYMBOL(mach_beep);#endif EXPORT_SYMBOL (dump_fpu);EXPORT_SYMBOL (dump_thread); -EXPORT_SYMBOL (strnlen); -EXPORT_SYMBOL (strrchr); -EXPORT_SYMBOL (strstr);EXPORT_SYMBOL (kernel_thread);#ifdef CONFIG_VME EXPORT_SYMBOL (vme_brdtype);
arch/m68k/lib/string.c +14 -1
@@ -1,6 +1,19 @@ +/* +* 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. +*/ + +#define __IN_STRING_C -#include <linux/types.h> #include <linux/module.h> +#include <linux/string.h> + +char *strcpy (char *dest,const char *src) +{ +return __kernel_strcpy (dest, src); +} +EXPORT_SYMBOL (strcpy);void *memset (void *s,int c,size_t count) {
include/asm-m68k/string.h +86 -108
228 lines not on this page · raw message
--
PATCH 3/5 m68k: fix type in __generic_copy_to_user
In reply to [email protected]Jump to the correct exit label after exception
--- arch/m68k/lib/uaccess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/m68k/lib/uaccess.c +1 -1
@@ -84,7 +84,7 @@ unsigned long __generic_copy_to_user(voi" .even\n" "20: lsl.l #2,%0\n" "50: add.l %5,%0\n" -" jra 7b\n" +" jra 8b\n" " .previous\n" "\n" " .section __ex_table,\"a\"\n"
--
PATCH 4/5 m68k: small system.h cleanup
In reply to [email protected]avoid unnecessary xchg() use in set_mb()
--- include/asm-m68k/system.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
include/asm-m68k/system.h +3 -3
@@ -78,13 +78,13 @@ static inline int irqs_disabled(void)#define mb () barrier()#define rmb () barrier()#define wmb () barrier() -#define read_barrier_depends () do { } while(0) -#define set_mb (var, value) do { xchg(&var, value); } while (0) +#define read_barrier_depends () ((void)0) +#define set_mb (var, value) ({ (var) = (value); wmb(); })#define smp_mb () barrier()#define smp_rmb () barrier()#define smp_wmb () barrier() -#define smp_read_barrier_depends () do { } while(0) +#define smp_read_barrier_depends () ((void)0)#define xchg (ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
--
PATCH 5/5 m68k: fix NBPG define
In reply to [email protected]The recent header cleanup removed PAGE_SIZE from the exported information as it depends on the configuration.
BTW This has possibly other consequences, as the core dump code is using PAGE_SIZE directly, which may need fixing as well.
---
include/asm-m68k/user.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/asm-m68k/user.h +1 -1
@@ -81,7 +81,7 @@ struct user{unsigned long magic;/* To uniquely identify a core file */ char u_comm[32 ];/* User command that was responsible */ }; -#define NBPG PAGE_SIZE +#define NBPG 4096#define UPAGES 1#define HOST_TEXT_START_ADDR (u.start_code)#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
--