[Top] [All Lists]

Re: [alsa-devel] ALSA on MIPS platform

To: Atsushi Nemoto <>
Subject: Re: [alsa-devel] ALSA on MIPS platform
From: Songmao Tian <>
Date: Wed, 08 Aug 2007 08:40:14 +0800
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <>
User-agent: Icedove (X11/20061116)
Atsushi Nemoto wrote:
On Tue, 7 Aug 2007 10:18:04 +0400, "Dajie Tan" <> wrote:
 static inline unsigned long virt_to_phys(volatile const void *address)
-       return (unsigned long)address - PAGE_OFFSET + PHYS_OFFSET;
+       return ((unsigned long)address & 0x1fffffff) + PHYS_OFFSET;

This makes virt_to_phys() a bit slower, and more importantly, breaks
64-bit kernel.

I have tried this way, and disassemble result show 32-bit kernel add only one instruction. But I don't really insist on this patch, for it doesn't resolve some driver code requirement.
Atsushi Nemoto
Alsa-devel mailing list

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