Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp244474imw; Mon, 4 Jul 2022 08:26:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v67tMm5Tbjp+7UHOAh4BmvSBtHXD+0+adxS9hcSrNtgQK/i5IoBkibC+JHZ3mDCZFtFOGE X-Received: by 2002:a05:6402:2b8d:b0:43a:5410:a9fc with SMTP id fj13-20020a0564022b8d00b0043a5410a9fcmr7856943edb.99.1656948364794; Mon, 04 Jul 2022 08:26:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656948364; cv=none; d=google.com; s=arc-20160816; b=kMl1ucAae8HR9vPqIuxFQe6IZ9ZS0w8tc0EWWBwFyIHSdug+nyEY2MrTpaTR7B6gVW 1rYE20lbVTpITTovRdPPjvgKRa1lbBW+CR+j+EOZsbETUUKAAO40rZYgnmny5WopMzUN /z138sw0XBPHVZeLggMzA3LgGkvQy412OdSZQ3ivCK/hrlwlo8rQRlfPwcobhpcHqT0D Sm3nGA2xjeKhHf3DyDPpUksnSJiGuCBBkIChW48DrHtPfIbX2BpKmf++47bsybcJbnom zHP5kes8B+k669XHpHvUO5XEO27RJa9fWDASmSwtgqQP741aoxaFFr4vCjVr1r6wf5bb YJiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=4xM5MK26CZ/c80sgGRiAvi/tYGUd6tin4tICi/jLr3g=; b=gOiusOtZeilYlIusrMirJySqEAQRqdpQmCPHMVhSDMJ4TaH7Dcu4OcVu6671sq5ULe q7jdYZ2hakdI/EJ8biMb8+3eGAO1igQ3Gfc42TN5VF37cdm0FCK2ijGEajOhqKrEIwo3 2G/RDmSfpLgKMgjH1w+wJfsKDC0+b3s2D0I2vZgyWjW7A810UOxfSlllolL34OF2uGXs OIOj+0SrOQ20Rb6HBr1T2TJcNQYpRY+qswIkCstp0GNIc88qtEUL4cd+8zhk2CgxePBU au8DEVvR9uqwbXn9KjwSXeC50+B3qKe/io7OL6ZMOzohlGFWi9kgHJcUS+ZA0iI0/zV6 tSGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=StziVOwR; 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=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb34-20020a170907962200b007121b9fc6fbsi11757847ejc.956.2022.07.04.08.25.40; Mon, 04 Jul 2022 08:26:04 -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=@gmail.com header.s=20210112 header.b=StziVOwR; 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=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233305AbiGDPXe (ORCPT + 99 others); Mon, 4 Jul 2022 11:23:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230100AbiGDPXb (ORCPT ); Mon, 4 Jul 2022 11:23:31 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B24C765C5; Mon, 4 Jul 2022 08:23:30 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id t17-20020a1c7711000000b003a0434b0af7so5888620wmi.0; Mon, 04 Jul 2022 08:23:30 -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=4xM5MK26CZ/c80sgGRiAvi/tYGUd6tin4tICi/jLr3g=; b=StziVOwR2dqeGT1vkrtGCUdDAS1P9FphpWD52LirNPf3iqYLtKZmz96p6YLOKpyirW Xg8JOmCVBVJAAgA7tHVbxrmMaFg7Gh5oxqY5L3mjEIfMUEADw3V729BEfgHKPuDN7HSZ hghcl2Y9AQyVE1zfSWC2uyJnOhLIHDj20IkjS4W8ow0xEEwULbIC5anBQ+7XAVulGgDh KrvXgKdOdn5ttyZmEM9b9hfPmNqv9SaQO0HN/rBE/ePL5T/JOhk+y4ZlbCQknX1+CxkY uigE6jI+scbqDnD/Sm5hiEYq9Gfbupw2sCW/y4S21GQvilSXMyNd61Jg1AMbi2DNC16w AR7A== 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=4xM5MK26CZ/c80sgGRiAvi/tYGUd6tin4tICi/jLr3g=; b=iYCNssxbJjgViLts+ylTWQG5rt0RPXUzdDxRBJCVQwEWelaBRhfx65858QMEUvXNa0 fV3DSI7HQS9nPxaqnZTb+jSMRRtm7cakwleaz5XR4eqSBXd22aRqUo8X7zQjVS0TeMqS Et3X22Ja3z1gjOADE2AWe4KopKdWcJ96ykwH/ZRqXzdyNwC6d4yNtOqTLEZ97/oAVTaP qECXWC+EAqs0veXXNYx//q5dZNHwK8GiyMLcYY5qd0jFW2nXPTTR8g2r9OX9EzQgCrbO H5wThg/xStuxmQLAl8Tq4IlGLrAI1rC9xZplsonXNYTbZ/uLuhwPs0/E8iWxT3ut5xhR JFnw== X-Gm-Message-State: AJIora+zlxna/XnvYzWUmCpJdUd9RNgFYpVuhAlfcPNrXVMBCVAIfZ8F zlTrFk741F7TsSXF9W4U+yo= X-Received: by 2002:a05:600c:500a:b0:3a1:8c53:9bd5 with SMTP id n10-20020a05600c500a00b003a18c539bd5mr20226182wmr.82.1656948209080; Mon, 04 Jul 2022 08:23:29 -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 p28-20020a1c545c000000b003a02de5de80sm16089631wmi.4.2022.07.04.08.23.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jul 2022 08:23:27 -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 v5 0/2] btrfs: Replace kmap() with kmap_local_page() in zstd.c Date: Mon, 4 Jul 2022 17:23:20 +0200 Message-Id: <20220704152322.20955-1-fmdefrancesco@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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. v4 -> v5: Use plain page_address() for pages which cannot come from Highmem (instead of kmapping them); remove unnecessary initialisations to NULL (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 | 34 ++++++++++++---------------- include/linux/highmem-internal.h | 10 ++++---- mm/highmem.c | 2 +- 5 files changed, 24 insertions(+), 30 deletions(-) -- 2.36.1