powerpc: Allow relative pointers in bug table entries
This enables GENERIC_BUG_RELATIVE_POINTERS on Power so that 32-bit offsets are stored in the bug entries rather than 64-bit pointers. While this doesn't save space for 32-bit machines, use it anyway so there is only one code path. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20201201005203.15210-1-jniethe5@gmail.com
This commit is contained in:
committed by
Michael Ellerman
parent
f3e9040801
commit
1baa1f70ef
@@ -1747,9 +1747,9 @@ static void print_bug_trap(struct pt_regs *regs)
|
||||
|
||||
#ifdef CONFIG_DEBUG_BUGVERBOSE
|
||||
printf("kernel BUG at %s:%u!\n",
|
||||
bug->file, bug->line);
|
||||
(char *)bug + bug->file_disp, bug->line);
|
||||
#else
|
||||
printf("kernel BUG at %px!\n", (void *)bug->bug_addr);
|
||||
printf("kernel BUG at %px!\n", (void *)bug + bug->bug_addr_disp);
|
||||
#endif
|
||||
#endif /* CONFIG_BUG */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user