diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/printk-formats.txt | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index 8ffb274367c7..e8a6aa473bab 100644 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt | |||
@@ -53,6 +53,14 @@ Struct Resources: | |||
53 | For printing struct resources. The 'R' and 'r' specifiers result in a | 53 | For printing struct resources. The 'R' and 'r' specifiers result in a |
54 | printed resource with ('R') or without ('r') a decoded flags member. | 54 | printed resource with ('R') or without ('r') a decoded flags member. |
55 | 55 | ||
56 | Physical addresses: | ||
57 | |||
58 | %pa 0x01234567 or 0x0123456789abcdef | ||
59 | |||
60 | For printing a phys_addr_t type (and its derivatives, such as | ||
61 | resource_size_t) which can vary based on build options, regardless of | ||
62 | the width of the CPU data path. Passed by reference. | ||
63 | |||
56 | Raw buffer as a hex string: | 64 | Raw buffer as a hex string: |
57 | %*ph 00 01 02 ... 3f | 65 | %*ph 00 01 02 ... 3f |
58 | %*phC 00:01:02: ... :3f | 66 | %*phC 00:01:02: ... :3f |
@@ -150,9 +158,9 @@ s64 SHOULD be printed with %lld/%llx, (long long): | |||
150 | printk("%lld", (long long)s64_var); | 158 | printk("%lld", (long long)s64_var); |
151 | 159 | ||
152 | If <type> is dependent on a config option for its size (e.g., sector_t, | 160 | If <type> is dependent on a config option for its size (e.g., sector_t, |
153 | blkcnt_t, phys_addr_t, resource_size_t) or is architecture-dependent | 161 | blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a |
154 | for its size (e.g., tcflag_t), use a format specifier of its largest | 162 | format specifier of its largest possible type and explicitly cast to it. |
155 | possible type and explicitly cast to it. Example: | 163 | Example: |
156 | 164 | ||
157 | printk("test: sector number/total blocks: %llu/%llu\n", | 165 | printk("test: sector number/total blocks: %llu/%llu\n", |
158 | (unsigned long long)sector, (unsigned long long)blockcount); | 166 | (unsigned long long)sector, (unsigned long long)blockcount); |