Re: [PATCH] TX49 MFC0 bug workaround

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> On Thu, 2 Feb 2006 16:56:56 +0000, Ralf Baechle <ralf@xxxxxxxxxxxxxx> said:

>> Hmm, wouldn't that "nop" alternative be simpler?

ralf> Simpler maybe - but this variant has zero runtime overhead.

Yes.  I do not want do add extra cycles.

However, It can be more readable since we can safely mask bit[5:1] (as
local_irq_enable() does).  Like this:

__asm__ (
	"	.macro	local_irq_disable\n"
	"	.set	push						\n"
	"	.set	noat						\n"
#ifdef CONFIG_CPU_MIPSR2
	"	di							\n"
#else
	"	mfc0	$1,$12						\n"
	"	ori	$1,0x1f						\n"
	"	xori	$1,0x1f						\n"
	"	.set	noreorder					\n"
	"	mtc0	$1,$12						\n"
#endif
	"	irq_disable_hazard					\n"
	"	.set	pop						\n"
	"	.endm							\n");


Is this preferred?  We can get rid of all TX49XX_MFC0_WAR on this way.

---
Atsushi Nemoto


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux