All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anup Patel <anup@brainfault.org>
To: Mike Rapoport <rppt@linux.ibm.com>
Cc: Damien Le Moal <Damien.LeMoal@wdc.com>,
	Palmer Dabbelt <palmer@sifive.com>,
	Anup Patel <anup.patel@wdc.com>,
	Christoph Hellwig <hch@infradead.org>,
	Atish Patra <atish.patra@wdc.com>, Gary Guo <gary@garyguo.net>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>
Subject: Re: 32bit kernel is broken for Linux-5.1-rc1 due to GCC cmodel=medlow
Date: Sun, 24 Mar 2019 15:11:02 +0530	[thread overview]
Message-ID: <CAAhSdy3BnbY2Nd1=KmDt-ym5Q8Zvd7Top7_JSArx84oa4KkV+Q@mail.gmail.com> (raw)
In-Reply-To: <20190324060526.GA19357@rapoport-lnx>

On Sun, Mar 24, 2019 at 11:35 AM Mike Rapoport <rppt@linux.ibm.com> wrote:
>
> On Sun, Mar 24, 2019 at 08:40:35AM +0530, Anup Patel wrote:
> > On Sun, Mar 24, 2019 at 7:26 AM Gary Guo <gary@garyguo.net> wrote:
> > >
> > > I think what he means is to force the file containing setup_vm to be compiled using medany, even if cmodel is configured to be medlow.
> >
> > Ahh, sorry I misread previously.
> >
> > I have not explored having separate file for just setup_vm() but I am sure
> > we cannot link two object files different code model and it will cause linker
> > error.
>
> Currently kernel/setup.c is always compiled with cmodel=medany:
>
> CFLAGS_setup.o := -mcmodel=medany
>
> I suppose that's what made it possible to have setup_vm() properly access
> global variables with relative addressing.
>
> Now when setup_vm() has been moved to mm/init.c, it's compiled with the
> cmodel chosen by the kernel configuration.
>
> AFAIU Christoph's suggestion was to move load_pa_offset and pfn_base to
> mm/init.c and add
>
> CFLAGS_init.o := -mcmodel=medany
>
> to mm/Makefile.

Cool, this looks good to me.

I will try this and send RC fix soon.

Regards,
Anup

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2019-03-24  9:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-22  6:16 32bit kernel is broken for Linux-5.1-rc1 due to GCC cmodel=medlow Anup Patel
2019-03-22 10:42 ` Mike Rapoport
2019-03-22 12:29   ` Anup Patel
2019-03-22 13:26     ` Christoph Hellwig
2019-03-22 13:38       ` Anup Patel
2019-03-22 13:25   ` Christoph Hellwig
2019-03-22 13:37     ` Anup Patel
2019-03-22 13:40       ` Christoph Hellwig
2019-03-22 13:45         ` Anup Patel
2019-03-23 17:21           ` Christoph Hellwig
2019-03-24  1:42             ` Anup Patel
2019-03-24  1:56               ` Gary Guo
2019-03-24  3:04                 ` Anup Patel
2019-03-24  3:10                 ` Anup Patel
2019-03-24  6:05                   ` Mike Rapoport
2019-03-24  9:41                     ` Anup Patel [this message]
2019-03-24  8:37               ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAhSdy3BnbY2Nd1=KmDt-ym5Q8Zvd7Top7_JSArx84oa4KkV+Q@mail.gmail.com' \
    --to=anup@brainfault.org \
    --cc=Damien.LeMoal@wdc.com \
    --cc=anup.patel@wdc.com \
    --cc=atish.patra@wdc.com \
    --cc=gary@garyguo.net \
    --cc=hch@infradead.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@sifive.com \
    --cc=rppt@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.