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

2019-04-09 Thread Anup Patel
On Tue, Apr 9, 2019 at 10:17 PM Palmer Dabbelt wrote: > > On Tue, 12 Mar 2019 15:08:16 PDT (-0700), 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 2/3] RISC-V: Make setup_vm() independent of GCC code model

2019-04-09 Thread Palmer Dabbelt
On Tue, 12 Mar 2019 15:08:16 PDT (-0700), 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 access kernel

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

2019-03-13 Thread Mike Rapoport
On Tue, Mar 12, 2019 at 10:08:16PM +, 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 access

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

2019-03-12 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 k