]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: zsmalloc: Fix link error on ARM
authorJoerg Roedel <joro@8bytes.org>
Wed, 27 Mar 2013 00:43:14 +0000 (01:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 May 2013 03:08:16 +0000 (20:08 -0700)
commit d95abbbb291bf5bce078148f53603ce9c0aa1d44 upstream.

Testing the arm chromebook config against the upstream
kernel produces a linker error for the zsmalloc module from
staging. The symbol flush_tlb_kernel_range is not available
there. Fix this by removing the reimplementation of
unmap_kernel_range in the zsmalloc module and using the
function directly. The unmap_kernel_range function is not
usable by modules, so also disallow building the driver as a
module for now.

Signed-off-by: Joerg Roedel <joro@8bytes.org>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/zsmalloc/Kconfig
drivers/staging/zsmalloc/zsmalloc-main.c

index 908456565796770c44065eb432622071bf8cbcf2..7fab032298f33986cd55b518d3db60eebadb4d9b 100644 (file)
@@ -1,5 +1,5 @@
 config ZSMALLOC
-       tristate "Memory allocator for compressed pages"
+       bool "Memory allocator for compressed pages"
        default n
        help
          zsmalloc is a slab-based memory allocator designed to store
index 223c7361cf9787bc52bdc42bf7689b5bdb391ca5..851a2fff3705c7f3079ff57e27ea50fb1f93b377 100644 (file)
@@ -657,11 +657,8 @@ static inline void __zs_unmap_object(struct mapping_area *area,
                                struct page *pages[2], int off, int size)
 {
        unsigned long addr = (unsigned long)area->vm_addr;
-       unsigned long end = addr + (PAGE_SIZE * 2);
 
-       flush_cache_vunmap(addr, end);
-       unmap_kernel_range_noflush(addr, PAGE_SIZE * 2);
-       flush_tlb_kernel_range(addr, end);
+       unmap_kernel_range(addr, PAGE_SIZE * 2);
 }
 
 #else /* USE_PGTABLE_MAPPING */