Re: [-mm patch] mm.h: fix page_zone compile error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 12, 2005 at 03:09:37PM -0700, Dave Hansen wrote:
> On Thu, 2005-05-12 at 23:42 +0200, Adrian Bunk wrote:
> > On Thu, May 12, 2005 at 03:31:00AM -0700, Andrew Morton wrote:
> > >...
> > > Changes since 2.6.12-rc3-mm3:
> > >...
> > > +sparsemem-memory-model.patch
> > >...
> > >  More sparsemem stuff
> > >...
> >
> > This causes the following compile error with gcc 3.4 on i386:
> > 
> > <--  snip  -->
> > 
> > ...
> >   CC      mm/hugetlb.o
> > mm/hugetlb.c: In function `enqueue_huge_page':
> > include/linux/mm.h:500: sorry, unimplemented: inlining failed in call to 
> > 'page_zone': function not considered for inlining
> > mm/hugetlb.c:486: sorry, unimplemented: called from here
> > make[1]: *** [mm/hugetlb.o] Error 1
> > make: *** [mm] Error 2
> 
> Any idea what actually causes that?
> 
> BTW, it doesn't seem to happen with gcc 2.95.  Can you send me
> your .config?  I'll double-check.

You won't see this error with gcc < 3.4 .

The kernel redefines "inline" to __attribute__((always_inline)).
That's why gcc 3.4 (correctly) aborts the compilation if it can't inline 
it.

gcc 3.4 isn't able to inline a function that wasn't defined before the 
first usage with -fno-unit-at-a-time (and we are currently giving this 
flag on i386).
That's the reason why a function prototype for a "static inline" 
function doesn't help you.

I can send you my .config if these explanations weren't enough.

> -- Dave

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux