diff options
author | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2017-06-01 13:53:55 -0400 |
commit | 05e97a9eda72d58dba293857df6aac62584ef99a (patch) | |
tree | e86e692f26d4879ff2210c54722e2b7780210249 /arch/powerpc/include/asm | |
parent | 2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff) | |
parent | d4ed3b9015b5eebc90d629579d9e7944607cbae5 (diff) |
Merge tag 'nand/fixes-for-4.12-rc3' of git://git.infradead.org/linux-mtd into MTD
From Boris:
"""
This pull request contains several fixes to the core and the tango
driver.
tango fixes:
* Add missing MODULE_DEVICE_TABLE() in tango_nand.c
* Update the number of corrected bitflips
core fixes:
* Fix a long standing memory leak in nand_scan_tail()
* Fix several bugs introduced by the per-vendor init/detection
infrastructure (introduced in 4.12)
* Add a static specifier to nand_ooblayout_lp_hamming_ops definition
"""
Diffstat (limited to 'arch/powerpc/include/asm')
-rw-r--r-- | arch/powerpc/include/asm/module.h | 4 | ||||
-rw-r--r-- | arch/powerpc/include/asm/page.h | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/module.h b/arch/powerpc/include/asm/module.h index 53885512b8d3..6c0132c7212f 100644 --- a/arch/powerpc/include/asm/module.h +++ b/arch/powerpc/include/asm/module.h | |||
@@ -14,6 +14,10 @@ | |||
14 | #include <asm-generic/module.h> | 14 | #include <asm-generic/module.h> |
15 | 15 | ||
16 | 16 | ||
17 | #ifdef CC_USING_MPROFILE_KERNEL | ||
18 | #define MODULE_ARCH_VERMAGIC "mprofile-kernel" | ||
19 | #endif | ||
20 | |||
17 | #ifndef __powerpc64__ | 21 | #ifndef __powerpc64__ |
18 | /* | 22 | /* |
19 | * Thanks to Paul M for explaining this. | 23 | * Thanks to Paul M for explaining this. |
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h index 2a32483c7b6c..8da5d4c1cab2 100644 --- a/arch/powerpc/include/asm/page.h +++ b/arch/powerpc/include/asm/page.h | |||
@@ -132,7 +132,19 @@ extern long long virt_phys_offset; | |||
132 | #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) | 132 | #define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT) |
133 | #define virt_to_page(kaddr) pfn_to_page(virt_to_pfn(kaddr)) | 133 | #define virt_to_page(kaddr) pfn_to_page(virt_to_pfn(kaddr)) |
134 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) | 134 | #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) |
135 | |||
136 | #ifdef CONFIG_PPC_BOOK3S_64 | ||
137 | /* | ||
138 | * On hash the vmalloc and other regions alias to the kernel region when passed | ||
139 | * through __pa(), which virt_to_pfn() uses. That means virt_addr_valid() can | ||
140 | * return true for some vmalloc addresses, which is incorrect. So explicitly | ||
141 | * check that the address is in the kernel region. | ||
142 | */ | ||
143 | #define virt_addr_valid(kaddr) (REGION_ID(kaddr) == KERNEL_REGION_ID && \ | ||
144 | pfn_valid(virt_to_pfn(kaddr))) | ||
145 | #else | ||
135 | #define virt_addr_valid(kaddr) pfn_valid(virt_to_pfn(kaddr)) | 146 | #define virt_addr_valid(kaddr) pfn_valid(virt_to_pfn(kaddr)) |
147 | #endif | ||
136 | 148 | ||
137 | /* | 149 | /* |
138 | * On Book-E parts we need __va to parse the device tree and we can't | 150 | * On Book-E parts we need __va to parse the device tree and we can't |