Re: [PATCH v2] RISC-V: Always compile mm/init.c with cmodel=medany

2019-03-26 Thread Alistair Francis
On Mon, 2019-03-25 at 19:22 -0700, Palmer Dabbelt wrote: > On Mon, 25 Mar 2019 00:01:45 PDT (-0700), a...@brainfault.org wrote: > > On Mon, Mar 25, 2019 at 12:18 PM Christoph Hellwig < > > h...@infradead.org> wrote: > > > On Mon, Mar 25, 2019 at 01:25:50PM +0800, Alan Kao wrote: > > > > Hi Anup, >

Re: [PATCH v2] RISC-V: Always compile mm/init.c with cmodel=medany

2019-03-25 Thread Anup Patel
On Tue, Mar 26, 2019 at 7:52 AM Palmer Dabbelt wrote: > > On Mon, 25 Mar 2019 00:01:45 PDT (-0700), a...@brainfault.org wrote: > > On Mon, Mar 25, 2019 at 12:18 PM Christoph Hellwig > > wrote: > >> > >> On Mon, Mar 25, 2019 at 01:25:50PM +0800, Alan Kao wrote: > >> > Hi Anup, > >> > > >> >

Re: [PATCH v2] RISC-V: Always compile mm/init.c with cmodel=medany

2019-03-25 Thread Palmer Dabbelt
On Mon, 25 Mar 2019 00:01:45 PDT (-0700), a...@brainfault.org wrote: On Mon, Mar 25, 2019 at 12:18 PM Christoph Hellwig wrote: On Mon, Mar 25, 2019 at 01:25:50PM +0800, Alan Kao wrote: > Hi Anup, > > Sorry for being late to the party. I think one more thing should > move together with

Re: [PATCH v2] RISC-V: Always compile mm/init.c with cmodel=medany

2019-03-25 Thread Anup Patel
On Mon, Mar 25, 2019 at 12:18 PM Christoph Hellwig wrote: > > On Mon, Mar 25, 2019 at 01:25:50PM +0800, Alan Kao wrote: > > Hi Anup, > > > > Sorry for being late to the party. I think one more thing should > > move together with setup_vm(): > > Ah, I wonded about that yesterday but wasn't sure.

Re: [PATCH v2] RISC-V: Always compile mm/init.c with cmodel=medany

2019-03-25 Thread Anup Patel
On Mon, Mar 25, 2019 at 10:56 AM Alan Kao wrote: > > Hi Anup, > > Sorry for being late to the party. I think one more thing should > move together with setup_vm(): > > On Mon, Mar 25, 2019 at 03:37:38AM +, Anup Patel wrote: > > The Linux RISC-V 32bit kernel is broken after we moved

Re: [PATCH v2] RISC-V: Always compile mm/init.c with cmodel=medany

2019-03-25 Thread Christoph Hellwig
On Mon, Mar 25, 2019 at 01:25:50PM +0800, Alan Kao wrote: > Hi Anup, > > Sorry for being late to the party. I think one more thing should > move together with setup_vm(): Ah, I wonded about that yesterday but wasn't sure. Maybe notrace is a little cleaner? Either way we should probably

Re: [PATCH v2] RISC-V: Always compile mm/init.c with cmodel=medany

2019-03-25 Thread Mike Rapoport
On Mon, Mar 25, 2019 at 03:37:38AM +, Anup Patel wrote: > 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

Re: [PATCH v2] RISC-V: Always compile mm/init.c with cmodel=medany

2019-03-24 Thread Alan Kao
Hi Anup, Sorry for being late to the party. I think one more thing should move together with setup_vm(): On Mon, Mar 25, 2019 at 03:37:38AM +, Anup Patel wrote: > 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

[PATCH v2] RISC-V: Always compile mm/init.c with cmodel=medany

2019-03-24 Thread Anup Patel
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