Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp16122789rwd; Mon, 26 Jun 2023 06:08:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4YgAHXZPDT2LDbN8v5MeYeOmahShdT7fbPx1EMamT5mQvltDdP33MPQEWQV2Mjiw2yUR7U X-Received: by 2002:a17:906:730c:b0:988:9d0f:db52 with SMTP id di12-20020a170906730c00b009889d0fdb52mr23822693ejc.35.1687784931239; Mon, 26 Jun 2023 06:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687784931; cv=none; d=google.com; s=arc-20160816; b=VwrlZkcFrLK4cvruzwdp618k3IYp+YHZ5R8KjqWJFXWYES7sImaIlbk5SfePR6txWD +2mPUu4gULY3uI9yesPMpA3LviXGeNgH7bUN4urm4qzVB0sV3/ZPPxb/xbadnC0CI8b0 QPHIK2dgsRedMVAboC7awP5HzaybTUIKCiUsybtW2HNI5FfmVJsK0TVl5CFe4Wr6/SAu RVknIiORPz+4mvKDWelhBrhTDHKHqZDCMgzB9PUfnZqFKsSG8003kRsGNpU4m2LqdSpY Dg9UuLQ2laQmu7aDO3cLly6Wp7Mxy4g9RzguP1qvzVXKRHZ1+WoHjEY4vpT9nlYqfWcZ yQFg== 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=jYID+uHpiKhA0BUnkJdgTBLsvBbsd7A/g5OJNIh0ufY=; fh=Pm5qlDXZMCeI+BDi8trv5j6CRr9ePSM+XXpN7cigZa4=; b=pOP1VwazoeusLznwVtPMHwfAMLdTBxl4DS5Mg98YrVjmZJDwuKXdCS4d8KgkcUNDpz s9Ozsp0ontnKQXNkGsBXk7rufhnWqamAa96d+37pmWMbEdYpnIAMiwYLZxBrsztwRWpe rPxzSjZYmRCaPreS0oJLyF8ZRuxvNoAkwsifveZlTu/lYkYQX/kvtCaiZVw71r2/VRc6 j1nPj7OvlivOMyApjFkxP1wmFtgJrCInN8DognPHf5H3A0aq7lVcG+U2qgxHyObTIabj JC9g7lq6m8PNCeLNF2yGFrXpnIJa/LM8TkOhjMl2bhiOlJxoZnhCf/IJa6W8HfpQMKOs DgPg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oz31-20020a170906cd1f00b009883ee7519fsi2807840ejb.884.2023.06.26.06.08.26; Mon, 26 Jun 2023 06:08:51 -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 S230223AbjFZNB5 (ORCPT + 99 others); Mon, 26 Jun 2023 09:01:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230154AbjFZNBz (ORCPT ); Mon, 26 Jun 2023 09:01:55 -0400 Received: from frasgout11.his.huawei.com (unknown [14.137.139.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A76B98 for ; Mon, 26 Jun 2023 06:01:54 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.18.147.227]) by frasgout11.his.huawei.com (SkyGuard) with ESMTP id 4QqSPy3Xylz9xFQT for ; Mon, 26 Jun 2023 20:51:02 +0800 (CST) Received: from A2101119013HW2.china.huawei.com (unknown [10.81.202.159]) by APP2 (Coremail) with SMTP id GxC2BwDXXWQljJlk1fGzAw--.36557S2; Mon, 26 Jun 2023 14:01:34 +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 , Kefeng Wang , petr@tesarici.cz Subject: [PATCH v1 0/2] swiotlb: Fix a couple of bugs in sizing areas Date: Mon, 26 Jun 2023 15:01:02 +0200 Message-Id: X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: GxC2BwDXXWQljJlk1fGzAw--.36557S2 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUYw7AC8VAFwI0_Gr0_Xr1l1xkIjI8I6I8E 6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28Cjx kF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUJVWUCwA2z4x0Y4vE2Ix0cI8I cVCY1x0267AKxVWUJVW8JwA2z4x0Y4vEx4A2jsIE14v26r4j6F4UM28EF7xvwVC2z280aV CY1x0267AKxVW8JVW8Jr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE 5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeV CFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1l c7CjxVAKzI0EY4vE52x082I5MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r 4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF 67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2I x0cI8IcVCY1x0267AKxVWUJVW8JwCI42IY6xAIw20EY4v20xvaj40_WFyUJVCq3wCI42IY 6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r1j6r4UYxBIdaVFxhVjvj DU0xZFpf9x0JU2fOwUUUUU= X-CM-SenderInfo: hshw23xhvd2x3n6k3tpzhluzxrxghudrp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, MAY_BE_FORGED,PDS_RDNS_DYNAMIC_FP,RDNS_DYNAMIC,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Petr Tesarik While reworking the dynamic SWIOTLB implementation, I ran into some locking issues with the current implementation. I believe the bugs are serious enough to be fixed separately. Petr Tesarik (2): swiotlb: Always set the number of areas before allocating the pool swiotlb: Reduce the number of areas to match actual memory pool size kernel/dma/swiotlb.c | 46 +++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) -- 2.25.1