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>
|
||
|---|---|---|
| .. | ||
| atomic.h | ||
| auxvec.h | ||
| bitops.h | ||
| bitsperlong.h | ||
| bug.h | ||
| bugs.h | ||
| busctl-regs.h | ||
| byteorder.h | ||
| cache.h | ||
| cacheflush.h | ||
| checksum.h | ||
| cpu-regs.h | ||
| cputime.h | ||
| current.h | ||
| delay.h | ||
| device.h | ||
| div64.h | ||
| dma-mapping.h | ||
| dma.h | ||
| dmactl-regs.h | ||
| elf.h | ||
| emergency-restart.h | ||
| errno.h | ||
| exceptions.h | ||
| fb.h | ||
| fcntl.h | ||
| fpu.h | ||
| frame.inc | ||
| ftrace.h | ||
| futex.h | ||
| gdb-stub.h | ||
| hardirq.h | ||
| highmem.h | ||
| hw_irq.h | ||
| intctl-regs.h | ||
| io.h | ||
| ioctl.h | ||
| ioctls.h | ||
| ipc.h | ||
| ipcbuf.h | ||
| irq.h | ||
| irq_regs.h | ||
| Kbuild | ||
| kdebug.h | ||
| kmap_types.h | ||
| kprobes.h | ||
| linkage.h | ||
| local.h | ||
| mc146818rtc.h | ||
| mman.h | ||
| mmu.h | ||
| mmu_context.h | ||
| module.h | ||
| msgbuf.h | ||
| mutex.h | ||
| nmi.h | ||
| page.h | ||
| page_offset.h | ||
| param.h | ||
| pci.h | ||
| percpu.h | ||
| pgalloc.h | ||
| pgtable.h | ||
| pio-regs.h | ||
| poll.h | ||
| posix_types.h | ||
| processor.h | ||
| ptrace.h | ||
| reset-regs.h | ||
| resource.h | ||
| rtc-regs.h | ||
| rtc.h | ||
| scatterlist.h | ||
| sections.h | ||
| sembuf.h | ||
| serial-regs.h | ||
| serial.h | ||
| setup.h | ||
| shmbuf.h | ||
| shmparam.h | ||
| sigcontext.h | ||
| siginfo.h | ||
| signal.h | ||
| smp.h | ||
| socket.h | ||
| sockios.h | ||
| spinlock.h | ||
| stat.h | ||
| statfs.h | ||
| string.h | ||
| swab.h | ||
| system.h | ||
| termbits.h | ||
| termios.h | ||
| thread_info.h | ||
| timer-regs.h | ||
| timex.h | ||
| tlb.h | ||
| tlbflush.h | ||
| topology.h | ||
| types.h | ||
| uaccess.h | ||
| ucontext.h | ||
| unaligned.h | ||
| unistd.h | ||
| user.h | ||
| vga.h | ||
| xor.h | ||