Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751208AbdFAOGW (ORCPT ); Thu, 1 Jun 2017 10:06:22 -0400 Received: from mail-by2nam03on0057.outbound.protection.outlook.com ([104.47.42.57]:53440 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751078AbdFAOGU (ORCPT ); Thu, 1 Jun 2017 10:06:20 -0400 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=cavium.com; From: Ganapatrao Kulkarni To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org Cc: Will.Deacon@arm.com, lorenzo.pieralisi@arm.com, hanjun.guo@linaro.org, sudeep.holla@arm.com, robin.murphy@arm.com, joro@8bytes.org, rjw@rjwysocki.net, lenb@kernel.org, jnair@caviumnetworks.com, gpkulkarni@gmail.com Subject: [PATCH] acpi/iort, numa: Add numa node mapping for smmuv3 devices Date: Thu, 1 Jun 2017 19:35:37 +0530 Message-Id: <1496325937-21113-1-git-send-email-ganapatrao.kulkarni@cavium.com> X-Mailer: git-send-email 1.8.1.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0115.INDPRD01.PROD.OUTLOOK.COM (10.174.56.159) To BN3PR0701MB1685.namprd07.prod.outlook.com (10.163.39.151) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PR0701MB1685: X-MS-Office365-Filtering-Correlation-Id: 891a23eb-6084-408f-5300-08d4a8f75fd2 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131423075)(201703031133081);SRVR:BN3PR0701MB1685; X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1685;3:ArPISNuRGdttLUbt6o4rlP85rn2jy1lKqaWSp+z/GuHcAWLKPnD70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+AwmRwG2P1vzh62ugSA5XhB0wBlZmAlBHH7gepTwOoBvaBZSVgmtZk/dnl7qkbjpLoOaonDSj3gNy4KlRRgfXysyxKTrZXYzYD1n1pjBYXP7ON6mA1y3oiQyOPGt12PjKwUdEi85CLrDkHhsoa1a5n/WxuahjSPG3tYucWelT0PZ9eM97RiZqhGEnA6/L6WDZESypj/met3Cd+d//BZ6EEAXgHvdmSPlJXyV8pPoffR6NptFmTi3DiM+2+QMdOxL8K+RJ67sF22fqMd8dVm3K170CcVSL37zS8CulCOc4cr4AveNhkSf5HS+3WSgFVv6lDhtpFXQMvaEeRsdpHZMuRLPsK/njUMBAA4hDb6oxG0Wfzwwycih4qYR50AidLBOiltrKdwd1xYA/4MX4zXHVkze/oboaP30lWytWU+3Gvp1myOPNcA1SrdSLURj1UDeXv3Kw/o4wqh7zaoEnaCmNRNFg+ZLX++E16mbLvCXsP7HmVccqpxrL4ZasAT X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700099)(100105000095)(100000701098)(100105300095)(100000702098)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(100000703098)(100105400095)(6041248)(20161123558100)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704098)(100105200095)(100000705098)(100105500095);SRVR:BN3PR0701MB1685;BCL:0;PCL:0;RULEID:(100000800098)(100110000095)(100000801098)(100110300095)(100000802098)(100110100095)(100000803098)(100110400095)(100000804098)(100110200095)(100000805098)(100110500095);SRVR:BN3PR0701MB1685; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN3PR0701MB1685;4:Z6r6UxPn3HUS+s66vk2TM0pAF5qXzIy+5ADey9un?= =?us-ascii?Q?71XHP04uRzR4nZHeCkXUUngerIbGUPNAG6NJxkisWBSRl3F0AY++YkxCq87Q?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lXD4mCUFTMo5UvK0RZoS7?= =?us-ascii?Q?gaIxPXv4B/CZVs/RkTm72V2D35ImiAcZ2UvqixjqD8zaUHJata9d5AEKKkRy?= =?us-ascii?Q?BWkkEMpYBvPyD6kXKa0dRfzT2w1KFU6KQy5vRDagGQEAIl3GAxR3nZOzAoCi?= =?us-ascii?Q?Lrl6o6KklaS2bkNkFw98Ah/5qbPX4tBZ?= X-Forefront-PRVS: 0325F6C77B X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(39400400002)(39840400002)(39850400002)(39450400003)(81166006)(50986999)(8676002)(7416002)(53936002)(2906002)(7736002)(38730400002)(110136004)(25786009)(5003940100001)(50226002)(86362001)(305945005)(6506006)(4326008)(36756003)(4720700003)(50466002)(48376002)(6512007)(6486002)(33646002)(189998001)(6666003)(47776003)(478600001)(72206003)(42186005)(66066001)(6116002)(5660300001)(3846002);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR0701MB1685;H:mypc.cavium.com.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN3PR0701MB1685;23:aCYMxHF3xfGjDccJsRRu50EMLUMiexILqLin5VB?= =?us-ascii?Q?X6LLlCIhl5K1QOXjQgxU5X9PF1r9naQ0se/jzEt1O5e02+JrD3kOCoHZBaP3?= =?us-ascii?Q?IYSoo7MX5wZOVefntl7DUuHSqqTP/ppbIhMi6BeDM/Zj21Sjn7YxXVPKo964?= =?us-ascii?Q?DSap4mCYZKN6AakTc+5ZAFN395JVWkkB6sMfJewvSCWyXRJIPhfHa1vKXPVG?= =?us-ascii?Q?JfwpNobpRKzESgMseUyU5FztmYaMS4hyWcR2pgTB0fDGmuA8Yj484P3LeDjY?= =?us-ascii?Q?k/2f26vCd+ovOTrnf+0AxS3lj44WWNwU6rDHoqHcmIXvwucu/hrvQkLadvZI?= =?us-ascii?Q?Dov9MRjKF+/rCvTR0Nk/ulVg5xEOaz1ebbtsu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dK5kQgR02hcg5utYyiYBhYZFDDrLPKkrTyyKQPzMe4Hys7GXLaRrPN/oFtMGFhwdw35yyRHRpQZWVM1DWtPNXXXAlXuZjEeT+qWQ0pprkAZ31genznigGOhHZ5guuW/GqfAWJBHUA4y2GehUZlZRgRg/svUaNaFZai9M9G1pm2CqSDiDbJfaAQ1+FYBHaUgK6d3odBnnfIkmhcY1rYrlxjqZlNa0j/nZ0COJtp5+XdPCgWVhprF2EFbX6P+lajkthyA1IirxwCM7rLPbMe0bbjF4RFARqTplCnv+h8jZvKVPdmqKJGwVOIQ== X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1685;5:EGQsuUBpTEV3ONcTiJHaFUOR8IWzWGqFCJk5cUWJq/QIsQqW3UG3GUymKfWUO/1DC79eqGDaX4NeP6DBipTjG79HEBCh6iMd6sY3ZQh+/9k5cp1cS/pADFZZeF8rDulU1piE9ZXGup6A82omgRPVLLRvqitMwmkIwQB8njAmhK91SxYcH52OaY7CY8LiXl/uHwzwZbCxEbebEFhAb+DeQ+lng9t4hktYY0u8o/HUjn7qT0wlJT24DrGWeRuLtxoOrKO3tluCq8XJAI65r/p0BQWFxYGD4hX2dKCvG123Ncks/MO15eCNcNrmocWZnKle1Qag96htsNmdcN0R+ZU7+NGWSdLpPlYs4Ottwjb9irEQ027zsLLr3eN1b3dV1SsB/8PuNHEcE1s4LeeQK2/Cbe4nd3gzFhKUbhqOmD75slHY9SSLBxizGi2LWJsoM1/1qDtmlHA8IOQB7yZLMsgvxzrOOK5G2RH0nq+UO9YzfvUypiztfbPQ0Du0vKvAgT6/;24:C8/FCUi0BUMPMnyD6Y7Xk+VhuVF4JntRyECuWaDVrkyehx9MqItoLmkksGz8NnUXTrV6kHWnLti5IxorcadkP7WIZ27iXSnEZEYFn8BRLoY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN3PR0701MB1685;7:g1+pjFUEW+YrwrkhUHLKvoMPnIUXwDkvi8lyZ27bJs4z7oB9sy+29kQTnk7uRAaq2CE7Zeo0G4up8/df2svdGAKCxeamfDTOZjQmB+JAb7wx/wAX+4qr/xxqd+YMBUYaRSt3cspB4iUR0CfnoOh/RXT6kxAx4f15UJ5rGNLznMu6B25Xz/9yUhMeUWfsryLRb6AKS+E4KFfHm/c1y7g+Zsc/txYnUlWnPPE4+PFSv5BtfW7x4feJsVFSjlgCuuCWoTH1xMwebpbv5uhevtvZ01mnSNVzo6CgILJ2E9PyTo2UgVWtUqbKbL/iHOvxYu0pzF/I64Mhm5UXhbeb+SI/jA== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2017 14:06:14.2636 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1685 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1662 Lines: 52 ARM IORT specification has provision to define Proximity domain in SMMUv3 IORT table. Adding required code to parse Proximity domain of SMMUv3 IORT table. Parsed Proximity domain is used to set numa_node of SMMUv3 platform devices. Signed-off-by: Ganapatrao Kulkarni --- drivers/iommu/arm-smmu-v3.c | 6 ++++++ include/acpi/actbl2.h | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c index 69d8506..98c2319 100644 --- a/drivers/iommu/arm-smmu-v3.c +++ b/drivers/iommu/arm-smmu-v3.c @@ -2667,6 +2667,12 @@ static int arm_smmu_device_acpi_probe(struct platform_device *pdev, if (iort_smmu->flags & ACPI_IORT_SMMU_V3_COHACC_OVERRIDE) smmu->features |= ARM_SMMU_FEAT_COHERENCY; + /* set numa proximity domain for smmv3 device */ + if (iort_smmu->flags & ACPI_IORT_SMMU_V3_PXM) { + set_dev_node(dev, acpi_map_pxm_to_node(iort_smmu->pxm)); + dev_info(dev, "on NUMA node %d\n", dev_to_node(dev)); + } + return 0; } #else diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 4b306a6..c16ced8 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h @@ -805,6 +805,9 @@ struct acpi_iort_smmu_v3 { u32 pri_gsiv; u32 gerr_gsiv; u32 sync_gsiv; + u8 pxm; + u8 reserved1; + u16 reserved2; }; /* Values for Model field above */ @@ -817,6 +820,7 @@ struct acpi_iort_smmu_v3 { #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1) #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (1<<1) +#define ACPI_IORT_SMMU_V3_PXM (1<<3) /******************************************************************************* * -- 1.8.1.4