Skip to contentSkip to conversation

Export swapper_space

PATCH Russell King 3 participants 5 messages Jun 3, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

swapper_space appears to be needed by modules:

Building modules, stage 2.
MODPOST
*** Warning: "swapper_space" [drivers/block/loop.ko] undefined! *** Warning: "swapper_space" [drivers/scsi/st.ko] undefined! *** Warning: "swapper_space" [drivers/scsi/sg.ko] undefined!

mm/swap_state.c +2 -1
@@ -6,7 +6,7 @@
  *
  *  Rewritten to use page cache, (C) 1998 Stephen Tweedie
  */
-
+#include <linux/module.h>
 #include <linux/mm.h>
 #include <linux/kernel_stat.h>
 #include <linux/swap.h>
@@ -38,6 +38,7 @@ struct address_space swapper_space = {
 	.a_ops		= &swap_aops,
 	.backing_dev_info = &swap_backing_dev_info,
 };
+EXPORT_SYMBOL(swapper_space);
 
 #define INC_CACHE_INFO(x)	do { swap_cache_info.x++; } while (0)
 
Signature · 4 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core
#1 lore raw
Quoted 7 lines · Russell King

swapper_space appears to be needed by modules:

Building modules, stage 2.
MODPOST
*** Warning: "swapper_space" [drivers/block/loop.ko] undefined! *** Warning: "swapper_space" [drivers/scsi/st.ko] undefined! *** Warning: "swapper_space" [drivers/scsi/sg.ko] undefined!

Please not. This seems to be some cache-flushing magic on the stranger architectures again :) Can you check how they're using it in the end and hopefully fix it by uninlining something?

#2 lore raw
Quoted 9 lines · Christoph Hellwig
Quoted 7 lines · Russell King

swapper_space appears to be needed by modules:

Building modules, stage 2.
MODPOST
*** Warning: "swapper_space" [drivers/block/loop.ko] undefined! *** Warning: "swapper_space" [drivers/scsi/st.ko] undefined! *** Warning: "swapper_space" [drivers/scsi/sg.ko] undefined!

Quoted 3 lines

Please not. This seems to be some cache-flushing magic on the stranger architectures again :) Can you check how they're using it in the end and hopefully fix it by uninlining something?

extern struct address_space swapper_space;
static inline struct address_space *page_mapping(struct page *page)

{
        struct address_space *mapping = NULL;
 
        if (unlikely(PageSwapCache(page)))
                mapping = &swapper_space;
        else if (likely(!PageAnon(page)))
                mapping = page->mapping;
        return mapping;
}

I'll leave that for someone else to sort out.

Signature · 4 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core
#3 lore raw
Quoted 15 lines · Russell King
Quoted 4 lines

Please not. This seems to be some cache-flushing magic on the stranger architectures again :) Can you check how they're using it in the end and hopefully fix it by uninlining something?

extern struct address_space swapper_space;
static inline struct address_space *page_mapping(struct page *page)

 {
         struct address_space *mapping = NULL;
  
         if (unlikely(PageSwapCache(page)))
                 mapping = &swapper_space;
         else if (likely(!PageAnon(page)))
                 mapping = page->mapping;
         return mapping;
Quoted 1 line

}

Christoph means "can arm uninline flush_dcache_page()"?

It looks like that would be the best approach - it's quite a large function.

#4 lore raw
Quoted 3 lines · Andrew Morton

Christoph means "can arm uninline flush_dcache_page()"?

It looks like that would be the best approach - it's quite a large function.

Grumble. We could, though I didn't expect it to become a large function... I guess the bloat monster has been fed again. ;(

Signature · 4 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core