Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp533374ybb; Wed, 8 Apr 2020 05:03:08 -0700 (PDT) X-Google-Smtp-Source: APiQypLy4aZRQjeGzJCSRvwWGQwYzeGy4dtfNQDOlxYTGq5Jll27m+n/i4tpq3WBx66CFNHeE0Yl X-Received: by 2002:a05:6830:11d5:: with SMTP id v21mr5402634otq.91.1586347388357; Wed, 08 Apr 2020 05:03:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586347388; cv=none; d=google.com; s=arc-20160816; b=ng4QL6XjXtCHDH7vDVgCMoi1O4xOaS+Il3MyTWPoccz5tkmLO4/X9pIR3RlMSV8sOs fpSSzQNwr5mjT0PKP9HpDo6mDWhUm50kV8/CuJhnCdwyh2YU151eg0RXTFzflanf9Mfe qfmi7Sg+x4MGY1BqWI3eDmUfTqEjDzRDyZFuBxlULQ7f2N8PmS08d/FshITErD1Isp0o R6XEu6uH8XBQ9T6gRbrJLJk9bJGtWGmehoT09nyewin2RIiw/KdaLkWEHpWR36QK+VFS 9Qo285Uapxd+mT0bbFrvawb5lNq0RYRarWcVelxH3MUyZC8Nbgx/ZUuEFz1pZRT/Zr5u g4aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ny8WDSQUfoBWfg8q985YYaQfhGb7DzEU/DgzJ/fuVqQ=; b=EGnvmJxzSWUFneWSL1rNpIIJeyR3XwaUeST53xqfYYmvZBzBmhHYkplzR/QQlTWHYS 1hsufqdCaKBr0w4ZmLhemzBthcX0CYDckFymEHM+Yet9eL80wa1fBNGl/hceSDxAdt9d 8JBNQlofgu5DwirzDb602CtlBCgIKq4cWJ6xSq+4f6b9s4g+GcLJUpR1jNbDbCYFS327 1/OEZrvvKinrDiSw6x5VIqkUGtUi8X3AIwDHQHF6RFuRO+dLGUvA8lkt3Y1ZJqNOseFG EDP9ijs13BqbfD8WohjT9B5TTtlEcl22UmAebzEpl4cdeL0Lb4GFh+Fl1AWjBgVfEL70 wZrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=kMYww0dY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c8si2866804otk.67.2020.04.08.05.02.36; Wed, 08 Apr 2020 05:03:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=kMYww0dY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728872AbgDHMAY (ORCPT + 99 others); Wed, 8 Apr 2020 08:00:24 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47720 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728845AbgDHMAX (ORCPT ); Wed, 8 Apr 2020 08:00:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Ny8WDSQUfoBWfg8q985YYaQfhGb7DzEU/DgzJ/fuVqQ=; b=kMYww0dYMqih4nXqzFYzLPfwnu 8K11Gs1tthUPRpdveSrymRFrZ0AVzpFluASNT9W/MXTSLm36Nq+FNZrkrtyYWAfqtPnCF0yjS0H1M Uxbs0RnXCNez6dObH6FXoi/Z9xkxRqrhT5h06lOoWOEO1ket0/Q9AuHndax7AZxGCy3BwVrydOXXm YH7Pe4IJMJ1S01/u2nF1MsbH0mBlipl+zFJctp6ep3xodceTMqiXEAGWiXBisIlyKE2D5ARBU/P8j YPmdp7H/bfFoIXC5huhvRMyqgN6ZQamt5E3HP2VUUfa+ZWPvTde6fdDn4gdxptbNAbOt5LZolTubJ R0C0ixmA==; Received: from [2001:4bb8:180:5765:65b6:f11e:f109:b151] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jM9N2-00021M-Ag; Wed, 08 Apr 2020 11:59:53 +0000 From: Christoph Hellwig To: Andrew Morton , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , x86@kernel.org, David Airlie , Daniel Vetter , Laura Abbott , Sumit Semwal , Sakari Ailus , Minchan Kim , Nitin Gupta Cc: Robin Murphy , Christophe Leroy , Peter Zijlstra , linuxppc-dev@lists.ozlabs.org, linux-hyperv@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/28] mm: remove __get_vm_area Date: Wed, 8 Apr 2020 13:59:05 +0200 Message-Id: <20200408115926.1467567-8-hch@lst.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200408115926.1467567-1-hch@lst.de> References: <20200408115926.1467567-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Switch the two remaining callers to use __get_vm_area_caller instead. Signed-off-by: Christoph Hellwig --- arch/powerpc/kernel/pci_64.c | 3 ++- arch/sh/kernel/cpu/sh4/sq.c | 3 ++- include/linux/vmalloc.h | 2 -- mm/vmalloc.c | 8 -------- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 8e86bd9c1eca..155e2ef60053 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c @@ -132,7 +132,8 @@ void __iomem *ioremap_pbh(phys_addr_t paddr, unsigned long size) * address decoding but I'd rather not deal with those outside of the * reserved 64K legacy region. */ - area = __get_vm_area(size, 0, PHB_IO_BASE, PHB_IO_END); + area = __get_vm_area_caller(size, 0, PHB_IO_BASE, PHB_IO_END, + __builtin_return_address(0)); if (!area) return NULL; diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c index 934ff84844fa..d432164b23b7 100644 --- a/arch/sh/kernel/cpu/sh4/sq.c +++ b/arch/sh/kernel/cpu/sh4/sq.c @@ -103,7 +103,8 @@ static int __sq_remap(struct sq_mapping *map, pgprot_t prot) #if defined(CONFIG_MMU) 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) return -ENOMEM; diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 0507a162ccd0..3070b4dbc2d9 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h @@ -161,8 +161,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_caller(unsigned long size, 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, unsigned long flags, unsigned long start, unsigned long end, diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 399f219544f7..d1534d610b48 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2127,14 +2127,6 @@ static struct vm_struct *__get_vm_area_node(unsigned long size, 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, unsigned long start, unsigned long end, const void *caller) -- 2.25.1