Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: Update mmiotrace.txt

Fix typos, spellos, hyphenation, line lengths.

BTW: are there some userspace tools? There is a reference to
some at the wiki page, but there are no tools listed there.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Acked-by: Pekka Paalanen <pq@iki.fi>
LKML-Reference: <4B2C0D68.6080401@oracle.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Randy Dunlap and committed by
Ingo Molnar
360b6e5c e36c5458

+8 -7
+8 -7
Documentation/trace/mmiotrace.txt
··· 44 44 Usage 45 45 ----- 46 46 47 - Make sure debugfs is mounted to /sys/kernel/debug. If not, (requires root privileges) 47 + Make sure debugfs is mounted to /sys/kernel/debug. 48 + If not (requires root privileges): 48 49 $ mount -t debugfs debugfs /sys/kernel/debug 49 50 50 51 Check that the driver you are about to trace is not loaded. ··· 92 91 $ tar zcf pciid-nick-mmiotrace.tar.gz mydump.txt lspci.txt dmesg.txt 93 92 and then send the .tar.gz file. The trace compresses considerably. Replace 94 93 "pciid" and "nick" with the PCI ID or model name of your piece of hardware 95 - under investigation and your nick name. 94 + under investigation and your nickname. 96 95 97 96 98 97 How Mmiotrace Works ··· 101 100 Access to hardware IO-memory is gained by mapping addresses from PCI bus by 102 101 calling one of the ioremap_*() functions. Mmiotrace is hooked into the 103 102 __ioremap() function and gets called whenever a mapping is created. Mapping is 104 - an event that is recorded into the trace log. Note, that ISA range mappings 103 + an event that is recorded into the trace log. Note that ISA range mappings 105 104 are not caught, since the mapping always exists and is returned directly. 106 105 107 106 MMIO accesses are recorded via page faults. Just before __ioremap() returns, ··· 123 122 ---------------- 124 123 125 124 The raw log is text and easily filtered with e.g. grep and awk. One record is 126 - one line in the log. A record starts with a keyword, followed by keyword 127 - dependant arguments. Arguments are separated by a space, or continue until the 125 + one line in the log. A record starts with a keyword, followed by keyword- 126 + dependent arguments. Arguments are separated by a space, or continue until the 128 127 end of line. The format for version 20070824 is as follows: 129 128 130 - Explanation Keyword Space separated arguments 129 + Explanation Keyword Space-separated arguments 131 130 --------------------------------------------------------------------------- 132 131 133 132 read event R width, timestamp, map id, physical, value, PC, PID ··· 137 136 marker MARK timestamp, text 138 137 version VERSION the string "20070824" 139 138 info for reader LSPCI one line from lspci -v 140 - PCI address map PCIDEV space separated /proc/bus/pci/devices data 139 + PCI address map PCIDEV space-separated /proc/bus/pci/devices data 141 140 unk. opcode UNKNOWN timestamp, map id, physical, data, PC, PID 142 141 143 142 Timestamp is in seconds with decimals. Physical is a PCI bus address, virtual