From patchwork Tue Nov 23 11:21:04 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: 12693443 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 A4FCDC433EF for ; Tue, 23 Nov 2021 11:23:57 +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=cNZqvO2ItATf02gcbtTROZPxK4LPXRPVCPJyZyfwlhI=; b=vSDQlFcLptEgOx SMyrQFTar3gzeh5ub6m0D0v8sfjSGf+oXvfYC22IzUtsoQimq16fh/e32sosDVL7mcba9gtK2WJnz sCk/UpEzrO+v9V5sueyLDikZJ+lW6Rvn/NW4owC+yumypDAX3RVv5WSkIEkjA/5omyHdk2qFlfB1z k1JhCp6TUWRzjn+X6eWOYBfaZ7CvzuykgCCKnzrthfXFlQ14Q9SOwznXIBUlD0vUFZrcXD8ib0bKv msTOc2HQy3vluIcz1dcUeu85kFCB2NhFlGDwtM88CNNVov5ctUb99H1qrb3uvy2z7xpvBl29dHSxc W+NDjAVHHYMSVI96zGIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpTsP-001sRv-DA; Tue, 23 Nov 2021 11:22:18 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpTrT-001s6Q-7h for linux-arm-kernel@lists.infradead.org; Tue, 23 Nov 2021 11:21:21 +0000 Received: by mail-pj1-x1031.google.com with SMTP id x7so16395757pjn.0 for ; Tue, 23 Nov 2021 03:21:18 -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=mq8nc34v9wy9BHUcdNCchv5TcJtzwaMW4yDN1UOKTXs=; b=JpDT/+FDBCbI5IBaWeaKfzyOwUUOyTt+Vw1ovqm0zuzKZZrjqWO3dJqGL1pzmsZRcz WEzphSwzny6i8imySPh8owk0bZ7mV09ROF7m2cIZELwxwLD3zWFbiIveEf0Sy/YacdFK n/sQubJ/NkmPIgp5pbeN1xtI08xQWQungcwqY= 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=mq8nc34v9wy9BHUcdNCchv5TcJtzwaMW4yDN1UOKTXs=; b=N6hC1BVhucVvqZQN9BGv4BX1yj+nwBPLFIY/MJkA+zEpCAwdcCxDYjJFndXiFGTHpr svgkGRnsH4gK4S1prxTLSln24jzWI6pnG4WVvbiogiKMJnTiNLWtK0qdGNQEZzabEwTm CQ9SLYU9qLAziQyawOxZQz7zJZVIzVi+iHwrXS89aQR4b7TQBweB8skoFdRIqLoU1NNe LAbDFrZUOOBTSo1ua5PYKT9pnDkGQBADVqCoz35Q/iQyhFaszbGKOpTzLIn3v/QNtVxu le+vjWZIL17BVNIOAguNRcnLSFcZokKysfODEkdQCZCnvUoW9dgdauO+N4hVNmWbbK7p dA9A== X-Gm-Message-State: AOAM530TBp1prT0xMl4X7Ka1cSGSdB7SvECop8WBADV90DIhhQmjO+wR t94dXhsRQyO5Lu19lNb1bdn+cQ== X-Google-Smtp-Source: ABdhPJxp5J8vQC13ZWDo2EQlaskUNOPku9PaqV5etdp5QIpELJ9fUxb88Pk4hXN6hRe8tLOckb6fGg== X-Received: by 2002:a17:902:7d96:b0:142:87dc:7dd3 with SMTP id a22-20020a1709027d9600b0014287dc7dd3mr5260273plm.11.1637666477920; Tue, 23 Nov 2021 03:21:17 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Nov 2021 03:21:17 -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 3/3] arm64: dts: mt8183: use restricted swiotlb for scp mem Date: Tue, 23 Nov 2021 19:21:04 +0800 Message-Id: <20211123112104.3530135-4-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_032119_314378_599534FC X-CRM114-Status: GOOD ( 15.10 ) 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 Use restricted-dma-pool for mtk_scp's reserved memory. And set the io-tlb-segsize to 4096 since the driver needs at least 2560 slabs to allocate memory. Signed-off-by: Hsin-Yi Wang --- arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi index 94c13c45919445..de94b2fd7f33e7 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi @@ -109,9 +109,9 @@ reserved_memory: reserved-memory { ranges; scp_mem_reserved: scp_mem_region { - compatible = "shared-dma-pool"; + compatible = "restricted-dma-pool"; reg = <0 0x50000000 0 0x2900000>; - no-map; + io-tlb-segsize = <4096>; }; };