Received: by 10.213.65.68 with SMTP id h4csp2113944imn; Sun, 8 Apr 2018 20:04:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx48y3XpTSVCG3y2yQ6bQlE7x1Bht1kedeckTWWxiYS9Cy3gh3iYLG1Qo2ocPc2ookLz/Qe6y X-Received: by 2002:a17:902:d20b:: with SMTP id t11-v6mr7391374ply.381.1523243042096; Sun, 08 Apr 2018 20:04:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243042; cv=none; d=google.com; s=arc-20160816; b=oll1/gnb9eg9eH6+kJ7E4goQu+Xr/0dIGKLZgmYkMBL5EMPYYT8ZiY1caqmM6LZGQB UlXjFtjrQMYViqazeEDs5MN3q9Gj+tE78G8unAcF3q+CfMQ2M2N/Po5m2lZR584Ez052 5Dn1nN6dlzBGineirlRBH/O0b7unaW3y0IsCae0XQhrc7hFqPvw05Gd9F3VxaBSBu4pP KcwZJ4Znq/GU2u9W2ToniUY1Bdco20jwmSq4VL1pnrQKJzvJqYjjTDiUNKCMngwn4H7o 829CJf3ZJC/2/M+YOikNQxVMVfepX2gU/EnmSUPhITMAMQ+AiQmYYnhus+33O524TpvT fxag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=88kVAncQk1XPMpOpte0jijVxZdk1H6zSCFTjPmHclBk=; b=SC6QX9CTsEABO0qDwQn/2rWL4zxJ4tFcjyHEgwWeZBGr3gqjh8+7zq9Iezk1pu0zfL cFsUzwLOXDWNlNVDCH/ucLw6LT1YEwMk1N8bE8o4hkLo4HGkgquFAITifzmEl3qIrodX 5x0jvkx9QFXoyPTi43NqVDH7Xi+y77/QBd6FvIglYSRNghTYjm+fqvu657X81Ly2+wSj KDmjsnJNVkgLc81jY0CKfT4171Sn6HqHwltb7IQ3g+1tDUyHJz1TV4AqI0WwXmqf0Egf ZykbSG/APo7gxo2nrtC1WfUPpU2r8LMPNxh5dNu4iZYKgDlJp+B+2r948+o9DIKahD1W rpCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=cSw8JMKm; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o19si8168657pgn.197.2018.04.08.20.03.25; Sun, 08 Apr 2018 20:04:02 -0700 (PDT) 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=@microsoft.com header.s=selector1 header.b=cSw8JMKm; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756205AbeDIAbN (ORCPT + 99 others); Sun, 8 Apr 2018 20:31:13 -0400 Received: from mail-by2nam03on0135.outbound.protection.outlook.com ([104.47.42.135]:16544 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754851AbeDIAbH (ORCPT ); Sun, 8 Apr 2018 20:31:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=88kVAncQk1XPMpOpte0jijVxZdk1H6zSCFTjPmHclBk=; b=cSw8JMKmmei+aENBh5y8wZiQ0sdycz4gnbQp5VUqfzrqAyntBp92rvU1YQ5ZDjS0kwlhZOwtP8KHitZPoLMvjdw0oNGTaG7c4XoK6OWYNQ+T33eLWuJPhnk8IYvnYRXLCZJEDEaObXBkcmaSiZdQHwAlBRtvcB94VMZDqShMjrw= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0917.namprd21.prod.outlook.com (52.132.132.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:31:05 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:31:05 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Dan Williams , Jeff Moyer , Christoph Hellwig , Matthew Wilcox , Ross Zwisler , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 152/293] libnvdimm, pmem: fix persistence warning Thread-Topic: [PATCH AUTOSEL for 4.9 152/293] libnvdimm, pmem: fix persistence warning Thread-Index: AQHTz5ktzw5kzqj8I0y83vxLpQ7ONg== Date: Mon, 9 Apr 2018 00:24:52 +0000 Message-ID: <20180409002239.163177-152-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0917;7:CWTCnIc8pbngbth2ESVl97bnlr4Q4kyStF5nvf1a+UerdM7SjGAn6j6JEcRf2VlpSya0gEeY7N+l2tFb2Xf3pq8SirHk+RTcV31R+5G2/BzPIkgMpRBbvGwP9GrxCp6iLlnTHJApE8WJhIRLxInltc2+rHnSSkDjKVG1S0iuKPGsxMAe2ZEprB9KyWU3YNMd8f0lww8vqfJuR1Y4J0LJDLnfK9KUkTyUq60N04pi5LzZECjwA+6oWtdWMXugTELS;20:P8mh+SCB4hWxHh8kHqTtrQKBtaWUhwIP+aO9512VCTJaZbDGhTQel4QKn2arqCOS9V9iMLqdFJptHJfaC5VNhBrF1aYuXu9ri3pvNdtGw6thZ7crdrAEN9p2QL1ZFw9OD2MNgayRoCKMPEe8GURDo5xM0MTfKjyn1fDtNCF92pg= X-MS-Office365-Filtering-Correlation-Id: b74d85d3-e384-4d0d-e060-08d59db12e3f x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(3008032)(48565401081)(2017052603328)(7193020);SRVR:DM5PR2101MB0917; x-ms-traffictypediagnostic: DM5PR2101MB0917: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231221)(944501327)(52105095)(3002001)(10201501046)(6055026)(61426038)(61427038)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB0917;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0917; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(39860400002)(366004)(396003)(346002)(376002)(189003)(199004)(99286004)(22452003)(106356001)(26005)(110136005)(478600001)(54906003)(10290500003)(316002)(1076002)(72206003)(186003)(4326008)(97736004)(66066001)(11346002)(25786009)(86362001)(476003)(446003)(2906002)(6666003)(6486002)(105586002)(86612001)(3280700002)(3660700001)(6512007)(3846002)(6116002)(6436002)(2616005)(486006)(53936002)(7736002)(8676002)(81166006)(81156014)(8936002)(68736007)(305945005)(10090500001)(76176011)(6506007)(102836004)(36756003)(107886003)(2900100001)(2501003)(14454004)(5660300001)(5250100002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0917;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: vY/BCvXlX94r7lbiqAFCv3vGF+F8+cLE46/VmnP/f4Bu32GHndOPnypvLmHtCqaugxdfQQkWZ5S0wiSlki583yH1mK16TbqC+FW1eSKFGrOwiCg4vNLgutW2P9XiIO7p3R/P0jBDqYdcqYZN4bvx14SWrLSEpUJvjnG8lBnC2sHmiT7rcopP7LO2QB6yoMZJIuAZCQtS2lADuDDBaXfAUVVy5BXZyo8qp9RLsrSqNKLZUAOonNnBxczbV7MugiJ7ewg4n0rRmJWQf1XgtaNDJVrEds8fSwv2i86kOCmBkpcrEu2mShh9do4OGobQH2bAa+IdppRaxXKD2MJrPdubviHMQT5bG1C/uoeLXY0D/W29Qb0lgI5KJN2NhFZrkxPT2JIyAYzoxtyNZRZPOSjvwLx1UDH2bdoFx1l4vYBQNfY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: b74d85d3-e384-4d0d-e060-08d59db12e3f X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:24:52.3626 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0917 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Williams [ Upstream commit c00b396ef782cb2296200d868a0013d8ca1d615e ] The pmem driver assumes if platform firmware describes the memory devices associated with a persistent memory range and CONFIG_ARCH_HAS_PMEM_API=3Dy that it has all the mechanism necessary to flush data to a power-fail safe zone. We warn if the firmware does not describe memory devices, but we also need to warn if the architecture does not claim pmem support. Cc: Jeff Moyer Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Ross Zwisler Reviewed-by: Jan Kara Signed-off-by: Dan Williams Signed-off-by: Sasha Levin --- drivers/nvdimm/region_devs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c index f62306246ca4..2ac9c6222914 100644 --- a/drivers/nvdimm/region_devs.c +++ b/drivers/nvdimm/region_devs.c @@ -970,8 +970,9 @@ int nvdimm_has_flush(struct nd_region *nd_region) { int i; =20 - /* no nvdimm =3D=3D flushing capability unknown */ - if (nd_region->ndr_mappings =3D=3D 0) + /* no nvdimm or pmem api =3D=3D flushing capability unknown */ + if (nd_region->ndr_mappings =3D=3D 0 + || !IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API)) return -ENXIO; =20 for (i =3D 0; i < nd_region->ndr_mappings; i++) { --=20 2.15.1