diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2014-05-21 20:36:33 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2014-05-21 20:36:33 -0400 |
commit | 03c1b4e8e560455a2634a76998883a22f1a01207 (patch) | |
tree | 30ca1237d094d66df1dc1533f7bf39b3877b5932 /arch/x86/mm | |
parent | ac49b9a9f26b6c42585f87857722085ef4b19c13 (diff) | |
parent | e6ab9a20e73e790d47e6aa231fcf66f27b6ce3d4 (diff) |
Merge remote-tracking branch 'origin/x86/espfix' into x86/vdso
Merge x86/espfix into x86/vdso, due to changes in the vdso setup code
that otherwise cause conflicts.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/dump_pagetables.c | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index 20621d753d5f..167ffcac16ed 100644 --- a/arch/x86/mm/dump_pagetables.c +++ b/arch/x86/mm/dump_pagetables.c | |||
@@ -30,12 +30,14 @@ struct pg_state { | |||
30 | unsigned long start_address; | 30 | unsigned long start_address; |
31 | unsigned long current_address; | 31 | unsigned long current_address; |
32 | const struct addr_marker *marker; | 32 | const struct addr_marker *marker; |
33 | unsigned long lines; | ||
33 | bool to_dmesg; | 34 | bool to_dmesg; |
34 | }; | 35 | }; |
35 | 36 | ||
36 | struct addr_marker { | 37 | struct addr_marker { |
37 | unsigned long start_address; | 38 | unsigned long start_address; |
38 | const char *name; | 39 | const char *name; |
40 | unsigned long max_lines; | ||
39 | }; | 41 | }; |
40 | 42 | ||
41 | /* indices for address_markers; keep sync'd w/ address_markers below */ | 43 | /* indices for address_markers; keep sync'd w/ address_markers below */ |
@@ -46,6 +48,7 @@ enum address_markers_idx { | |||
46 | LOW_KERNEL_NR, | 48 | LOW_KERNEL_NR, |
47 | VMALLOC_START_NR, | 49 | VMALLOC_START_NR, |
48 | VMEMMAP_START_NR, | 50 | VMEMMAP_START_NR, |
51 | ESPFIX_START_NR, | ||
49 | HIGH_KERNEL_NR, | 52 | HIGH_KERNEL_NR, |
50 | MODULES_VADDR_NR, | 53 | MODULES_VADDR_NR, |
51 | MODULES_END_NR, | 54 | MODULES_END_NR, |
@@ -68,6 +71,7 @@ static struct addr_marker address_markers[] = { | |||
68 | { PAGE_OFFSET, "Low Kernel Mapping" }, | 71 | { PAGE_OFFSET, "Low Kernel Mapping" }, |
69 | { VMALLOC_START, "vmalloc() Area" }, | 72 | { VMALLOC_START, "vmalloc() Area" }, |
70 | { VMEMMAP_START, "Vmemmap" }, | 73 | { VMEMMAP_START, "Vmemmap" }, |
74 | { ESPFIX_BASE_ADDR, "ESPfix Area", 16 }, | ||
71 | { __START_KERNEL_map, "High Kernel Mapping" }, | 75 | { __START_KERNEL_map, "High Kernel Mapping" }, |
72 | { MODULES_VADDR, "Modules" }, | 76 | { MODULES_VADDR, "Modules" }, |
73 | { MODULES_END, "End Modules" }, | 77 | { MODULES_END, "End Modules" }, |
@@ -182,7 +186,7 @@ static void note_page(struct seq_file *m, struct pg_state *st, | |||
182 | pgprot_t new_prot, int level) | 186 | pgprot_t new_prot, int level) |
183 | { | 187 | { |
184 | pgprotval_t prot, cur; | 188 | pgprotval_t prot, cur; |
185 | static const char units[] = "KMGTPE"; | 189 | static const char units[] = "BKMGTPE"; |
186 | 190 | ||
187 | /* | 191 | /* |
188 | * If we have a "break" in the series, we need to flush the state that | 192 | * If we have a "break" in the series, we need to flush the state that |
@@ -197,6 +201,7 @@ static void note_page(struct seq_file *m, struct pg_state *st, | |||
197 | st->current_prot = new_prot; | 201 | st->current_prot = new_prot; |
198 | st->level = level; | 202 | st->level = level; |
199 | st->marker = address_markers; | 203 | st->marker = address_markers; |
204 | st->lines = 0; | ||
200 | pt_dump_seq_printf(m, st->to_dmesg, "---[ %s ]---\n", | 205 | pt_dump_seq_printf(m, st->to_dmesg, "---[ %s ]---\n", |
201 | st->marker->name); | 206 | st->marker->name); |
202 | } else if (prot != cur || level != st->level || | 207 | } else if (prot != cur || level != st->level || |
@@ -208,17 +213,24 @@ static void note_page(struct seq_file *m, struct pg_state *st, | |||
208 | /* | 213 | /* |
209 | * Now print the actual finished series | 214 | * Now print the actual finished series |
210 | */ | 215 | */ |
211 | pt_dump_seq_printf(m, st->to_dmesg, "0x%0*lx-0x%0*lx ", | 216 | if (!st->marker->max_lines || |
212 | width, st->start_address, | 217 | st->lines < st->marker->max_lines) { |
213 | width, st->current_address); | 218 | pt_dump_seq_printf(m, st->to_dmesg, |
214 | 219 | "0x%0*lx-0x%0*lx ", | |
215 | delta = (st->current_address - st->start_address) >> 10; | 220 | width, st->start_address, |
216 | while (!(delta & 1023) && unit[1]) { | 221 | width, st->current_address); |
217 | delta >>= 10; | 222 | |
218 | unit++; | 223 | delta = st->current_address - st->start_address; |
224 | while (!(delta & 1023) && unit[1]) { | ||
225 | delta >>= 10; | ||
226 | unit++; | ||
227 | } | ||
228 | pt_dump_cont_printf(m, st->to_dmesg, "%9lu%c ", | ||
229 | delta, *unit); | ||
230 | printk_prot(m, st->current_prot, st->level, | ||
231 | st->to_dmesg); | ||
219 | } | 232 | } |
220 | pt_dump_cont_printf(m, st->to_dmesg, "%9lu%c ", delta, *unit); | 233 | st->lines++; |
221 | printk_prot(m, st->current_prot, st->level, st->to_dmesg); | ||
222 | 234 | ||
223 | /* | 235 | /* |
224 | * We print markers for special areas of address space, | 236 | * We print markers for special areas of address space, |
@@ -226,7 +238,17 @@ static void note_page(struct seq_file *m, struct pg_state *st, | |||
226 | * This helps in the interpretation. | 238 | * This helps in the interpretation. |
227 | */ | 239 | */ |
228 | if (st->current_address >= st->marker[1].start_address) { | 240 | if (st->current_address >= st->marker[1].start_address) { |
241 | if (st->marker->max_lines && | ||
242 | st->lines > st->marker->max_lines) { | ||
243 | unsigned long nskip = | ||
244 | st->lines - st->marker->max_lines; | ||
245 | pt_dump_seq_printf(m, st->to_dmesg, | ||
246 | "... %lu entr%s skipped ... \n", | ||
247 | nskip, | ||
248 | nskip == 1 ? "y" : "ies"); | ||
249 | } | ||
229 | st->marker++; | 250 | st->marker++; |
251 | st->lines = 0; | ||
230 | pt_dump_seq_printf(m, st->to_dmesg, "---[ %s ]---\n", | 252 | pt_dump_seq_printf(m, st->to_dmesg, "---[ %s ]---\n", |
231 | st->marker->name); | 253 | st->marker->name); |
232 | } | 254 | } |