Bizarre initrd problem on CLLF860T

Marcus Sundberg erammsu at kieraypc01.p.y.ki.era.ericsson.se
Tue Apr 18 19:10:35 EST 2000


Marcus Sundberg <erammsu at kieraypc01.p.y.ki.era.ericsson.se> writes:

> I'd suggest keeping the C-version of set_dec() in ppc/kernel/time.h
> where it used to be and change it to the following code :

[snip]

Or not. ;-)
That didn't come out of the compiler as something useful, this version
works though:

static __inline__ void set_dec(unsigned int val)
{
	unsigned long dummy_var;
	register unsigned long reg5 __asm__ ("r5");
	register unsigned long reg4 __asm__ ("r4");
	unsigned long flags;

	save_flags(flags);
	cli();
	reg4 = (unsigned long) &dummy_var;
	reg5 = DEC_ADDR;
	asm volatile (
		"stw   %3,0(%2) \n\t"
		"lwz   %3,0(%2) \n\t"
		"mtspr %0,%1 \n\t"
		: : "i"(DEC), "r"((val)), "r"(reg4), "r"(reg5)
		: "r4", "r5", "memory");
	restore_flags(flags);
}

//Marcus
--
Signature under construction, please come back later.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list