xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad@kernel.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v1 1/4] serial: Support OXPCIe952 aka Oxford Semiconductor Ltd Device c138 (1415:c138)
Date: Thu, 6 Mar 2014 13:47:44 -0500	[thread overview]
Message-ID: <20140306184743.GD9852@localhost.localdomain> (raw)
In-Reply-To: <531858BC02000078001216D1@nat28.tlf.novell.com>

On Thu, Mar 06, 2014 at 10:15:08AM +0000, Jan Beulich wrote:
> >>> On 05.03.14 at 18:25, Konrad Rzeszutek Wilk <konrad@kernel.org> wrote:
> > @@ -325,11 +342,12 @@ static void __init ns16550_init_preirq(struct serial_port *port)
> >  #ifdef CONFIG_X86
> >          enum fixed_addresses idx = FIX_COM_BEGIN + (uart - ns16550_com);
> >  
> > -        set_fixmap_nocache(idx, uart->io_base);
> > +        set_fixmap_nocache(idx, uart->io_base + uart->offset);
> >          uart->remapped_io_base = (void __iomem *)fix_to_virt(idx);
> > -        uart->remapped_io_base += uart->io_base & ~PAGE_MASK;
> > +        uart->remapped_io_base += (uart->io_base + uart->offset) & ~PAGE_MASK;
> >  #else
> > -        uart->remapped_io_base = (char *)ioremap(uart->io_base, uart->io_size);
> > +        uart->remapped_io_base = (char *)ioremap(uart->io_base + uart->offset,
> > +                                                 uart->io_size);
> >  #endif
> 
> Looking at this again, I have a hard time seeing why you can't simply
> set uart->io_base to the full, final value ...

I was trying to make it obvious that it is not just io_base but also
an offset.
> 
> > @@ -701,6 +719,10 @@ pci_uart_config (struct ns16550 *uart, int skip_amt, int bar_idx)
> >                          uart->lsr_mask = uart_config[i].lsr_mask;
> >                          uart->io_base = ((u64)bar_64 << 32) |
> >                                          (bar & PCI_BASE_ADDRESS_MEM_MASK);
> > +                        uart->offset = uart_config[i].first_offset;
> > +                        uart->offset += bar_idx * uart_config[i].uart_offset;
> 
> ... here, and drop the offset field again.

But on the other hand - why even do that - when all of that can nicely
be put in there with an explanation.

Will rebase! Thank you again for your review!
> 
> Jan
> 

  reply	other threads:[~2014-03-06 18:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 17:25 [PATCH v1] Enable serial output for Oxford Semiconductor PCIe cards Konrad Rzeszutek Wilk
2014-03-05 17:25 ` [PATCH v1 1/4] serial: Support OXPCIe952 aka Oxford Semiconductor Ltd Device c138 (1415:c138) Konrad Rzeszutek Wilk
2014-03-06 10:15   ` Jan Beulich
2014-03-06 18:47     ` Konrad Rzeszutek Wilk [this message]
2014-03-05 17:25 ` [PATCH v1 2/4] serial: Seperate the PCI device ids and quirks Konrad Rzeszutek Wilk
2014-03-06 10:17   ` Jan Beulich
2014-03-06 18:48     ` Konrad Rzeszutek Wilk
2014-03-05 17:25 ` [PATCH v1 3/4] serial: Use #defines for PCI vendor and models Konrad Rzeszutek Wilk
2014-03-05 17:34   ` Andrew Cooper
2014-03-06 10:18   ` Jan Beulich
2014-03-05 17:25 ` [PATCH v1 4/4] serial: Expand the PCI serial quirks for OXPCIe200 and OXPCIe952 1 Native UART Konrad Rzeszutek Wilk
2014-03-06 10:20   ` Jan Beulich
2014-03-07 15:55     ` Konrad Rzeszutek Wilk
2014-03-07 16:30       ` Jan Beulich

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=20140306184743.GD9852@localhost.localdomain \
    --to=konrad.wilk@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=konrad@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).