mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* only sparc can not include linux/pagemap.h?
@ 2008-03-16 12:22 Geert Uytterhoeven
  2008-03-16 12:47 ` Adrian Bunk
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2008-03-16 12:22 UTC (permalink / raw)
  To: sparclinux; +Cc: Linux/m68k, Linux Kernel Development

When trying to compile a m68k kernel with CONFIG_SWAP=n (e.g. allnoconfig), I'm
bitten by:

    include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
    include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
    include/asm-generic/tlb.h: In function 'tlb_remove_page':
    include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'

because include/linux/swap.h defines free_page_and_swap_cache() and
free_pages_and_swap_cache() to page_cache_release() resp. release_pages()
without including <linux/pagemap.h>.

include/linux/swap.h has a comment that says:

    /* only sparc can not include linux/pagemap.h in this file
     * so leave page_cache_release and release_pages undeclared... */
    #define free_page_and_swap_cache(page) \
	    page_cache_release(page)
    #define free_pages_and_swap_cache(pages, nr) \
	    release_pages((pages), (nr), 0);

Is this comment still true?

If not, I'd like to add

    #include <linux/pagemap.h>

to the !CONFIG_SWAP section of include/linux/swap.h.

If yes, would it be acceptible/work to add

    #ifndef CONFIG_SWAP
    #include <linux/pagemap.h>
    #endif

at the top of include/asm-generic/tlb.h?

Thanks!

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* Re: only sparc can not include linux/pagemap.h?
  2008-03-16 12:22 only sparc can not include linux/pagemap.h? Geert Uytterhoeven
@ 2008-03-16 12:47 ` Adrian Bunk
  0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2008-03-16 12:47 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: sparclinux, Linux/m68k, Linux Kernel Development

On Sun, Mar 16, 2008 at 01:22:22PM +0100, Geert Uytterhoeven wrote:
> When trying to compile a m68k kernel with CONFIG_SWAP=n (e.g. allnoconfig), I'm
> bitten by:
> 
>     include/asm-generic/tlb.h: In function 'tlb_flush_mmu':
>     include/asm-generic/tlb.h:76: error: implicit declaration of function 'release_pages'
>     include/asm-generic/tlb.h: In function 'tlb_remove_page':
>     include/asm-generic/tlb.h:105: error: implicit declaration of function 'page_cache_release'
> 
> because include/linux/swap.h defines free_page_and_swap_cache() and
> free_pages_and_swap_cache() to page_cache_release() resp. release_pages()
> without including <linux/pagemap.h>.
> 
> include/linux/swap.h has a comment that says:
> 
>     /* only sparc can not include linux/pagemap.h in this file
>      * so leave page_cache_release and release_pages undeclared... */
>     #define free_page_and_swap_cache(page) \
> 	    page_cache_release(page)
>     #define free_pages_and_swap_cache(pages, nr) \
> 	    release_pages((pages), (nr), 0);
> 
> Is this comment still true?
>...

Yes, see http://lkml.org/lkml/2008/1/31/268

> Thanks!
> 
> Gr{oetje,eeting}s,
> 
> 						Geert

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


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

end of thread, other threads:[~2008-03-16 12:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-16 12:22 only sparc can not include linux/pagemap.h? Geert Uytterhoeven
2008-03-16 12:47 ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®