From patchwork Tue Aug 7 06:15:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ocean He X-Patchwork-Id: 10558219 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C02A14E2 for ; Tue, 7 Aug 2018 06:15:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7997A29895 for ; Tue, 7 Aug 2018 06:15:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6D2C0298E3; Tue, 7 Aug 2018 06:15:48 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, T_DKIM_INVALID autolearn=ham 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 2A17029943 for ; Tue, 7 Aug 2018 06:15:48 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B103F210DBE9C; Mon, 6 Aug 2018 23:15:47 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400d:c09::244; helo=mail-qk0-x244.google.com; envelope-from=oceanhehy@gmail.com; receiver=linux-nvdimm@lists.01.org Received: from mail-qk0-x244.google.com (mail-qk0-x244.google.com [IPv6:2607:f8b0:400d:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 67754210DBE87 for ; Mon, 6 Aug 2018 23:15:46 -0700 (PDT) Received: by mail-qk0-x244.google.com with SMTP id z74-v6so10639105qkb.10 for ; Mon, 06 Aug 2018 23:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=upEb29oY+a89tcabrxtjbMHz3lful7Qiryf0EA4+c5c=; b=byxrzc4ukGdkvy5wIL//lhC6FqgmmF543vdu12IIDqdxXZVoiPTmDDy+czMal/+6aL q+zmX7HyyO005lqueZeHrgC1564f/ZpOGHSbs8tjeQQ1Q8+3q2TsS/yvrrW5Xf/qDA1W cb5yW0DVaHwexc9f5O4FtTBuUZ7xGNkEPlzA+5IocF6GRmFUUWW4Ci/bpdZn/GodgOLV ol+rqPaAQTp1nxacZQTSa+1VhWJ04jpc7/0n5UIMgWT0s9kWvC7KX3gACui4SmcTJRsM VCqpr21sCDg2m7jMdTR4hcTh+Bb6whhcmM7hva7CjAafhQq3Y6eWA/cK51J18TX0U9aZ nZAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=upEb29oY+a89tcabrxtjbMHz3lful7Qiryf0EA4+c5c=; b=NQFAUZZQuSYNgG7qU2zhLr0rc7hk+OpLZGiIreaGKux6GPYulnSG1DJmT+uqhiymQ/ ZihDW9+5NKspECO/v32TAnV3eyLLJBL5Q0kf6Xys9Jb4Y3TioKYjsuiAqUhutuSVtB2y SrmW/S14ZIsPFWaDElcf+MH3+AbGuuPcylusbiSF7abeAW6wdtrhCNzQBV6uHLMK3jx6 x1CBWrv8ZX89Nj/0fXBYgVMCs51xpgDyCYHcRhBkZBiibVeR8egSwUxaLd8qgFWoZeXk ayWg0TbljXQQvGEGX3+5IjGQGD1FQ+qSvzoZIAWp9My4SlM1w6z8OUqwlEREZmGMcbGF DuaQ== X-Gm-Message-State: AOUpUlGTFDhfakV58pjX/CkVQSQ7CLHZP8Ldt0nZfOJ7oNpbW0xkZTni A6blVvSIl2uE9PTca2b0UUU= X-Google-Smtp-Source: AAOMgpcbpA40ZhKWavakiFiRAGxRdiiTEbFVgHElzUEnLCZ1EZkcMSH/WbkW3dwqHGCnpVAvKXGZaQ== X-Received: by 2002:a37:d61b:: with SMTP id t27-v6mr15491146qki.244.1533622544698; Mon, 06 Aug 2018 23:15:44 -0700 (PDT) Received: from 192.168.190.131 ([104.237.86.234]) by smtp.gmail.com with ESMTPSA id d2-v6sm303626qkj.76.2018.08.06.23.15.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Aug 2018 23:15:44 -0700 (PDT) From: Ocean He To: dan.j.williams@intel.com, ross.zwisler@linux.intel.com, vishal.l.verma@intel.com, dave.jiang@intel.com, rjw@rjwysocki.net, lenb@kernel.org Subject: [PATCH] ACPI: nfit: adjust annotation for why return 0 if fail to find NFIT at startup Date: Tue, 7 Aug 2018 02:15:31 -0400 Message-Id: <1533622531-3617-1-git-send-email-oceanhehy@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-acpi@vger.kernel.org, Ocean He , linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP From: Ocean He Add detail explanation why it's ok to return 0 if fail to find NFIT at startup, refer to chapter 9.20.2 NVDIMM Root Device in ACPI 6.2 spec. Signed-off-by: Ocean He Reviewed-by: Vishal Verma --- v1: https://lists.01.org/pipermail/linux-nvdimm/2018-August/017311.html v2: Per Vishal's comments of v1, it turns out that it's right to keep "return 0" if NFIT not found at boot time. This v2 adjust annotation to avoid misunderstanding of "return 0". drivers/acpi/nfit/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c index 7c47900..1b982fe 100644 --- a/drivers/acpi/nfit/core.c +++ b/drivers/acpi/nfit/core.c @@ -3353,7 +3353,13 @@ static int acpi_nfit_add(struct acpi_device *adev) status = acpi_get_table(ACPI_SIG_NFIT, 0, &tbl); if (ACPI_FAILURE(status)) { - /* This is ok, we could have an nvdimm hotplugged later */ + /* The NVDIMM root device allows OS to trigger enumeration of + * NVDIMMs through NFIT at boot time and re-enumeration at + * root level via the _FIT method during runtime. + * This is ok to return 0 here, we could have an nvdimm + * hotplugged later and evaluate _FIT method which returns + * data in the format of a series of NFIT Structures. + */ dev_dbg(dev, "failed to find NFIT at startup\n"); return 0; }