Skip to contentSkip to conversation

CPHYSADDR in setup.c

DISCUSSION Franck Bui-Huu 2 participants 3 messages Jan 10, 2005 1 message not in the archive MIPS

lore
Share & tools
lore
#0 lore raw

Hi

I have noticed that someone has comitted some changes because of 64 bits proc and specially added CPHYSADDR macro in resource_init function. Is it really needed to add specific code in setup.c ? Couldn't we modify "virt_to_phys" or "__pa" instead of ?

I think we should get ride of this CPHYSADDR macro if it's possible.

Thanks for your answers.

Franck

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw

Hi Thiemo

Quoted 6 lines · Thiemo Seufer

That place in setup.c _had_ virt_to_phys before. It fails to build for 64bit code in 32bit objects with reasonably modern toolchains (which means all 64bit kernels currently supported in CVS).

yes, but can't we modify "virt_to_phys" or "__pa" directly instead of adding some new uses of CPHYSADDR in setup.c

thanks,

Franck

#3 lore raw
Quoted 10 lines · Franck Bui-Huu

Hi Thiemo

Quoted 4 lines · Thiemo Seufer

That place in setup.c _had_ virt_to_phys before. It fails to build for 64bit code in 32bit objects with reasonably modern toolchains (which means all 64bit kernels currently supported in CVS).

yes, but can't we modify "virt_to_phys" or "__pa" directly instead of adding some new uses of CPHYSADDR in setup.c

We shouldn't. virt_to_phys accepts typesafe addresses, while CPHYSADDR only juggles the bits of an unsigned long around. Degrading virt_to_phys to the standard of CPHYSADDR isn't an improvement.

Thiemo