From patchwork Wed Jul 6 11:15:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Fabio M. De Francesco" X-Patchwork-Id: 12907987 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 276B4C43334 for ; Wed, 6 Jul 2022 11:15:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 546386B0071; Wed, 6 Jul 2022 07:15:29 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4CDB76B0073; Wed, 6 Jul 2022 07:15:29 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 348236B0074; Wed, 6 Jul 2022 07:15:29 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 1E0856B0071 for ; Wed, 6 Jul 2022 07:15:29 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id E4C4C322B8 for ; Wed, 6 Jul 2022 11:15:28 +0000 (UTC) X-FDA: 79656419136.16.FE2BB2D Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by imf24.hostedemail.com (Postfix) with ESMTP id 8E2CE18000B for ; Wed, 6 Jul 2022 11:15:28 +0000 (UTC) Received: by mail-wr1-f44.google.com with SMTP id q9so21569828wrd.8 for ; Wed, 06 Jul 2022 04:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DVIqMuPLzYcOO4HfWaLexMHz/42n1NJarHPePFEhy5w=; b=m5QIzCxTztbi5KfIP3O6LOSDYQiWmkgsJQVhGH/t8ydJoQfPUxc/dKURnvfmJJS9Rz zwG7N+HRzcal5Fdnl/pKbNDvr/8OBXvtkeh9jTsJNQbkSU7qRF4T774IP8yKZmVo7XLT aKQJ0DRnvKnc5YgICzzMfIFF5dQ+A77fZenZFovchl8WEA9kExvAa4/ofYdiEtj7iPyR 1sG7yz9QmKsbfjfaMZicR8VwSFT2cUtFK6yMODVdC4t2+7/eLLTXagm6Q+aEID7T/NjA psO6g7drtb9f5UtaCbJfajQyekacMm1av9fCTsbU3juL/Rdo1zDHefTV2y9F0xFJ7wgV NsKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=DVIqMuPLzYcOO4HfWaLexMHz/42n1NJarHPePFEhy5w=; b=Bat5sPKUrudSOgv0hn4jyd4MEVKcH48AaiRvO6AM2LBecV/1Lve6li1/64PW7VIfDw 6CP+z5sNg0QRwZOv5h0swyJoeny/MMtVspximq+Mnmh/JO5cACb5tNcRtEe1lBjM+EFB 6IMVn6bryCPBK5z5IFQww+bkK5tp/NxXPfeduCD2XqDCc2Z6Ub47cA0eEmi+QSaMdqU9 8k9EsDAqAzlVqAJTmB5WXilmHep70jlxUp1wvr9RxPOsFKIGeImmESqMev+Ptx3KR+jv y8mRjePPFSVmYywIxgPyWnsG3iF0YAdRrab8y+mTAqeJeogdL/jj7/8r3c+uqL8quKrE jFWQ== X-Gm-Message-State: AJIora8MftfWt9r77beAj9hMbQvB0lu18RhrHmcgaHhz7H4gwL7tsMyn DHDKCKfaqBUJe6rpPGseODs= X-Google-Smtp-Source: AGRyM1torpT8rb4PEx6tmQwuKc10pA2UzSAKa80fu6UU6snP+8f2bx4lOwv5uHAt71CsGSJ0lloNKQ== X-Received: by 2002:a5d:484c:0:b0:21d:6c71:a053 with SMTP id n12-20020a5d484c000000b0021d6c71a053mr13020335wrs.449.1657106127146; Wed, 06 Jul 2022 04:15:27 -0700 (PDT) Received: from localhost.localdomain (host-79-53-109-127.retail.telecomitalia.it. [79.53.109.127]) by smtp.gmail.com with ESMTPSA id k1-20020adff5c1000000b0020d07d90b71sm34830696wrp.66.2022.07.06.04.15.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 04:15:25 -0700 (PDT) From: "Fabio M. De Francesco" To: David Sterba , Chris Mason , Josef Bacik , Nick Terrell , linux-btrfs@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Ira Weiny , Andrew Morton , Matthew Wilcox , Kees Cook , Sebastian Andrzej Siewior , "James E. J. Bottomley" , Helge Deller , John David Anglin , linux-parisc@vger.kernel.org Cc: "Fabio M. De Francesco" Subject: [PATCH v6 0/2] btrfs: Replace kmap() with kmap_local_page() in zstd.c Date: Wed, 6 Jul 2022 13:15:18 +0200 Message-Id: <20220706111520.12858-1-fmdefrancesco@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657106128; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=DVIqMuPLzYcOO4HfWaLexMHz/42n1NJarHPePFEhy5w=; b=rYjXHXXF1GSes+L7lqfTunuFA8kjvT+uccUYMxH3L91vaYUGq4PIpcJWNZxHcH/p9K02fL qcon4PHtIN5FC2t9r8y6MxR6ehT6pZVFokf8TX2Uu6SKq+K270EL32AXZd6iPdaAuufxVP 6BRLBdTw95khhJGAtBH1utzHbamQwzk= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657106128; a=rsa-sha256; cv=none; b=w2C3ZPzFzP7+492n64iMXhU/z0oMYakvii/pVMlkM9D7ONt7I5LyioALY8nbWG87XVNgec 19/B8PdJ6rbWuKwGwTtQrRMit/h6slaQj9S+XF8psuXObB+cPeNcDhlbR08qoBFw3JZsaE fJZ7Yp8e9yE0LAeCJ07yeKh8csU2sOA= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=m5QIzCxT; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf24.hostedemail.com: domain of fmdefrancesco@gmail.com designates 209.85.221.44 as permitted sender) smtp.mailfrom=fmdefrancesco@gmail.com X-Stat-Signature: ziek6wzyun5rhh6r9639xxpfcn6dm65o X-Rspamd-Queue-Id: 8E2CE18000B X-Rspam-User: Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=m5QIzCxT; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf24.hostedemail.com: domain of fmdefrancesco@gmail.com designates 209.85.221.44 as permitted sender) smtp.mailfrom=fmdefrancesco@gmail.com X-Rspamd-Server: rspam10 X-HE-Tag: 1657106128-870545 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: This is a little series which serves the purpose to replace kmap() with kmap_local_page() in btrfs/zstd.c. Actually this task is only accomplished in patch 2/2. Instead patch 1/2 is a pre-requisite for the above-mentioned replacement, however, above all else, it has the purpose to conform the prototypes of __kunmap_{local,atomic}() to their own correct semantics. Since those functions don't make changes to the memory pointed by their arguments, change the type of those arguments to become pointers to const void. v5 -> v6: Delete an unnecessary assignment in 2/2 (thanks to Ira Weiny). v4 -> v5: Use plain page_address() for pages which cannot come from Highmem (instead of kmapping them); remove unnecessary initializations to NULL in 2/2 (thanks to Ira Weiny). v3 -> v4: Resend and add linux-mm to the list of recipients (thanks to Andrew Morton). Fabio M. De Francesco (2): highmem: Make __kunmap_{local,atomic}() take "const void *" btrfs: Replace kmap() with kmap_local_page() in zstd.c arch/parisc/include/asm/cacheflush.h | 6 ++--- arch/parisc/kernel/cache.c | 2 +- fs/btrfs/zstd.c | 33 +++++++++++----------------- include/linux/highmem-internal.h | 10 ++++----- mm/highmem.c | 2 +- 5 files changed, 23 insertions(+), 30 deletions(-)