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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> 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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux