Commit 11886c19 authored by Sven Schnelle's avatar Sven Schnelle Committed by Vasily Gorbik

s390: add machine check SIGP

This will be used with the upcoming entry.S changes to signal
that there's a machine check pending that cannot be handled in
the Machine check handler itself.
Reviewed-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent a999eb96
...@@ -58,5 +58,6 @@ extern int smp_rescan_cpus(void); ...@@ -58,5 +58,6 @@ extern int smp_rescan_cpus(void);
extern void __noreturn cpu_die(void); extern void __noreturn cpu_die(void);
extern void __cpu_die(unsigned int cpu); extern void __cpu_die(unsigned int cpu);
extern int __cpu_disable(void); extern int __cpu_disable(void);
extern void schedule_mcck_handler(void);
#endif /* __ASM_SMP_H */ #endif /* __ASM_SMP_H */
...@@ -61,6 +61,7 @@ enum { ...@@ -61,6 +61,7 @@ enum {
ec_schedule = 0, ec_schedule = 0,
ec_call_function_single, ec_call_function_single,
ec_stop_cpu, ec_stop_cpu,
ec_mcck_pending,
}; };
enum { enum {
...@@ -403,6 +404,11 @@ int smp_find_processor_id(u16 address) ...@@ -403,6 +404,11 @@ int smp_find_processor_id(u16 address)
return -1; return -1;
} }
void schedule_mcck_handler(void)
{
pcpu_ec_call(pcpu_devices + smp_processor_id(), ec_mcck_pending);
}
bool arch_vcpu_is_preempted(int cpu) bool arch_vcpu_is_preempted(int cpu)
{ {
if (test_cpu_flag_of(CIF_ENABLED_WAIT, cpu)) if (test_cpu_flag_of(CIF_ENABLED_WAIT, cpu))
...@@ -497,6 +503,8 @@ static void smp_handle_ext_call(void) ...@@ -497,6 +503,8 @@ static void smp_handle_ext_call(void)
scheduler_ipi(); scheduler_ipi();
if (test_bit(ec_call_function_single, &bits)) if (test_bit(ec_call_function_single, &bits))
generic_smp_call_function_single_interrupt(); generic_smp_call_function_single_interrupt();
if (test_bit(ec_mcck_pending, &bits))
s390_handle_mcck();
} }
static void do_ext_call_interrupt(struct ext_code ext_code, static void do_ext_call_interrupt(struct ext_code ext_code,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment