From patchwork Thu Mar 16 15:35:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 70875 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp560416wrt; Thu, 16 Mar 2023 08:55:20 -0700 (PDT) X-Google-Smtp-Source: AK7set+6awF0GTaPvZW5cWpPY84t50UOWL4Q4nM3LrOT730EiggRD4okbDfKldulpTIBRWM8nFMf X-Received: by 2002:a05:6a20:9389:b0:d3:8e87:f148 with SMTP id x9-20020a056a20938900b000d38e87f148mr5498474pzh.26.1678982120040; Thu, 16 Mar 2023 08:55:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678982120; cv=none; d=google.com; s=arc-20160816; b=aulrWdU2Cr2x5jpVDbQCe++dUaLko6r1NX8GAzi3LW8/4/E+piXa56ig4itGd9uzud nX2SyjUQAFyrSdtvREQ+3GTw+BlASHOUb2G+LlH2kuwTaLtSa4l6HDETNxeV98JNZmRS ttrl0GJczvzUYcZnGDYckgWNl2A1ouuGB2VipY9d9hZLLfZSRqdFsHkS6MEpEpY8WUHH QlTrYGB5roHOhka03sM1Rx3mAlFhot3H4c1RxiYUkdml7AHBpgkkJg7KTfcQi9BWW026 oG5z/uJOCVumbv6pm/T4XEqwYKhrmjNLDH7vnb3VzaMN8YQLsz3QBYQGeJhGExJWtbR4 JkjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=CMpJA9CnAQbYjqPq7Brlq3mMVZeSNU9fjtUmomY0bN0=; b=VxlmHaVzsWJ6JLfG76k+O0cLWysS34cnHbsv1pOy5C/K9tIi6nXKUNqhDBFDk3NI3Q mK8lSX87JZlOqOs92xUVsOs0zdSofSMqNXr3Lea5IZA9m0ky6KefoUgC0yY8b+LIYVfv 66HY8+PB62Xe5GYFQhNq6UU2NtD+NDM53i9vbPWzlNcSGKWChyHLerzU1ezAFh9Xb9FV fI3A6rog35CsgecisEPhXzaP4Dwr1E04OrOXeCAZ5re/llAefTpAjQjTsdje3Ob4oJfX vWdikz4C9vancA79QrNnfxYFxlgS+gpiZu8+PGUtHjHj975+NE9KVKOuEona/+GXPJJl sFjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=lEqeWHw9; dkim=neutral (no key) header.i=@linutronix.de header.b=mPU8trPZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q20-20020a056a00151400b00625ff8521e7si1697048pfu.242.2023.03.16.08.55.03; Thu, 16 Mar 2023 08:55:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=lEqeWHw9; dkim=neutral (no key) header.i=@linutronix.de header.b=mPU8trPZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231602AbjCPPis (ORCPT + 99 others); Thu, 16 Mar 2023 11:38:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230227AbjCPPia (ORCPT ); Thu, 16 Mar 2023 11:38:30 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4540BE1FF8; Thu, 16 Mar 2023 08:36:44 -0700 (PDT) Date: Thu, 16 Mar 2023 15:35:37 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1678980938; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMpJA9CnAQbYjqPq7Brlq3mMVZeSNU9fjtUmomY0bN0=; b=lEqeWHw9pgk4oPSMTQm2vWEmPyaVdmrwUm3ROwRZilzhHjRTIGk/o22drfh2Hyc1rv6/dP B+ggbC4RAygfHF96TlIEsvgni923Cjnkh40SARrvNAnPCY+AH9NnySUlPAs+AYqXMzsZog D4/vmSy4ZaFaMpwrVP8euktSO+gDAwP4aKCTnPqT1K6EmUQ9XsETfP8k6WsV8FBms//vKO oZUCaF34hD0dCIG2px9o+O2FQa1oWdSub51TbI9pSRur6wTRtSN47JYeA1Bsw4VgWk7LWW H9G8OyrB8LrA1MWM0ekhLZw4k6Qur3Eh/OegN4PpfpRzPq0H1Eac+7klpi9D3g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1678980938; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMpJA9CnAQbYjqPq7Brlq3mMVZeSNU9fjtUmomY0bN0=; b=mPU8trPZ3fG7UbuICx6vNy+JDRhafYbnXA3ZWqCY7YEsZ9FvPMQ6mxHyqgeP16qfD24leC tdEbTBw9K2QnsVDQ== From: "tip-bot2 for Ira Weiny" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cleanups] x86/uaccess: Remove memcpy_page_flushcache() Cc: Ira Weiny , Dave Hansen , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <167898093734.5837.6665906842521706513.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760540355721329835?= X-GMAIL-MSGID: =?utf-8?q?1760540355721329835?= The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: b9da86e3aade0cd8c8b60a0f6356e7730fc90d5d Gitweb: https://git.kernel.org/tip/b9da86e3aade0cd8c8b60a0f6356e7730fc90d5d Author: Ira Weiny AuthorDate: Wed, 15 Mar 2023 16:20:54 -07:00 Committer: Dave Hansen CommitterDate: Thu, 16 Mar 2023 08:27:57 -07:00 x86/uaccess: Remove memcpy_page_flushcache() Commit 21b56c847753 ("iov_iter: get rid of separate bvec and xarray callbacks") removed the calls to memcpy_page_flushcache(). In addition, memcpy_page_flushcache() uses the deprecated kmap_atomic(). Remove the unused x86 memcpy_page_flushcache() implementation and also get rid of one more kmap_atomic() user. [ dhansen: tweak changelog ] Signed-off-by: Ira Weiny Signed-off-by: Dave Hansen Link: https://lore.kernel.org/all/20221230-kmap-x86-v1-1-15f1ecccab50%40intel.com --- 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 d13d71a..c6b1dcd 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 6c1f8ac..f515542 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