Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8479662rwl; Tue, 10 Jan 2023 14:18:26 -0800 (PST) X-Google-Smtp-Source: AMrXdXun3MilLD7DHSkYVyHb9F1yAXVKDQdAdBzwtNTb1GEYViMD0G4tM0hGb8c6wm35tYAngYAS X-Received: by 2002:a17:902:b60b:b0:192:b6af:415 with SMTP id b11-20020a170902b60b00b00192b6af0415mr440042pls.14.1673389106739; Tue, 10 Jan 2023 14:18:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673389106; cv=none; d=google.com; s=arc-20160816; b=Ab+KCIvexxmpSiWane7fWiQkygdJdD5l++dVxabDiYUl9s8yX+3vDbDmqwkq0nWea/ MouFv5l9GSgkXsTYXAbW5scyC06xx+vNs0vzdITkudLhNMVjIuhr7ZjrUkFtcBFqxDEu PeQuunGG8A5cZnUo3PUHvOmMaZN09f/LO+lYtEnV2Cp5jEq13g8UQCnfrX4AJFL8vfrx 9ocwfokct94XhlDyt2gH4rW3MpJAUWbgdVQLw5OUaWFUJP7/70SOPTA54Fp98hmuuIQ6 M3uClPJWTAbOG1P2VdNMmpfiYNBiNtO28S/vVa+ceXRuJLCGFEGooKi/umFQ+XSPUhDF t0xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:cms-type:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dkim-filter; bh=aDwwXnazPVSQ+yvIKpbLVcKE8HhnZcKuDsNRJFw81Qc=; b=s6IpKdxnxvOGbBzrE+HC13Jlj5Vy1TeWpVb9R7PKmskJo1brafCpNC70XNdWdSXGp8 CLpabC7TFFIJhsF0q2TLD0Q16GOmPm/qVOYc539N4LormPHVTmf1SG3WHgdDv7Zd7pQn b90d/fNsQE4h8g5cqyWDCrE7KqmxlO6CFVSAavxP4GoYgXkVqrb2DxMitW6MlfUx72RJ f74k99pZ8nQqsriwzH5M5bo8emyWpPXeufd3T+TXDylDlgrkYKd9WPDp+yY39FZQhGcb D9pbx2FmGb4Q4tf0KJLm9w/CHUsraA5UfRI/aWMS3nZyylmKTyyPN/75pTkGcTUxJiaJ v0Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=QxyBm1eS; 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=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i191-20020a6387c8000000b00496ed742e61si1955849pge.40.2023.01.10.14.18.19; Tue, 10 Jan 2023 14:18:26 -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=@samsung.com header.s=mail20170921 header.b=QxyBm1eS; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234164AbjAJWLI (ORCPT + 53 others); Tue, 10 Jan 2023 17:11:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232123AbjAJWK7 (ORCPT ); Tue, 10 Jan 2023 17:10:59 -0500 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 421BF2653 for ; Tue, 10 Jan 2023 14:10:53 -0800 (PST) Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230110221052euoutp01fc8073b44c4f32e243290409edb6babd~5Ehz-BoVF3098630986euoutp01t for ; Tue, 10 Jan 2023 22:10:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230110221052euoutp01fc8073b44c4f32e243290409edb6babd~5Ehz-BoVF3098630986euoutp01t DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1673388652; bh=aDwwXnazPVSQ+yvIKpbLVcKE8HhnZcKuDsNRJFw81Qc=; h=From:To:Cc:Subject:Date:References:From; b=QxyBm1eSrsILoV+lArCo4Rf1YKbPmfdhJCZgFHK9wpzC8S69Mjr3WkWe78e5fXUkj xBUScD9K5DHTaSneybhy8HNHSyXj4sK7IKW9kt3+GyTD6mw19tW5DNTFXnUVpFt8Wn XJMsdOolpZrYBvq9+W7Hf3RKcqaaahS3ufnphR+c= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20230110221051eucas1p120137684dafb329829719aa2fedaa151~5EhzfKehp1952319523eucas1p1a; Tue, 10 Jan 2023 22:10:51 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id F6.E7.43884.B62EDB36; Tue, 10 Jan 2023 22:10:51 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20230110221051eucas1p26888130e7de454995a00918456c99bdb~5EhzDy8hm0420104201eucas1p2M; Tue, 10 Jan 2023 22:10:51 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230110221051eusmtrp1a22a8ee2b02baa57e5a4241c6ad47c60~5EhzDNJbE2004620046eusmtrp1L; Tue, 10 Jan 2023 22:10:51 +0000 (GMT) X-AuditID: cbfec7f5-25bff7000000ab6c-97-63bde26b30e8 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id A9.58.23420.B62EDB36; Tue, 10 Jan 2023 22:10:51 +0000 (GMT) Received: from AMDC2765.digital.local (unknown [106.120.51.73]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20230110221050eusmtip10f91a3a1a577cafdf8e70175dc0c5729~5Ehyen3pN1935119351eusmtip1P; Tue, 10 Jan 2023 22:10:50 +0000 (GMT) From: Marek Szyprowski To: chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org Cc: Marek Szyprowski , Benson Leung , Guenter Roeck , Tzung-Bi Shih , Prashant Malani , Rob Barnes , dtor@chromium.org Subject: [PATCH] platform/chrome: cros_ec: Fix panic notifier registration Date: Tue, 10 Jan 2023 23:10:33 +0100 Message-Id: <20230110221033.7441-1-m.szyprowski@samsung.com> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLKsWRmVeSWpSXmKPExsWy7djP87rZj/YmGzx/qmkx/cllFou3y+Yx Wsxs2s5qcerVMmaLy7vmsFmsPXKX3WLqhdnsFm/nb2K3+H53IpMDp8fshossHgs2lXpsWtXJ 5vFi80xGj74tqxg9Pm+SC2CL4rJJSc3JLEst0rdL4Mr4fXktS8E9oYqN6/waGI8IdDFyckgI mEicmPmasYuRi0NIYAWjxL2rk9ghnC+MEvfblrJAOJ8ZJRbe/cTaxcgB1tK3IwIivpxR4t+R n4xwHVumzGIDmcsmYCjR9bYLzBYRcJT403CHFaSIWaCBSWLW4Vdgk4QFvCTO/+UCqWERUJW4 +nQaO4jNK2Aj0Xahjx3iPnmJ1udbWSHighInZz5hAbGZgeLNW2czg8yUENjBIfH47y8WiOtc JFZ2x0P0Cku8Or4Fao6MxOnJPSwQ9e2MEgt+32eCcCYwSjQ8v8UIUWUtcefcLzaQQcwCmhLr d+lDzHSUuHJeHsLk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DINwtJahaS1AJGplWMIqmlxbnpucWGesWJucWleel6yfm5mxiBob/t2M/NOxjn vfqod4iRiYPxEKMEB7OSCO9Kzj3JQrwpiZVVqUX58UWlOanFhxhNge6byCwlmpwPjL68knhD MwNTQxMzSwNTSzNjJXFez4KORCGB9MSS1OzU1ILUIpg+Jg5OqQam3XX2k68UCFzI6b2VqJbL XmEaIFTlq3xowYHchFPsBzhbZ/xPX+zM6W9o2t7kOnVZVYnYzave7Bvqtoum3GTJ+uhcwPX8 8LE1N0VST8rKx4qYaV1r7J847crlr5xrVHfv53nSon3Rs0bHa6qX7cUPE6ed9l3D7Sr60ln7 0t/pP5wY9waeXrftRde+WyYhyU/7ly/Nv+Jy6MrEB6EXz5WoTdW68+nKdfPvqU/dXldmXRNW CDBY4XB95ynu2I3nRBLldTqiDj65330qVnzuuq6yt8ILbvg8Kj/I6S/fMrFSz1ir+eKc6/tU Hx8x+Lc6o/TOjFkNvrNWhyy4feKVSq1VouCcC593u+vaSx+/fFj2oRJLcUaioRZzUXEiAJTn VacGAwAA X-CMS-MailID: 20230110221051eucas1p26888130e7de454995a00918456c99bdb X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20230110221051eucas1p26888130e7de454995a00918456c99bdb X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230110221051eucas1p26888130e7de454995a00918456c99bdb References: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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 Initialize panic notifier to avoid the following lockdep warning: --->8--- INFO: trying to register non-static key. The code is fine but needs lockdep annotation, or maybe you didn't initialize this object before use? turning off the locking correctness validator. CPU: 0 PID: 62 Comm: kworker/u16:1 Not tainted 6.2.0-rc3-next-20230110-00037-g7c2b0426386a #6112 Hardware name: Samsung Exynos (Flattened Device Tree) Workqueue: events_unbound async_run_entry_fn unwind_backtrace from show_stack+0x10/0x14 show_stack from dump_stack_lvl+0x58/0x70 dump_stack_lvl from register_lock_class+0x998/0x9a8 register_lock_class from __lock_acquire+0x6c/0x2a80 __lock_acquire from lock_acquire+0x124/0x3f0 lock_acquire from down_write+0x40/0xd8 down_write from blocking_notifier_chain_register+0x28/0x58 blocking_notifier_chain_register from cros_ec_debugfs_probe+0x324/0x3b4 cros_ec_debugfs_probe from platform_probe+0x5c/0xb8 platform_probe from really_probe+0xe0/0x414 really_probe from __driver_probe_device+0x9c/0x200 __driver_probe_device from driver_probe_device+0x30/0xc0 driver_probe_device from __device_attach_driver+0xa8/0x120 __device_attach_driver from bus_for_each_drv+0x7c/0xc0 bus_for_each_drv from __device_attach_async_helper+0xa0/0xf4 __device_attach_async_helper from async_run_entry_fn+0x40/0x154 async_run_entry_fn from process_one_work+0x288/0x790 process_one_work from worker_thread+0x44/0x504 worker_thread from kthread+0xf0/0x124 kthread from ret_from_fork+0x14/0x2c Exception stack(0xf0a6dfb0 to 0xf0a6dff8) ... ------------[ cut here ]------------ Fixes: d90fa2c64d59 ("platform/chrome: cros_ec: Poll EC log on EC panic") Signed-off-by: Marek Szyprowski --- drivers/platform/chrome/cros_ec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c index ec733f683f34..c4345dafec57 100644 --- a/drivers/platform/chrome/cros_ec.c +++ b/drivers/platform/chrome/cros_ec.c @@ -182,6 +182,7 @@ int cros_ec_register(struct cros_ec_device *ec_dev) int err = 0; BLOCKING_INIT_NOTIFIER_HEAD(&ec_dev->event_notifier); + BLOCKING_INIT_NOTIFIER_HEAD(&ec_dev->panic_notifier); ec_dev->max_request = sizeof(struct ec_params_hello); ec_dev->max_response = sizeof(struct ec_response_get_protocol_info); -- 2.39.0