mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
powerpc/ptdump: get out of note_prot_wx() when CONFIG_PPC_DEBUG_WX is not selected.
When CONFIG_PPC_DEBUG_WX, note_prot_wx() is useless. Get out of it early and inconditionnally in that case, so that GCC can kick all the code out. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/ff6c8f631bd4ce3a10e0cc241eb569816187bc20.1565786091.git.christophe.leroy@c-s.fr
This commit is contained in:
parent
8224235272
commit
f3a2ac0589
1 changed files with 1 additions and 1 deletions
|
@ -177,7 +177,7 @@ static void dump_addr(struct pg_state *st, unsigned long addr)
|
||||||
|
|
||||||
static void note_prot_wx(struct pg_state *st, unsigned long addr)
|
static void note_prot_wx(struct pg_state *st, unsigned long addr)
|
||||||
{
|
{
|
||||||
if (!st->check_wx)
|
if (!IS_ENABLED(CONFIG_PPC_DEBUG_WX) || !st->check_wx)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!((st->current_flags & pgprot_val(PAGE_KERNEL_X)) == pgprot_val(PAGE_KERNEL_X)))
|
if (!((st->current_flags & pgprot_val(PAGE_KERNEL_X)) == pgprot_val(PAGE_KERNEL_X)))
|
||||||
|
|
Loading…
Reference in a new issue