Lines Matching refs:st
179 static void dump_prot(struct pg_state *st) in dump_prot() argument
186 if ((st->current_prot & pte_bits[i].mask) == pte_bits[i].val) in dump_prot()
192 pt_dump_seq_printf(st->seq, " %s", s); in dump_prot()
201 static void dump_addr(struct pg_state *st, unsigned long addr) in dump_addr() argument
207 pt_dump_seq_printf(st->seq, ADDR_FORMAT "-" ADDR_FORMAT " ", in dump_addr()
208 st->start_address, addr); in dump_addr()
210 pt_dump_seq_printf(st->seq, " " ADDR_FORMAT " ", st->start_pa); in dump_addr()
211 delta = (addr - st->start_address) >> 10; in dump_addr()
218 pt_dump_seq_printf(st->seq, "%9lu%c %s", delta, *unit, in dump_addr()
219 pg_level[st->level].name); in dump_addr()
222 static void note_prot_wx(struct pg_state *st, unsigned long addr) in note_prot_wx() argument
224 if (!st->check_wx) in note_prot_wx()
227 if ((st->current_prot & (_PAGE_WRITE | _PAGE_EXEC)) != in note_prot_wx()
232 (void *)st->start_address, (void *)st->start_address); in note_prot_wx()
234 st->wx_pages += (addr - st->start_address) / PAGE_SIZE; in note_prot_wx()
240 struct pg_state *st = container_of(pt_st, struct pg_state, ptdump); in note_page() local
247 if (st->level == -1) { in note_page()
248 st->level = level; in note_page()
249 st->current_prot = prot; in note_page()
250 st->start_address = addr; in note_page()
251 st->start_pa = pa; in note_page()
252 st->last_pa = pa; in note_page()
253 pt_dump_seq_printf(st->seq, "---[ %s ]---\n", st->marker->name); in note_page()
254 } else if (prot != st->current_prot || in note_page()
255 level != st->level || addr >= st->marker[1].start_address) { in note_page()
256 if (st->current_prot) { in note_page()
257 note_prot_wx(st, addr); in note_page()
258 dump_addr(st, addr); in note_page()
259 dump_prot(st); in note_page()
260 pt_dump_seq_puts(st->seq, "\n"); in note_page()
263 while (addr >= st->marker[1].start_address) { in note_page()
264 st->marker++; in note_page()
265 pt_dump_seq_printf(st->seq, "---[ %s ]---\n", in note_page()
266 st->marker->name); in note_page()
269 st->start_address = addr; in note_page()
270 st->start_pa = pa; in note_page()
271 st->last_pa = pa; in note_page()
272 st->current_prot = prot; in note_page()
273 st->level = level; in note_page()
275 st->last_pa = pa; in note_page()
281 struct pg_state st = { in ptdump_walk() local
294 ptdump_walk_pgd(&st.ptdump, pinfo->mm, NULL); in ptdump_walk()
299 struct pg_state st = { in ptdump_check_wx() local
316 ptdump_walk_pgd(&st.ptdump, &init_mm, NULL); in ptdump_check_wx()
318 if (st.wx_pages) in ptdump_check_wx()
320 st.wx_pages); in ptdump_check_wx()