Linux IOMMU Development
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
To: Varun Sethi <Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
Cc: "m-karicheri2-l0cyMroinI0@public.gmane.org"
	<m-karicheri2-l0cyMroinI0@public.gmane.org>,
	"iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org"
	<iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	"arnd-r2nGTMty4D4@public.gmane.org"
	<arnd-r2nGTMty4D4@public.gmane.org>
Subject: Re: [PATCH 2/2] iommu/arm-smmu: remove homebrew PCI dma alias parsing
Date: Mon, 19 Jan 2015 14:09:48 +0000	[thread overview]
Message-ID: <20150119140948.GK32131@arm.com> (raw)
In-Reply-To: <BN3PR0301MB121948FC05425680C6C2CA63EA4A0-CEkquS/Gb81uuip9JPHoc5wN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>

On Mon, Jan 19, 2015 at 01:43:51PM +0000, Varun Sethi wrote:
> Hi Will,

Hey Varun,

> >  		/*
> >  		 * Assume Stream ID == Requester ID for now.
> >  		 * We need a way to describe the ID mappings in FDT.
> >  		 */
> > -		pci_for_each_dma_alias(pdev, __arm_smmu_get_pci_sid,
> > -				       &cfg->streamids[0]);
> > -		releasefn = __arm_smmu_release_pci_iommudata;
> > +		cfg->streamids[cfg->num_streamids++] = sid;
> 
> [varun] Couldn't there be an issue, when a single stream id is shared by
> multiple devices  (in case of non transparent bridge). Wouldn't that be an
> issue here? When devices are attached to the domain SMR would be allocated
> per stream id, this could lead to duplicate stream ids.

Yup. Since I'm reworking this code after Alex's feedback, I'll add some
code to check for duplicates before adding the new SID.

Thanks,

Will

      parent reply	other threads:[~2015-01-19 14:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 16:58 [PATCH 0/2] Reuse generic PCI DMA alias parsing code for the ARM SMMU Will Deacon
     [not found] ` <1421427514-16579-1-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org>
2015-01-16 16:58   ` [PATCH 1/2] iommu: return dma alias from iommu_group_get_for_pci_dev() Will Deacon
     [not found]     ` <1421427514-16579-2-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org>
2015-01-16 17:41       ` Alex Williamson
     [not found]         ` <1421430111.6130.254.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-01-16 20:33           ` Will Deacon
     [not found]             ` <20150116203350.GA21807-5wv7dgnIgG8@public.gmane.org>
2015-01-16 21:11               ` Alex Williamson
     [not found]                 ` <1421442663.6130.281.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-01-19 12:02                   ` Will Deacon
2015-01-16 16:58   ` [PATCH 2/2] iommu/arm-smmu: remove homebrew PCI dma alias parsing Will Deacon
     [not found]     ` <1421427514-16579-3-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org>
2015-01-19 13:43       ` Varun Sethi
     [not found]         ` <BN3PR0301MB121948FC05425680C6C2CA63EA4A0-CEkquS/Gb81uuip9JPHoc5wN6zqB+hSMnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2015-01-19 14:09           ` Will Deacon [this message]

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=20150119140948.GK32131@arm.com \
    --to=will.deacon-5wv7dgnigg8@public.gmane.org \
    --cc=Varun.Sethi-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=m-karicheri2-l0cyMroinI0@public.gmane.org \
    /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