Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm

Pull ARM fixes from Russell King:
 "Three fixes this time around:

   - ensure sparse realises that we're building for a 32-bit arch on
     64-bit hosts.

   - use the correct instruction for semihosting on v7m (nommu) CPUs.

   - reserve address 0 to prevent the first page of memory being used on
     nommu systems"

* 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm:
  ARM: 8704/1: semihosting: use proper instruction on v7m processors
  ARM: 8701/1: fix sparse flags for build on 64bit machines
  ARM: 8700/1: nommu: always reserve address 0 away
This commit is contained in:
Linus Torvalds 2017-10-20 18:20:17 -04:00
commit 9c323bff13
4 changed files with 18 additions and 1 deletions

View File

@ -131,7 +131,7 @@ endif
KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm KBUILD_CFLAGS +=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float KBUILD_AFLAGS +=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float
CHECKFLAGS += -D__arm__ CHECKFLAGS += -D__arm__ -m32
#Default value #Default value
head-y := arch/arm/kernel/head$(MMUEXT).o head-y := arch/arm/kernel/head$(MMUEXT).o

View File

@ -23,7 +23,11 @@ ENTRY(putc)
strb r0, [r1] strb r0, [r1]
mov r0, #0x03 @ SYS_WRITEC mov r0, #0x03 @ SYS_WRITEC
ARM( svc #0x123456 ) ARM( svc #0x123456 )
#ifdef CONFIG_CPU_V7M
THUMB( bkpt #0xab )
#else
THUMB( svc #0xab ) THUMB( svc #0xab )
#endif
mov pc, lr mov pc, lr
.align 2 .align 2
1: .word _GLOBAL_OFFSET_TABLE_ - . 1: .word _GLOBAL_OFFSET_TABLE_ - .

View File

@ -115,7 +115,11 @@ ENTRY(printascii)
mov r1, r0 mov r1, r0
mov r0, #0x04 @ SYS_WRITE0 mov r0, #0x04 @ SYS_WRITE0
ARM( svc #0x123456 ) ARM( svc #0x123456 )
#ifdef CONFIG_CPU_V7M
THUMB( bkpt #0xab )
#else
THUMB( svc #0xab ) THUMB( svc #0xab )
#endif
ret lr ret lr
ENDPROC(printascii) ENDPROC(printascii)
@ -124,7 +128,11 @@ ENTRY(printch)
strb r0, [r1] strb r0, [r1]
mov r0, #0x03 @ SYS_WRITEC mov r0, #0x03 @ SYS_WRITEC
ARM( svc #0x123456 ) ARM( svc #0x123456 )
#ifdef CONFIG_CPU_V7M
THUMB( bkpt #0xab )
#else
THUMB( svc #0xab ) THUMB( svc #0xab )
#endif
ret lr ret lr
ENDPROC(printch) ENDPROC(printch)

View File

@ -344,6 +344,11 @@ void __init arm_mm_memblock_reserve(void)
* reserved here. * reserved here.
*/ */
#endif #endif
/*
* In any case, always ensure address 0 is never used as many things
* get very confused if 0 is returned as a legitimate address.
*/
memblock_reserve(0, 1);
} }
void __init adjust_lowmem_bounds(void) void __init adjust_lowmem_bounds(void)