From patchwork Tue Nov 23 11:21:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12693442 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6B8DC433F5 for ; Tue, 23 Nov 2021 11:23:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=11cMT6/pirALQoj0O6av7/ghhtnNlHnJVgLSkHwOLg8=; b=1VQS7lzb/rar9M n+8xwQ4MHxJzbg0otyUNFoG/e2aP8g80jyxyLXpAFnSPMIsNcjsykCHrn1orpKiytxENacWwWhUMK 5JZgFK/rfvqp9/Hh5tPdL8Jp5lfqBvO9A9meaEQ4HBwLpqUfo3gXqf3RILquIwUCbIblxGahPjdgc xzluX1MPzn9/U7/nX+xoFx/JDwvVgki1klM8KJZOgA0VqwuX+HTS2yXPbA1J8P/YWznO+tnFLd4rJ 7TQTQZwprGaDSJ7gOMiu4BebaY3TDNBHZ0RZZgqzdPa+HNKrJdA2tI3a2Yd7ytcrPdJTZD/tdOKpE X9c/3VtI8UxhCidyEXPg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpTs3-001sJL-MD; Tue, 23 Nov 2021 11:21:55 +0000 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpTrQ-001s4W-O8 for linux-arm-kernel@lists.infradead.org; Tue, 23 Nov 2021 11:21:19 +0000 Received: by mail-pf1-x434.google.com with SMTP id n26so19139744pff.3 for ; Tue, 23 Nov 2021 03:21:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=z+/tM6AGO8qVa/0Ves95KRNhzSUdOxRaqnGgKB5D++M=; b=XpXqNAebRwgXhworSNtt028SsP5KTorBtVnPQ2NDJ5AqE0w8IT8BOg6T3ewnDOxn0x QaNyBlTudA5wA6HUsP3tTtdlTWjvrE8GuQPbTwT1fW+w1gEOlQN/lkvuxJNQ4SJKqEYn we3ePUFjfo44/HkRFeRMoGLKvp+vx0wcGlvTA= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=z+/tM6AGO8qVa/0Ves95KRNhzSUdOxRaqnGgKB5D++M=; b=JCtMMf+T6jbBwEPciJ4NQNeCiXM9R++2WSNn/rANIalk/j7/JcXBXBhOoCWzzICvWm Q8N+fPGNOw4uYGXroqGO47vPhdjbff+YbXDemIxMI7C8jqeHGSDQBjLNKlNhR2o6gKrh z71QwvGQOIq9e3otnlSzgMIjcRd9Ng1bay1Ug4rSGljH++ZNLY1YlipnlSCFlmDvWwfb mJgWUZjvb9gNBVqWKcUfEe61vpj+wHU1s30j2PoDnfm9nAwa69U3VRy1//r4WzTMx5st zQwosCYQzZOaiyewezlP+v+LPfR6xEgLT9/My9s8Nip5ttFP1IUNttEhFYrMhe2635pW u0iw== X-Gm-Message-State: AOAM531M458E2BTOzyY2jFKlmL0+A9AHnY2RWqaBE8GDxC2tNbAJjRBs 7lkO1lVZeqRX1PaiMAv308QCUQ== X-Google-Smtp-Source: ABdhPJxETkQVjZ/TElThsyh1V0RdLsnWog1QFLXL9SdSSg23n2Tff5mZqtPLZT8Oh2DPEEUzXXmy1w== X-Received: by 2002:a63:f64:: with SMTP id 36mr3117696pgp.464.1637666475417; Tue, 23 Nov 2021 03:21:15 -0800 (PST) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:d1ae:c331:ed2a:15e9]) by smtp.gmail.com with ESMTPSA id 63sm11093914pfz.119.2021.11.23.03.21.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Nov 2021 03:21:15 -0800 (PST) From: Hsin-Yi Wang To: Christoph Hellwig Cc: Marek Szyprowski , Robin Murphy , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Rob Herring , Maxime Ripard , - , devicetree@vger.kernel.org, Matthias Brugger , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, senozhatsky@chromium.org, tfiga@chromium.org Subject: [PATCH 2/3] dt-bindings: Add io-tlb-segsize property for restricted-dma-pool Date: Tue, 23 Nov 2021 19:21:03 +0800 Message-Id: <20211123112104.3530135-3-hsinyi@chromium.org> X-Mailer: git-send-email 2.34.0.rc2.393.gf8c9666880-goog In-Reply-To: <20211123112104.3530135-1-hsinyi@chromium.org> References: <20211123112104.3530135-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211123_032116_860609_E6CAEAD3 X-CRM114-Status: GOOD ( 13.53 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a io-tlb-segsize property that each restricted-dma-pool can set its own io_tlb_segsize since some use cases require slabs larger than default value (128). Signed-off-by: Hsin-Yi Wang --- .../bindings/reserved-memory/shared-dma-pool.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/reserved-memory/shared-dma-pool.yaml b/Documentation/devicetree/bindings/reserved-memory/shared-dma-pool.yaml index a4bf757d6881de..6198bf6b76f0b2 100644 --- a/Documentation/devicetree/bindings/reserved-memory/shared-dma-pool.yaml +++ b/Documentation/devicetree/bindings/reserved-memory/shared-dma-pool.yaml @@ -56,6 +56,14 @@ properties: If this property is present, then Linux will use the region for the default pool of the consistent DMA allocator. + io-tlb-segsize: + type: u32 + description: > + Each restricted-dma-pool can use this property to set its own + io_tlb_segsize. If not set, it will use the default value + IO_TLB_SEGSIZE defined in include/linux/swiotlb.h. The value has + to be a power of 2, otherwise it will fall back to IO_TLB_SEGSIZE. + unevaluatedProperties: false examples: