linux-mips
[Top] [All Lists]

Re: [PATCH] cleanup hardcoding __pa/__va macros etc. (take-2)

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: [PATCH] cleanup hardcoding __pa/__va macros etc. (take-2)
From: girish <girishvg@gmail.com>
Date: Wed, 27 Sep 2006 07:06:10 +0900
Cc: "linux-mips@linux-mips.org" <linux-mips@linux-mips.org>, girish <girishvg@gmail.com>
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:user-agent:date:subject:from:to:cc:message-id:thread-topic:thread-index:in-reply-to:mime-version:content-type; b=E/CatyHixH32LvVWsb4qqj79r6fHiniipkBT+a4EZqGWzGjdiJ3SM/YCgZh060GNLqHGiYLWcrIy9pY8RMmSuCEfONbTTk3d0RcmNx6LoeusBxKvcvcroRi+EFi13jreaE5xP7brjiRfy6TeZWJDK/K2dZGc+bjgbjqBqkrWZaQ=
In-reply-to: <20060927.013553.48803581.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Thread-index: Acbht/kIN7Jphk2rEdulewATIGIqNA==
Thread-topic: [PATCH] cleanup hardcoding __pa/__va macros etc. (take-2)
User-agent: Microsoft-Entourage/11.2.1.051004
>> But, then again treating all addresses as above PAGE_OFFSET is also wrong :)
> 
> It would be a design not a bug :-)
> 
>> I looked at it just as a work around. These macros are called from so many
>> other places that if an access is made at say 4000_0000 the kernel will oops
>> telling it was C000_0000 access error. Now that confused me a lot! With this
>> change now kernel oops on 4000_0000 :)
> 
> Yes, 4000_0000, which is wrong too.  And it _hides_ wrong usage of
> vaddr/paddr.  Bad side effect :)
> 
>> Anyway, you may ignore __pa/__va macros.
>> 
>> Could you please look into other changes I proposed?
> 
> __pa() returns "unsigned long" and __va() returns "void *" so some
> casts are also redundant.

After removing some of the redundant casts, re-submitting the patch.
Attached the patch in a text file.
 
In the meantime, I couldn't find the changes suggested for SPARSEMEM support
in the main source tree. Especially the ones reviewed during month of August
([PATCH] do not count pages in holes with sparsemem ...). Could you please
resend the consolidated patch to the list? Thanks.

BTW, I have couple of more changes in mind.
.1a Currently only one PCI DMA window is supported. We need to extend that,
if the PCI controller has multiple windows. Example implementation is in
arch/powerpc.
.1b During HIGHMEM support the PCI windows are not honored correctly. A
kmap() based mapping could be provided during PCI sync. Example
implementation, again arch/powerpc. Has anybody looked into this?
.2 Has anybody tested /dev/mem and/or /dev/kmem devices on MIPS platform?

Attachment: patch-basicfix-20060927
Description: Binary data

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