Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp6522909rwj; Wed, 21 Dec 2022 17:13:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXsOTXgPlcgLnP/fEtNTrfBjr6wbbAyBRgaZKIvRvv33w+VjlKlsdHoQTfGblq0jw7Gd+DLf X-Received: by 2002:a05:6402:1f89:b0:47b:16c7:492c with SMTP id c9-20020a0564021f8900b0047b16c7492cmr3899422edc.25.1671671583695; Wed, 21 Dec 2022 17:13:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671671583; cv=none; d=google.com; s=arc-20160816; b=EuBBYQQaMOMY2FYz85MnAE3CmhH8IAxeAoCrctndVwB6GDx0W9UBMf0+KQqC+b+bjY 6HtW6TkhUCb/6L4cZ5j8OP87J8HOnMhLdnPNpubXqBq+67vgCiZyN9CfKxCpaBRMeu1S 3G+BNg+liXPJueUrDbxxZySvRUSbXeff8lWA0VIN4T4bOoRC6mZzjAti+rYFZ7QgfSuk iWdh7bhYctaTYyZzpurZY0TM4D8mP2jsvwrO/WzwDzDmWe+JT4QFtHrTrTo7fkglt09k +kmU/7YJAVAPmAzlbs3/DL9E6QMLhRHmNpyQvqpL4CDHhSp2YEGe3V7oi1C7GmjvIX+8 CZ0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=yzZhw6ffUxADtGAtnmUBgN031mQuJfIajgUr9oqVk30=; b=0MU9KaHB/BpFP6IsqgWUVPzPBTaJhwd7Iy+KQ1Zs6OnWGL/h3K+aUwbyXru6QN6IFM i6UToAnxYQixKC8fpO+rfuIKXMHuIRu3FVUEaPG56+ecNRlP2z1/RYaOoWgMObKd3O26 y9mDFHmsG4LkIWwE+Lko1dwEzKiF4Qh5n8GbdHLT6DeWCX6axcFh+MXVca9dAUUEuM4P Q4JAzWUYNG6uYAGbeWuQEIDeMFCRcG5sEDemF1XR/xquH486VMdwbdJLMIFAef3dzGcZ anKzFIfYQ+S6efOozs/HdfQB8JiPOXO9KM8BgN0kZJiUjPptnqU3RQhl1itVX+bqgZNb OnwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dpRdWg62; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dk17-20020a0564021d9100b0046b1abd7876si2529057edb.535.2022.12.21.17.12.40; Wed, 21 Dec 2022 17:13:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dpRdWg62; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234811AbiLVAio (ORCPT + 68 others); Wed, 21 Dec 2022 19:38:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbiLVAim (ORCPT ); Wed, 21 Dec 2022 19:38:42 -0500 Received: from mail-yw1-x1134.google.com (mail-yw1-x1134.google.com [IPv6:2607:f8b0:4864:20::1134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01EF91A051 for ; Wed, 21 Dec 2022 16:38:41 -0800 (PST) Received: by mail-yw1-x1134.google.com with SMTP id 00721157ae682-45f4aef92daso8657687b3.0 for ; Wed, 21 Dec 2022 16:38:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yzZhw6ffUxADtGAtnmUBgN031mQuJfIajgUr9oqVk30=; b=dpRdWg62PLIUZnk08JFnInnXwlKhrq+AJ+tLVEj9OK/VkhR0WZ7LSpDc7zqXfXtxrV EzPbW5sJeh6WjQFbHvXeoRPsp1ZYsD0udH2dQEXEOc3nl/3DTQx0YY6TLDKMnYnEQ8mF g61IP8JQt7AujwnTNvKoJj3/6C9WWpB4lWumw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yzZhw6ffUxADtGAtnmUBgN031mQuJfIajgUr9oqVk30=; b=8FEyQ9GhUwj9DkwcsGATDzc539qHuRzzPF4mJN5ye1kH6ER2c8QkBgeGOoCsVjJ85N vo84SFs67wM0cRr3Sw1ALRgepzDc03yODRyLshIMLcq4ucD9Ciw04WgTUIwcBmtOzIPf 2MxzB97WjGBgsRsy7pP8QT+/07H9bDcO1TayW5wR5i1y+3qg6V0pMx2SQgczVsb2I1+C qph2AcwKH8359Sq4Mq9M893Bvvts3N5f8KuBieq6KEVZ2w5n6SRw2mrFV1/w5BJLv5tj 3KogJABFZB/pOgcPHzUppCWE4ouCc32oDzrR9m7zup7zkNzzNysviomxmu3Ed+/pjcC7 ghwg== X-Gm-Message-State: AFqh2krouEf1nwObyJVo87OiP9BZAXehSDSz2vtZ1zjpqGFaeTFClLZ3 K2mj2GLL7fPmuRS5oKp5VNi2WuUrPJgLHDOjqEfVPA== X-Received: by 2002:a05:690c:c98:b0:3c8:cd0e:87d6 with SMTP id cm24-20020a05690c0c9800b003c8cd0e87d6mr400912ywb.272.1671669520177; Wed, 21 Dec 2022 16:38:40 -0800 (PST) MIME-Version: 1.0 References: <20221221185540.2265771-1-robbarnes@google.com> In-Reply-To: From: Prashant Malani Date: Wed, 21 Dec 2022 16:38:28 -0800 Message-ID: Subject: Re: [PATCH] drivers/cros_ec: Handle CrOS EC panics To: Rob Barnes Cc: Guenter Roeck , chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, dtor@chromium.org, Benson Leung Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 21, 2022 at 3:55 PM Rob Barnes wrote: > > On Wed, Dec 21, 2022 at 12:23 PM Prashant Malani wrote: > > > > > > Can you provide a link (either in the commit, or here in the comment) > > to the coreboot/BIOS code which uses this value? I feel this should > > be documented in some form that correlates the caller and the callee. > > Link: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/4023535 Thanks. Please add a code link (for example, I could find [2], but you could use another code mirror if there is a canonical one for coreboot) to the commit description, or in the comment when you send out v2. > > Any reason we cannot use the existing event_notifier (with value argument)? > > It's a system panic, so I doubt that computational overhead for other > > notifier block > > listeners is a concern. > > The value field is already being used for "queued_during_suspend" in > event_notifier. OK, I suppose you could use the data pointer... It's just I find having a notifier for a single use case overkill(even 2 would be fine); one could get away with exposing a method in cros_typec_debugfs via a local .h file (it can compile to a stub if cros_typec_debugfs is not compiled to the kernel); the LPC code can then just call that method instead of invoking a notifier. Best regards, -Prashant > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bdc48fa11e46f867ea4d75fa59ee87a7f48be144 [2] https://github.com/coreboot/coreboot/blob/ff6b3af113f84a1957dcdf8a8179a751ce08becf/src/ec/google/chromeec/acpi/ec.asl#L15