mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
Merge branch 'akpm' (incoming from Andrew)
Merge second patch-bomb from Andrew Morton: - various misc bits - the rest of MM - add generic fixmap.h, use it - backlight updates - dynamic_debug updates - printk() updates - checkpatch updates - binfmt_elf - ramfs - init/ - autofs4 - drivers/rtc - nilfs - hfsplus - Documentation/ - coredump - procfs - fork - exec - kexec - kdump - partitions - rapidio - rbtree - userns - memstick - w1 - decompressors * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (197 commits) lib/decompress_unlz4.c: always set an error return code on failures romfs: fix returm err while getting inode in fill_super drivers/w1/masters/w1-gpio.c: add strong pullup emulation drivers/memstick/host/rtsx_pci_ms.c: fix ms card data transfer bug userns: relax the posix_acl_valid() checks arch/sh/kernel/dwarf.c: use rbtree postorder iteration helper instead of solution using repeated rb_erase() fs-ext3-use-rbtree-postorder-iteration-helper-instead-of-opencoding-fix fs/ext3: use rbtree postorder iteration helper instead of opencoding fs/jffs2: use rbtree postorder iteration helper instead of opencoding fs/ext4: use rbtree postorder iteration helper instead of opencoding fs/ubifs: use rbtree postorder iteration helper instead of opencoding net/netfilter/ipset/ip_set_hash_netiface.c: use rbtree postorder iteration instead of opencoding rbtree/test: test rbtree_postorder_for_each_entry_safe() rbtree/test: move rb_node to the middle of the test struct rapidio: add modular rapidio core build into powerpc and mips branches partitions/efi: complete documentation of gpt kernel param purpose kdump: add /sys/kernel/vmcoreinfo ABI documentation kdump: fix exported size of vmcoreinfo note kexec: add sysctl to disable kexec_load fs/exec.c: call arch_pick_mmap_layout() only once ...
This commit is contained in:
commit
3aacd625f2
231 changed files with 3339 additions and 2187 deletions
97
include/asm-generic/fixmap.h
Normal file
97
include/asm-generic/fixmap.h
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* fixmap.h: compile-time virtual memory allocation
|
||||
*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 1998 Ingo Molnar
|
||||
*
|
||||
* Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999
|
||||
* x86_32 and x86_64 integration by Gustavo F. Padovan, February 2009
|
||||
* Break out common bits to asm-generic by Mark Salter, November 2013
|
||||
*/
|
||||
|
||||
#ifndef __ASM_GENERIC_FIXMAP_H
|
||||
#define __ASM_GENERIC_FIXMAP_H
|
||||
|
||||
#include <linux/bug.h>
|
||||
|
||||
#define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT))
|
||||
#define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
/*
|
||||
* 'index to address' translation. If anyone tries to use the idx
|
||||
* directly without translation, we catch the bug with a NULL-deference
|
||||
* kernel oops. Illegal ranges of incoming indices are caught too.
|
||||
*/
|
||||
static __always_inline unsigned long fix_to_virt(const unsigned int idx)
|
||||
{
|
||||
BUILD_BUG_ON(idx >= __end_of_fixed_addresses);
|
||||
return __fix_to_virt(idx);
|
||||
}
|
||||
|
||||
static inline unsigned long virt_to_fix(const unsigned long vaddr)
|
||||
{
|
||||
BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START);
|
||||
return __virt_to_fix(vaddr);
|
||||
}
|
||||
|
||||
/*
|
||||
* Provide some reasonable defaults for page flags.
|
||||
* Not all architectures use all of these different types and some
|
||||
* architectures use different names.
|
||||
*/
|
||||
#ifndef FIXMAP_PAGE_NORMAL
|
||||
#define FIXMAP_PAGE_NORMAL PAGE_KERNEL
|
||||
#endif
|
||||
#ifndef FIXMAP_PAGE_NOCACHE
|
||||
#define FIXMAP_PAGE_NOCACHE PAGE_KERNEL_NOCACHE
|
||||
#endif
|
||||
#ifndef FIXMAP_PAGE_IO
|
||||
#define FIXMAP_PAGE_IO PAGE_KERNEL_IO
|
||||
#endif
|
||||
#ifndef FIXMAP_PAGE_CLEAR
|
||||
#define FIXMAP_PAGE_CLEAR __pgprot(0)
|
||||
#endif
|
||||
|
||||
#ifndef set_fixmap
|
||||
#define set_fixmap(idx, phys) \
|
||||
__set_fixmap(idx, phys, FIXMAP_PAGE_NORMAL)
|
||||
#endif
|
||||
|
||||
#ifndef clear_fixmap
|
||||
#define clear_fixmap(idx) \
|
||||
__set_fixmap(idx, 0, FIXMAP_PAGE_CLEAR)
|
||||
#endif
|
||||
|
||||
/* Return a pointer with offset calculated */
|
||||
#define __set_fixmap_offset(idx, phys, flags) \
|
||||
({ \
|
||||
unsigned long addr; \
|
||||
__set_fixmap(idx, phys, flags); \
|
||||
addr = fix_to_virt(idx) + ((phys) & (PAGE_SIZE - 1)); \
|
||||
addr; \
|
||||
})
|
||||
|
||||
#define set_fixmap_offset(idx, phys) \
|
||||
__set_fixmap_offset(idx, phys, FIXMAP_PAGE_NORMAL)
|
||||
|
||||
/*
|
||||
* Some hardware wants to get fixmapped without caching.
|
||||
*/
|
||||
#define set_fixmap_nocache(idx, phys) \
|
||||
__set_fixmap(idx, phys, FIXMAP_PAGE_NOCACHE)
|
||||
|
||||
#define set_fixmap_offset_nocache(idx, phys) \
|
||||
__set_fixmap_offset(idx, phys, FIXMAP_PAGE_NOCACHE)
|
||||
|
||||
/*
|
||||
* Some fixmaps are for IO
|
||||
*/
|
||||
#define set_fixmap_io(idx, phys) \
|
||||
__set_fixmap(idx, phys, FIXMAP_PAGE_IO)
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __ASM_GENERIC_FIXMAP_H */
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
/*
|
||||
* asm-generic/int-l64.h
|
||||
*
|
||||
* Integer declarations for architectures which use "long"
|
||||
* for 64-bit types.
|
||||
*/
|
||||
#ifndef _ASM_GENERIC_INT_L64_H
|
||||
#define _ASM_GENERIC_INT_L64_H
|
||||
|
||||
#include <uapi/asm-generic/int-l64.h>
|
||||
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
typedef signed char s8;
|
||||
typedef unsigned char u8;
|
||||
|
||||
typedef signed short s16;
|
||||
typedef unsigned short u16;
|
||||
|
||||
typedef signed int s32;
|
||||
typedef unsigned int u32;
|
||||
|
||||
typedef signed long s64;
|
||||
typedef unsigned long u64;
|
||||
|
||||
#define S8_C(x) x
|
||||
#define U8_C(x) x ## U
|
||||
#define S16_C(x) x
|
||||
#define U16_C(x) x ## U
|
||||
#define S32_C(x) x
|
||||
#define U32_C(x) x ## U
|
||||
#define S64_C(x) x ## L
|
||||
#define U64_C(x) x ## UL
|
||||
|
||||
#else /* __ASSEMBLY__ */
|
||||
|
||||
#define S8_C(x) x
|
||||
#define U8_C(x) x
|
||||
#define S16_C(x) x
|
||||
#define U16_C(x) x
|
||||
#define S32_C(x) x
|
||||
#define U32_C(x) x
|
||||
#define S64_C(x) x
|
||||
#define U64_C(x) x
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* _ASM_GENERIC_INT_L64_H */
|
||||
Loading…
Reference in a new issue