linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Lu Baolu <baolu.lu@linux.intel.com>
Cc: iommu@lists.linux-foundation.org, Yian Chen <yian.chen@intel.com>,
	Ashok Raj <ashok.raj@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] iommu/vt-d: Apply SATC policy
Date: Tue, 2 Feb 2021 14:55:01 +0100	[thread overview]
Message-ID: <20210202135501.GX32671@8bytes.org> (raw)
In-Reply-To: <20210202044057.615277-4-baolu.lu@linux.intel.com>

On Tue, Feb 02, 2021 at 12:40:57PM +0800, Lu Baolu wrote:
> +	list_for_each_entry_rcu(satcu, &dmar_satc_units, list) {
> +		satc = container_of(satcu->hdr, struct acpi_dmar_satc, header);
> +		if (satc->segment == pci_domain_nr(dev->bus) && satcu->atc_required) {

You can safe a level of indentation and make this look nicer if you do:

		if (satc->segment != pci_domain_nr(dev->bus) || !satcu->atc_required)
			continue;


> +			for_each_dev_scope(satcu->devices, satcu->devices_cnt, i, tmp)
> +				if (to_pci_dev(tmp) == dev)
> +					goto out;
> +		}
> +	}
> +	ret = 0;
> +out:
> +	rcu_read_unlock();
> +	return ret;
> +}

  reply	other threads:[~2021-02-02 19:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-02  4:40 [PATCH 0/3] iommu/vt-d: Add support for ACPI/SATC table Lu Baolu
2021-02-02  4:40 ` [PATCH 1/3] iommu/vt-d: Add new enum value and structure for SATC Lu Baolu
2021-02-02 13:51   ` Joerg Roedel
2021-02-03  0:11     ` Lu Baolu
2021-02-02 16:02   ` Raj, Ashok
2021-02-03  0:15     ` Lu Baolu
2021-02-02  4:40 ` [PATCH 2/3] iommu/vt-d: Parse SATC reporting structure Lu Baolu
2021-02-02 13:53   ` Joerg Roedel
2021-02-03  0:26     ` Lu Baolu
2021-02-02 16:41   ` Raj, Ashok
2021-02-03  0:29     ` Lu Baolu
2021-02-02  4:40 ` [PATCH 3/3] iommu/vt-d: Apply SATC policy Lu Baolu
2021-02-02 13:55   ` Joerg Roedel [this message]
2021-02-03  0:33     ` Lu Baolu
2021-02-03  8:41 ` [PATCH 0/3] iommu/vt-d: Add support for ACPI/SATC table Christoph Hellwig
2021-02-03  9:29   ` Lu Baolu

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=20210202135501.GX32671@8bytes.org \
    --to=joro@8bytes.org \
    --cc=ashok.raj@intel.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yian.chen@intel.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 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).