From patchwork Tue Mar 7 21:35:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linda Knippers X-Patchwork-Id: 9609895 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 6A4056046A for ; Tue, 7 Mar 2017 21:35:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 584E628559 for ; Tue, 7 Mar 2017 21:35:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4D61B2855B; Tue, 7 Mar 2017 21:35:42 +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.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 183C328559 for ; Tue, 7 Mar 2017 21:35:42 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 11DFE80352; Tue, 7 Mar 2017 13:35:42 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0717.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe46::717]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 25B9180348 for ; Tue, 7 Mar 2017 13:35:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=HPEnterprise.onmicrosoft.com; s=selector1-hpe-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=lqT0XzvHjFkmIyviJOIaJNmSJYCBGBK4xuUq2mUg65I=; b=j2eloofEsY2IduG5fUQHW6bs0KPMUmC+V+sMm21UgE+/VW+wlJrDoIQmL/GvP/JPj7TGlEKaApcSfb2nCGxPoYUM38YhPzOrAiCtUG0fjbkiOl5tpe2kxkGY1nDF6jHMgTkvveAOrbPJ3/8tA4eMYxvv6Mp1KQhm6BVHAP9NgNs= Authentication-Results: lists.01.org; dkim=none (message not signed) header.d=none; lists.01.org; dmarc=none action=none header.from=hpe.com; Received: from hp-dl380pgen9-02.lab.bos.redhat.com (66.187.233.206) by AT5PR84MB0162.NAMPRD84.PROD.OUTLOOK.COM (10.162.138.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.12; Tue, 7 Mar 2017 21:35:37 +0000 From: Linda Knippers To: Subject: [PATCH 2/3] Allow specifying a default DSM family Date: Tue, 7 Mar 2017 16:35:13 -0500 Message-ID: <24665de46521e86c907e0813ee5a25956bfaf5c7.1488921944.git.linda.knippers@hpe.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [66.187.233.206] X-ClientProxiedBy: DM5PR08CA0011.namprd08.prod.outlook.com (10.175.218.21) To AT5PR84MB0162.NAMPRD84.PROD.OUTLOOK.COM (10.162.138.12) X-MS-Office365-Filtering-Correlation-Id: 591eabba-4cfa-4510-77f6-08d465a1e5ad X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081); SRVR:AT5PR84MB0162; X-Microsoft-Exchange-Diagnostics: 1; AT5PR84MB0162; 3:Fy2ih297KoLtdLwBMC1qNCGvPBhTi9n/c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EG616/EfR1R2HiwjwLPKSAlKui+pdOqTHuzfv2AcTqDl2ti05WGErH/Wh9ejfUMX20j7LvkWb9UxkDX/T80UXUgaaaeDkStgK7PPegl3m3JXmaBzvfvx8csO+muhTHtdWkhq6o/lw8uJThQ7vZz/AIV/NrswlotW2q/KD9uyTg+PpPtRmC+kfoaOUFDgSw0uK45whxM47tS3AtdDSCBEFDmAHUJGYCIrvqUCqBYyWvRTCGRGqKLOb9ShV7ZOQ+4tWz1pdi/9w7BH05SEkhYR7mfu9cajXDaFDvopHWiaanSjbsp+8qnRr3G6rwKswesQ3mDDlhwapls7DGw88axFKK8KS7vSsHy/RI67hkrNvHT3xqivyF8nMX4aS3diwEoAXBRht8QqtkKO8grbu3KOkULAj2JGDxEwaiagCYNxZfecPyz6CVx9Y9DNAZBGIQRP6zu/DbSOKJikp X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(227479698468861); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123558025)(20161123562025)(20161123555025)(20161123564025)(6072148); SRVR:AT5PR84MB0162; BCL:0; PCL:0; RULEID:; SRVR:AT5PR84MB0162; X-Microsoft-Exchange-Diagnostics: 1; AT5PR84MB0162; 4:YzmawTBExFuGO+P7gspsVLNezImWkqCHDJh5ED6A3bpynpv710t5m7QSVWh+l3yYVkQ5FwUdSkYiJt9ej9cvlqGe7aFqiBW+v88QAvG9RrRihJo4FgwiAN9vYvFW1sEw1tIf5phdTgaSDIa/MHl78xTUZITItyiF1LcicnV7upU3MroqUOBddsGZB8mBG19c74+u/tRJHWYBpkUDpAhPcM2UC0+oQSqH0lwys02lzcu/hHb2AYrrjQ9Hq72Yly1rJkGP8xUZW9xmCMrxpBUExDp1s2+ggswTihkgIUuPg0wfbo1otM8gTOgkR4sIDrwt5VLAcRZ1jFJcs1e8YmAUhqNEX3k7a5uljT/zbH3dsl7d9W75x8MRoH5JdhPCpk7xbJeeZWbVXjGvQUodXU/ob53yIazO1qjHO6kPBGJUSvSw0op0SOda8ubjWpHOgFS7ZITPbvbRf5GEixUAISzOZWSUjUti9//oDBnbXuYEdX+u5pO/wn5tqsio6RIWpr+I+jXCuo86vFAvY5b7hCXZu06pnvn35aUNL2wKRYKY4Fsvrw6XNFssJICY5/yWlehmMb759oLa0kjPmiUws2ZDfvfIYKBEZTCmu62cLeh3HsBfXaM3Yc0EdZMdXsZkRQHKbFjWmBG1JOHrrzQnJSO2OGlJOF+M+CYNocay/kJFR/o= X-Forefront-PRVS: 0239D46DB6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(39860400002)(39850400002)(39410400002)(39450400003)(6506006)(6486002)(50226002)(5003940100001)(2906002)(54906002)(6512007)(118296001)(76176999)(42186005)(50986999)(5660300001)(2351001)(3846002)(6116002)(4326008)(36756003)(47776003)(33646002)(48376002)(38730400002)(305945005)(110136004)(53936002)(50466002)(189998001)(4720700003)(6916009)(6666003)(2950100002)(86362001)(7736002)(8676002)(66066001)(7099028); DIR:OUT; SFP:1102; SCL:1; SRVR:AT5PR84MB0162; H:hp-dl380pgen9-02.lab.bos.redhat.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AT5PR84MB0162; 23:WA1HmSS9R/Y9H/HsUjQ8rDl5xicSwQIrvHnKkBmYZ?= =?us-ascii?Q?RAZ6VxspFMmRHBkpABRTJRiHe6Tfgr9pGkWAMcYw/dCQjR1C/Vh/a3jxBVK3?= =?us-ascii?Q?X3DPA+2ugqxnuxBKeKdIXdojvjyGCT94DuMW7kEi4Q0JeraZuypGvc/uJi3M?= =?us-ascii?Q?161AEHhr4vWbY7xUjpa6AzobXTG7OSDq/eQhXABQnQsO0gdWTdvzWeDwF8DV?= =?us-ascii?Q?SbNf9h5kpA8j+/x2AcFxSigcnKgJn3iaLDwocZd1mhZTYTkzOLMKwdGSeq5O?= =?us-ascii?Q?WY0bcojU60fEGfsGkdboBbqriQf5rJWfafEU/Gk3kcZZvFFtwLBRcov/wokj?= =?us-ascii?Q?OmQ4YSqTwudlWbhdfzE3oQUXNyrwLxYzuZQSDerGuUOdG0TQBE7aLrVrNoJB?= =?us-ascii?Q?Yh3IIptc9iCdVd9vbkUkVAAkeq8rO8NbMJ7rtafzYDRrF2305OnkythJanYR?= =?us-ascii?Q?vOKMz8TTDySF338GdH7vssu9KRj9zNIiZ7cnRnFhGVwTaPCCuAdRDkVoCf8X?= =?us-ascii?Q?x1HOJtMsZ3uUkqrY4CvmFPiuVZ7LbGrcCqsceFMnOumBq2q9KJ4alpb00UOQ?= =?us-ascii?Q?lki38ofDhViC/d9/QftN1Ba5gpCxNLiZEnKShxjpNRt+GHiRlJlprl8GIDNU?= =?us-ascii?Q?EA1aE196HWRHQh06UNCUKD5RgzAtS1dXdvhQ9wapwI7KyRerRzHXeLh3I1T+?= =?us-ascii?Q?5lHL4A82coRPnfnnFbId3Xs0VGhXnNvqb/82UoahjOspIaJtFdwcPsi9k0Bu?= =?us-ascii?Q?QKORylRtC6m3Gsj4OBEGa4ald0vL4NzxWV0G8zN/2fPKIY6YIQQmdqfKUsf3?= =?us-ascii?Q?r24ay9BNuaqKb4bd6vMou8Y/2+dQWVF0Rw5FT6fqE+rajnruMS7Z6Y/TymCw?= =?us-ascii?Q?vg3FF7CY97rHCcUbXiRQ2OIQvlnvB99cO5Z7omMCt90jPlfKIz4c74zeyC5F?= =?us-ascii?Q?4Rt5hn6sWQ9ZslLc38HMeahZTP0LiTcueDzjwbQlQPjLj+fl405YaxOW4aqD?= =?us-ascii?Q?IRn0PrJLEzKqwtufLNyBYmSDmIVjZzKVphDsTgb7LDg7Q=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; AT5PR84MB0162; 6:HjN7iUrmNynQoI34rg354CltxBtIgOFlgfkkRTBFWCgAjy/HO5qfim61hu0LJTH0g71n3bax5dRI06kTUD7nkqpcS/k++IkxPQUgX2p1YLcLfFySpcqStUiBYuj6JcnuwfnBkLJm4lzKU8hQX0+x+YPp6hx36SrGOo6g87pHnRv1r+p51v/0WRyOJds2C3bYaL3jeyAWV77VMz+S/TMyQTpSxiHS5OELaIgLkHfgICgyRKgyDMh+RHfoazxMTI93/blPFebiRm6bxOpGhRKp0+PXPkerWYOtaZBNZRU+xm0TYsSi/lr9Spn5IkZFrfoBAGAlCIzB9xFMUhV5mWTg4Ce1PCJuSnOGxSK6/2fIdklgsQhqZmdWk1xAecXsmHrlgM7C6v/qZ7ErJBhwEojAa+jOcPmbL8THNLC9neqPSqw=; 5:nmg+9jugAy8SDbBCQ1mmMH1hT6KB5JQvXIrm9jxqez3iKVrROJzn5bvRJvoo4teTCT7e+0t9XE586QeqoYRU9TotSGvmJSUeQbdrMsPnlUUtASCCVftz5x9s/emQL624j/K4fuxckF2SdYOmCOhsVQ==; 24:OANL8qr8+3FEK95M6sVImkJOUbc2q5Z5+EzuPqOwluYybaIjAd8ADIk8rQ1ELAR247yItH42WFSeMerajtiJq2zIZfxCNjicD9+9HmjDnpk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AT5PR84MB0162; 7:PJiX5H9zfuWmlPnsjMjDx/tNm/ldzV6OB5+YMCYFd4kBSOeo/89zRLI5TX/IZi/DjBiAa/3ZXGY1CmogjQ9sopqTJ9niAvvleLs6g0pnG8z0sQQDAKz100N8uPFIYK3lD3Tb1hLL1T14zAyeQKo4y2xFwEmD9+YYr6Psk4e4LAdd0pKxLUFHCg4sxZxukDwH6zqKm4EIEmhUK2YXnjpHjQ5zq0DUaFcO8R3r2SPcXq8eH8HGQLJPDsrkQk4tvJP4pOpVFjwRZDkmhfeIxU12LKaUw1cRKoT06OBApayctkaYe7m5Jwza6PX9nozU/jgMunKA8YmMsUliBc+kpy3FBg== X-OriginatorOrg: hpe.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2017 21:35:37.7166 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AT5PR84MB0162 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP Provide the ability to request a default DSM family. If it is not supported, then fall back to the normal discovery order. This is helpful for testing platforms that support multiple DSM families. It will also allow administrators to request the DSM family that their management tools support, which may not be the first one found using the current discovery order. Signed-off-by: Linda Knippers --- drivers/acpi/nfit/core.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 97d42ff..0564cd6 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -55,6 +55,11 @@ module_param(override_dsm_mask, ulong, S_IRUGO); MODULE_PARM_DESC(override_dsm_mask, "Bitmask of allowed NVDIMM DSM functions"); +static int default_dsm_family = -1; +module_param(default_dsm_family, int, S_IRUGO); +MODULE_PARM_DESC(default_dsm_family, + "Try this DSM type first when identifying NVDIMM family"); + LIST_HEAD(acpi_descs); DEFINE_MUTEX(acpi_desc_lock); @@ -1372,6 +1377,7 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc, unsigned long dsm_mask; const u8 *uuid; int i; + int family = -1; /* nfit test assumes 1:1 relationship between commands and dsms */ nfit_mem->dsm_mask = acpi_desc->dimm_cmd_force_en; @@ -1402,10 +1408,11 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc, */ for (i = NVDIMM_FAMILY_INTEL; i <= NVDIMM_FAMILY_MSFT; i++) if (acpi_check_dsm(adev_dimm->handle, to_nfit_uuid(i), 1, 1)) - break; + if (family < 0 || i == default_dsm_family) + family = i; /* limit the supported commands to those that are publicly documented */ - nfit_mem->family = i; + nfit_mem->family = family; if (override_dsm_mask && !disable_vendor_specific) dsm_mask = override_dsm_mask; else if (nfit_mem->family == NVDIMM_FAMILY_INTEL) {