Message ID | 20221101152132.v2.5.Ia458a69e1d592bfa4f04cde7018bbc7486f91a23@changeid |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp3246395wru; Tue, 1 Nov 2022 15:32:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4V9QbLpgwDLVH4a51nMWU/liZ3ljraC7dFmGb/DUfXN6/2FFZlSJwmusSoMroAAjsLd6kL X-Received: by 2002:a17:906:9b8e:b0:791:8f57:6845 with SMTP id dd14-20020a1709069b8e00b007918f576845mr20986063ejc.174.1667341947588; Tue, 01 Nov 2022 15:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667341947; cv=none; d=google.com; s=arc-20160816; b=gko3H9ME8N0iEG5KugZdGWDDg+XA9B7LfK21pc1T1RPboEArqN/oQJf7EQXBMgGwVl rCEfZoSkiSjfG2HJQtxYM4cejTOEAApsYxfyJyi1s7d2PWf0KE89mJoNzb9ZtzsZZhMD Ryq982d6sNUhfn745ydQwu+qtl1uBdZ14iQpjTV0a57n1v1xEs1m7etRiYPc+UqaPIXJ SNs2VGgPE0xgb5G39Kn4TFKum/T8fdTHLGBFsTYBlXp2o+yFry25z8sYealzpqBE8vWp GkqwbnDN0vmBpkZMjT0X0KDLf0QPf+zKq75+Z1QnSQc4NUydxmdeRAphE8GMXbSI+0kG Z0Pg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=H/atQqeE7yew2f3NLAU7m28aDdmCRbd7A5xTuP3olaM=; b=tmNOppuEvkvpanhV5CscGVYnSIKcKaa8cWXEsJXEjg9TYTYolE95VV+3sr+SfqrygM 5UkXVORE4LZuFF/7yjn2WdiM3LB7x2PUKEzkFNUGD/v3AI7eYn9gKki7o7D+zmFkylG5 NylcXTqTjHnDiBZonY+ArUsT5n2Sxu4b12INRUseK9V1S4s83US7GytnWaBujeDnfnHY lF/pu3xnQrGDDodb81TbZO6FV87jYGSKhfE1SY5g1VP8o4mrH+mbuKwIVlVOSCm3QxaU ihGHHtZ/PvXQSAsbnMaabKt5JyrgN7bFlrI4aY/ccALH/bP3jXeZZ7EdkAYr6+2HhKwW whDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="Z/SVfi/W"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ae3-20020a17090725c300b007ab1b8b719csi15894792ejc.0.2022.11.01.15.32.03; Tue, 01 Nov 2022 15:32:27 -0700 (PDT) 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="Z/SVfi/W"; 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 S230488AbiKAWXJ (ORCPT <rfc822;kartikey406@gmail.com> + 99 others); Tue, 1 Nov 2022 18:23:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230304AbiKAWXC (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 1 Nov 2022 18:23:02 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3415A1A811 for <linux-kernel@vger.kernel.org>; Tue, 1 Nov 2022 15:22:57 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id p21so11003932plr.7 for <linux-kernel@vger.kernel.org>; Tue, 01 Nov 2022 15:22:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H/atQqeE7yew2f3NLAU7m28aDdmCRbd7A5xTuP3olaM=; b=Z/SVfi/W/l0ZbgH7VD2JPBlUzJN4/MyupL9V4lXL/QK1qKQT1oJDwbnPQRJF1Flhw3 RQgQVZ3rB3x2DDjEg+v2Fs7tYMStDaw4ahLmgdpZ1FuqcFmDO9Rn3/uADJGqGfEjlNC0 uhzcpvSIuDLiZCO+KiAGnCUuLzMTSInGH8NcM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H/atQqeE7yew2f3NLAU7m28aDdmCRbd7A5xTuP3olaM=; b=38rlth+7NAx3RIAO2fM/n3os5umAZPEWJzMk/n/nkpaaGT1Qvb0sRPVj8EbvFFpZO8 P0hsl+96mFDGUMCQ3QhWERoiaVcvobBDZl6rOuUKM8PbKrnEgnFK6j1pDsLeSDN0W96E ATxrztTFVZ8jqlkm33JsxY0m9NEKVqb8eQ9+r2lV0LA2VCKULTapjSyGEI02eD6ahvus FvYKKO64TgQG9iNk/38aX/wfmFTziVUbdDpDXhBOSXn1ZQI+HMyP+OL8ysbDuCZHOtK3 AVyhvThUAs5Idx9y2KDv9MXDC0TYjYMLHntI1Q8DqP8m01OVs5BcXaKVx0EEVwGaUcIU 8Fbw== X-Gm-Message-State: ACrzQf20zGglE+PRRU4LgURsMvz3keqyek+mSasCzuzSm3yx4+I4Krb9 mPt4vb6oD7pbh+O9L0RDAkHeyQ== X-Received: by 2002:a17:90b:4c48:b0:214:25cd:96e3 with SMTP id np8-20020a17090b4c4800b0021425cd96e3mr1808035pjb.188.1667341376942; Tue, 01 Nov 2022 15:22:56 -0700 (PDT) Received: from localhost ([2620:15c:9d:2:9c5f:7c8e:b8a2:3495]) by smtp.gmail.com with UTF8SMTPSA id m10-20020a170902f64a00b001769cfa5cd4sm6865385plg.49.2022.11.01.15.22.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Nov 2022 15:22:56 -0700 (PDT) From: Brian Norris <briannorris@chromium.org> To: Benson Leung <bleung@chromium.org>, Guenter Roeck <groeck@chromium.org> Cc: chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org, Brian Norris <briannorris@chromium.org> Subject: [PATCH v2 5/5] platform/chrome: cros_ec_spi: Set PROBE_PREFER_ASYNCHRONOUS Date: Tue, 1 Nov 2022 15:22:10 -0700 Message-Id: <20221101152132.v2.5.Ia458a69e1d592bfa4f04cde7018bbc7486f91a23@changeid> X-Mailer: git-send-email 2.38.1.273.g43a17bfeac-goog In-Reply-To: <20221101152132.v2.1.I0728421299079b104710c202d5d7095b2674fd8c@changeid> References: <20221101152132.v2.1.I0728421299079b104710c202d5d7095b2674fd8c@changeid> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.2 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748334750062654630?= X-GMAIL-MSGID: =?utf-8?q?1748334750062654630?= |
Series |
[v2,1/5] platform/chrome: cros_ec_lpc: Move mec_init to device probe
|
|
Commit Message
Brian Norris
Nov. 1, 2022, 10:22 p.m. UTC
This driver often takes on the order of 10ms to start, but in some cases
as much as 600ms [1]. It shouldn't have many cross-device dependencies
to race with, nor racy access to shared state with other drivers, so
this should be a relatively low risk change.
This driver was pinpointed as part of a survey of top slowest initcalls
(i.e., are built in, and probing synchronously) on a lab of ChromeOS
systems.
[1] 600ms was especially surprising to me, so I checked a little deeper.
This driver is used to interface with Embedded Controllers besides just
the traditional laptop power-state controller -- it also interfaces with
some fingerprint readers, which may start up in parallel with the
kernel, or which may not even be present on some SKUs, despite having a
node for it. Thus, our time is wasted just timing out talking to it. At
least we can do that without blocking everyone else.
Signed-off-by: Brian Norris <briannorris@chromium.org>
---
(no changes since v1)
drivers/platform/chrome/cros_ec_spi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/platform/chrome/cros_ec_spi.c b/drivers/platform/chrome/cros_ec_spi.c index 7360b3ff6e4f..21143dba8970 100644 --- a/drivers/platform/chrome/cros_ec_spi.c +++ b/drivers/platform/chrome/cros_ec_spi.c @@ -834,6 +834,7 @@ static struct spi_driver cros_ec_driver_spi = { .name = "cros-ec-spi", .of_match_table = cros_ec_spi_of_match, .pm = &cros_ec_spi_pm_ops, + .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .probe = cros_ec_spi_probe, .remove = cros_ec_spi_remove,