From patchwork Thu Apr 20 09:58:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Tesarik X-Patchwork-Id: 8476 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp215015vqo; Thu, 20 Apr 2023 03:06:38 -0700 (PDT) X-Google-Smtp-Source: AKy350ZXw9CHNU79ZYaG6jqmsRQe7nSxhBir7Bvv+ieW2/Zpcg65QxxR2IwRrhZ9NTUNeOn5vRzU X-Received: by 2002:a17:90a:3947:b0:249:88a2:fb60 with SMTP id n7-20020a17090a394700b0024988a2fb60mr1150307pjf.31.1681985197915; Thu, 20 Apr 2023 03:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681985197; cv=none; d=google.com; s=arc-20160816; b=iCpXMRuwKtHnigUvDakhclqKLRuO6Ro/WNZrDy0UApc3SDR/MZMQSbhU8t/ddw2Z5o F9GRiK8NgWpvX/T1INlXTP2csafzqTlQthA8le8ksWgZQuRf4GxVex0W/lHg5FpuI9IV 7QiUW3zU5/NRS0B8q89yx41ulVpzhRS2B/zageXMRXKD83murB5apEyu2NJAAOAU8j3Y YoJUCZ2DaxWhj3e4PsMOyEd7LqhuwkeSQB76GQZWduMt0RrdiS7oKzpW+ugjjLET9yti wTiyPL4TiEE/qTgL1my5AMV1otpYV912HOcft8FaYizC/GBWiEBLhQX7AhrOvcDn8Jo+ gNHg== 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; bh=SVPOAzpXpLFJxx7MfJigx2wV3NN8nWu3tSsL+u8CFEM=; b=SPMyjRAupbo958BQ3y6oqy+zjFhXzbWXa1NC+I4NIUgYmA6D0QtT97o13X9mWQgkW0 2dog9MgGxBGqYH+CBYyN+uDVBwpJwrFh2VISDUM6vBjd7Q9KSMV8Qec9WMKeeLzXQYY2 qNCCJv/O7pao1iaGgQ4/clY81llftox+uPuG19Qoc6RF5OAtFqfXOtEdX0lPFFIRhfcQ S7Kna9KJ9rLZHIiz5bChTML/QeSNjHhwuuFEhe/snlOvJihXP0wvFq6cqEYb6QaR//g0 hxkcIikM+WviEP8aRFRmd1RqeT/fQ7U9V3EL3wxmmJ2Tk/J95Z0368ThAFXwtBxJ3ieF zFiw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 23-20020a17090a0c1700b002477fad79d5si3915727pjs.63.2023.04.20.03.06.25; Thu, 20 Apr 2023 03:06:37 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234266AbjDTJ7f (ORCPT + 99 others); Thu, 20 Apr 2023 05:59:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229704AbjDTJ7b (ORCPT ); Thu, 20 Apr 2023 05:59:31 -0400 Received: from frasgout13.his.huawei.com (frasgout13.his.huawei.com [14.137.139.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13B2EC0 for ; Thu, 20 Apr 2023 02:59:30 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.18.147.229]) by frasgout13.his.huawei.com (SkyGuard) with ESMTP id 4Q2CYw6PqSz9xyMy for ; Thu, 20 Apr 2023 17:49:56 +0800 (CST) Received: from A2101119013HW2.china.huawei.com (unknown [10.81.207.102]) by APP2 (Coremail) with SMTP id GxC2BwDXhj3oDEFkH7g7Ag--.1836S2; Thu, 20 Apr 2023 10:59:11 +0100 (CET) From: Petr Tesarik To: Christoph Hellwig , Marek Szyprowski , Robin Murphy , iommu@lists.linux.dev (open list:DMA MAPPING HELPERS), linux-kernel@vger.kernel.org (open list) Cc: Roberto Sassu , petr@tesarici.cz Subject: [PATCH v1 0/1] swiotlb: Clean up unused code if !CONFIG_DEBUG_FS Date: Thu, 20 Apr 2023 11:58:57 +0200 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM-TRANSID: GxC2BwDXhj3oDEFkH7g7Ag--.1836S2 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUYf7kC6x804xWl14x267AKxVW8JVW5JwAF c2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII 0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26r1j6r1xM28EF7xv wVC0I7IYx2IY6xkF7I0E14v26F4j6r4UJwA2z4x0Y4vEx4A2jsIE14v26r4j6F4UM28EF7 xvwVC2z280aVCY1x0267AKxVW8Jr0_Cr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8C rVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r106r15McIj6I8E87Iv67AKxV WUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lc7CjxVAKzI0EY4vE 52x082I5MxAIw28IcxkI7VAKI48JMxAqzxv26xkF7I0En4kS14v26r1q6r43MxC20s026x CaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_ JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r 1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_ Wr1j6rW3Jr1lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JV W8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU8O_-PUUUUU== X-CM-SenderInfo: hshw23xhvd2x3n6k3tpzhluzxrxghudrp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763689310531210557?= X-GMAIL-MSGID: =?utf-8?q?1763689310531210557?= From: Petr Tesarik While verifying that the swiotlb high water marks are never used if CONFIG_DEBUG_FS is unset, I guarded the corresponding fields in strut io_tlb_mem with an #ifdef, but then I ran into a build failure. This patch tries to clean up the optional debugfs code in swiotlb. The patch should be applied to the dma-mapping for-next tree. Petr Tesarik (1): swiotlb: Omit total_used and used_hiwater if !CONFIG_DEBUG_FS include/linux/swiotlb.h | 2 ++ kernel/dma/swiotlb.c | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-)