From patchwork Fri Jan 8 14:52:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 12006783 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF290C433DB for ; Fri, 8 Jan 2021 15:07:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F6B823998 for ; Fri, 8 Jan 2021 15:07:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F6B823998 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=FTDTcL+eThJLFnK+yLRc1Hv30JDryCmyWD8sZ69lOWY=; b=S+IqqZyPoq7MNlvwEu29TrIrB A1uet9ferKjQkKqFOOLIeU8rSLkO8U5yevfIg2SaL4Ec9wx3sgk05T73FpxPkp8BBVyZSi4Hbpy4I Z5Ojlsa7p8DAxAhRMMSsSQNfZ/mULEFUyCsBTkORS9LS5Q4WDCy1Lh75jdore9QlRz9pNTrGDYyYM h8X99TbWZG56XBARvF33RrMKXjHQxDOL+zUPnKvaNphzKfYk0c/Qdgtq9AwdL7DEKGBa33Xb0LI6Z oy93Q5e8/umm3oLUDnCoX6HYnJIYsfidbx+ZEszaXQi33X36vmRmIChmh1FYIv0afh5j3omn/i+jw s88BKtiTg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxtKH-0006NG-Nb; Fri, 08 Jan 2021 15:05:17 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kxtHl-0005tj-Ez for linux-arm-kernel@lists.infradead.org; Fri, 08 Jan 2021 15:02:43 +0000 Received: by mail-wr1-x42b.google.com with SMTP id t30so9341743wrb.0 for ; Fri, 08 Jan 2021 07:02:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=M6xu+NZsefpfo8WqjQL32PlY8NL0QuBVkGqSt5snD+A=; b=kxuUCMV1WAqpwwvoibNUsWYrlPgddFb1B3XDtYKriSKJqhZ7YxBdz7idYeFiPEusdj oSxwzMXDVtdAhRbiUIPtiWxDXm3EOdY0B1oZ4RFYK1eN63WYymsf6s1QMgxe1Fp+XJLm 7MYSyOGWzgv+FVOhkD8wVISPR0VlGxk9zmYIDuW8ATAmQ8SghsBmSoZJE31MhRs/IXU7 jcMsXHSkhBXTuv9sJLCqbDDqfbxZnhaRfmDInXFrql1M/HVbnCpK9DeM9XJWQDFfFBiX CVAh4zvNMBGGzxZ42Xa9GLW4zEO7yuaspaFGL8sBAQLWZMjutowtPglRsb0G7rH8euGW 4JKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=M6xu+NZsefpfo8WqjQL32PlY8NL0QuBVkGqSt5snD+A=; b=CqfibhdtllM5e/sQOiYUK+JoPGFbCnYeT7mlVKDBcPp66QXlTtxIEp/RxBXv7K6wB/ 9IeuUkSpQAmd0rtg55TUDzPwuMtJRHgZoHb1tqS8zqYGfj6eymnbdzmyWi/nZYl0NgzD K4fn+z0aZdYSWb3GjNVwVPLNDjJ3DdesGHs6QbJg+Im/MBTOC/218eZ74Sp5hoAOvz3s i3heT7tDBoQovkEwt1ob6loBdkvjE/kFwmUKbWCLk3F9qGbmoG3umHpp/xNtgfIlSvCQ XkYCPNiRiBk7HzbvH8OkxmerYWtUaSPm96AHjQ8xU9CVDfrJt5HOUyf84y+VGKLwogNC yfog== X-Gm-Message-State: AOAM532fQxo1FdcySvTDkORqpfFT6uKmsh58UBpdyLoCoBb/vXYvHwuW PKPfM2vOCQ+kxZ2S4SndSuqadg== X-Google-Smtp-Source: ABdhPJxXGloEPafSPINGJsoqaUcfHJIL8u06StaksnduujJItHcYtBuA/olK4ECauRMs3Zhmv7TwtA== X-Received: by 2002:a05:6000:c9:: with SMTP id q9mr3946567wrx.259.1610118160590; Fri, 08 Jan 2021 07:02:40 -0800 (PST) Received: from localhost.localdomain ([2001:1715:4e26:a7e0:116c:c27a:3e7f:5eaf]) by smtp.gmail.com with ESMTPSA id s13sm14258464wra.53.2021.01.08.07.02.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jan 2021 07:02:39 -0800 (PST) From: Jean-Philippe Brucker To: joro@8bytes.org, will@kernel.org Subject: [PATCH v9 09/10] ACPI/IORT: Enable stall support for platform devices Date: Fri, 8 Jan 2021 15:52:17 +0100 Message-Id: <20210108145217.2254447-10-jean-philippe@linaro.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210108145217.2254447-1-jean-philippe@linaro.org> References: <20210108145217.2254447-1-jean-philippe@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210108_100242_123243_84CE4854 X-CRM114-Status: GOOD ( 13.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, lorenzo.pieralisi@arm.com, linux-acpi@vger.kernel.org, Jean-Philippe Brucker , guohanjun@huawei.com, rjw@rjwysocki.net, shameerali.kolothum.thodi@huawei.com, eric.auger@redhat.com, iommu@lists.linux-foundation.org, robh+dt@kernel.org, linux-accelerators@lists.ozlabs.org, Jonathan.Cameron@huawei.com, sudeep.holla@arm.com, vivek.gautam@arm.com, zhangfei.gao@linaro.org, baolu.lu@linux.intel.com, robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org, lenb@kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Copy the "Stall supported" bit, that tells whether a named component supports stall, into the dma-can-stall device property. Signed-off-by: Jean-Philippe Brucker --- v9: dropped fwspec member in favor of device properties --- drivers/acpi/arm64/iort.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c index c9a8bbb74b09..42820d7eb869 100644 --- a/drivers/acpi/arm64/iort.c +++ b/drivers/acpi/arm64/iort.c @@ -968,13 +968,15 @@ static int iort_pci_iommu_init(struct pci_dev *pdev, u16 alias, void *data) static void iort_named_component_init(struct device *dev, struct acpi_iort_node *node) { - struct property_entry props[2] = {}; + struct property_entry props[3] = {}; struct acpi_iort_named_component *nc; nc = (struct acpi_iort_named_component *)node->node_data; props[0] = PROPERTY_ENTRY_U32("pasid-num-bits", FIELD_GET(ACPI_IORT_NC_PASID_BITS, nc->node_flags)); + if (nc->node_flags & ACPI_IORT_NC_STALL_SUPPORTED) + props[1] = PROPERTY_ENTRY_BOOL("dma-can-stall"); if (device_add_properties(dev, props)) dev_warn(dev, "Could not add device properties\n");