[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vfc+JTjU2P0GCedVFcHYniXoVcmRC3n4cFsLMr9sx6eyA@mail.gmail.com>
Date: Tue, 13 Mar 2018 19:20:42 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Gary R Hook <gary.hook@....com>
Cc: iommu@...ts.linux-foundation.org, Joerg Roedel <joro@...tes.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [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@....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
Powered by blists - more mailing lists