lkml.org 
[lkml]   [1998]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: x86 memsize > 1Gb patches.
On Mon, Mar 16, 1998 at 10:07:05PM +0100, Pavel Machek wrote:

> > > According to Martin Mares:
> > > > Functions such as phys_to_virt et. al. are going to be horribly broken when
> > > > we compile modules with a different CONFIG_MAX_MEMSIZE
> > >
> > > Perhaps the link name of such functions should have the value of C_M_M
> > > appended. Thus, phys_to_virt would link as phys_to_virt_1024.
> >
> > What about just not inlining it anymore ;-)
>
> Bad idea, phys_to_virt(x) translates to (PAGE_OFFSET | x). You do not
> want call overhead on single instruction. (Which is probably exactly
> as long as call instruction).

Do the calculation using inline assembler, collect the addresses of the
add instructions in a special ELF section. Patch the add instructions
on startup and free the section.

Ralf

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.041 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site