From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: Re: [PATCH v5 2/5] iommu/vt-d: Add debugfs support to show context internals Date: Thu, 28 Dec 2017 10:51:58 +0200 Message-ID: <1514451118.7000.308.camel@linux.intel.com> References: <1513902760-45605-1-git-send-email-sohil.mehta@intel.com> <1513902760-45605-3-git-send-email-sohil.mehta@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1513902760-45605-3-git-send-email-sohil.mehta-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Sohil Mehta , Joerg Roedel , Alex Williamson Cc: Ravi V Shankar , Fenghua Yu , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, David Woodhouse , Gayatri Kammela List-Id: iommu@lists.linux-foundation.org On Thu, 2017-12-21 at 16:32 -0800, Sohil Mehta wrote: > From: Gayatri Kammela > > 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 > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include 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 Intel Finland Oy