OSDN Git Service

switchtec: Improve MRPC efficiency by enabling write combining
authorKelvin Cao <kelvin.cao@microchip.com>
Mon, 10 Dec 2018 09:12:23 +0000 (17:12 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 13 Dec 2018 15:03:24 +0000 (09:03 -0600)
commit52d8db8e0cd7c28316514568fe5df0cfd4fa2075
tree0c7880212afffe3b71def5162ad3804c608ed3b0
parente4a7dca5de625018b29417ecc39dc5037d9a5a36
switchtec: Improve MRPC efficiency by enabling write combining

The MRPC Input buffer is mostly memory without any side effects, so we
can improve the access time by enabling write combining on this region
of the BAR.

In a few places, we still need to flush the WC buffer.  To do this, we
simply read from the Outbound Doorbell register because reads to this
register are processed by low latency hardware.

Signed-off-by: Kelvin Cao <kelvin.cao@microchip.com>
Signed-off-by: Wesley Sheng <wesley.sheng@microchip.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
drivers/pci/switch/switchtec.c