提交 ae81a76e 编写于 作者: C Christoph Hellwig 提交者: Yang Yingliang

mm: remove __get_vm_area

mainline inclusion
from mainline-v5.8-rc1
commit 49266277
category: feature
bugzilla: NA
CVE: NA

---------------------------

Switch the two remaining callers to use __get_vm_area_caller instead.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Acked-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>
Cc: Gao Xiang <xiang@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Michael Kelley <mikelley@microsoft.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Wei Liu <wei.liu@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Paul Mackerras <paulus@ozlabs.org>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Cc: Will Deacon <will@kernel.org>
Link: http://lkml.kernel.org/r/20200414131348.444715-9-hch@lst.deSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: NRui Xiang <rui.xiang@huawei.com>
Reviewed-by: NDing Tianhong <dingtianhong@huawei.com>
Reviewed-by: NZefan Li <lizefan@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 907e1221
...@@ -144,7 +144,8 @@ static int pcibios_map_phb_io_space(struct pci_controller *hose) ...@@ -144,7 +144,8 @@ static int pcibios_map_phb_io_space(struct pci_controller *hose)
* with incomplete address decoding but I'd rather not deal with * with incomplete address decoding but I'd rather not deal with
* those outside of the reserved 64K legacy region. * those outside of the reserved 64K legacy region.
*/ */
area = __get_vm_area(size_page, 0, PHB_IO_BASE, PHB_IO_END); area = __get_vm_area_caller(size_page, 0, PHB_IO_BASE, PHB_IO_END,
__builtin_return_address(0));
if (area == NULL) if (area == NULL)
return -ENOMEM; return -ENOMEM;
hose->io_base_alloc = area->addr; hose->io_base_alloc = area->addr;
......
...@@ -106,7 +106,8 @@ static int __sq_remap(struct sq_mapping *map, pgprot_t prot) ...@@ -106,7 +106,8 @@ static int __sq_remap(struct sq_mapping *map, pgprot_t prot)
#if defined(CONFIG_MMU) #if defined(CONFIG_MMU)
struct vm_struct *vma; struct vm_struct *vma;
vma = __get_vm_area(map->size, VM_ALLOC, map->sq_addr, SQ_ADDRMAX); vma = __get_vm_area_caller(map->size, VM_ALLOC, map->sq_addr,
SQ_ADDRMAX, __builtin_return_address(0));
if (!vma) if (!vma)
return -ENOMEM; return -ENOMEM;
......
...@@ -133,8 +133,6 @@ static inline size_t get_vm_area_size(const struct vm_struct *area) ...@@ -133,8 +133,6 @@ static inline size_t get_vm_area_size(const struct vm_struct *area)
extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags); extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags);
extern struct vm_struct *get_vm_area_caller(unsigned long size, extern struct vm_struct *get_vm_area_caller(unsigned long size,
unsigned long flags, const void *caller); unsigned long flags, const void *caller);
extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags,
unsigned long start, unsigned long end);
extern struct vm_struct *__get_vm_area_caller(unsigned long size, extern struct vm_struct *__get_vm_area_caller(unsigned long size,
unsigned long flags, unsigned long flags,
unsigned long start, unsigned long end, unsigned long start, unsigned long end,
......
...@@ -2000,14 +2000,6 @@ static struct vm_struct *__get_vm_area_node(unsigned long size, ...@@ -2000,14 +2000,6 @@ static struct vm_struct *__get_vm_area_node(unsigned long size,
return area; return area;
} }
struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags,
unsigned long start, unsigned long end)
{
return __get_vm_area_node(size, 1, flags, start, end, NUMA_NO_NODE,
GFP_KERNEL, __builtin_return_address(0));
}
EXPORT_SYMBOL_GPL(__get_vm_area);
struct vm_struct *__get_vm_area_caller(unsigned long size, unsigned long flags, struct vm_struct *__get_vm_area_caller(unsigned long size, unsigned long flags,
unsigned long start, unsigned long end, unsigned long start, unsigned long end,
const void *caller) const void *caller)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册