All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Heiher <r@hev.cc>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH 1/2] MIPS: Loongson: Add support for Loongson3.
Date: Fri, 12 Jun 2015 14:57:08 +0300	[thread overview]
Message-ID: <20150612145708.64143663@opensuse.site> (raw)
In-Reply-To: <CAHirt9j_uS7LWZUdN-uN1T6-5baKa4X5svqVhwMLMWoMbcOCDw@mail.gmail.com>

В Fri, 12 Jun 2015 19:52:31 +0800
Heiher <r@hev.cc> пишет:

> Hi,
> 
> Thanks for reivew.
> 
> On Fri, Jun 12, 2015 at 6:02 PM, Andrei Borzenkov <arvidjaar@gmail.com>
> wrote:
> 
> > В Mon, 8 Jun 2015 17:25:16 +0800
> > Heiher <r@hev.cc> пишет:
> >
> > > --- a/grub-core/bus/pci.c
> > > +++ b/grub-core/bus/pci.c
> > > @@ -72,7 +72,7 @@ grub_dma_get_virt (struct grub_pci_dma_chunk *ch)
> > >  grub_uint32_t
> > >  grub_dma_get_phys (struct grub_pci_dma_chunk *ch)
> > >  {
> > > -  return (((grub_uint32_t) ch) & 0x1fffffff) | 0x80000000;
> > > +  return (((grub_uint32_t) ch) & 0x1fffffff);
> >
> > I do not have experience with hardware but that does not look right.
> > Either this chunk breaks existing hardware or this part was not needed
> > in the first place. I suspect the former because later you re-add the
> > same code in subsequent patch.
> >
> 
> I think this is a old mistake that caused grub on loongson3 broken. The dma
> chunk address (ch & 0x1fffffff) is physical address. and it or 0x80000000
> is cached virtual address.
> 

So if this is not needed for existing platforms please make it separate
patch to make it obvious and facilitate regression search. Do not hide
it inside additional platform support.

> My next subsequent patch fixed grub_dma_get_virt (not grub_dma_get_phys)
> function,  because the Loongson 3B has a dma cached coherent issue, just
> only access memory by uncached for dma. so i add a grub_dma_coherent flag
> to control grub_dma_get_virt return cached virtual address or uncached.
> 
> 
> >
> > This makes it hard to bisect later as it leaves some commits in
> > non-functional state.
> >
> > Could you please rearrange your patches so that they do not impact
> > existing platforms?
> >
> 
> I have tested on Loongson 2F and Loongson 3A, 3B platforms. I have not
> tested on qemu mips, and i will do that next. thanks!
> 



  reply	other threads:[~2015-06-12 11:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-08  9:25 [PATCH 1/2] MIPS: Loongson: Add support for Loongson3 Heiher
2015-06-12 10:02 ` Andrei Borzenkov
2015-06-12 11:52   ` Heiher
2015-06-12 11:57     ` Andrei Borzenkov [this message]
2015-06-12 11:58       ` Heiher
2015-06-12 12:21         ` Heiher

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=20150612145708.64143663@opensuse.site \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    --cc=r@hev.cc \
    /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.