mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 15:33:28 +00:00
The Breaking-Event-Address-Register (BEAR) stores the address of the last breaking event instruction. Breaking events are usually instructions that change the program flow - for example branches, and instructions that modify the address in the PSW like lpswe. This is useful for debugging wild branches, because one could easily figure out where the wild branch was originating from. What is problematic is that lpswe is considered a breaking event, and therefore overwrites BEAR on kernel exit. The BEAR enhancement facility adds new instructions that allow to save/restore BEAR and also an lpswey instruction that doesn't cause a breaking event. So we can save BEAR on kernel entry and restore it on exit to user space. Signed-off-by: Sven Schnelle <[email protected]> Reviewed-by: Heiko Carstens <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
29 lines
620 B
C
29 lines
620 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright IBM Corp. 2000, 2009
|
|
* Author(s): Hartmut Penner <[email protected]>,
|
|
* Martin Schwidefsky <[email protected]>,
|
|
* Christian Ehrhardt <[email protected]>,
|
|
*/
|
|
|
|
#ifndef _ASM_S390_CPU_H
|
|
#define _ASM_S390_CPU_H
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/jump_label.h>
|
|
|
|
struct cpuid
|
|
{
|
|
unsigned int version : 8;
|
|
unsigned int ident : 24;
|
|
unsigned int machine : 16;
|
|
unsigned int unused : 16;
|
|
} __attribute__ ((packed, aligned(8)));
|
|
|
|
DECLARE_STATIC_KEY_FALSE(cpu_has_bear);
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
#endif /* _ASM_S390_CPU_H */
|