Re: wrong usage of MAX_DMA_ADDRESS in bootmem.h

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Christoph Lameter
Date: Wednesday, October 1, 2008 - 5:07 am

Russell King - ARM Linux wrote:



Someone screwed around with the basics here. MAX_DMA_ADDRESS is no longer
related to MAX_DMA_PFN for the x86_32 case. What is the point of relating
MAX_DMA_ADDRESS to PAGE_OFFSET? Looks like we are creating more confusion
about the strange DMA zone.

The best would be to rename these variables to make the semantics clearer

ZONE_DMA related variables:

MAX_DMA_PFN -> MAX_ZONE_DMA_PFN
MAX_DMA_ADDRESS -> MAX_ZONE_DMA_ADDRESS

MAX_DMA32_PFN -> MAX_ZONE_DMA32_PFN
MAX_DMA32_ADDRESS -> MAX_ZONE_DMA32_ADDRESS

Then the general DMAability

MAX_DMA_ADDRESS -> DMA_LIMIT



MAX_DMA_ADDRESS is the highest possible address for the DMA zone. Not the
highest possible address that any DMA controller can use. And now we have
special casing that makes the semantics different between 32 bit and 64 bit
x86? Insane! Please clean up the fuzzy semantics.



I believe we have been over this. If you just have one zone then the core code
would expect you to disable CONFIG_ZONE_DMA and have all memory treated equal
in ZONE_NORMAL.

The naming seems to be the problem here. Maybe renaming ZONE_DMA to
ZONE_RESTRICTED_DMA or something would help. We are currently creating two
different paradigms of using these constants.



--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
wrong usage of MAX_DMA_ADDRESS in bootmem.h, Nicolas Pitre, (Tue Sep 30, 12:35 pm)
Re: wrong usage of MAX_DMA_ADDRESS in bootmem.h, Christoph Lameter, (Tue Sep 30, 12:56 pm)
Re: wrong usage of MAX_DMA_ADDRESS in bootmem.h, Russell King - ARM Linux, (Tue Sep 30, 1:12 pm)
Re: wrong usage of MAX_DMA_ADDRESS in bootmem.h, Nicolas Pitre, (Tue Sep 30, 2:09 pm)
Re: wrong usage of MAX_DMA_ADDRESS in bootmem.h, Christoph Lameter, (Wed Oct 1, 5:07 am)
Re: wrong usage of MAX_DMA_ADDRESS in bootmem.h, Russell King - ARM Linux, (Wed Oct 1, 7:06 am)
Re: wrong usage of MAX_DMA_ADDRESS in bootmem.h, Christoph Lameter, (Wed Oct 1, 7:50 am)
Re: wrong usage of MAX_DMA_ADDRESS in bootmem.h, Russell King - ARM Linux, (Wed Oct 1, 8:02 am)
Re: wrong usage of MAX_DMA_ADDRESS in bootmem.h, Christoph Lameter, (Thu Oct 2, 9:49 am)
Re: wrong usage of MAX_DMA_ADDRESS in bootmem.h, Russell King - ARM Linux, (Thu Oct 2, 12:06 pm)