Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2436848imj; Mon, 11 Feb 2019 02:53:57 -0800 (PST) X-Google-Smtp-Source: AHgI3IaRm71x/Z+acTAn93RYM0acwE298NN57MuPFWQYbx+t21R9pyRHTZSplh57HSAJyJowvKxw X-Received: by 2002:aa7:8759:: with SMTP id g25mr27180056pfo.248.1549882437892; Mon, 11 Feb 2019 02:53:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549882437; cv=none; d=google.com; s=arc-20160816; b=X7YDnVtkvBnjWcZWMZFLc7R2CW53f2NT82lC3vIuLrUadOwbPTMxT+tG43s/eaUXG8 aZeVw8vuJVc0OHD92YjsWVLtZRdugB43A0hD6TG7OMRwhk4WRHDZqqXpXvQ/FsRU6P07 bSnhXEiR6xyFB9MfvwA1nc+FiupzIXHfRgaBHA6jUbtllk5IjbUjwtsPyrG1vbDEvC8x YjgZO2zqf5SEb8D+ZWfoHIjj1P8yedPVezVEFuKBa0oKL8wSjN5CLWy12MhHOU0vg2Z1 +f6OV6H3g1xPQnxcqVaFNdQdRgQX3fCJxeSc5t0Uwyqgq97oIaFmUNPOXfh0uWpMq8aD awRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date; bh=OWYapRvdT9Fd0h6gSgJ12DEq1hBEssP1shIXtzhZGxQ=; b=S+Pm77kEQjoID0RNkGz0qS7RY82zZ9YsGz3kYyJJyGfqessP0xiOKGt6dy3yq06eXX TGiXzgXfb1leJMoSVWXr9lxLryzYZc5UpuoBYoCsEtyqzx0MQZBHo7rmfirHz0lWKqhp 5Fmq8PhWfFt2MNazplDX6wmU+rjhmc7c8gKR5KnlEonVKDuv1jYTfKxRkkOBs6nXg0j0 pSgVwNEvDFvzEdQ4wvVtE3VqrlLf8We2rzU1f45rEtadfjvojGumdoUR1F+LcNRSUCJo FJZiPRISSWe0C+3vQoX8+TBsFfkkjJ9PuLBFv+nGreto+QosbBXNxCn/rxJqrDJf+pdA fw6g== ARC-Authentication-Results: i=1; mx.google.com; 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 l81si3287646pfj.230.2019.02.11.02.53.41; Mon, 11 Feb 2019 02:53:57 -0800 (PST) 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; 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 S1726834AbfBKKxC (ORCPT + 99 others); Mon, 11 Feb 2019 05:53:02 -0500 Received: from terminus.zytor.com ([198.137.202.136]:52177 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725931AbfBKKxB (ORCPT ); Mon, 11 Feb 2019 05:53:01 -0500 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id x1BAqkHa3499190 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Mon, 11 Feb 2019 02:52:46 -0800 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id x1BAqksR3499187; Mon, 11 Feb 2019 02:52:46 -0800 Date: Mon, 11 Feb 2019 02:52:46 -0800 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Ira Weiny Message-ID: Cc: bp@alien8.de, linux-kernel@vger.kernel.org, peterz@infradead.org, dave.hansen@intel.com, akpm@linux-foundation.org, tglx@linutronix.de, kirill.shutemov@linux.intel.com, mingo@kernel.org, ira.weiny@intel.com, dan.j.williams@intel.com, torvalds@linux-foundation.org, hpa@zytor.com Reply-To: linux-kernel@vger.kernel.org, ira.weiny@intel.com, hpa@zytor.com, torvalds@linux-foundation.org, dave.hansen@intel.com, akpm@linux-foundation.org, tglx@linutronix.de, kirill.shutemov@linux.intel.com, bp@alien8.de, peterz@infradead.org, mingo@kernel.org, dan.j.williams@intel.com In-Reply-To: <20190210223424.13934-1-ira.weiny@intel.com> References: <20190210223424.13934-1-ira.weiny@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/mm] mm/gup: Remove the 'write' parameter from gup_fast_permitted() Git-Commit-ID: ad8cfb9c42ef83ecf4079bc7d77e6557648e952b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: ad8cfb9c42ef83ecf4079bc7d77e6557648e952b Gitweb: https://git.kernel.org/tip/ad8cfb9c42ef83ecf4079bc7d77e6557648e952b Author: Ira Weiny AuthorDate: Sun, 10 Feb 2019 14:34:24 -0800 Committer: Ingo Molnar CommitDate: Mon, 11 Feb 2019 08:20:40 +0100 mm/gup: Remove the 'write' parameter from gup_fast_permitted() The 'write' parameter is unused in gup_fast_permitted() so remove it. Signed-off-by: Ira Weiny Acked-by: Kirill A. Shutemov Reviewed-by: Thomas Gleixner Cc: Andrew Morton Cc: Borislav Petkov Cc: Dan Williams Cc: Dave Hansen Cc: Linus Torvalds Cc: Peter Zijlstra Cc: linux-mm@kvack.org Link: http://lkml.kernel.org/r/20190210223424.13934-1-ira.weiny@intel.com Signed-off-by: Ingo Molnar --- arch/x86/include/asm/pgtable_64.h | 3 +-- mm/gup.c | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/x86/include/asm/pgtable_64.h b/arch/x86/include/asm/pgtable_64.h index 9c85b54bf03c..0bb566315621 100644 --- a/arch/x86/include/asm/pgtable_64.h +++ b/arch/x86/include/asm/pgtable_64.h @@ -259,8 +259,7 @@ extern void init_extra_mapping_uc(unsigned long phys, unsigned long size); extern void init_extra_mapping_wb(unsigned long phys, unsigned long size); #define gup_fast_permitted gup_fast_permitted -static inline bool gup_fast_permitted(unsigned long start, int nr_pages, - int write) +static inline bool gup_fast_permitted(unsigned long start, int nr_pages) { unsigned long len, end; diff --git a/mm/gup.c b/mm/gup.c index 05acd7e2eb22..b63e88eca31b 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1786,7 +1786,7 @@ static void gup_pgd_range(unsigned long addr, unsigned long end, * Check if it's allowed to use __get_user_pages_fast() for the range, or * we need to fall back to the slow version: */ -bool gup_fast_permitted(unsigned long start, int nr_pages, int write) +bool gup_fast_permitted(unsigned long start, int nr_pages) { unsigned long len, end; @@ -1828,7 +1828,7 @@ int __get_user_pages_fast(unsigned long start, int nr_pages, int write, * block IPIs that come from THPs splitting. */ - if (gup_fast_permitted(start, nr_pages, write)) { + if (gup_fast_permitted(start, nr_pages)) { local_irq_save(flags); gup_pgd_range(start, end, write, pages, &nr); local_irq_restore(flags); @@ -1870,7 +1870,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write, if (unlikely(!access_ok((void __user *)start, len))) return -EFAULT; - if (gup_fast_permitted(start, nr_pages, write)) { + if (gup_fast_permitted(start, nr_pages)) { local_irq_disable(); gup_pgd_range(addr, end, write, pages, &nr); local_irq_enable();