mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugo Lefeuvre <hle@owl.eu.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty/nozomi: use pci_iomap instead of ioremap_nocache
Date: Sun, 10 Feb 2019 22:45:00 +0100	[thread overview]
Message-ID: <20190210214500.GB22758@behemoth.owl.eu.com.local> (raw)
In-Reply-To: <20190210171212.GA22758@behemoth.owl.eu.com.local>

[-- Attachment #1: Type: text/plain, Size: 1048 bytes --]

> Use pci_iomap instead of ioremap_nocache in nozomi_card_init(). This
> is a cleaner way to do PCI MMIO (performs additional checks) and
> allows to drop the manual call to pci_resource_start.
> 
> pci_iomap relies on ioremap for MMIO and thus has uncached behavior.

there's still something unclear to me about dc->card_type being used as
size argument to ioremap_nocache().

dc->base_addr is the sum of all six io region lengths, not the size of
region 0 which we are trying to map here. Why not using the size of region
0 instead ?

If the goal is to map all six regions "at once", I'm not sure how this is
supposed to work. Is there any kind of guarantee that all six regions will
be adjacent?

If this is a bug then this patch "somehow" already adresses it since
pci_iomap calls pci_resource_len itself. Otherwise this patch is broken.

-- 
                Hugo Lefeuvre (hle)    |    www.owl.eu.com
RSA4096_ 360B 03B3 BF27 4F4D 7A3F D5E8 14AA 1EB8 A247 3DFD
ed25519_ 37B2 6D38 0B25 B8A2 6B9F 3A65 A36F 5357 5F2D DC4C

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-02-10 21:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-10 17:12 Hugo Lefeuvre
2019-02-10 21:45 ` Hugo Lefeuvre [this message]
2019-02-12  9:26   ` Greg Kroah-Hartman
2019-02-12 18:25     ` Hugo Lefeuvre
2019-02-14 21:56       ` Hugo Lefeuvre

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=20190210214500.GB22758@behemoth.owl.eu.com.local \
    --to=hle@owl.eu.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®