linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/1] mfd: intel-lpss: Try to enable Memory-Write-Invalidate
@ 2016-11-15 10:37 Andy Shevchenko
  2016-11-17  9:05 ` Mika Westerberg
  2016-11-21 13:13 ` Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2016-11-15 10:37 UTC (permalink / raw)
  To: Lee Jones, linux-kernel, Mika Westerberg; +Cc: Andy Shevchenko

Enable MWI mechanism if PCI bus master supports it.

It might be potential benefit in some cases. Documentation [1] says that
standard Memory Write might supply more current data than in the CPU modified
cache line and "trashing a line in the cache may trash some data that is more
current that in the memory line". This allows to avoid potential retries and
other performance degradation issues on the bus.

[1] PCI System Architecture, 4th edition, ISBN: 0-201-30974-2, pp.117-119.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
In v2:
- extend commit message
 drivers/mfd/intel-lpss-pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
index 50e78db..4756153 100644
--- a/drivers/mfd/intel-lpss-pci.c
+++ b/drivers/mfd/intel-lpss-pci.c
@@ -41,6 +41,7 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev,
 
 	/* Probably it is enough to set this for iDMA capable devices only */
 	pci_set_master(pdev);
+	pci_try_set_mwi(pdev);
 
 	ret = intel_lpss_probe(&pdev->dev, info);
 	if (ret)
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/1] mfd: intel-lpss: Try to enable Memory-Write-Invalidate
  2016-11-15 10:37 [PATCH v2 1/1] mfd: intel-lpss: Try to enable Memory-Write-Invalidate Andy Shevchenko
@ 2016-11-17  9:05 ` Mika Westerberg
  2016-11-21 13:13 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Mika Westerberg @ 2016-11-17  9:05 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: Lee Jones, linux-kernel

On Tue, Nov 15, 2016 at 12:37:04PM +0200, Andy Shevchenko wrote:
> Enable MWI mechanism if PCI bus master supports it.
> 
> It might be potential benefit in some cases. Documentation [1] says that
> standard Memory Write might supply more current data than in the CPU modified
> cache line and "trashing a line in the cache may trash some data that is more
> current that in the memory line". This allows to avoid potential retries and
> other performance degradation issues on the bus.
> 
> [1] PCI System Architecture, 4th edition, ISBN: 0-201-30974-2, pp.117-119.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 1/1] mfd: intel-lpss: Try to enable Memory-Write-Invalidate
  2016-11-15 10:37 [PATCH v2 1/1] mfd: intel-lpss: Try to enable Memory-Write-Invalidate Andy Shevchenko
  2016-11-17  9:05 ` Mika Westerberg
@ 2016-11-21 13:13 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2016-11-21 13:13 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Mika Westerberg

On Tue, 15 Nov 2016, Andy Shevchenko wrote:

> Enable MWI mechanism if PCI bus master supports it.
> 
> It might be potential benefit in some cases. Documentation [1] says that
> standard Memory Write might supply more current data than in the CPU modified
> cache line and "trashing a line in the cache may trash some data that is more
> current that in the memory line". This allows to avoid potential retries and
> other performance degradation issues on the bus.
> 
> [1] PCI System Architecture, 4th edition, ISBN: 0-201-30974-2, pp.117-119.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> In v2:
> - extend commit message
>  drivers/mfd/intel-lpss-pci.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.

> diff --git a/drivers/mfd/intel-lpss-pci.c b/drivers/mfd/intel-lpss-pci.c
> index 50e78db..4756153 100644
> --- a/drivers/mfd/intel-lpss-pci.c
> +++ b/drivers/mfd/intel-lpss-pci.c
> @@ -41,6 +41,7 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev,
>  
>  	/* Probably it is enough to set this for iDMA capable devices only */
>  	pci_set_master(pdev);
> +	pci_try_set_mwi(pdev);
>  
>  	ret = intel_lpss_probe(&pdev->dev, info);
>  	if (ret)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-21 13:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-15 10:37 [PATCH v2 1/1] mfd: intel-lpss: Try to enable Memory-Write-Invalidate Andy Shevchenko
2016-11-17  9:05 ` Mika Westerberg
2016-11-21 13:13 ` Lee Jones

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).