From patchwork Mon May 22 15:06:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robin Murphy X-Patchwork-Id: 9740941 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 991766034C for ; Mon, 22 May 2017 16:03:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88E3E280B0 for ; Mon, 22 May 2017 16:03:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7DA6D28698; Mon, 22 May 2017 16:03:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 081D1280B0 for ; Mon, 22 May 2017 16:03:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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:In-Reply-To: References:List-Owner; bh=kWrKX+fYT/LNMDUQt785bKk7G5dPvMRGwyfFi+osfQc=; b=uEU MqOxZqG0DMdjw/R69y2UQsldolMc+Mfs8SKmyosdgizNFMoPV9kDgPHwDJ/VeMVxrqu3bPjaiVVa0 Iu+OMw0CG77ztP+7H3iIfAAC3KEn9s2mDB5682LGH3VM/SawgqDvTaf9ajqQYLG3ZIsuTd540H5HU iAApsmHjpHt4PHEz/vQUZhP1CbjARxa1utJ3bGspHgvfiV47D0yzcKaZHX9XmJTxfc1cK2Q2dw3up PWTLtKoLSEKXASs2znnqtoAkctNuoFvMqI1mzc7VFgCE54cjntyHPzqvS4WsQaViGSwFxoPlhZExP UXTbmBnerg0k/BMMg2+J5TexI+luB2A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dCpoD-000168-T6; Mon, 22 May 2017 16:03:49 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dCpnx-0000pF-8F for linux-arm-kernel@bombadil.infradead.org; Mon, 22 May 2017 16:03:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Me6yXRptxZIBZJRnRK7t+1QuS1WnlVjkIfQLQRyCLqQ=; b=wM3vJFwJGV0vDE4LNL9KhotND zYa9lGpSGK7vJsR+MnNxmaCLUG2RcOFGWAvnM6sFPPFo9JwNPELjhKYnecU7d8Kc7yUEnW5Nfz6/p hpxtf5MUQDlKkHNynEVUxIRVBbPZvLSd3r9oa5jDmRVN4enbfbH6w8RdcblrQ0OZEhnF5iRw0akyM WA03k16WJ6gAw1ySSmHtQlxxVCVSY9+RrYlaLnQ+gIXVCp3LDRMiDqge/3UYUPwW7gkMABHgYQ3ej 0OAJmzWA4+lmIiY9dH6c/bDIy8Ne0KtF7iKSfCNLpYgLZS8J1m0xpYayY/9jGCMsQ6RX+zaP0lTJK S08+uUqaw==; Received: from foss.arm.com ([217.140.101.70]) by merlin.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dCovT-0000DI-Iu for linux-arm-kernel@lists.infradead.org; Mon, 22 May 2017 15:07:16 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0D2362B; Mon, 22 May 2017 08:06:55 -0700 (PDT) Received: from e110467-lin.cambridge.arm.com (e110467-lin.cambridge.arm.com [10.1.210.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 73A563F53D; Mon, 22 May 2017 08:06:52 -0700 (PDT) From: Robin Murphy To: will.deacon@arm.com, joro@8bytes.org Subject: [PATCH v2 1/2] ACPICA: IORT: Update SMMU models for IORT rev. C Date: Mon, 22 May 2017 16:06:37 +0100 Message-Id: <11ef7d28c535c01d42b7b3c8e632934f0e0f1048.1495459319.git.robin.murphy@arm.com> X-Mailer: git-send-email 2.12.2.dirty X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170522_110715_696969_F3B0A8E3 X-CRM114-Status: GOOD ( 10.44 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lorenzo.pieralisi@arm.com, gabriele.paoloni@huawei.com, gakula@caviumnetworks.com, rjw@rjwysocki.net, robert.moore@intel.com, shameerali.kolothum.thodi@huawei.com, rrichter@cavium.com, linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org, hanjun.guo@linaro.org, linu.cherian@cavium.com, john.garry@huawei.com, linux-arm-kernel@lists.infradead.org, lv.zheng@intel.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP IORT revision C has been published with a number of new SMMU implementation identifiers. Since IORT doesn't have any way of falling back to a more generic model code, we really need Linux to know about these before vendors start updating their firmware tables to use them. CC: Rafael J. Wysocki CC: Robert Moore CC: Lv Zheng Acked-by: Robert Richter Tested-by: Robert Richter Signed-off-by: Robin Murphy Reviewed-by: Hanjun Guo --- v2: Update more comments, add Robert's tags. I'm including this here as a kernel patch just for context - once I've figured out how we actually submit patches to ACPICA directly, I'll do that per the preferred process. Robin. include/acpi/actbl2.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index faa9f2c0d5de..f469ea41f2fd 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -663,7 +663,7 @@ struct acpi_ibft_target { * IORT - IO Remapping Table * * Conforms to "IO Remapping Table System Software on ARM Platforms", - * Document number: ARM DEN 0049B, October 2015 + * Document number: ARM DEN 0049C, May 2017 * ******************************************************************************/ @@ -778,6 +778,8 @@ struct acpi_iort_smmu { #define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */ #define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */ #define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */ +#define ACPI_IORT_SMMU_CORELINK_MMU401 0x00000004 /* ARM Corelink MMU-401 */ +#define ACPI_IORT_SMMU_CAVIUM_SMMUV2 0x00000005 /* Cavium ThunderX SMMUv2 */ /* Masks for Flags field above */ @@ -798,13 +800,19 @@ struct acpi_iort_smmu_v3 { u32 flags; u32 reserved; u64 vatos_address; - u32 model; /* O: generic SMMUv3 */ + u32 model; u32 event_gsiv; u32 pri_gsiv; u32 gerr_gsiv; u32 sync_gsiv; }; +/* Values for Model field above */ + +#define ACPI_IORT_SMMU_V3 0x00000000 /* Generic SMMUv3 */ +#define ACPI_IORT_SMMU_HISILICON_HI161X 0x00000001 /* HiSilicon Hi161x SMMUv3 */ +#define ACPI_IORT_SMMU_CAVIUM_CN99XX 0x00000002 /* Cavium CN99xx SMMUv3 */ + /* Masks for Flags field above */ #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1)