aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DocBook/kernel-hacking.tmpl2
-rw-r--r--Documentation/MSI-HOWTO.txt6
-rw-r--r--Documentation/PCI/pci.txt4
-rw-r--r--Documentation/PCI/pcieaer-howto.txt11
-rw-r--r--Documentation/kernel-parameters.txt31
-rw-r--r--Documentation/markers.txt10
-rw-r--r--Documentation/sysrq.txt5
-rw-r--r--Documentation/tracepoints.txt101
-rw-r--r--Documentation/tracers/mmiotrace.txt5
9 files changed, 141 insertions, 34 deletions
diff --git a/Documentation/DocBook/kernel-hacking.tmpl b/Documentation/DocBook/kernel-hacking.tmpl
index 4c63e5864160..ae15d55350ec 100644
--- a/Documentation/DocBook/kernel-hacking.tmpl
+++ b/Documentation/DocBook/kernel-hacking.tmpl
@@ -1105,7 +1105,7 @@ static struct block_device_operations opt_fops = {
1105 </listitem> 1105 </listitem>
1106 <listitem> 1106 <listitem>
1107 <para> 1107 <para>
1108 Function names as strings (__FUNCTION__). 1108 Function names as strings (__func__).
1109 </para> 1109 </para>
1110 </listitem> 1110 </listitem>
1111 <listitem> 1111 <listitem>
diff --git a/Documentation/MSI-HOWTO.txt b/Documentation/MSI-HOWTO.txt
index a51f693c1541..256defd7e174 100644
--- a/Documentation/MSI-HOWTO.txt
+++ b/Documentation/MSI-HOWTO.txt
@@ -236,10 +236,8 @@ software system can set different pages for controlling accesses to the
236MSI-X structure. The implementation of MSI support requires the PCI 236MSI-X structure. The implementation of MSI support requires the PCI
237subsystem, not a device driver, to maintain full control of the MSI-X 237subsystem, not a device driver, to maintain full control of the MSI-X
238table/MSI-X PBA (Pending Bit Array) and MMIO address space of the MSI-X 238table/MSI-X PBA (Pending Bit Array) and MMIO address space of the MSI-X
239table/MSI-X PBA. A device driver is prohibited from requesting the MMIO 239table/MSI-X PBA. A device driver should not access the MMIO address
240address space of the MSI-X table/MSI-X PBA. Otherwise, the PCI subsystem 240space of the MSI-X table/MSI-X PBA.
241will fail enabling MSI-X on its hardware device when it calls the function
242pci_enable_msix().
243 241
2445.3.2 API pci_enable_msix 2425.3.2 API pci_enable_msix
245 243
diff --git a/Documentation/PCI/pci.txt b/Documentation/PCI/pci.txt
index 8d4dc6250c58..fd4907a2968c 100644
--- a/Documentation/PCI/pci.txt
+++ b/Documentation/PCI/pci.txt
@@ -163,6 +163,10 @@ need pass only as many optional fields as necessary:
163 o class and classmask fields default to 0 163 o class and classmask fields default to 0
164 o driver_data defaults to 0UL. 164 o driver_data defaults to 0UL.
165 165
166Note that driver_data must match the value used by any of the pci_device_id
167entries defined in the driver. This makes the driver_data field mandatory
168if all the pci_device_id entries have a non-zero driver_data value.
169
166Once added, the driver probe routine will be invoked for any unclaimed 170Once added, the driver probe routine will be invoked for any unclaimed
167PCI devices listed in its (newly updated) pci_ids list. 171PCI devices listed in its (newly updated) pci_ids list.
168 172
diff --git a/Documentation/PCI/pcieaer-howto.txt b/Documentation/PCI/pcieaer-howto.txt
index 16c251230c82..ddeb14beacc8 100644
--- a/Documentation/PCI/pcieaer-howto.txt
+++ b/Documentation/PCI/pcieaer-howto.txt
@@ -203,22 +203,17 @@ to mmio_enabled.
203 203
2043.3 helper functions 2043.3 helper functions
205 205
2063.3.1 int pci_find_aer_capability(struct pci_dev *dev); 2063.3.1 int pci_enable_pcie_error_reporting(struct pci_dev *dev);
207pci_find_aer_capability locates the PCI Express AER capability
208in the device configuration space. If the device doesn't support
209PCI-Express AER, the function returns 0.
210
2113.3.2 int pci_enable_pcie_error_reporting(struct pci_dev *dev);
212pci_enable_pcie_error_reporting enables the device to send error 207pci_enable_pcie_error_reporting enables the device to send error
213messages to root port when an error is detected. Note that devices 208messages to root port when an error is detected. Note that devices
214don't enable the error reporting by default, so device drivers need 209don't enable the error reporting by default, so device drivers need
215call this function to enable it. 210call this function to enable it.
216 211
2173.3.3 int pci_disable_pcie_error_reporting(struct pci_dev *dev); 2123.3.2 int pci_disable_pcie_error_reporting(struct pci_dev *dev);
218pci_disable_pcie_error_reporting disables the device to send error 213pci_disable_pcie_error_reporting disables the device to send error
219messages to root port when an error is detected. 214messages to root port when an error is detected.
220 215
2213.3.4 int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev); 2163.3.3 int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev);
222pci_cleanup_aer_uncorrect_error_status cleanups the uncorrectable 217pci_cleanup_aer_uncorrect_error_status cleanups the uncorrectable
223error status register. 218error status register.
224 219
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 0f1544f67400..53ba7c7d82b3 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -101,6 +101,7 @@ parameter is applicable:
101 X86-64 X86-64 architecture is enabled. 101 X86-64 X86-64 architecture is enabled.
102 More X86-64 boot options can be found in 102 More X86-64 boot options can be found in
103 Documentation/x86_64/boot-options.txt . 103 Documentation/x86_64/boot-options.txt .
104 X86 Either 32bit or 64bit x86 (same as X86-32+X86-64)
104 105
105In addition, the following text indicates that the option: 106In addition, the following text indicates that the option:
106 107
@@ -1588,7 +1589,7 @@ and is between 256 and 4096 characters. It is defined in the file
1588 See also Documentation/paride.txt. 1589 See also Documentation/paride.txt.
1589 1590
1590 pci=option[,option...] [PCI] various PCI subsystem options: 1591 pci=option[,option...] [PCI] various PCI subsystem options:
1591 off [X86-32] don't probe for the PCI bus 1592 off [X86] don't probe for the PCI bus
1592 bios [X86-32] force use of PCI BIOS, don't access 1593 bios [X86-32] force use of PCI BIOS, don't access
1593 the hardware directly. Use this if your machine 1594 the hardware directly. Use this if your machine
1594 has a non-standard PCI host bridge. 1595 has a non-standard PCI host bridge.
@@ -1596,9 +1597,9 @@ and is between 256 and 4096 characters. It is defined in the file
1596 hardware access methods are allowed. Use this 1597 hardware access methods are allowed. Use this
1597 if you experience crashes upon bootup and you 1598 if you experience crashes upon bootup and you
1598 suspect they are caused by the BIOS. 1599 suspect they are caused by the BIOS.
1599 conf1 [X86-32] Force use of PCI Configuration 1600 conf1 [X86] Force use of PCI Configuration
1600 Mechanism 1. 1601 Mechanism 1.
1601 conf2 [X86-32] Force use of PCI Configuration 1602 conf2 [X86] Force use of PCI Configuration
1602 Mechanism 2. 1603 Mechanism 2.
1603 noaer [PCIE] If the PCIEAER kernel config parameter is 1604 noaer [PCIE] If the PCIEAER kernel config parameter is
1604 enabled, this kernel boot option can be used to 1605 enabled, this kernel boot option can be used to
@@ -1618,37 +1619,37 @@ and is between 256 and 4096 characters. It is defined in the file
1618 this option if the kernel is unable to allocate 1619 this option if the kernel is unable to allocate
1619 IRQs or discover secondary PCI buses on your 1620 IRQs or discover secondary PCI buses on your
1620 motherboard. 1621 motherboard.
1621 rom [X86-32] Assign address space to expansion ROMs. 1622 rom [X86] Assign address space to expansion ROMs.
1622 Use with caution as certain devices share 1623 Use with caution as certain devices share
1623 address decoders between ROMs and other 1624 address decoders between ROMs and other
1624 resources. 1625 resources.
1625 norom [X86-32,X86_64] Do not assign address space to 1626 norom [X86] Do not assign address space to
1626 expansion ROMs that do not already have 1627 expansion ROMs that do not already have
1627 BIOS assigned address ranges. 1628 BIOS assigned address ranges.
1628 irqmask=0xMMMM [X86-32] Set a bit mask of IRQs allowed to be 1629 irqmask=0xMMMM [X86] Set a bit mask of IRQs allowed to be
1629 assigned automatically to PCI devices. You can 1630 assigned automatically to PCI devices. You can
1630 make the kernel exclude IRQs of your ISA cards 1631 make the kernel exclude IRQs of your ISA cards
1631 this way. 1632 this way.
1632 pirqaddr=0xAAAAA [X86-32] Specify the physical address 1633 pirqaddr=0xAAAAA [X86] Specify the physical address
1633 of the PIRQ table (normally generated 1634 of the PIRQ table (normally generated
1634 by the BIOS) if it is outside the 1635 by the BIOS) if it is outside the
1635 F0000h-100000h range. 1636 F0000h-100000h range.
1636 lastbus=N [X86-32] Scan all buses thru bus #N. Can be 1637 lastbus=N [X86] Scan all buses thru bus #N. Can be
1637 useful if the kernel is unable to find your 1638 useful if the kernel is unable to find your
1638 secondary buses and you want to tell it 1639 secondary buses and you want to tell it
1639 explicitly which ones they are. 1640 explicitly which ones they are.
1640 assign-busses [X86-32] Always assign all PCI bus 1641 assign-busses [X86] Always assign all PCI bus
1641 numbers ourselves, overriding 1642 numbers ourselves, overriding
1642 whatever the firmware may have done. 1643 whatever the firmware may have done.
1643 usepirqmask [X86-32] Honor the possible IRQ mask stored 1644 usepirqmask [X86] Honor the possible IRQ mask stored
1644 in the BIOS $PIR table. This is needed on 1645 in the BIOS $PIR table. This is needed on
1645 some systems with broken BIOSes, notably 1646 some systems with broken BIOSes, notably
1646 some HP Pavilion N5400 and Omnibook XE3 1647 some HP Pavilion N5400 and Omnibook XE3
1647 notebooks. This will have no effect if ACPI 1648 notebooks. This will have no effect if ACPI
1648 IRQ routing is enabled. 1649 IRQ routing is enabled.
1649 noacpi [X86-32] Do not use ACPI for IRQ routing 1650 noacpi [X86] Do not use ACPI for IRQ routing
1650 or for PCI scanning. 1651 or for PCI scanning.
1651 use_crs [X86-32] Use _CRS for PCI resource 1652 use_crs [X86] Use _CRS for PCI resource
1652 allocation. 1653 allocation.
1653 routeirq Do IRQ routing for all PCI devices. 1654 routeirq Do IRQ routing for all PCI devices.
1654 This is normally done in pci_enable_device(), 1655 This is normally done in pci_enable_device(),
@@ -1677,6 +1678,12 @@ and is between 256 and 4096 characters. It is defined in the file
1677 reserved for the CardBus bridge's memory 1678 reserved for the CardBus bridge's memory
1678 window. The default value is 64 megabytes. 1679 window. The default value is 64 megabytes.
1679 1680
1681 pcie_aspm= [PCIE] Forcibly enable or disable PCIe Active State Power
1682 Management.
1683 off Disable ASPM.
1684 force Enable ASPM even on devices that claim not to support it.
1685 WARNING: Forcing ASPM on may cause system lockups.
1686
1680 pcmv= [HW,PCMCIA] BadgePAD 4 1687 pcmv= [HW,PCMCIA] BadgePAD 4
1681 1688
1682 pd. [PARIDE] 1689 pd. [PARIDE]
diff --git a/Documentation/markers.txt b/Documentation/markers.txt
index d9f50a19fa0c..089f6138fcd9 100644
--- a/Documentation/markers.txt
+++ b/Documentation/markers.txt
@@ -50,10 +50,12 @@ Connecting a function (probe) to a marker is done by providing a probe (function
50to call) for the specific marker through marker_probe_register() and can be 50to call) for the specific marker through marker_probe_register() and can be
51activated by calling marker_arm(). Marker deactivation can be done by calling 51activated by calling marker_arm(). Marker deactivation can be done by calling
52marker_disarm() as many times as marker_arm() has been called. Removing a probe 52marker_disarm() as many times as marker_arm() has been called. Removing a probe
53is done through marker_probe_unregister(); it will disarm the probe and make 53is done through marker_probe_unregister(); it will disarm the probe.
54sure there is no caller left using the probe when it returns. Probe removal is 54marker_synchronize_unregister() must be called before the end of the module exit
55preempt-safe because preemption is disabled around the probe call. See the 55function to make sure there is no caller left using the probe. This, and the
56"Probe example" section below for a sample probe module. 56fact that preemption is disabled around the probe call, make sure that probe
57removal and module unload are safe. See the "Probe example" section below for a
58sample probe module.
57 59
58The marker mechanism supports inserting multiple instances of the same marker. 60The marker mechanism supports inserting multiple instances of the same marker.
59Markers can be put in inline functions, inlined static functions, and 61Markers can be put in inline functions, inlined static functions, and
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt
index 49378a9f2b5f..10a0263ebb3f 100644
--- a/Documentation/sysrq.txt
+++ b/Documentation/sysrq.txt
@@ -95,8 +95,9 @@ On all - write a character to /proc/sysrq-trigger. e.g.:
95 95
96'p' - Will dump the current registers and flags to your console. 96'p' - Will dump the current registers and flags to your console.
97 97
98'q' - Will dump a list of all running hrtimers. 98'q' - Will dump per CPU lists of all armed hrtimers (but NOT regular
99 WARNING: Does not cover any other timers 99 timer_list timers) and detailed information about all
100 clockevent devices.
100 101
101'r' - Turns off keyboard raw mode and sets it to XLATE. 102'r' - Turns off keyboard raw mode and sets it to XLATE.
102 103
diff --git a/Documentation/tracepoints.txt b/Documentation/tracepoints.txt
new file mode 100644
index 000000000000..5d354e167494
--- /dev/null
+++ b/Documentation/tracepoints.txt
@@ -0,0 +1,101 @@
1 Using the Linux Kernel Tracepoints
2
3 Mathieu Desnoyers
4
5
6This document introduces Linux Kernel Tracepoints and their use. It provides
7examples of how to insert tracepoints in the kernel and connect probe functions
8to them and provides some examples of probe functions.
9
10
11* Purpose of tracepoints
12
13A tracepoint placed in code provides a hook to call a function (probe) that you
14can provide at runtime. A tracepoint can be "on" (a probe is connected to it) or
15"off" (no probe is attached). When a tracepoint is "off" it has no effect,
16except for adding a tiny time penalty (checking a condition for a branch) and
17space penalty (adding a few bytes for the function call at the end of the
18instrumented function and adds a data structure in a separate section). When a
19tracepoint is "on", the function you provide is called each time the tracepoint
20is executed, in the execution context of the caller. When the function provided
21ends its execution, it returns to the caller (continuing from the tracepoint
22site).
23
24You can put tracepoints at important locations in the code. They are
25lightweight hooks that can pass an arbitrary number of parameters,
26which prototypes are described in a tracepoint declaration placed in a header
27file.
28
29They can be used for tracing and performance accounting.
30
31
32* Usage
33
34Two elements are required for tracepoints :
35
36- A tracepoint definition, placed in a header file.
37- The tracepoint statement, in C code.
38
39In order to use tracepoints, you should include linux/tracepoint.h.
40
41In include/trace/subsys.h :
42
43#include <linux/tracepoint.h>
44
45DEFINE_TRACE(subsys_eventname,
46 TPPTOTO(int firstarg, struct task_struct *p),
47 TPARGS(firstarg, p));
48
49In subsys/file.c (where the tracing statement must be added) :
50
51#include <trace/subsys.h>
52
53void somefct(void)
54{
55 ...
56 trace_subsys_eventname(arg, task);
57 ...
58}
59
60Where :
61- subsys_eventname is an identifier unique to your event
62 - subsys is the name of your subsystem.
63 - eventname is the name of the event to trace.
64- TPPTOTO(int firstarg, struct task_struct *p) is the prototype of the function
65 called by this tracepoint.
66- TPARGS(firstarg, p) are the parameters names, same as found in the prototype.
67
68Connecting a function (probe) to a tracepoint is done by providing a probe
69(function to call) for the specific tracepoint through
70register_trace_subsys_eventname(). Removing a probe is done through
71unregister_trace_subsys_eventname(); it will remove the probe sure there is no
72caller left using the probe when it returns. Probe removal is preempt-safe
73because preemption is disabled around the probe call. See the "Probe example"
74section below for a sample probe module.
75
76The tracepoint mechanism supports inserting multiple instances of the same
77tracepoint, but a single definition must be made of a given tracepoint name over
78all the kernel to make sure no type conflict will occur. Name mangling of the
79tracepoints is done using the prototypes to make sure typing is correct.
80Verification of probe type correctness is done at the registration site by the
81compiler. Tracepoints can be put in inline functions, inlined static functions,
82and unrolled loops as well as regular functions.
83
84The naming scheme "subsys_event" is suggested here as a convention intended
85to limit collisions. Tracepoint names are global to the kernel: they are
86considered as being the same whether they are in the core kernel image or in
87modules.
88
89
90* Probe / tracepoint example
91
92See the example provided in samples/tracepoints/src
93
94Compile them with your kernel.
95
96Run, as root :
97modprobe tracepoint-example (insmod order is not important)
98modprobe tracepoint-probe-example
99cat /proc/tracepoint-example (returns an expected error)
100rmmod tracepoint-example tracepoint-probe-example
101dmesg
diff --git a/Documentation/tracers/mmiotrace.txt b/Documentation/tracers/mmiotrace.txt
index a4afb560a45b..5bbbe2096223 100644
--- a/Documentation/tracers/mmiotrace.txt
+++ b/Documentation/tracers/mmiotrace.txt
@@ -36,7 +36,7 @@ $ mount -t debugfs debugfs /debug
36$ echo mmiotrace > /debug/tracing/current_tracer 36$ echo mmiotrace > /debug/tracing/current_tracer
37$ cat /debug/tracing/trace_pipe > mydump.txt & 37$ cat /debug/tracing/trace_pipe > mydump.txt &
38Start X or whatever. 38Start X or whatever.
39$ echo "X is up" > /debug/tracing/marker 39$ echo "X is up" > /debug/tracing/trace_marker
40$ echo none > /debug/tracing/current_tracer 40$ echo none > /debug/tracing/current_tracer
41Check for lost events. 41Check for lost events.
42 42
@@ -59,9 +59,8 @@ The 'cat' process should stay running (sleeping) in the background.
59Load the driver you want to trace and use it. Mmiotrace will only catch MMIO 59Load the driver you want to trace and use it. Mmiotrace will only catch MMIO
60accesses to areas that are ioremapped while mmiotrace is active. 60accesses to areas that are ioremapped while mmiotrace is active.
61 61
62[Unimplemented feature:]
63During tracing you can place comments (markers) into the trace by 62During tracing you can place comments (markers) into the trace by
64$ echo "X is up" > /debug/tracing/marker 63$ echo "X is up" > /debug/tracing/trace_marker
65This makes it easier to see which part of the (huge) trace corresponds to 64This makes it easier to see which part of the (huge) trace corresponds to
66which action. It is recommended to place descriptive markers about what you 65which action. It is recommended to place descriptive markers about what you
67do. 66do.