Received: by 10.223.164.202 with SMTP id h10csp1007464wrb; Wed, 15 Nov 2017 11:32:07 -0800 (PST) X-Google-Smtp-Source: AGs4zMbXku5ZqsEvPmxDXsA6jOPIz3R0pdMA4U1oMBaMPd7+GzvytjZNU8pGmdIYbJaw0Uhc3ZOS X-Received: by 10.98.202.133 with SMTP id y5mr18956707pfk.122.1510774327467; Wed, 15 Nov 2017 11:32:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510774327; cv=none; d=google.com; s=arc-20160816; b=BXMyqYFAGzDI7IAhSvloWMuSyhdAOBA3sZVEr2iAUbmFG6R+e7jBIft0uLqF/1IhFv GpUyd77ZkSwEtOz6G967o6p3KyNqKoRrJUK1/1eR7rGCn6YVsKTpN9d1RDd7JwZ74bgA 9I74zYSxBZQgb5qg7yhpvgd1a0594LKGoiK/U7P5A8UPrGwqCGEDiisjeUpP9P1JQs0I W+JK6phf/Ktq5GUwzMygWJHKnUCaR4NiQdTaxUHM62+voDCPXbmVakqBcvRq9li/zVtJ qdmQzyNsjYzkbQYurgcgl/VzV5oOsPRxqTNhM69qHeeZZQ0V5Ar0nL+y/1n/CyAnA4NH 3qdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=04oR8Uu9zDeFQMIEeD5orhy9t2c/JMWsewjbMNltC2k=; b=QwXkOTNpPxS+daGtD2bUI41BRM8agc9VlR/bKAYaW30pvXPNJ5grMDjVUGQE/kfgJ7 i9Jl/yJSIHEpxJrVDgX1imrN/LbafV0JUhXGdSHfNORcFkQTX6sxxyxT4sOgpnXj/J3X H39HlBWngIFe6UiG4r6M8FOdZGvXR09n7XhYtVBHAGs4SIvtDoTs24IHAp2hwpPSSsse +9OkBoGo+u49muy10vl9PxLguA1GEE/QTGVZijlImRqITjSJ0kqGutGYdCfg8chMAVtd tfFEeAZ9EdxaUCqLRhLqgCWMRhLARx9Z+8M+mOLCAoD+JIQkRLLogUg18Uxo+hJXzELg 72mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=JouYs3tw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 92si18667208plw.30.2017.11.15.11.31.54; Wed, 15 Nov 2017 11:32:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@CAVIUMNETWORKS.onmicrosoft.com header.s=selector1-cavium-com header.b=JouYs3tw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758840AbdKORaE (ORCPT + 90 others); Wed, 15 Nov 2017 12:30:04 -0500 Received: from mail-sn1nam01on0089.outbound.protection.outlook.com ([104.47.32.89]:33728 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757627AbdKOR3z (ORCPT ); Wed, 15 Nov 2017 12:29:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=04oR8Uu9zDeFQMIEeD5orhy9t2c/JMWsewjbMNltC2k=; b=JouYs3tw/x19C9b4buDQXJEtRJu8u6EYM8yqivuqWQp6xKoTwHqw5yyfZKaFLc64G5QlLmcnXUPW6OqeNY0qAUn+ObanxJe2/fbFCUgy+hMnslYnZSzzIcJvzW4xAwiUVnKM2CkbdXE4I8Q5IkRdI28MGS1/Y0Dp53g4iiclHEU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Ganapatrao.Kulkarni@cavium.com; Received: from mypc.cavium.com.com (111.93.218.67) by BN3PR07MB2561.namprd07.prod.outlook.com (10.167.4.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.218.12; Wed, 15 Nov 2017 17:29:49 +0000 From: Ganapatrao Kulkarni To: linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: fenghua.yu@intel.com, tony.luck@intel.com, rjw@rjwysocki.net, lenb@kernel.org, guohanjun@huawei.com, jnair@caviumnetworks.com, gpkulkarni@gmail.com, Robert.Richter@cavium.com Subject: [PATCH] acpi, numa, ia64: Parse all entries of SRAT memory affinity table Date: Wed, 15 Nov 2017 22:59:02 +0530 Message-Id: <20171115172902.20083-1-ganapatrao.kulkarni@cavium.com> X-Mailer: git-send-email 2.9.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0097.INDPRD01.PROD.OUTLOOK.COM (10.174.208.13) To BN3PR07MB2561.namprd07.prod.outlook.com (10.167.4.150) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 735ebb10-9117-4b51-fe3c-08d52c4e7bce X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199);SRVR:BN3PR07MB2561; X-Microsoft-Exchange-Diagnostics: 1;BN3PR07MB2561;3:j/rby1Bx3p6bRnZHI46NyDzBI4Csm288LbPonz6KMFjVoteHIESGAjapWaf6djPK3RUF21QYh7LfenKUf3lD5ijMLfL3OMrHz/CqROOumGYPvFGD5AH0x3Ff1QDf4KdhP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o5K8UPQP0b8+3LgO1qFP/DoPbI8fDDm7JnbxN9VNWSwNTcyTuNo2fMNdXBRwmn4psnjQg0oDWvBvCicEYqdTCBAx7qjhu1anOufD/IEAKOP2nSqlw7YLEtm5m75APU9FMlA31Kz8FLR6NGq6+t6aZ9uPaKJy+pcXsx39Nat1zEclHbjK94scqtwRlsKe83MrsHHUEu0i1hBVjZLhL2oDh;4:YTpwAWrP3SZkq1TzcHaX17GTT/JVkKo2MpmhzuN3J0O2x9VMQuDP8K2/pux5uuCw7zQiiJQ7jgb5FZNNCXk23XZPY4Ei7vDkcn+EQO9Bmceqio218z1OQo2huWvoAmBlZ7QWodm0kGxTnbErO7A3HqJH5so4QAgo9MrF0vtrh6iZU2teBeBlTNrrD8NNdknWdhfhuAXSsbzZ7kSy9k+zNgjtZJ9hWRZMUk8+hm+W9bEXhVbgrIumeIttTIxox9BuOHLRehn3B5wkgdyVljWDyg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(3231022)(10201501046)(93006095)(93001095)(6041248)(20161123564025)(20161123558100)(20161123560025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BN3PR07MB2561;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BN3PR07MB2561; X-Forefront-PRVS: 0492FD61DD X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(346002)(376002)(199003)(189002)(50226002)(189998001)(33646002)(106356001)(81166006)(6116002)(81156014)(47776003)(66066001)(3846002)(8936002)(8676002)(5003940100001)(105586002)(97736004)(305945005)(50466002)(48376002)(6666003)(1076002)(7736002)(5660300001)(86362001)(68736007)(6506006)(50986999)(72206003)(39060400002)(16586007)(6486002)(2906002)(316002)(478600001)(107886003)(4326008)(5009440100003)(36756003)(101416001)(53936002)(25786009)(6512007)(16526018);DIR:OUT;SFP:1101;SCL:1;SRVR:BN3PR07MB2561;H:mypc.cavium.com.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BN3PR07MB2561;23:4YpB57ZBz3m55Ol+Go2383unM+cxlxcxSLnH6noZ1?= =?us-ascii?Q?IC0T0Rd+NSkI0FJX0DAFHNe1Z/nEk6zonuxZdWFeCXupF/qOg1VphMw2TeXg?= =?us-ascii?Q?kUwdEh34qNNZL8mTk5PqRAnpautIAghFEKmzzm1+AfYf4Z/ibybTaCd2Vq9X?= =?us-ascii?Q?bFXT0GxiAtJlffDM4BxHp+VnpHJvbUBHtvaQjbSiUTomJF6+9W7exu6irQZa?= =?us-ascii?Q?NTJWD1Qr8hvxc+vLRzB1t94XEs5f8PbThKqh/IN9ouwPSuK11kp8Y30l2GY5?= =?us-ascii?Q?RUZpDckMFsNgufbazsWPmoItBHwCS8Ubv02Se39vzYJPLnXvU4mSyWw5JmZv?= =?us-ascii?Q?tmp6byBZ82/pD82M3wo3OnULnDeLL51FdvIxNESfA3cHTGN2ohF+b1GnIk52?= =?us-ascii?Q?MWIsXnXOjS2OMxmHvOEHSPGC+Mn90QRAVgbR8XUN95NmIyGvS0O8rO/37uSi?= =?us-ascii?Q?eTJ4QZQQlZslJN3ENLJxKRNam4CtVSbcEHUbTP/iFppJ5vPA09IehDP/AO+M?= =?us-ascii?Q?A3TPUOpt8Pu1Xt2846UJGJlvTdOUdCXF+rqvdLVKzk4b/YtFSswqB4Ee8rzd?= =?us-ascii?Q?rHda9EzI2OPabxyL1LKjy70v0su1q555zWQZJ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qXJgK7SO33WdUKkE++6r2/aqLRSWsKd8C6BBtBu0imemqV7sMpDH3NwcXec0HGJf4iR7Wosat2bX+qzja3LjzlI/vKlcIxDynwgVeqsycMsvJbZIQycID9aDc4vyM8Vt4hi5mxo=;24:ICZaFWNNDmwBuFInf7UlxuzrZvCevRh3ot6OaRm4hNPBZQVF4y4kkEuyZAOXmWofAXMKJ4k1vSI4/hT+GSBm3IGw5I7p1bP6pUauHWVoPZY=;7:ndzP/Xf5bwqwYKXMJEBTh2QXKMNKAIZQUiybzGlE6JkM1cFw5brtyOLwEiWcRW0YEsH2QmkTCuvffHCzeUdiAg4asCiiAdiiso5C/TfMpe2BJ5bEAWhhNphPdIeiR3ovWhOwgUnk2AuZ26e9mGyd5dLwrmfstsBuHlEhddRoKEqFPDm1G09WBD8kjtSWUjWs/EU2Kv4ZtN8Tl4I9zzAcRu4maMSUxc5PDmduvHbZMhKeR1JjI91O59GX9R4HrtNE SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Nov 2017 17:29:49.9496 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 735ebb10-9117-4b51-fe3c-08d52c4e7bce X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2561 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In current implementation, SRAT Memory Affinity Structure table parsing is restricted to number of maximum memblocks allowed (NR_NODE_MEMBLKS). However NR_NODE_MEMBLKS is defined individually as per architecture requirements. Hence removing the restriction of SRAT Memory Affinity Structure parsing in acpi driver code and let architecture code check for allowed memblocks count. This check is already added in x86 and extending same to ia64. Signed-off-by: Ganapatrao Kulkarni --- arch/ia64/kernel/acpi.c | 5 +++++ drivers/acpi/numa.c | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 1d29b2f..1dacbf5 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c @@ -504,6 +504,11 @@ acpi_numa_memory_affinity_init(struct acpi_srat_mem_affinity *ma) if (!(ma->flags & ACPI_SRAT_MEM_ENABLED)) return -1; + if (num_node_memblks >= NR_NODE_MEMBLKS) { + pr_err("NUMA: too many memblk ranges\n"); + return -EINVAL; + } + /* record this node in proximity bitmap */ pxm_bit_set(pxm); diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 917f1cc..8ccaae3 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c @@ -460,8 +460,7 @@ int __init acpi_numa_init(void) srat_proc, ARRAY_SIZE(srat_proc), 0); cnt = acpi_table_parse_srat(ACPI_SRAT_TYPE_MEMORY_AFFINITY, - acpi_parse_memory_affinity, - NR_NODE_MEMBLKS); + acpi_parse_memory_affinity, 0); } /* SLIT: System Locality Information Table */ -- 2.9.4 From 1585771740382502699@xxx Sun Dec 03 14:03:00 +0000 2017 X-GM-THRID: 1585771740382502699 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread