[alsa-devel] ALSA on MIPS platform

Songmao Tian tiansm at lemote.com
Wed Aug 8 02:40:14 CEST 2007


Atsushi Nemoto wrote:
> On Tue, 7 Aug 2007 10:18:04 +0400, "Dajie Tan" <jiankemeng at gmail.com> 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
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
>
>   



More information about the Alsa-devel mailing list