All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
To: Srinath Mannam <srinath.mannam-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org,
	Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>,
	Frank Rowand
	<frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [RFC PATCH 0/2] Add sideband data extraction
Date: Fri, 7 Jul 2017 14:21:31 +0100	[thread overview]
Message-ID: <20170707132131.GA3425@leverpostej> (raw)
In-Reply-To: <1499411399-25103-1-git-send-email-srinath.mannam-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>

On Fri, Jul 07, 2017 at 12:39:57PM +0530, Srinath Mannam wrote:
> These patches implements optional DT properties to generate
> smaller sideband data from RID which can be further mapped
> to MSI Device ID or Stream ID
> 
> On some of the systems, sideband data is smaller than RID
> (16bits). For such system, sideband data has to be generated
> by dropping some of the RID bits
> 
> the process of sideband data extracted from RID can be expressed
> using optional DT property {iommu/msi}-map-drop-mask.
> 
> Example: If drop-mask is 0xFF09 then sideband data is
> 8 bits bus number followed by 1 bit of device number and
> 1 bit function number. This means drop-mask=0xFF09 will
> convert RID=0x1a10 (16bits) to sideband data 0x6a (10bits).

So IIUC, here's you're using this not only to mask bits out, but also to
determine a *shift* to apply to the value, implicitly provided by the
(contiguous) low bits of the mask.

That's really not obvious from the name.

Mark.

> 
> Srinath Mannam (2):
>   dt-bindings: pci: Add drop mask property for MSI and IOMMU
>   pcie: sideband data by dropping RID bits
> 
>  .../devicetree/bindings/pci/pci-iommu.txt          | 31 ++++++++++++++
>  Documentation/devicetree/bindings/pci/pci-msi.txt  | 33 +++++++++++++++
>  drivers/iommu/of_iommu.c                           |  4 +-
>  drivers/of/irq.c                                   |  3 +-
>  drivers/of/of_pci.c                                | 48 ++++++++++++++++++++--
>  include/linux/of_pci.h                             |  6 ++-
>  6 files changed, 117 insertions(+), 8 deletions(-)
> 
> -- 
> 2.7.4
> 

WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: Srinath Mannam <srinath.mannam@broadcom.com>
Cc: Rob Herring <robh+dt@kernel.org>, Joerg Roedel <joro@8bytes.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Frank Rowand <frowand.list@gmail.com>,
	iommu@lists.linux-foundation.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	bcm-kernel-feedback-list@broadcom.com
Subject: Re: [RFC PATCH 0/2] Add sideband data extraction
Date: Fri, 7 Jul 2017 14:21:31 +0100	[thread overview]
Message-ID: <20170707132131.GA3425@leverpostej> (raw)
In-Reply-To: <1499411399-25103-1-git-send-email-srinath.mannam@broadcom.com>

On Fri, Jul 07, 2017 at 12:39:57PM +0530, Srinath Mannam wrote:
> These patches implements optional DT properties to generate
> smaller sideband data from RID which can be further mapped
> to MSI Device ID or Stream ID
> 
> On some of the systems, sideband data is smaller than RID
> (16bits). For such system, sideband data has to be generated
> by dropping some of the RID bits
> 
> the process of sideband data extracted from RID can be expressed
> using optional DT property {iommu/msi}-map-drop-mask.
> 
> Example: If drop-mask is 0xFF09 then sideband data is
> 8 bits bus number followed by 1 bit of device number and
> 1 bit function number. This means drop-mask=0xFF09 will
> convert RID=0x1a10 (16bits) to sideband data 0x6a (10bits).

So IIUC, here's you're using this not only to mask bits out, but also to
determine a *shift* to apply to the value, implicitly provided by the
(contiguous) low bits of the mask.

That's really not obvious from the name.

Mark.

> 
> Srinath Mannam (2):
>   dt-bindings: pci: Add drop mask property for MSI and IOMMU
>   pcie: sideband data by dropping RID bits
> 
>  .../devicetree/bindings/pci/pci-iommu.txt          | 31 ++++++++++++++
>  Documentation/devicetree/bindings/pci/pci-msi.txt  | 33 +++++++++++++++
>  drivers/iommu/of_iommu.c                           |  4 +-
>  drivers/of/irq.c                                   |  3 +-
>  drivers/of/of_pci.c                                | 48 ++++++++++++++++++++--
>  include/linux/of_pci.h                             |  6 ++-
>  6 files changed, 117 insertions(+), 8 deletions(-)
> 
> -- 
> 2.7.4
> 

  parent reply	other threads:[~2017-07-07 13:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07  7:09 [RFC PATCH 0/2] Add sideband data extraction Srinath Mannam
2017-07-07  7:09 ` Srinath Mannam
2017-07-07  7:09 ` [RFC PATCH 1/2] dt-bindings: pci: Add drop mask property for MSI and IOMMU Srinath Mannam
     [not found]   ` <1499411399-25103-2-git-send-email-srinath.mannam-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-07-07 13:30     ` Mark Rutland
2017-07-07 13:30       ` Mark Rutland
2017-07-07 14:55       ` Robin Murphy
2017-07-07 14:55         ` Robin Murphy
2017-07-07 15:22         ` Scott Branden
     [not found]           ` <a66fac9a-b8f7-489e-a32a-ab2100c89653-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-07-07 15:42             ` Robin Murphy
2017-07-07 15:42               ` Robin Murphy
2017-07-07 15:47             ` Mark Rutland
2017-07-07 15:47               ` Mark Rutland
2017-07-07  7:09 ` [RFC PATCH 2/2] pcie: sideband data by dropping RID bits Srinath Mannam
     [not found]   ` <1499411399-25103-3-git-send-email-srinath.mannam-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-07-07 13:33     ` Mark Rutland
2017-07-07 13:33       ` Mark Rutland
     [not found] ` <1499411399-25103-1-git-send-email-srinath.mannam-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-07-07 13:21   ` Mark Rutland [this message]
2017-07-07 13:21     ` [RFC PATCH 0/2] Add sideband data extraction Mark Rutland

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=20170707132131.GA3425@leverpostej \
    --to=mark.rutland-5wv7dgnigg8@public.gmane.org \
    --cc=bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=srinath.mannam-dY08KVG/lbpWk0Htik3J/w@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 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.