diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 22:11:50 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 22:11:50 -0500 |
| commit | 3aacd625f20129f5a41ea3ff3b5353b0e4dabd01 (patch) | |
| tree | 7cf4ea65397f80098b30494df31cfc8f5fa26d63 /include/asm-generic | |
| parent | 7e21774db5cc9cf8fe93a64a2f0c6cf47db8ab24 (diff) | |
| parent | 2a1d689c9ba42a6066540fb221b6ecbd6298b728 (diff) | |
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
...
Diffstat (limited to 'include/asm-generic')
| -rw-r--r-- | include/asm-generic/fixmap.h | 97 | ||||
| -rw-r--r-- | include/asm-generic/int-l64.h | 49 |
2 files changed, 97 insertions, 49 deletions
diff --git a/include/asm-generic/fixmap.h b/include/asm-generic/fixmap.h new file mode 100644 index 000000000000..5a64ca4621f3 --- /dev/null +++ b/include/asm-generic/fixmap.h | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | /* | ||
| 2 | * fixmap.h: compile-time virtual memory allocation | ||
| 3 | * | ||
| 4 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 5 | * License. See the file "COPYING" in the main directory of this archive | ||
| 6 | * for more details. | ||
| 7 | * | ||
| 8 | * Copyright (C) 1998 Ingo Molnar | ||
| 9 | * | ||
| 10 | * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999 | ||
| 11 | * x86_32 and x86_64 integration by Gustavo F. Padovan, February 2009 | ||
| 12 | * Break out common bits to asm-generic by Mark Salter, November 2013 | ||
| 13 | */ | ||
| 14 | |||
| 15 | #ifndef __ASM_GENERIC_FIXMAP_H | ||
| 16 | #define __ASM_GENERIC_FIXMAP_H | ||
| 17 | |||
| 18 | #include <linux/bug.h> | ||
| 19 | |||
| 20 | #define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT)) | ||
| 21 | #define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT) | ||
| 22 | |||
| 23 | #ifndef __ASSEMBLY__ | ||
| 24 | /* | ||
| 25 | * 'index to address' translation. If anyone tries to use the idx | ||
| 26 | * directly without translation, we catch the bug with a NULL-deference | ||
| 27 | * kernel oops. Illegal ranges of incoming indices are caught too. | ||
| 28 | */ | ||
| 29 | static __always_inline unsigned long fix_to_virt(const unsigned int idx) | ||
| 30 | { | ||
| 31 | BUILD_BUG_ON(idx >= __end_of_fixed_addresses); | ||
| 32 | return __fix_to_virt(idx); | ||
| 33 | } | ||
| 34 | |||
| 35 | static inline unsigned long virt_to_fix(const unsigned long vaddr) | ||
| 36 | { | ||
| 37 | BUG_ON(vaddr >= FIXADDR_TOP || vaddr < FIXADDR_START); | ||
| 38 | return __virt_to_fix(vaddr); | ||
| 39 | } | ||
| 40 | |||
| 41 | /* | ||
| 42 | * Provide some reasonable defaults for page flags. | ||
| 43 | * Not all architectures use all of these different types and some | ||
| 44 | * architectures use different names. | ||
| 45 | */ | ||
| 46 | #ifndef FIXMAP_PAGE_NORMAL | ||
| 47 | #define FIXMAP_PAGE_NORMAL PAGE_KERNEL | ||
| 48 | #endif | ||
| 49 | #ifndef FIXMAP_PAGE_NOCACHE | ||
| 50 | #define FIXMAP_PAGE_NOCACHE PAGE_KERNEL_NOCACHE | ||
| 51 | #endif | ||
| 52 | #ifndef FIXMAP_PAGE_IO | ||
| 53 | #define FIXMAP_PAGE_IO PAGE_KERNEL_IO | ||
| 54 | #endif | ||
| 55 | #ifndef FIXMAP_PAGE_CLEAR | ||
| 56 | #define FIXMAP_PAGE_CLEAR __pgprot(0) | ||
| 57 | #endif | ||
| 58 | |||
| 59 | #ifndef set_fixmap | ||
| 60 | #define set_fixmap(idx, phys) \ | ||
| 61 | __set_fixmap(idx, phys, FIXMAP_PAGE_NORMAL) | ||
| 62 | #endif | ||
| 63 | |||
| 64 | #ifndef clear_fixmap | ||
| 65 | #define clear_fixmap(idx) \ | ||
| 66 | __set_fixmap(idx, 0, FIXMAP_PAGE_CLEAR) | ||
| 67 | #endif | ||
| 68 | |||
| 69 | /* Return a pointer with offset calculated */ | ||
| 70 | #define __set_fixmap_offset(idx, phys, flags) \ | ||
| 71 | ({ \ | ||
| 72 | unsigned long addr; \ | ||
| 73 | __set_fixmap(idx, phys, flags); \ | ||
| 74 | addr = fix_to_virt(idx) + ((phys) & (PAGE_SIZE - 1)); \ | ||
| 75 | addr; \ | ||
| 76 | }) | ||
| 77 | |||
| 78 | #define set_fixmap_offset(idx, phys) \ | ||
| 79 | __set_fixmap_offset(idx, phys, FIXMAP_PAGE_NORMAL) | ||
| 80 | |||
| 81 | /* | ||
| 82 | * Some hardware wants to get fixmapped without caching. | ||
| 83 | */ | ||
| 84 | #define set_fixmap_nocache(idx, phys) \ | ||
| 85 | __set_fixmap(idx, phys, FIXMAP_PAGE_NOCACHE) | ||
| 86 | |||
| 87 | #define set_fixmap_offset_nocache(idx, phys) \ | ||
| 88 | __set_fixmap_offset(idx, phys, FIXMAP_PAGE_NOCACHE) | ||
| 89 | |||
| 90 | /* | ||
| 91 | * Some fixmaps are for IO | ||
| 92 | */ | ||
| 93 | #define set_fixmap_io(idx, phys) \ | ||
| 94 | __set_fixmap(idx, phys, FIXMAP_PAGE_IO) | ||
| 95 | |||
| 96 | #endif /* __ASSEMBLY__ */ | ||
| 97 | #endif /* __ASM_GENERIC_FIXMAP_H */ | ||
diff --git a/include/asm-generic/int-l64.h b/include/asm-generic/int-l64.h deleted file mode 100644 index 27d4ec0dfce0..000000000000 --- a/include/asm-generic/int-l64.h +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * asm-generic/int-l64.h | ||
| 3 | * | ||
| 4 | * Integer declarations for architectures which use "long" | ||
| 5 | * for 64-bit types. | ||
| 6 | */ | ||
| 7 | #ifndef _ASM_GENERIC_INT_L64_H | ||
| 8 | #define _ASM_GENERIC_INT_L64_H | ||
| 9 | |||
| 10 | #include <uapi/asm-generic/int-l64.h> | ||
| 11 | |||
| 12 | |||
| 13 | #ifndef __ASSEMBLY__ | ||
| 14 | |||
| 15 | typedef signed char s8; | ||
| 16 | typedef unsigned char u8; | ||
| 17 | |||
| 18 | typedef signed short s16; | ||
| 19 | typedef unsigned short u16; | ||
| 20 | |||
| 21 | typedef signed int s32; | ||
| 22 | typedef unsigned int u32; | ||
| 23 | |||
| 24 | typedef signed long s64; | ||
| 25 | typedef unsigned long u64; | ||
| 26 | |||
| 27 | #define S8_C(x) x | ||
| 28 | #define U8_C(x) x ## U | ||
| 29 | #define S16_C(x) x | ||
| 30 | #define U16_C(x) x ## U | ||
| 31 | #define S32_C(x) x | ||
| 32 | #define U32_C(x) x ## U | ||
| 33 | #define S64_C(x) x ## L | ||
| 34 | #define U64_C(x) x ## UL | ||
| 35 | |||
| 36 | #else /* __ASSEMBLY__ */ | ||
| 37 | |||
| 38 | #define S8_C(x) x | ||
| 39 | #define U8_C(x) x | ||
| 40 | #define S16_C(x) x | ||
| 41 | #define U16_C(x) x | ||
| 42 | #define S32_C(x) x | ||
| 43 | #define U32_C(x) x | ||
| 44 | #define S64_C(x) x | ||
| 45 | #define U64_C(x) x | ||
| 46 | |||
| 47 | #endif /* __ASSEMBLY__ */ | ||
| 48 | |||
| 49 | #endif /* _ASM_GENERIC_INT_L64_H */ | ||
