linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pte_alloc_kernel parameters
@ 2005-12-15 14:53 Jan Beulich
  2005-12-16 21:05 ` Hugh Dickins
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Beulich @ 2005-12-15 14:53 UTC (permalink / raw)
  To: linux-kernel

Is there any particular reason why pte_alloc_kernel() has to have
'struct mm_struct*' as its first parameter? Except for a case in parisc
(where NULL gets passed) and another (ill-looking one) in arm26 it is
always &init_mm, and since the function is not inline the compiler can't
eliminate the needless passing of the argument.

Thanks, Jan

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: pte_alloc_kernel parameters
  2005-12-15 14:53 pte_alloc_kernel parameters Jan Beulich
@ 2005-12-16 21:05 ` Hugh Dickins
  0 siblings, 0 replies; 2+ messages in thread
From: Hugh Dickins @ 2005-12-16 21:05 UTC (permalink / raw)
  To: Jan Beulich; +Cc: linux-kernel

On Thu, 15 Dec 2005, Jan Beulich wrote:
> Is there any particular reason why pte_alloc_kernel() has to have
> 'struct mm_struct*' as its first parameter? Except for a case in parisc
> (where NULL gets passed) and another (ill-looking one) in arm26 it is
> always &init_mm, and since the function is not inline the compiler can't
> eliminate the needless passing of the argument.

You're looking at old source: it's gone in 2.6.15-rc.  There was a point
to it before 2.6.13 - arch/ppc64 used it on its ioremap_mm too, but has
since amalgamated that into init_mm.  I removed the arg in 2.6.15-rc,
not really as an optimization, more to force a build error on mismatch
when making a change to the locking there.

Hugh

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-16 21:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-15 14:53 pte_alloc_kernel parameters Jan Beulich
2005-12-16 21:05 ` Hugh Dickins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).