ARM: tegra: smmu: debugfs for TLB/PTC statistics
authorHiroshi DOYU <hdoyu@nvidia.com>
Thu, 19 Jul 2012 09:03:19 +0000 (12:03 +0300)
committerVarun Colbert <vcolbert@nvidia.com>
Wed, 1 Aug 2012 23:19:13 +0000 (16:19 -0700)
commitac796425d712669f4aef187c94e97195aa223d86
tree684f79fedb07e487f46f436a646eef0c000e539d
parent99e8acdb1a097b6561e702d35688386e836d2eac
ARM: tegra: smmu: debugfs for TLB/PTC statistics

Add debugfs entries to collect TLB/PTC statistics.

  $ echo "on" > /sys/kernel/debug/smmu/mc/{tlb,ptc}
  $ echo "off" > /sys/kernel/debug/smmu/mc/{tlb,ptc}
  $ cat /sys/kernel/debug/smmu/mc/{tlb,ptc}
  0014910c 00014d22

  The above format is:
  <HIT count><SPC><MISS count><SPC><CR+LF>

  fscanf(fp, "%lx %lx", &hit, &miss);

Also add struct device of "tegra_smmu" as a member of struct
smmu_device.

Change-Id: Ia83c5dc51ad7164bfeb1230d6d1e36e22dfea497
Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/118309
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
arch/arm/mach-tegra/iovmm-smmu.c