Re: [PATCH] Make PFN_PHYS return a properly-formed physical address

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeremy Fitzhardinge
Date: Thursday, August 7, 2008 - 3:10 pm

Andrew Morton wrote:

Oops.  Forgot.


I don't know.  Is it?  It's what linux/ioport.h:struct resource uses to 
hold "start" and "end", which presumably means its intended to hold 
arbitrary physical addresses.


Not an option:

config X86_PAE
	def_bool n
	prompt "PAE (Physical Address Extension) Support"
	depends on X86_32 && !HIGHMEM4G
	select RESOURCES_64BIT


And if you don't enable RESOURCES_64BIT, then I guess it's reasonable 
for PFN_PHYS to discount the possibility of high pages?


I had that originally, but someone (hpa?) suggested resource_size_t.  
The sad thing is that most users don't really care;  they're either 
64-bit anyway, or immediately truncate the result to 32-bit.

"Properly" would be to define a phys_addr_t which can always represent a 
physical address.  We have one in x86-land, but I hesitate to add it for 
everyone else.


(u64) cast, I guess.

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

Messages in current thread:
Re: [PATCH] Make PFN_PHYS return a properly-formed physica ..., Jeremy Fitzhardinge, (Thu Aug 7, 3:10 pm)
Re: [PATCH] Make PFN_PHYS return a properly-formed physica ..., Jeremy Fitzhardinge, (Thu Aug 7, 4:45 pm)
Re: [PATCH] Make PFN_PHYS return a properly-formed physica ..., Jeremy Fitzhardinge, (Thu Aug 7, 5:16 pm)
[PATCH 1/2] add phys_addr_t for holding physical addresses, Jeremy Fitzhardinge, (Mon Aug 11, 12:38 pm)
[PATCH 2/2] make PFN_PHYS explicitly return phys_addr_t, Jeremy Fitzhardinge, (Mon Aug 11, 12:38 pm)
Re: [PATCH 1/2] add phys_addr_t for holding physical addresses, Benjamin Herrenschmidt, (Mon Aug 11, 2:58 pm)
Re: [PATCH 1/2] add phys_addr_t for holding physical addresses, Jeremy Fitzhardinge, (Mon Aug 11, 3:15 pm)
Re: [PATCH 1/2] add phys_addr_t for holding physical addresses, Benjamin Herrenschmidt, (Mon Aug 11, 3:32 pm)
Re: [PATCH 1/2] add phys_addr_t for holding physical addresses, Jeremy Fitzhardinge, (Mon Aug 11, 3:50 pm)
Re: [PATCH 1/2] add phys_addr_t for holding physical addresses, Benjamin Herrenschmidt, (Mon Aug 11, 3:53 pm)
Re: [PATCH 1/2] add phys_addr_t for holding physical addresses, Jeremy Fitzhardinge, (Mon Aug 11, 4:02 pm)
Re: [PATCH 1/2] add phys_addr_t for holding physical addresses, Benjamin Herrenschmidt, (Mon Aug 11, 4:17 pm)