Re: [PATCH v2 2/5] RISC-V: Make setup_vm() independent of GCC code model

2019-03-24 Thread Anup Patel
On Sat, Mar 23, 2019 at 9:15 PM Mike Rapoport wrote: > > On Thu, Mar 21, 2019 at 09:47:47AM +, Anup Patel wrote: > > The setup_vm() must access kernel symbols in a position independent way > > because it will be called from head.S with MMU off. > > > > If we compile kernel with cmodel=medany

Re: [PATCH v2 2/5] RISC-V: Make setup_vm() independent of GCC code model

2019-03-23 Thread Mike Rapoport
On Thu, Mar 21, 2019 at 09:47:47AM +, Anup Patel wrote: > The setup_vm() must access kernel symbols in a position independent way > because it will be called from head.S with MMU off. > > If we compile kernel with cmodel=medany then PC-relative addressing will > be used in setup_vm() to

[PATCH v2 2/5] RISC-V: Make setup_vm() independent of GCC code model

2019-03-21 Thread Anup Patel
The setup_vm() must access kernel symbols in a position independent way because it will be called from head.S with MMU off. If we compile kernel with cmodel=medany then PC-relative addressing will be used in setup_vm() to access kernel symbols so it works perfectly fine. Although, if we compile