1
0
Fork 0
alistair23-linux/arch/riscv/mm
Anup Patel 387181dcdb
RISC-V: Always compile mm/init.c with cmodel=medany and notrace
The Linux RISC-V 32bit kernel is broken after we moved setup_vm() from
kernel/setup.c to mm/init.c because Linux RISC-V 32bit kernel by default
uses cmodel=medlow which results in a non-position-independent setup_vm().

This patch fixes Linux RISC-V 32bit kernel booting by:
1. Forcing cmodel=medany for mm/init.c
2. Moving remaing MM-related stuff va_pa_offset, pfn_base and
   empty_zero_page from kernel/setup.c to mm/init.c

Further, the setup_vm() cannot handle GCC instrumentation for FTRACE so
we disable it for mm/init.c by not using "-pg" compiler flag.

Fixes: 6f1e9e946f ("RISC-V: Move setup_vm() to mm/init.c")
Suggested-by: Christoph Hellwig <hch@lst.de>
Suggested-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-26 18:25:06 -07:00
..
Makefile RISC-V: Always compile mm/init.c with cmodel=medany and notrace 2019-03-26 18:25:06 -07:00
cacheflush.c RISC-V: Flush I$ when making a dirty page executable 2017-11-30 12:58:25 -08:00
extable.c RISC-V: ELF and module implementation 2017-09-26 15:26:46 -07:00
fault.c mm: convert return type of handle_mm_fault() caller to vm_fault_t 2018-08-17 16:20:28 -07:00
init.c RISC-V: Always compile mm/init.c with cmodel=medany and notrace 2019-03-26 18:25:06 -07:00
ioremap.c RISC-V: Avoid corrupting the upper 32-bit of phys_addr_t in ioremap 2018-10-22 17:02:56 -07:00