lkml.org 
[lkml]   [2017]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 2/5] iommu/vt-d: Add debugfs support to show context internals
From
Date
On Thu, 2017-12-21 at 16:32 -0800, Sohil Mehta wrote:
> From: Gayatri Kammela <gayatri.kammela@intel.com>
>
> IOMMU internals states such as root and context can be exported to the
> userspace.
>
> Example of such dump in Kabylake:

> v5: Change to a SPDX license tag
> Fix seq_printf formatting
>
>

> +#define pr_fmt(fmt) "INTEL_IOMMU: " fmt
> +#include <linux/err.h>
> +#include <linux/io.h>
> +#include <linux/slab.h>
> +#include <linux/uaccess.h>
> +#include <linux/pm_runtime.h>
> +#include <linux/debugfs.h>
> +#include <linux/pci.h>
> +#include <linux/iommu.h>
> +#include <linux/intel-iommu.h>
> +#include <linux/intel-svm.h>
> +#include <linux/dmar.h>
> +#include <linux/spinlock.h>

It might make sense to keep above ordered alphabetically.

> +static void root_tbl_entry_show(struct seq_file *m, struct
> intel_iommu *iommu,
> + u64 rtaddr_reg, bool ext, bool
> new_ext)
> +{
> + int bus;
> +
> + seq_printf(m, "\nIOMMU %s: %2s Root Table Addr:%llx\n",
> iommu->name,
> + ext ? "Extended" : "", rtaddr_reg);

Still leading '\n'...

--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

\
 
 \ /
  Last update: 2017-12-28 09:58    [W:0.075 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site