All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Xingang <wangxingang5@huawei.com>
To: <will@kernel.org>, <joro@8bytes.org>
Cc: <bhelgaas@google.com>, <gregkh@linuxfoundation.org>,
	<iommu@lists.linux-foundation.org>,
	<linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>,
	<xieyingtai@huawei.com>, <wangxingang5@huawei.com>
Subject: [PATCH 0/1] iommu/of: Fix request and enable ACS for of_iommu_configure
Date: Fri, 7 May 2021 12:49:52 +0000	[thread overview]
Message-ID: <1620391793-18744-1-git-send-email-wangxingang5@huawei.com> (raw)

From: Xingang Wang <wangxingang5@huawei.com>

When request ACS in of_iommu_configure, the pci_acs_init procedure has
already been called. The pci device probe procedure is like the following:
pci_host_common_probe
    pci_device_add
        pci_acs_init
of_iommu_configure
    pci_request_acs

The pci_request_acs() does not work because the pci_acs_init and
pci_enable_acs procedure has already finished, so the ACS is not
enabled as expected.  Besides, the ACS is enabled only if IOMMU is
detected and the device is pci.

So this fix 6bf6c24720d33 ("iommu/of: Request ACS from the PCI core
when configuring IOMMU linkage"), add pci_enable_acs() and IOMMU check
to make sure ACS is enabled for the pci_device.

Xingang Wang (1):
  iommu/of: Fix request and enable ACS for of_iommu_configure

 drivers/iommu/of_iommu.c | 10 +++++++++-
 drivers/pci/pci.c        |  2 +-
 include/linux/pci.h      |  1 +
 3 files changed, 11 insertions(+), 2 deletions(-)

-- 
2.19.1


WARNING: multiple messages have this Message-ID (diff)
From: Wang Xingang <wangxingang5@huawei.com>
To: <will@kernel.org>, <joro@8bytes.org>
Cc: xieyingtai@huawei.com, wangxingang5@huawei.com,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	iommu@lists.linux-foundation.org, linux-pci@vger.kernel.org,
	bhelgaas@google.com
Subject: [PATCH 0/1] iommu/of: Fix request and enable ACS for of_iommu_configure
Date: Fri, 7 May 2021 12:49:52 +0000	[thread overview]
Message-ID: <1620391793-18744-1-git-send-email-wangxingang5@huawei.com> (raw)

From: Xingang Wang <wangxingang5@huawei.com>

When request ACS in of_iommu_configure, the pci_acs_init procedure has
already been called. The pci device probe procedure is like the following:
pci_host_common_probe
    pci_device_add
        pci_acs_init
of_iommu_configure
    pci_request_acs

The pci_request_acs() does not work because the pci_acs_init and
pci_enable_acs procedure has already finished, so the ACS is not
enabled as expected.  Besides, the ACS is enabled only if IOMMU is
detected and the device is pci.

So this fix 6bf6c24720d33 ("iommu/of: Request ACS from the PCI core
when configuring IOMMU linkage"), add pci_enable_acs() and IOMMU check
to make sure ACS is enabled for the pci_device.

Xingang Wang (1):
  iommu/of: Fix request and enable ACS for of_iommu_configure

 drivers/iommu/of_iommu.c | 10 +++++++++-
 drivers/pci/pci.c        |  2 +-
 include/linux/pci.h      |  1 +
 3 files changed, 11 insertions(+), 2 deletions(-)

-- 
2.19.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

             reply	other threads:[~2021-05-07 12:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07 12:49 Wang Xingang [this message]
2021-05-07 12:49 ` [PATCH 0/1] iommu/of: Fix request and enable ACS for of_iommu_configure Wang Xingang
2021-05-07 12:49 ` [PATCH 1/1] " Wang Xingang
2021-05-07 12:49   ` Wang Xingang
2021-05-07 21:14   ` Bjorn Helgaas
2021-05-07 21:14     ` Bjorn Helgaas
2021-05-08  1:32     ` Xingang Wang
2021-05-08  1:32       ` Xingang Wang

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=1620391793-18744-1-git-send-email-wangxingang5@huawei.com \
    --to=wangxingang5@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=will@kernel.org \
    --cc=xieyingtai@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.