From: guohanjun@huawei•com (Hanjun Guo)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ACPI/IORT: Make dma masks set-up IORT specific
Date: Tue, 6 Dec 2016 15:55:40 +0800 [thread overview]
Message-ID: <58466EFC.3070109@huawei.com> (raw)
In-Reply-To: <20161205122619.25045-1-lorenzo.pieralisi@arm.com>
On 2016/12/5 20:26, Lorenzo Pieralisi wrote:
> The introduction of acpi_dma_configure() allows to configure DMA
> and related IOMMU for any device that is DMA capable. To achieve
> that goal it ensures DMA masks are set-up to sane default values
> before proceeding with IOMMU and DMA ops configuration.
>
> On x86/ia64 systems, through acpi_bind_one(), acpi_dma_configure() is
> called for every device that has an ACPI companion, in that every device
> is considered DMA capable on x86/ia64 systems (ie acpi_get_dma_attr() API),
> which has the side effect of initializing dma masks also for
> pseudo-devices (eg CPUs and memory nodes) and potentially for devices
> whose dma masks were not set-up before the acpi_dma_configure() API was
> introduced, which may have noxious side effects.
>
> Therefore, in preparation for IORT firmware specific DMA masks set-up,
> wrap the default DMA masks set-up in acpi_dma_configure() inside an IORT
> specific wrapper that reverts to a NOP on x86/ia64 systems, restoring the
> default expected behaviour on x86/ia64 systems and keeping DMA default
> masks set-up on IORT based (ie ARM) arch configurations.
>
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm•com>
> Cc: Will Deacon <will.deacon@arm•com>
> Cc: Hanjun Guo <hanjun.guo@linaro•org>
Add this patch on top of your v9 acpi smmu patchset,
tested on Hisilicon D03 (ARM64), devices with SMMU
enabled work fine,
Tested-by: Hanjun Guo <hanjun.guo@linaro•org>
Reviewed-by: Hanjun Guo <hanjun.guo@linaro•org>
Thanks
Hanjun
next prev parent reply other threads:[~2016-12-06 7:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-05 12:26 [PATCH] ACPI/IORT: Make dma masks set-up IORT specific Lorenzo Pieralisi
2016-12-05 22:18 ` Rafael J. Wysocki
2016-12-06 9:37 ` Lorenzo Pieralisi
2016-12-06 13:24 ` Joerg Roedel
2016-12-06 15:18 ` Lorenzo Pieralisi
2016-12-06 7:55 ` Hanjun Guo [this message]
2016-12-06 9:43 ` Will Deacon
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=58466EFC.3070109@huawei.com \
--to=guohanjun@huawei$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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