From patchwork Wed Mar 15 23:20:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 13176751 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BBEFCC7618B for ; Wed, 15 Mar 2023 23:22:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=djIaZz3nTT8P0hudo2o16aJk4llw//B8GFG5yKDkfTs=; b=eXguGSkzt9iMtD chGUpyhKD7t372lqc56zU8UygBRxu2/jZpDBauIedcqE9F0DbCzYCpGn8tl4FdgfnSVQcauzl9KFo ZkpPyuQNN67wzAGquKhmtHWb2YXJO+cz2fnuFOgcHSC4KNi7yByUvEeGwgzT0JM6V4sGSI4vBbCdN L8lKy946HCXscOrJdu1NUCzRPhug5jrZlBHtk7D97A254LvEcb/6BhWBSkh5a5Pmfw/OWISr5qhx5 Ig91odbndCbChX5u+XsY2jaNzl6wWJfei6LBl+EeeDvZPGTYgKkVVkQIMVtg+rAQLTQCO5Gf3ZwTg MEvnlhDX2LUkai2SI9lg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcaQs-00EhEg-24; Wed, 15 Mar 2023 23:21:22 +0000 Received: from mga01.intel.com ([192.55.52.88]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcaQo-00EhDB-2d for linux-arm-kernel@lists.infradead.org; Wed, 15 Mar 2023 23:21:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678922478; x=1710458478; h=from:date:subject:mime-version:content-transfer-encoding: message-id:references:in-reply-to:to:cc; bh=hTHmFfjOsB4OVepCRKtPKTfrpQQ+NPJymzD64IX4dgI=; b=A5s1iyEFIodKXSGkAPIaByCVmcaiCxkYhpWthmcvp3SBKdnoaHxgiZ1B hoyRo1ao2fXGdvivsoWK5Vm0DlLeX6ouQpFCQppsI03okqBCNHYUIUOhk qfL9jmSMbzBCskxaWBRbCkpE1heZt8Sislh9ybPeHU6FavOGqz//RiOJj Hz3QV7+a65rnoyolHWpF0WGB60XUv0/0KV4UbGA/NrSOPs+cq8E2fXF3e 1R255oatGXCQMDbHUwb2NvxaWZ7W63QQllrREjDk/1IXiTcWH7XCfx14H VBhZL9BztItQyX9/Ru815lo3JvcHGvfZcoNo1vDQn2i1NXCLMuaskRqRe g==; X-IronPort-AV: E=McAfee;i="6500,9779,10650"; a="365527046" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="365527046" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2023 16:21:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10650"; a="672915091" X-IronPort-AV: E=Sophos;i="5.98,262,1673942400"; d="scan'208";a="672915091" Received: from iweiny-desk3.amr.corp.intel.com (HELO localhost) ([10.212.196.133]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2023 16:21:01 -0700 From: Ira Weiny Date: Wed, 15 Mar 2023 16:20:54 -0700 Subject: [PATCH 1/3] x86, uaccess: Remove memcpy_page_flushcache() MIME-Version: 1.0 Message-Id: <20221230-kmap-x86-v1-1-15f1ecccab50@intel.com> References: <20221230-kmap-x86-v1-0-15f1ecccab50@intel.com> In-Reply-To: <20221230-kmap-x86-v1-0-15f1ecccab50@intel.com> To: Dave Hansen , Thomas Gleixner , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Catalin Marinas , Will Deacon , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H. Peter Anvin" Cc: Dan Williams , Al Viro , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, Ira Weiny X-Mailer: b4 0.13-dev-ada30 X-Developer-Signature: v=1; a=ed25519-sha256; t=1678922459; l=1867; i=ira.weiny@intel.com; s=20221222; h=from:subject:message-id; bh=hTHmFfjOsB4OVepCRKtPKTfrpQQ+NPJymzD64IX4dgI=; b=R22Wk9eXfxke9PcTFFNPFdA1VAjkKHUHCkHh1AmhPOofA7NfgRUw0cVsSIqTFK5KdEdll3UM1 g6ReFh5l0vcC3FUcAcbPNkHsO4AUXpCGvxlsHRQDHtFWxKTP8cIfI60 X-Developer-Key: i=ira.weiny@intel.com; a=ed25519; pk=brwqReAJklzu/xZ9FpSsMPSQ/qkSalbg6scP3w809Ec= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230315_162118_868901_D947282A X-CRM114-Status: GOOD ( 12.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Commit 21b56c847753 ("iov_iter: get rid of separate bvec and xarray callbacks") removed the calls to memcpy_page_flushcache(). kmap_atomic() is deprecated and used in memcpy_page_flushcache(). Remove the unnecessary memcpy_page_flushcache() call. Cc: Al Viro Cc: "Dan Williams" Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: x86@kernel.org Cc: "H. Peter Anvin" Signed-off-by: Ira Weiny --- arch/x86/include/asm/uaccess_64.h | 2 -- arch/x86/lib/usercopy_64.c | 9 --------- 2 files changed, 11 deletions(-) diff --git a/arch/x86/include/asm/uaccess_64.h b/arch/x86/include/asm/uaccess_64.h index d13d71af5cf6..c6b1dcded364 100644 --- a/arch/x86/include/asm/uaccess_64.h +++ b/arch/x86/include/asm/uaccess_64.h @@ -62,8 +62,6 @@ extern long __copy_user_nocache(void *dst, const void __user *src, unsigned size, int zerorest); extern long __copy_user_flushcache(void *dst, const void __user *src, unsigned size); -extern void memcpy_page_flushcache(char *to, struct page *page, size_t offset, - size_t len); static inline int __copy_from_user_inatomic_nocache(void *dst, const void __user *src, diff --git a/arch/x86/lib/usercopy_64.c b/arch/x86/lib/usercopy_64.c index 6c1f8ac5e721..f515542f017f 100644 --- a/arch/x86/lib/usercopy_64.c +++ b/arch/x86/lib/usercopy_64.c @@ -136,13 +136,4 @@ void __memcpy_flushcache(void *_dst, const void *_src, size_t size) } } EXPORT_SYMBOL_GPL(__memcpy_flushcache); - -void memcpy_page_flushcache(char *to, struct page *page, size_t offset, - size_t len) -{ - char *from = kmap_atomic(page); - - memcpy_flushcache(to, from + offset, len); - kunmap_atomic(from); -} #endif