diff options
author | Mark Salter <msalter@redhat.com> | 2009-10-01 18:44:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-01 19:11:12 -0400 |
commit | d22a001bf6a502e978a8617e3f297b4d762cfbb5 (patch) | |
tree | 6291200ec18203153ff6e26a666bd7809659b371 /arch/mn10300/unit-asb2305 | |
parent | 933d35f00cfaf99985515c7c212d9dee30b1a1fb (diff) |
mn10300: fix kernel build failures when using gcc-4.x
Fix some build failures when using gcc-4.x for MN10300.
Firstly, __get_user() fails to build because the pointer points to a const and
__gu_val ends up being read-only:
In file included from include/linux/mempolicy.h:62,
from init/main.c:50:
include/linux/pagemap.h: In function 'fault_in_pages_readable':
include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:394: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output
include/linux/pagemap.h:400: error: read-only variable '__gu_val' used as 'asm' output
make[1]: *** [init/main.o] Error 1
Secondly, gcc-4 doesn't allow casts of lvalues:
UPD include/linux/compile.h
arch/mn10300/kernel/rtc.c: In function 'calibrate_clock':
arch/mn10300/kernel/rtc.c:170: error: lvalue required as left operand of assignment
arch/mn10300/kernel/rtc.c:172: error: lvalue required as left operand of assignment
make[1]: *** [arch/mn10300/kernel/rtc.o] Error 1
These are seen with gcc 4.2.1.
Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mn10300/unit-asb2305')
-rw-r--r-- | arch/mn10300/unit-asb2305/include/unit/clock.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/mn10300/unit-asb2305/include/unit/clock.h b/arch/mn10300/unit-asb2305/include/unit/clock.h index 7d514841ffda..67be3f2eb18e 100644 --- a/arch/mn10300/unit-asb2305/include/unit/clock.h +++ b/arch/mn10300/unit-asb2305/include/unit/clock.h | |||
@@ -20,9 +20,9 @@ extern unsigned long mn10300_ioclk; /* IOCLK (crystal speed) in HZ */ | |||
20 | extern unsigned long mn10300_iobclk; | 20 | extern unsigned long mn10300_iobclk; |
21 | extern unsigned long mn10300_tsc_per_HZ; | 21 | extern unsigned long mn10300_tsc_per_HZ; |
22 | 22 | ||
23 | #define MN10300_IOCLK ((unsigned long)mn10300_ioclk) | 23 | #define MN10300_IOCLK mn10300_ioclk |
24 | /* If this processors has a another clock, uncomment the below. */ | 24 | /* If this processors has a another clock, uncomment the below. */ |
25 | /* #define MN10300_IOBCLK ((unsigned long)mn10300_iobclk) */ | 25 | /* #define MN10300_IOBCLK mn10300_iobclk */ |
26 | 26 | ||
27 | #else /* !CONFIG_MN10300_RTC */ | 27 | #else /* !CONFIG_MN10300_RTC */ |
28 | 28 | ||
@@ -35,7 +35,7 @@ extern unsigned long mn10300_tsc_per_HZ; | |||
35 | #define MN10300_TSCCLK MN10300_IOCLK | 35 | #define MN10300_TSCCLK MN10300_IOCLK |
36 | 36 | ||
37 | #ifdef CONFIG_MN10300_RTC | 37 | #ifdef CONFIG_MN10300_RTC |
38 | #define MN10300_TSC_PER_HZ ((unsigned long)mn10300_tsc_per_HZ) | 38 | #define MN10300_TSC_PER_HZ mn10300_tsc_per_HZ |
39 | #else /* !CONFIG_MN10300_RTC */ | 39 | #else /* !CONFIG_MN10300_RTC */ |
40 | #define MN10300_TSC_PER_HZ (MN10300_TSCCLK/HZ) | 40 | #define MN10300_TSC_PER_HZ (MN10300_TSCCLK/HZ) |
41 | #endif /* !CONFIG_MN10300_RTC */ | 41 | #endif /* !CONFIG_MN10300_RTC */ |