lkml.org 
[lkml]   [2018]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH v2 5/5] iommu/amd - Add a debugfs entry to specify a IOMMU device table entry
    On Fri, Mar 9, 2018 at 2:51 AM, Gary R Hook <gary.hook@amd.com> wrote:
    > Initially (at boot) the device table values dumped are all of the
    > active devices. Add a devid debugfs file to allow the user to select a
    > single device table entry to dump (active or not). Let any devid value
    > greater than the maximum allowable PCI ID (0xFFFF) restore the
    > behavior to that effective at boot.

    > + oboff += OSCNPRINTF("%02x:%02x:%x (%u / %04x)\n",
    > + PCI_BUS_NUM(amd_iommu_devid),
    > + PCI_SLOT(amd_iommu_devid),
    > + PCI_FUNC(amd_iommu_devid),

    Perhaps at some point we will have an extension to %p to print PCI BDFs.

    > + if (strnchr(obuf, OBUFLEN, ':'))
    > + {

    Style

    > + } else if (obuf[0] == '0' && obuf[1] == 'x') {
    > + n = sscanf(obuf, "%x", &amd_iommu_devid);
    > + } else {
    > + n = sscanf(obuf, "%d", &amd_iommu_devid);
    > + }

    kstrtoint() ?

    --
    With Best Regards,
    Andy Shevchenko

    \
     
     \ /
      Last update: 2018-03-13 18:21    [W:2.985 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site