11980c2ac4
The anonymous shared memory (ashmem) subsystem provides a Unix-y,file-based shared memory interface to user-space. It works like anonymous memory (e.g. mmapping fd=0) except if you share the file descriptor via the usual means, you will share the mapping. The shared memory can be accessed via both mmap or file I/O. The backing store is a simple shmem file. Additionally, ashmem introduces the concept of page pinning. Pinned pages (the default) behave like any anonymous memory. Unpinned pages are available to the kernel for eviction during VM pressure. When repinning the pages, the return value instructs user-space as to any eviction. In this manner, user-space processes may implement caching and similar resource management that efficiently integrates with kernel memory management. Signed-off-by: Robert Love <rlove@google.com> ashmem: Don't install fault handler for private mmaps. Ashmem is used to create named private heaps. If this heap is backed by a tmpfs file it will allocate two pages for every page touched. In 2.6.27, the extra page would later be freed, but 2.6.29 does not scan anonymous pages when running without swap so the memory is not freed while the file is referenced. This change changes the behavior of private ashmem mmaps to match /dev/zero instead tmpfs. Signed-off-by: Arve Hjønnevåg <arve@android.com> ashmem: Add common prefix to name reported in /proc/pid/maps Signed-off-by: Arve Hjønnevåg <arve@android.com> ashmem: don't require a page aligned size This makes ashmem more similar to shmem and mmap, by not requiring the specified size to be page aligned, instead rounding it internally as needed. Signed-off-by: Marco Nelissen <marcone@android.com> [jstultz: Improved commit subject and included patch description from rlove. Also moved ashmem files to staging dir, and reworked code to avoid touching mm/shmem.c while we're in staging.] CC: Brian Swetland <swetland@google.com> CC: Colin Cross <ccross@android.com> CC: Arve Hjønnevåg <arve@android.com> CC: Dima Zavin <dima@android.com> CC: Robert Love <rlove@google.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
111 lines
2.8 KiB
Text
111 lines
2.8 KiB
Text
menu "Android"
|
|
|
|
config ANDROID
|
|
bool "Android Drivers"
|
|
default N
|
|
---help---
|
|
Enable support for various drivers needed on the Android platform
|
|
|
|
if ANDROID
|
|
|
|
config ANDROID_BINDER_IPC
|
|
bool "Android Binder IPC Driver"
|
|
default n
|
|
|
|
config ASHMEM
|
|
bool "Enable the Anonymous Shared Memory Subsystem"
|
|
default n
|
|
depends on SHMEM || TINY_SHMEM
|
|
help
|
|
The ashmem subsystem is a new shared memory allocator, similar to
|
|
POSIX SHM but with different behavior and sporting a simpler
|
|
file-based API.
|
|
|
|
config ANDROID_LOGGER
|
|
tristate "Android log driver"
|
|
default n
|
|
|
|
config ANDROID_RAM_CONSOLE
|
|
bool "Android RAM buffer console"
|
|
default n
|
|
|
|
config ANDROID_RAM_CONSOLE_ENABLE_VERBOSE
|
|
bool "Enable verbose console messages on Android RAM console"
|
|
default y
|
|
depends on ANDROID_RAM_CONSOLE
|
|
|
|
menuconfig ANDROID_RAM_CONSOLE_ERROR_CORRECTION
|
|
bool "Android RAM Console Enable error correction"
|
|
default n
|
|
depends on ANDROID_RAM_CONSOLE
|
|
depends on !ANDROID_RAM_CONSOLE_EARLY_INIT
|
|
select REED_SOLOMON
|
|
select REED_SOLOMON_ENC8
|
|
select REED_SOLOMON_DEC8
|
|
|
|
if ANDROID_RAM_CONSOLE_ERROR_CORRECTION
|
|
|
|
config ANDROID_RAM_CONSOLE_ERROR_CORRECTION_DATA_SIZE
|
|
int "Android RAM Console Data data size"
|
|
default 128
|
|
help
|
|
Must be a power of 2.
|
|
|
|
config ANDROID_RAM_CONSOLE_ERROR_CORRECTION_ECC_SIZE
|
|
int "Android RAM Console ECC size"
|
|
default 16
|
|
|
|
config ANDROID_RAM_CONSOLE_ERROR_CORRECTION_SYMBOL_SIZE
|
|
int "Android RAM Console Symbol size"
|
|
default 8
|
|
|
|
config ANDROID_RAM_CONSOLE_ERROR_CORRECTION_POLYNOMIAL
|
|
hex "Android RAM Console Polynomial"
|
|
default 0x19 if (ANDROID_RAM_CONSOLE_ERROR_CORRECTION_SYMBOL_SIZE = 4)
|
|
default 0x29 if (ANDROID_RAM_CONSOLE_ERROR_CORRECTION_SYMBOL_SIZE = 5)
|
|
default 0x61 if (ANDROID_RAM_CONSOLE_ERROR_CORRECTION_SYMBOL_SIZE = 6)
|
|
default 0x89 if (ANDROID_RAM_CONSOLE_ERROR_CORRECTION_SYMBOL_SIZE = 7)
|
|
default 0x11d if (ANDROID_RAM_CONSOLE_ERROR_CORRECTION_SYMBOL_SIZE = 8)
|
|
|
|
endif # ANDROID_RAM_CONSOLE_ERROR_CORRECTION
|
|
|
|
config ANDROID_RAM_CONSOLE_EARLY_INIT
|
|
bool "Start Android RAM console early"
|
|
default n
|
|
depends on ANDROID_RAM_CONSOLE
|
|
|
|
config ANDROID_RAM_CONSOLE_EARLY_ADDR
|
|
hex "Android RAM console virtual address"
|
|
default 0
|
|
depends on ANDROID_RAM_CONSOLE_EARLY_INIT
|
|
|
|
config ANDROID_RAM_CONSOLE_EARLY_SIZE
|
|
hex "Android RAM console buffer size"
|
|
default 0
|
|
depends on ANDROID_RAM_CONSOLE_EARLY_INIT
|
|
|
|
config ANDROID_TIMED_OUTPUT
|
|
bool "Timed output class driver"
|
|
default y
|
|
|
|
config ANDROID_TIMED_GPIO
|
|
tristate "Android timed gpio driver"
|
|
depends on GENERIC_GPIO && ANDROID_TIMED_OUTPUT
|
|
default n
|
|
|
|
config ANDROID_LOW_MEMORY_KILLER
|
|
bool "Android Low Memory Killer"
|
|
default N
|
|
---help---
|
|
Register processes to be killed when memory is low
|
|
|
|
config ANDROID_PMEM
|
|
bool "Android pmem allocator"
|
|
depends on ARM
|
|
|
|
source "drivers/staging/android/switch/Kconfig"
|
|
|
|
endif # if ANDROID
|
|
|
|
endmenu
|