linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: icenowy@aosc.io (Icenowy Zheng)
To: linux-arm-kernel@lists.infradead.org
Subject: Question about a quirky (DesignWare) PCIe RC in Allwinner H6
Date: Mon, 05 Mar 2018 22:50:58 +0800	[thread overview]
Message-ID: <1520261458.33502.10.camel@aosc.io> (raw)

Hi everyone,

I'm trying to implement a driver for the quirky (DW) PCIe RC in the
Allwinner H6 SoC.

The quirk is that only the "dbi" space is always mapped, but at the
same time only 64KiB of other spaces (config, downstream IO and non-
prefetchable memory) are accessible. To access a certain address the
high 16-bit of the address (all bus addresses in H6 SoC are 32-bit
despite the CPU is 64-bit) needs to be written into the
PCIE_ADDR_PAGE_CFG register (a vendor-defined register in DBI space).
So the access to these spaces cannot be processed correctly with just
readl/writel, as the existing code does.

Is it possible to workaround this in the PCI subsystem of Linux?

(I have thought a workaround that only maps the current accessible
64KiB with the MMU, and when accessing the non-accessible part, catch
the page fault and re-setup the map to the new 64KiB page. But surely
it will kill the performance.)

Thanks,
Icenowy

             reply	other threads:[~2018-03-05 14:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-05 14:50 Icenowy Zheng [this message]
2018-03-05 21:47 ` Question about a quirky (DesignWare) PCIe RC in Allwinner H6 Bjorn Helgaas
2018-03-06  3:57   ` Icenowy Zheng
2018-03-06 23:38     ` Bjorn Helgaas
2018-03-08  5:48       ` Icenowy Zheng
2018-03-08 11:55         ` Marc Gonzalez
2018-03-08 13:18           ` Icenowy Zheng
2018-03-08 14:11             ` Icenowy Zheng
2018-03-08 12:10       ` Marc Gonzalez

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=1520261458.33502.10.camel@aosc.io \
    --to=icenowy@aosc.io \
    --cc=linux-arm-kernel@lists.infradead.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).