All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gary Guo <gary@garyguo.net>
To: Anup Patel <anup@brainfault.org>
Cc: Damien Le Moal <Damien.LeMoal@wdc.com>,
	Palmer Dabbelt <palmer@sifive.com>,
	Anup Patel <anup.patel@wdc.com>,
	Mike Rapoport <rppt@linux.ibm.com>,
	Christoph Hellwig <hch@infradead.org>,
	Atish Patra <atish.patra@wdc.com>,
	"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 01:56:22 +0000	[thread overview]
Message-ID: <LO2P265MB0847CF97521DEF5AB0EA7B21D65D0@LO2P265MB0847.GBRP265.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CAAhSdy07GsHXpG9MJZ4aiB5uG7D+9RA+17Nb1MrWdFg9ee6rUA@mail.gmail.com>

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.

Regards,
Gary

> -----Original Message-----
> From: linux-riscv <linux-riscv-bounces@lists.infradead.org> On Behalf Of Anup
> Patel
> Sent: Sunday, March 24, 2019 01:42
> To: Christoph Hellwig <hch@infradead.org>
> Cc: Damien Le Moal <Damien.LeMoal@wdc.com>; Palmer Dabbelt
> <palmer@sifive.com>; Anup Patel <anup.patel@wdc.com>; Mike Rapoport
> <rppt@linux.ibm.com>; Atish Patra <atish.patra@wdc.com>; linux-
> riscv@lists.infradead.org
> Subject: Re: 32bit kernel is broken for Linux-5.1-rc1 due to GCC cmodel=medlow
> 
> On Sat, Mar 23, 2019 at 10:51 PM Christoph Hellwig <hch@infradead.org>
> wrote:
> >
> > On Fri, Mar 22, 2019 at 07:15:37PM +0530, Anup Patel wrote:
> > > >
> > > > I am not saying the revert is the final solution.  I'm just saying
> > > > that 5.1-rc is not the place we should be doing the major surgery.
> > > > Revert fox 5.1, fix for real for 5.2+.
> > >
> > > If we revert for time being then even fixmap support has to be
> > > reverted.
> > >
> > > The patch only updates access to kernel symbols via __load_pa() and
> > > __load_va(). There is no functional change as such. The patch is
> > > tested on QEMU/virt 64bit, QEMU/virt 32bit, and SiFive Unleashed.
> >
> > Just curios - if you just move setup_vm and dependencies into a new
> > file that is compiled with -mcmodel=medany, just like setup.c, what
> > issues would we still have that require explicitly passing the load
> > address?
> 
> There are four cases here:
> 1. 64bit with cmodel=medany (default for 64bit system) 2. 64bit with
> cmodel=medlow 3. 32bit with cmodel=medany 4. 32bit with cmodel=medlow
> (default for 32bit system)
> 
> I had tried using cmodel=medany as default for both 64bit and 32bit system and
> it works fine because there is no issue with cmodel=medany but it is a very crude
> fix and things break again if someone explicitly selects cmodel=medlow using
> kconfig.
> 
> The patch for using __load_va()/__load_pa() accessor in setup_vm() solves the
> problem for all four cases above.
> 
> If you still think the patch is too big as rcX fix then alternate approach is:
> 1. For Linux-5.1-rcX, we use cmodel=medany by default for both 32bit and 64bit
> RISC-V (I can send a patch for this immediately) 2. Consider
> __load_va()/__load_pa() patch for Linux-5.2
> 
> Regards,
> Anup
> 
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv

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

  reply	other threads:[~2019-03-24  1:56 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 [this message]
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
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=LO2P265MB0847CF97521DEF5AB0EA7B21D65D0@LO2P265MB0847.GBRP265.PROD.OUTLOOK.COM \
    --to=gary@garyguo.net \
    --cc=Damien.LeMoal@wdc.com \
    --cc=anup.patel@wdc.com \
    --cc=anup@brainfault.org \
    --cc=atish.patra@wdc.com \
    --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.