Skip to contentSkip to conversation

x86: Fix-up for 2.6.26.5+

Adeos-main Jan Kiszka 1 participant 1 message Oct 20, 2008 x86

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

Philippe,

ipipe-2.0-15 does not apply to 2.6.26.5 and later. Hunk below might be non-trivial to resolve for normal users, so please merge soon (specifically into Xenomai):

arch/x86/kernel/traps_64.c +3 -0
Index: linux-2.6.26-xeno_64/arch/x86/kernel/traps_64.c
===================================================================
@@ -1140,17 +1148,20 @@ asmlinkage void math_state_restore(void)
 		local_irq_disable();
 	}
 
+	local_irq_save_hw_cond(flags);
 	clts();			/* Allow maths ops (or we recurse) */
  	/*
  	 * Paranoid restore. send a SIGSEGV if we fail to restore the state.
  	 */
  	if (unlikely(restore_fpu_checking(&me->thread.xstate->fxsave))) {
  		stts();
+		local_irq_restore_hw_cond(flags);
  		force_sig(SIGSEGV, me);
  		return;
  	}
 	task_thread_info(me)->status |= TS_USEDFPU;
 	me->fpu_counter++;
+	local_irq_restore_hw_cond(flags);
 }
 EXPORT_SYMBOL_GPL(math_state_restore);
 

Thanks,
Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux