Update to CMC/CPE polling
PATCH 1/1 Update to CMC/CPE polling
Based on the feedback from Tony, here's the patch that flips
around the clearing of cmc_polling_enabled. This is based on what's currently in to-linus-2.5, but applies on 2.4.21 as well. Bjorn, I've also attached the diff for the name change David recommended. Thanks,
Alex
Signature · 1 line
Alex Williamson HP Linux & Open Source Lab
arch/ia64/kernel/mca.c renamed from arch/ia64/kernel/mca.c~ +7 -1
@@ -1149,13 +1149,19 @@printk (KERN_WARNING "%s: Returning to interrupt driven CMC handler\n" , __FUNCTION__); - cmc_polling_enabled =0 ;/* * The cmc interrupt handler enabled irqs, so * this can't deadlock. */ smp_call_function (ia64_mca_cmc_vector_enable,NULL ,1 ,0 ); + +/* +* Turn off interrupts before re-enabling the +* cmc vector locally. Make sure we get out. +*/ +local_irq_disable ();ia64_mca_cmc_vector_enable (NULL ); + cmc_polling_enabled =0 ; }else {
include/asm-ia64/sal.h renamed from include/asm-ia64/sal.h~ +4 -4
@@ -56,7 +56,7 @@ia64_load_scratch_fpregs (__ia64_scn_fr); \ } while (0) -# define SAL_CALL_SAFE(result,args...) do { \ +# define SAL_CALL_REENTRANT(result,args...) do { \ struct ia64_fpreg __ia64_scs_fr[6]; \ ia64_save_scratch_fpregs(__ia64_scs_fr); \ __SAL_CALL(result, args); \
@@ -665,7 +665,7 @@ ia64_sal_clear_state_info (u64 sal_info_type) {struct ia64_sal_retval isrv; -SAL_CALL_SAFE (isrv,SAL_CLEAR_STATE_INFO , sal_info_type,0 , +SAL_CALL_REENTRANT (isrv,SAL_CLEAR_STATE_INFO , sal_info_type,0 ,0 ,0 ,0 ,0 ,0 );return isrv.status; }
@@ -678,7 +678,7 @@ ia64_sal_get_state_info (u64 sal_info_type, u64 *sal_info) { struct ia64_sal_retval isrv; -SAL_CALL_SAFE (isrv,SAL_GET_STATE_INFO , sal_info_type,0 , +SAL_CALL_REENTRANT (isrv,SAL_GET_STATE_INFO , sal_info_type,0 , sal_info,0 ,0 ,0 ,0 );if (isrv.status)return 0 ;
@@ -694,7 +694,7 @@ ia64_sal_get_state_info_size (u64 sal_info_type) {struct ia64_sal_retval isrv; -SAL_CALL_SAFE (isrv,SAL_GET_STATE_INFO_SIZE , sal_info_type,0 , +SAL_CALL_REENTRANT (isrv,SAL_GET_STATE_INFO_SIZE , sal_info_type,0 ,0 ,0 ,0 ,0 ,0 );if (isrv.status)return 0 ;
Quoted 5 lines · Alex Williamson
Based on the feedback from Tony, here's the patch that flips
around the clearing ofcmc_polling_enabled. This is based on what's currently in to-linus-2.5, but applies on 2.4.21 as well. Bjorn, I've also attached the diff for the name change David recommended. Thanks,
I applied both patches for 2.4.
Bjorn