From d6ffe1b8ecc59ae23524e408063dc7725f485f96 Mon Sep 17 00:00:00 2001 From: Hans-Christian Egtvedt Date: Mon, 13 May 2013 22:13:59 +0200 Subject: avr32: move NODES_SHIFT into Kconfig and delete numnodes.h This patch moves the NODES_SHIFT symbol into Kconfig to synchronize AVR32 architecture with the current kernel. The global header files do longer use the value from numnodes.h. See commit c80d79d746cc48bd94b0ce4f6d4f3c90cd403aaf for details. Signed-off-by: Paul Bolle Signed-off-by: Hans-Christian Egtvedt --- arch/avr32/Kconfig | 5 +++++ arch/avr32/include/asm/numnodes.h | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) delete mode 100644 arch/avr32/include/asm/numnodes.h (limited to 'arch/avr32') diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig index 22c40308360..ba4d40569f9 100644 --- a/arch/avr32/Kconfig +++ b/arch/avr32/Kconfig @@ -208,6 +208,11 @@ config ARCH_DISCONTIGMEM_ENABLE config ARCH_SPARSEMEM_ENABLE def_bool n +config NODES_SHIFT + int + default "2" + depends on NEED_MULTIPLE_NODES + source "mm/Kconfig" config OWNERSHIP_TRACE diff --git a/arch/avr32/include/asm/numnodes.h b/arch/avr32/include/asm/numnodes.h deleted file mode 100644 index 0b864d7ce33..00000000000 --- a/arch/avr32/include/asm/numnodes.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef __ASM_AVR32_NUMNODES_H -#define __ASM_AVR32_NUMNODES_H - -/* Max 4 nodes */ -#define NODES_SHIFT 2 - -#endif /* __ASM_AVR32_NUMNODES_H */ -- cgit v1.2.3-70-g09d2 From e68c636d88db3fda74e664ecb1a213ae0d50a7d8 Mon Sep 17 00:00:00 2001 From: Hans-Christian Egtvedt Date: Mon, 13 May 2013 22:22:10 +0200 Subject: avr32: fix relocation check for signed 18-bit offset Caught by static code analysis by David. Reported-by: David Binderman Signed-off-by: Hans-Christian Egtvedt Cc: stable@kernel.org --- arch/avr32/kernel/module.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/avr32') diff --git a/arch/avr32/kernel/module.c b/arch/avr32/kernel/module.c index 596f7305d93..2c941290802 100644 --- a/arch/avr32/kernel/module.c +++ b/arch/avr32/kernel/module.c @@ -264,7 +264,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, break; case R_AVR32_GOT18SW: if ((relocation & 0xfffe0003) != 0 - && (relocation & 0xfffc0003) != 0xffff0000) + && (relocation & 0xfffc0000) != 0xfffc0000) return reloc_overflow(module, "R_AVR32_GOT18SW", relocation); relocation >>= 2; -- cgit v1.2.3-70-g09d2 From 0c9b5a317b8ae7201fed07ec66d642b2ad7ea1b0 Mon Sep 17 00:00:00 2001 From: Jiang Liu Date: Fri, 17 May 2013 23:45:18 +0800 Subject: avr32: fix building warnings caused by redefinitions of HZ As suggested by David Howells , use asm-generic/param.h and uapi/asm-generic/param.h for AVR32. It also fixes building warnings caused by redefinitions of HZ: In file included from /ws/linux/kernel/linux.git/include/uapi/linux/param.h:4, from include/linux/timex.h:63, from include/linux/jiffies.h:8, from include/linux/ktime.h:25, from include/linux/timer.h:5, from include/linux/workqueue.h:8, from include/linux/srcu.h:34, from include/linux/notifier.h:15, from include/linux/memory_hotplug.h:6, from include/linux/mmzone.h:777, from include/linux/gfp.h:4, from arch/avr32/mm/init.c:10: /ws/linux/kernel/linux.git/arch/avr32/include/asm/param.h:6:1: warning: "HZ" redefined In file included from /ws/linux/kernel/linux.git/arch/avr32/include/asm/param.h:4, from /ws/linux/kernel/linux.git/include/uapi/linux/param.h:4, from include/linux/timex.h:63, from include/linux/jiffies.h:8, from include/linux/ktime.h:25, from include/linux/timer.h:5, from include/linux/workqueue.h:8, from include/linux/srcu.h:34, from include/linux/notifier.h:15, from include/linux/memory_hotplug.h:6, from include/linux/mmzone.h:777, from include/linux/gfp.h:4, from arch/avr32/mm/init.c:10: /ws/linux/kernel/linux.git/arch/avr32/include/uapi/asm/param.h:6:1: warning: this is the location of the previous definition Signed-off-by: Jiang Liu Cc: Hans-Christian Egtvedt Cc: Haavard Skinnemoen Cc: linux-kernel@vger.kernel.org Signed-off-by: Hans-Christian Egtvedt --- arch/avr32/include/asm/Kbuild | 1 + arch/avr32/include/asm/param.h | 9 --------- arch/avr32/include/uapi/asm/Kbuild | 1 + arch/avr32/include/uapi/asm/param.h | 18 ------------------ 4 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 arch/avr32/include/asm/param.h delete mode 100644 arch/avr32/include/uapi/asm/param.h (limited to 'arch/avr32') diff --git a/arch/avr32/include/asm/Kbuild b/arch/avr32/include/asm/Kbuild index 4dd4f78d3dc..d22af851f3f 100644 --- a/arch/avr32/include/asm/Kbuild +++ b/arch/avr32/include/asm/Kbuild @@ -2,3 +2,4 @@ generic-y += clkdev.h generic-y += exec.h generic-y += trace_clock.h +generic-y += param.h diff --git a/arch/avr32/include/asm/param.h b/arch/avr32/include/asm/param.h deleted file mode 100644 index 009a167aea1..00000000000 --- a/arch/avr32/include/asm/param.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __ASM_AVR32_PARAM_H -#define __ASM_AVR32_PARAM_H - -#include - -# define HZ CONFIG_HZ -# define USER_HZ 100 /* User interfaces are in "ticks" */ -# define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ -#endif /* __ASM_AVR32_PARAM_H */ diff --git a/arch/avr32/include/uapi/asm/Kbuild b/arch/avr32/include/uapi/asm/Kbuild index df53e7a4677..3b85eaddf52 100644 --- a/arch/avr32/include/uapi/asm/Kbuild +++ b/arch/avr32/include/uapi/asm/Kbuild @@ -33,3 +33,4 @@ header-y += termbits.h header-y += termios.h header-y += types.h header-y += unistd.h +generic-y += param.h diff --git a/arch/avr32/include/uapi/asm/param.h b/arch/avr32/include/uapi/asm/param.h deleted file mode 100644 index d28aa5ee6d3..00000000000 --- a/arch/avr32/include/uapi/asm/param.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _UAPI__ASM_AVR32_PARAM_H -#define _UAPI__ASM_AVR32_PARAM_H - - -#ifndef HZ -# define HZ 100 -#endif - -/* TODO: Should be configurable */ -#define EXEC_PAGESIZE 4096 - -#ifndef NOGROUP -# define NOGROUP (-1) -#endif - -#define MAXHOSTNAMELEN 64 - -#endif /* _UAPI__ASM_AVR32_PARAM_H */ -- cgit v1.2.3-70-g09d2