AMD-GFX Archive on lore.kernel.org
 help / color / Atom feed
From: Felix Kuehling <felix.kuehling@amd.com>
To: Fenghua Yu <fenghua.yu@intel.com>, Yong Zhao <Yong.Zhao@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Subject: Re: drm/amdkfd: Change pasid's type to unsigned int
Date: Fri, 22 May 2020 15:40:06 -0400
Message-ID: <d6318005-4860-b82f-e2fc-21fa9f1c1683@amd.com> (raw)
In-Reply-To: <20200522192554.GA39766@romley-ivt3.sc.intel.com>

Hi Fenghua,

The PASID width in KFD is currently limited to 16 bits. I believe this
reflects what our hardware can handle. KFD will never allocate a PASID
bigger than 16 bits. That said, I'm OK with changing this field in the
kfd_process structure to unsigned int. Generally, I find uint16_t in
structures not very useful except in tightly packed structures such as
packet formats or ioctl arguments.

Regards,
  Felix

Am 2020-05-22 um 3:25 p.m. schrieb Fenghua Yu:
> Hi, Yong,
>
> In commit: 6027b1bf6071fc61a5aa11b9922a2e0e91bff1ea
>     drm/amdkfd: Use hex print format for pasid
>
> pasid's type was change to "uint16_t" from "unsigned int" in
> struct kfd_process.
>
> But, pasid is a 20-bit value according to PCIe spec and other places
> in amdkfd (plus other iommu code) define pasid as "unsigned int".
> If defined as uint16_t, pasid will overflow if its value is bigger than 16-bit.
>
> Did I miss anything? Should we change pasid's type back to "unsigned int"?
>
> [a little background: pasid is defined as various types including "int",
> "unsigned int", "u32" in iommu. I'm changing pasid's types to "unsigned int"
> so that the types are consistent in iommu]
>
> Thanks.
>
> -Fenghua
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22 19:25 Fenghua Yu
2020-05-22 19:40 ` Felix Kuehling [this message]
2020-05-22 21:21   ` Fenghua Yu
2020-05-23  3:14     ` Zhao, Yong

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=d6318005-4860-b82f-e2fc-21fa9f1c1683@amd.com \
    --to=felix.kuehling@amd.com \
    --cc=Yong.Zhao@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=fenghua.yu@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

AMD-GFX Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/amd-gfx/0 amd-gfx/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 amd-gfx amd-gfx/ https://lore.kernel.org/amd-gfx \
		amd-gfx@lists.freedesktop.org
	public-inbox-index amd-gfx

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.freedesktop.lists.amd-gfx


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git