summaryrefslogtreecommitdiff
path: root/ANDROID_3.4.5/include/linux/decompress/mm.h
diff options
context:
space:
mode:
authorSrikant Patnaik2015-01-11 12:28:04 +0530
committerSrikant Patnaik2015-01-11 12:28:04 +0530
commit871480933a1c28f8a9fed4c4d34d06c439a7a422 (patch)
tree8718f573808810c2a1e8cb8fb6ac469093ca2784 /ANDROID_3.4.5/include/linux/decompress/mm.h
parent9d40ac5867b9aefe0722bc1f110b965ff294d30d (diff)
downloadFOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.gz
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.tar.bz2
FOSSEE-netbook-kernel-source-871480933a1c28f8a9fed4c4d34d06c439a7a422.zip
Moved, renamed, and deleted files
The original directory structure was scattered and unorganized. Changes are basically to make it look like kernel structure.
Diffstat (limited to 'ANDROID_3.4.5/include/linux/decompress/mm.h')
-rw-r--r--ANDROID_3.4.5/include/linux/decompress/mm.h93
1 files changed, 0 insertions, 93 deletions
diff --git a/ANDROID_3.4.5/include/linux/decompress/mm.h b/ANDROID_3.4.5/include/linux/decompress/mm.h
deleted file mode 100644
index 7925bf0e..00000000
--- a/ANDROID_3.4.5/include/linux/decompress/mm.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * linux/compr_mm.h
- *
- * Memory management for pre-boot and ramdisk uncompressors
- *
- * Authors: Alain Knaff <alain@knaff.lu>
- *
- */
-
-#ifndef DECOMPR_MM_H
-#define DECOMPR_MM_H
-
-#ifdef STATIC
-
-/* Code active when included from pre-boot environment: */
-
-/*
- * Some architectures want to ensure there is no local data in their
- * pre-boot environment, so that data can arbitrarily relocated (via
- * GOT references). This is achieved by defining STATIC_RW_DATA to
- * be null.
- */
-#ifndef STATIC_RW_DATA
-#define STATIC_RW_DATA static
-#endif
-
-/* A trivial malloc implementation, adapted from
- * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
- */
-STATIC_RW_DATA unsigned long malloc_ptr;
-STATIC_RW_DATA int malloc_count;
-
-static void *malloc(int size)
-{
- void *p;
-
- if (size < 0)
- return NULL;
- if (!malloc_ptr)
- malloc_ptr = free_mem_ptr;
-
- malloc_ptr = (malloc_ptr + 3) & ~3; /* Align */
-
- p = (void *)malloc_ptr;
- malloc_ptr += size;
-
- if (free_mem_end_ptr && malloc_ptr >= free_mem_end_ptr)
- return NULL;
-
- malloc_count++;
- return p;
-}
-
-static void free(void *where)
-{
- malloc_count--;
- if (!malloc_count)
- malloc_ptr = free_mem_ptr;
-}
-
-#define large_malloc(a) malloc(a)
-#define large_free(a) free(a)
-
-#define INIT
-
-#else /* STATIC */
-
-/* Code active when compiled standalone for use when loading ramdisk: */
-
-#include <linux/kernel.h>
-#include <linux/fs.h>
-#include <linux/string.h>
-#include <linux/slab.h>
-#include <linux/vmalloc.h>
-
-/* Use defines rather than static inline in order to avoid spurious
- * warnings when not needed (indeed large_malloc / large_free are not
- * needed by inflate */
-
-#define malloc(a) kmalloc(a, GFP_KERNEL)
-#define free(a) kfree(a)
-
-#define large_malloc(a) vmalloc(a)
-#define large_free(a) vfree(a)
-
-#define INIT __init
-#define STATIC
-
-#include <linux/init.h>
-
-#endif /* STATIC */
-
-#endif /* DECOMPR_MM_H */