insert_slb_entry((unsignedlong)p, MMU_SEGSIZE_1T, mmu_vmalloc_psize); /* * This triggers exception, If handled correctly we must recover * from this error.
*/
p[0] = '!';
vfree(p); return 0;
}
p = kmalloc(2048, GFP_KERNEL); if (!p) return -ENOMEM;
insert_slb_entry((unsignedlong)p, MMU_SEGSIZE_1T, mmu_linear_psize); /* * This triggers exception, If handled correctly we must recover * from this error.
*/
p[0] = '!';
kfree(p); return 0;
}
/* * Few initial SLB entries are bolted. Add a test to inject * multihit in bolted entry 0.
*/ staticvoid insert_dup_slb_entry_0(void)
{ unsignedlong test_address = PAGE_OFFSET, *test_ptr; unsignedlong esid, vsid; unsignedlong i = 0;
/* for i !=0 we would need to mask out the old entry number */ asmvolatile("slbmte %0,%1" :
: "r" (vsid), "r" (esid | (SLB_NUM_BOLTED + 1))
: "memory");
pr_info("%s accessing test address 0x%lx: 0x%lx\n",
__func__, test_address, *test_ptr);
preempt_enable();
}
staticvoid lkdtm_PPC_SLB_MULTIHIT(void)
{ if (!radix_enabled()) {
pr_info("Injecting SLB multihit errors\n"); /* * These need not be separate tests, And they do pretty * much same thing. In any case we must recover from the * errors introduced by these functions, machine would not * survive these tests in case of failure to handle.
*/
inject_vmalloc_slb_multihit();
inject_kmalloc_slb_multihit();
insert_dup_slb_entry_0();
pr_info("Recovered from SLB multihit errors\n");
} else {
pr_err("XFAIL: This test is for ppc64 and with hash mode MMU only\n");
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.