[Top] [All Lists]

Re: [PATCH] Added MIPS RM9K watchdog driver

To: Thomas Koeller <>
Subject: Re: [PATCH] Added MIPS RM9K watchdog driver
From: Ralf Baechle <>
Date: Sat, 12 Aug 2006 23:41:00 +0100
Cc: Alan Cox <>,,,
In-reply-to: <>
Original-recipient: rfc822;
References: <> <1155326835.24077.116.camel@localhost.localdomain> <>
User-agent: Mutt/
On Sat, Aug 12, 2006 at 06:06:02PM +0200, Thomas Koeller wrote:

> > > + while (1) continue;
> >
> > cpu_relax();
> I tried to find out about the purpose of cpu_relax(). On MIPS, at least,
> it maps to barrier(). I do not quite understand why I would need a
> barrier() in this place. Would you, or someone else, care to
> enlighten me?

Busy wait loops are meant to be filled with cpu_relax() in Linux.  On
processors like the Pentium 4 this expands into something that keeps
the CPU from consuming excessive amounts of energy for just twiddling
thumbs and probably also CPU dependant.  On MIPS cpu_relax() so far is
meaningless and therfore just defined as barrier().


<Prev in Thread] Current Thread [Next in Thread>