@@ -288,15 +288,16 @@ static void __init test_monitor_call(void)
288
288
289
289
void __init trap_init (void )
290
290
{
291
+ struct lowcore * lc = get_lowcore ();
291
292
unsigned long flags ;
292
293
struct ctlreg cr0 ;
293
294
294
295
local_irq_save (flags );
295
296
cr0 = local_ctl_clear_bit (0 , CR0_LOW_ADDRESS_PROTECTION_BIT );
296
- psw_bits (get_lowcore () -> external_new_psw ).mcheck = 1 ;
297
- psw_bits (get_lowcore () -> program_new_psw ).mcheck = 1 ;
298
- psw_bits (get_lowcore () -> svc_new_psw ).mcheck = 1 ;
299
- psw_bits (get_lowcore () -> io_new_psw ).mcheck = 1 ;
297
+ psw_bits (lc -> external_new_psw ).mcheck = 1 ;
298
+ psw_bits (lc -> program_new_psw ).mcheck = 1 ;
299
+ psw_bits (lc -> svc_new_psw ).mcheck = 1 ;
300
+ psw_bits (lc -> io_new_psw ).mcheck = 1 ;
300
301
local_ctl_load (0 , & cr0 );
301
302
local_irq_restore (flags );
302
303
local_mcck_enable ();
@@ -307,11 +308,12 @@ static void (*pgm_check_table[128])(struct pt_regs *regs);
307
308
308
309
void noinstr __do_pgm_check (struct pt_regs * regs )
309
310
{
310
- unsigned int trapnr ;
311
+ struct lowcore * lc = get_lowcore () ;
311
312
irqentry_state_t state ;
313
+ unsigned int trapnr ;
312
314
313
- regs -> int_code = get_lowcore () -> pgm_int_code ;
314
- regs -> int_parm_long = get_lowcore () -> trans_exc_code ;
315
+ regs -> int_code = lc -> pgm_int_code ;
316
+ regs -> int_parm_long = lc -> trans_exc_code ;
315
317
316
318
state = irqentry_enter (regs );
317
319
@@ -324,19 +326,19 @@ void noinstr __do_pgm_check(struct pt_regs *regs)
324
326
current -> thread .last_break = regs -> last_break ;
325
327
}
326
328
327
- if (get_lowcore () -> pgm_code & 0x0200 ) {
329
+ if (lc -> pgm_code & 0x0200 ) {
328
330
/* transaction abort */
329
- current -> thread .trap_tdb = get_lowcore () -> pgm_tdb ;
331
+ current -> thread .trap_tdb = lc -> pgm_tdb ;
330
332
}
331
333
332
- if (get_lowcore () -> pgm_code & PGM_INT_CODE_PER ) {
334
+ if (lc -> pgm_code & PGM_INT_CODE_PER ) {
333
335
if (user_mode (regs )) {
334
336
struct per_event * ev = & current -> thread .per_event ;
335
337
336
338
set_thread_flag (TIF_PER_TRAP );
337
- ev -> address = get_lowcore () -> per_address ;
338
- ev -> cause = get_lowcore () -> per_code_combined ;
339
- ev -> paid = get_lowcore () -> per_access_id ;
339
+ ev -> address = lc -> per_address ;
340
+ ev -> cause = lc -> per_code_combined ;
341
+ ev -> paid = lc -> per_access_id ;
340
342
} else {
341
343
/* PER event in kernel is kprobes */
342
344
__arch_local_irq_ssm (regs -> psw .mask & ~PSW_MASK_PER );
0 commit comments