From patchwork Mon May 2 00:33:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 8989681 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 108FFBF29F for ; Mon, 2 May 2016 00:33:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F24CB20165 for ; Mon, 2 May 2016 00:33:35 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id D40182015A for ; Mon, 2 May 2016 00:33:34 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 9DD8C1A1E89; Sun, 1 May 2016 17:33:34 -0700 (PDT) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mail-oi0-x232.google.com (mail-oi0-x232.google.com [IPv6:2607:f8b0:4003:c06::232]) (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 29DAB1A1E89 for ; Sun, 1 May 2016 17:33:33 -0700 (PDT) Received: by mail-oi0-x232.google.com with SMTP id x19so174019118oix.2 for ; Sun, 01 May 2016 17:33:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=kPDOD5t+fkUUmgTl4A4cd8zfR1NXWHh9KmOvxN3ghcc=; b=cd7G6Uu+DdgRvrBQQ2tSnjrqXDwI71bfOMRRDT4dMAUpsjf6kX1spV2UiPaQYZXCye hd79/W1m47wmA64eWoRgwiEINDQqZMNM1OZKJbiPAtG2IimrWALs1t4NcSur9cK7o9K5 h1K97pTc3U64pq2Svfy2l+BM1Sqz12xa8pp9JbKTl1cpDU5fDKkosq8W86Sd92lo+xze HP3maVq21M01HE77p1miJGxHdA5z+xCa0DB0OzAl1n8QJ4vHTwIjLobayr3KpQ7GprtP ERddHAYhKqtdaofhT3dsS6MUhufPsorSasMd4/rsUKVhyCPdHG3SOgDUgLbwRYTta8Sz xyYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=kPDOD5t+fkUUmgTl4A4cd8zfR1NXWHh9KmOvxN3ghcc=; b=dEh63hy5TQY8PoURzRtakbQ6JshKfidaC1AhnpevK70oIHwkx7eGBwB02Z5QnyycZ3 zuLnuRnOQOMzlty5y0LBAB5UD2M/9Nan8mDhXcJ0Or2uKGj+/CZdPWpLSz8kgM57deGt YmemPWylvSZh+bm5O3tYMfsAIDzMGp96KhiF0Lgo6pSG7rlilk2HxJQP1GIJ19g7xphy JETqSpjBBdN7dWitUpuMbq/VNYk+qEuTXSoD8Or9H5oqTQGl9XRJpHJf3GtVK2NRd/4y IoWVB8V+N2BddBSdOv9kTaE+xffbLVMwToNaJsEdkNUOsoVXmAoKi7o+zvv1YyDnMuQf uvwQ== X-Gm-Message-State: AOPr4FX5UBuegYBwDHCYjKUG5+Rs2MfiKZ/SiJWA4Zzoe74XoxFe0ObTOBZcpA3T7j+MySAXTEZ2ZFBCkeGN6p8g MIME-Version: 1.0 X-Received: by 10.157.55.139 with SMTP id x11mr14498486otb.66.1462149212202; Sun, 01 May 2016 17:33:32 -0700 (PDT) Received: by 10.157.38.39 with HTTP; Sun, 1 May 2016 17:33:32 -0700 (PDT) In-Reply-To: <57265CA5.8040503@hpe.com> References: <5723EFEE.9060200@hpe.com> <5726400D.10700@hpe.com> <57265CA5.8040503@hpe.com> Date: Sun, 1 May 2016 17:33:32 -0700 Message-ID: Subject: Re: acpi_nfit_query_poison() broken on non-ARS systems From: Dan Williams To: Linda Knippers X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-nvdimm@lists.01.org" Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Sun, May 1, 2016 at 12:44 PM, Linda Knippers wrote: > > > On 5/1/2016 1:42 PM, Linda Knippers wrote: > >>> >>> Can you add some debug tracing to xlat_status()? Something is not lining up. > > I put a printk at the top of xlat_status() as well as in each case statement. >> >> xlat_status() is not called from acpi_nfit_query_poison(), which is called at >> boot time. Not sure if we're getting there from acpi_nfit_scrub() or >> acpi_nfit_async_scrub(). > > Ok, it actually is being called, but only for the start command. See attached. > > BTW, this is with your rewrite of Jerry's patches but I saw the same > behavior before I applied them as that's what the previous dmesg output > was from. > > One thing you'll notice in this new dmesg output is that unlike before, > the acpi_nfit_ctl() function prints the DSM number, not the DSM name, > when displaying the input. It prints the DSM name when displaying the > output. > Found it. This is one of those brown-paper-bag bugs that tells me I need to figure out a way to unit/regression test the interface between acpi_nfit_ctl() and acpi_evalaute_dsm(). In this case I injected a __wrap_acpi_evaulate_dsm(), but I can't ship it as a new test in nfit_test because it relies on an enabled BIOS for all the other cases. ACPI_FREE(out_obj); diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c index d0f35e63640b..24ef312fdba3 100644 --- a/drivers/acpi/nfit.c +++ b/drivers/acpi/nfit.c @@ -287,8 +288,11 @@ static int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, offset); rc = -ENXIO; } - } else + } else { rc = 0; + if (cmd_rc) + *cmd_rc = xlat_status(buf, cmd); + } out: