Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp802513pxf; Thu, 1 Apr 2021 14:05:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQoZHykMldQ/kVskXQ6ZfazdrleoIM7QkGlgflaw+snSgQJzbkSzjnMOlTX/BNzZpmLPU3 X-Received: by 2002:a6b:7302:: with SMTP id e2mr8178110ioh.106.1617311129155; Thu, 01 Apr 2021 14:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617311129; cv=none; d=google.com; s=arc-20160816; b=X75C5BMriME9B0mMdCpK/oaX4eUDQ4nPXcIeySBim4/cZjjCGl/RlXa4RCGPVkwqn4 +c4/ufA80Jis5H2oVcMo4Lm+726iLKhk4Of/K4YWrgeFszseVo4cxkuFC9Vg/lOuiEZ4 I36AiP+c15AWQgrBrOOBklAb0CUdE6O02soCLOazwCACcXiPcCriBVkFVKFFVzpJvvsN yXRM5QEjLtIaNFT3EVrBnNN/DGcsCfldhwU3pxWvKd+tnnx8TLrJGmYrWuDqVzOzPMLq pRM1baqxoTwwxgfH9VY0aqDKUOxftAJKO9U+Nmqv/Sy30ffL76rQfhSy0o2OZqxucp76 RL5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=rS1LPIsezpCfocYIASL2NtIlww+sNkf6cjcT4RJnaow=; b=NpBQ67X34Iucpt6cswu23UaKOji56zZjNMYURRJjQYA4GZotnTdF/xb9NMLabN7ocQ 9KcSCFE05kfLyMCjdMJx97avgzBmTX8lzBjMjAiHVSGYOoxAzh+xBImSTNAtq/4pifEY hzdky2M2lBlnDZ+L57XufJqCF8a7PJprcpIeEFji3e23xSa/X/Hphh4lWJ96PZy2Cyyh +nN/bDJkhHH7jke+ubFvEe6wtiR9koPfWag+EJuUXov/AbCLeuXMPtbl9lAh+WhwqVEn ekRgCkO2Nw6BLuWm+/YoaknWfX7ObNbcNpMNzKAtyGVdK5ORXnCl5hDfF+obabFGfNGI paEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fwh3+pD5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q9si6402177ilu.98.2021.04.01.14.05.06; Thu, 01 Apr 2021 14:05:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=fwh3+pD5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233930AbhDAVEr (ORCPT + 99 others); Thu, 1 Apr 2021 17:04:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233710AbhDAVEr (ORCPT ); Thu, 1 Apr 2021 17:04:47 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ABC6C0613E6 for ; Thu, 1 Apr 2021 14:04:46 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id il9-20020a17090b1649b0290114bcb0d6c2so3728329pjb.0 for ; Thu, 01 Apr 2021 14:04:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rS1LPIsezpCfocYIASL2NtIlww+sNkf6cjcT4RJnaow=; b=fwh3+pD5yDTbAvFnHw+DPPjbmI6jhKr1a2h5FwBZuCtmYefNWziRgemcSVNnPTJ0He zcu31whNStsYbAhTrWIP+L/bdiMzcTF+Fp/8dS1f0TDFWHohIIFonTjAXwGAXbjwa+HJ I7zvP/F3lnV1dJLOPH43Y3Pm6QqyBlydZzfp8= 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:mime-version :content-transfer-encoding; bh=rS1LPIsezpCfocYIASL2NtIlww+sNkf6cjcT4RJnaow=; b=VGJ661MbSxojnOheCAtMJ9SkJw8TkBCqFASjlRg/xhIwR51wZJ8R0bb+G0H1yOvXpc 9FKls4uavMN32PxjFf5Ddyqm8ZM7U89MNNyQF1aVcMAvtPLR9J3jdH47RCrosv3EVx73 hHz+tmp+G7QVBEOpZBW3B4lMPuBbUexg0Iy+5l4jb7pH3ElGVSZ2LjVEYvZ9xLy8MCM0 7OA1jyaQvgdXCpIvSevP6yLUSEiTp+UhwWOyYu1MN73HPDaDC9Op+TiT7+Qli741CR8N 3TfmNPcWp/38VoWOfifBb4hMioupdGtTDKkpwE19zZuHdYZkLjlcWjhS93ySbweymibN CENw== X-Gm-Message-State: AOAM5310DaeLDD2dB6c8jGQ1WT5GHAMzMq3liT2dejDwW4I/331HJdka k2AaFNyNc1pvGcq9Z56fOqrYUQ== X-Received: by 2002:a17:90a:174c:: with SMTP id 12mr10470133pjm.40.1617311085643; Thu, 01 Apr 2021 14:04:45 -0700 (PDT) Received: from evgreen-glaptop.lan ([2601:646:c780:5ba8:208f:468e:f20:f4a]) by smtp.gmail.com with ESMTPSA id j3sm6177873pfi.74.2021.04.01.14.04.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Apr 2021 14:04:45 -0700 (PDT) From: Evan Green To: Greg Kroah-Hartman Cc: Ard Biesheuvel , Arthur Heymans , Patrick Rudolph , Furquan Shaikh , Evan Green , linux-kernel@vger.kernel.org Subject: [PATCH] firmware: google: Enable s0ix logging by default Date: Thu, 1 Apr 2021 14:04:36 -0700 Message-Id: <20210401140430.1.Ie141e6044d9b0d5aba72cb08857fdb43660c54d3@changeid> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Many moons ago, support was added to the SMI handlers to log s0ix entry and exit. Early iterations of firmware on Apollo Lake correctly returned "unsupported" for this new command they did not recognize, but unfortunately also contained a quirk where this command would cause them to power down rather than resume from s0ix. Fixes for this quirk were pushed out long ago, so all APL devices still in the field should have updated firmware. As such, we no longer need to have the s0ix_logging_enable be opt-in, where every new platform has to add this to their kernel commandline parameters. Change it to be on by default. In theory we could remove the parameter altogether: updated versions of Chrome OS containing a kernel with this change would also be coupled with firmware that behaves properly with these commands. Eventually we should probably do that. For now, convert this to an opt-out parameter so there's an emergency valve for people who are deliberately running old firmware, or as an escape hatch in case of unforeseen regressions. Signed-off-by: Evan Green --- drivers/firmware/google/gsmi.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c index 3d77f26c1e8c93..bb6e77ee3898c1 100644 --- a/drivers/firmware/google/gsmi.c +++ b/drivers/firmware/google/gsmi.c @@ -136,12 +136,16 @@ MODULE_PARM_DESC(spincount, "The number of loop iterations to use when using the spin handshake."); /* - * Platforms might not support S0ix logging in their GSMI handlers. In order to - * avoid any side-effects of generating an SMI for S0ix logging, use the S0ix - * related GSMI commands only for those platforms that explicitly enable this - * option. + * Some older platforms with Apollo Lake chipsets do not support S0ix logging + * in their GSMI handlers, and behaved poorly when resuming via power button + * press if the logging was attempted. Updated firmware with proper behavior + * has long since shipped, removing the need for this opt-in parameter. It + * now exists as an opt-out parameter for folks defiantly running old + * firmware, or unforeseen circumstances. After the change from opt-in to + * opt-out has baked sufficiently, this parameter should probably be removed + * entirely. */ -static bool s0ix_logging_enable; +static bool s0ix_logging_enable = true; module_param(s0ix_logging_enable, bool, 0600); static struct gsmi_buf *gsmi_buf_alloc(void) -- 2.29.2