amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* drm/amdkfd: Change pasid's type to unsigned int
@ 2020-05-22 19:25 Fenghua Yu
  2020-05-22 19:40 ` Felix Kuehling
  0 siblings, 1 reply; 4+ messages in thread
From: Fenghua Yu @ 2020-05-22 19:25 UTC (permalink / raw)
  To: Yong Zhao, Felix Kuehling; +Cc: amd-gfx

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-23  3:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-22 19:25 drm/amdkfd: Change pasid's type to unsigned int Fenghua Yu
2020-05-22 19:40 ` Felix Kuehling
2020-05-22 21:21   ` Fenghua Yu
2020-05-23  3:14     ` Zhao, Yong

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).