From: "Carlos O'Donell" Subject: Re: parisc: add barriers to mmio accessors Date: Tue, 3 Jun 2008 08:23:10 -0400 Message-ID: <119aab440806030523o28640c4coaf9076a78c8a061c@mail.gmail.com> References: <20080603054212.GA31771@phobos.i.cabal.ca> <119aab440806030522i1a4dd588v20630893e3fb0425@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Cc: linux-parisc@vger.kernel.org To: "Kyle McMartin" Return-path: In-Reply-To: <119aab440806030522i1a4dd588v20630893e3fb0425@mail.gmail.com> List-ID: List-Id: linux-parisc.vger.kernel.org On Tue, Jun 3, 2008 at 8:22 AM, Carlos O'Donell wrote: >> +#ifdef CONFIG_64BIT >> + asm volatile( >> + " ldq 0(%0), %1\n" >> + : : "r"(addr), "r"(q) : "memory"); >> +#else >> + unsigned int q_lo, q_hi; >> + q_hi = __raw_readl(addr); >> + q_lo = __raw_readl(addr+4); >> + q = (unsigned long long)(q_hi << 32) | (q_lo); >> +#endif >> + >> + return q; > > Is there any reason the 32-bit version is uses plain C? I see, you optimized this for the 64-bit case, that makes sense. I should drink more coffee. Cheers, Carlos.