Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6826652pxb; Wed, 17 Feb 2021 14:48:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJwz12BXLAFZARmUFMN6LJCaw9UDFFf00OJosmfdkLpu9eH5OyUkxSBNtqsSsEwDqV6UDYHK X-Received: by 2002:a50:cbc7:: with SMTP id l7mr1072161edi.134.1613602081267; Wed, 17 Feb 2021 14:48:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613602081; cv=none; d=google.com; s=arc-20160816; b=vxLgpbTxodsQtyTASsHgmiJV8XwxPG7mgnqlXA2eaaJbKFmeGiA78sCD6K7XUqoc2+ dKUATYQECf1ObiXg5vVy7KgSGfXxIEtcueaHUttOwKJ2okIwH7d3CzKiP2wsoz1wGc2x ktGbNA/KYFiHISva9aiHyg6xe4X2cYQWShvS+Wi+LZcIN0CrbFy41QuLLypfwSOGynqi x7c5cMsy2mGOIsFwLIGClfzM1c4FmerkKQYD8OM7KHwFqwKcFmxrT/z8SRcjE5FH/HfV PrlphMN0RhSjXXAUlK8GAV7StcMKOIzDiDPDnPdcCQJesOeTKELb6NKjFfkHAPHxytd0 ttWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:dkim-signature:dkim-filter:date; bh=hrCqOktxWH8gGcBmBtZ5Sz0GQaLvLl4sZU2pzZlHrWg=; b=JqWhaVm71Cu5bVkF1z8YkJze7+jkI7AVGrhtLKEB5m67hiBo/R3YNAOinwocfmw9A6 qX9lTnhglc4N1zMgl4UgKJLYTAdkZeQjghPQz1SMP6A3bPiVuaqdjk9XNtIoivTZSF0u NMVzMJCy6Uai62aOM8bwydK46nA6fi3oJIlt2a1FLZeYZsv93iz1ez1s4kKV3Y47YHbg ya/dCxEQq79C+XKbHXV/EfkxvgaA33lsxYupRLRHEIQOVFGkoPOh9iJq8f9Cr6L0XfPB zPNsP/55u0dpFZK8BYdJGfEgO8fWcRkjVcfc/M5mwfyZF2+Z0QyasJ4dkqr7Q1XkX/TV KWuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@innovation.ch header.s=default header.b=QUCtJBAL; 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=QUARANTINE dis=NONE) header.from=innovation.ch Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f16si110299ejc.619.2021.02.17.14.47.30; Wed, 17 Feb 2021 14:48:01 -0800 (PST) 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=@innovation.ch header.s=default header.b=QUCtJBAL; 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=QUARANTINE dis=NONE) header.from=innovation.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232985AbhBQWqf (ORCPT + 99 others); Wed, 17 Feb 2021 17:46:35 -0500 Received: from chill.innovation.ch ([216.218.245.220]:46888 "EHLO chill.innovation.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233233AbhBQWfq (ORCPT ); Wed, 17 Feb 2021 17:35:46 -0500 Date: Wed, 17 Feb 2021 14:34:40 -0800 DKIM-Filter: OpenDKIM Filter v2.10.3 chill.innovation.ch DD83B641387 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=innovation.ch; s=default; t=1613601280; bh=hrCqOktxWH8gGcBmBtZ5Sz0GQaLvLl4sZU2pzZlHrWg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QUCtJBALr8Xvqb80iRCFaYJiiuzl0DbLcpR+fFjP5B1dsUccr2yF8wyRm+LeCj23T eFs3AY5o60UNMKxJb5D5xxEgcFmKSXoHvTqp1qOnxyTJKNmgBVHxgjv6c97g1l6uJ+ N5hmVvSfB2zbfOqFuFGU+kzp5jQNA5d6uEH9pBLEE9wrIVI43vjqO9FwlvitFCZMc+ Za2ghMkqskOdIlIbmKp+HyEhZPmFUDkTF6VVcWTOWei4bMm0sCZcgnjtoOstWiJeb5 0ZqpLdRy0PapYmYk1aZekztbHbzQx9ZSPbeYPouVwkK0PfqZdFYnOry6ywR1UuRVxX 59VQMg95ZOPnQ== From: "Life is hard, and then you die" To: Dmitry Torokhov Cc: "Gustavo A. R. Silva" , Sergiu Cuciurean , Lee Jones , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] Input: applespi: Add trace_event module param for early tracing. Message-ID: <20210217223440.GC25685@innovation.ch> References: <20210217190718.11035-1-ronald@innovation.ch> <20210217190718.11035-3-ronald@innovation.ch> <20210217205257.GB25685@innovation.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dmitry, On Wed, Feb 17, 2021 at 01:06:27PM -0800, Dmitry Torokhov wrote: > On Wed, Feb 17, 2021 at 12:52:57PM -0800, Life is hard, and then you die wrote: > > > > On Wed, Feb 17, 2021 at 12:26:18PM -0800, Dmitry Torokhov wrote: > > > > > > On Wed, Feb 17, 2021 at 11:07:18AM -0800, Ronald Tschal?r wrote: > > > > The problem is that tracing can't be set via sysfs until the module is > > > > loaded, at which point the keyboard and trackpad initialization commands > > > > have already been run and hence tracing can't be used to debug problems > > > > here. > > > > > > > > Adding this param allows tracing to be enabled for messages sent and > > > > received during module probing. It takes comma-separated list of events, > > > > e.g. > > > > > > > > trace_event=applespi_tp_ini_cmd,applespi_bad_crc > > > > > > You can unbind and rebind a device to a driver via sysfs as many times > > > as needed (see bind and unbind driver sysfs attributes), so I believe Ok yes, that works well, except for the boot-debug scenario. > > Hmm, I'm going to have to play with that a bit, but one place it still > > won't help I think is something we ran into in practise: init was > > failing during boot, but was successfull later on. > > Maybe compiling module as a built-in and then using kernel command line > option to initiate the trace would work? My personal issue with this is the fact that most folks reporting issues are running their distro's standard kernel, which invariably has this (and most others) compiled as a loadable module; and asking folks to rebuild their kernel is actually quite a hurdle for them, in particular compared to asking them to just add some boot params or manipulating some sysfs entries. So I prefer to try to provide easy ways for folks to be able to generate and report info back that work and are enabled out-of-the-box on most distros. > If this facility is really needed, it would be beneficial for other > modules as well, and thus better implemented in the module loading code > to activate desired tracing after loading the module but before invoking > module init code. I don't know if it rises to the level of "really needed" - I certainly needed something like this to debug an issue and hence the module param. And I figured if somebody adds/debugs additional init commands they could find it useful too. But this may not be commonly needed after all, or folks are using some other solution. If there's interest, I might be able to take a stab a this in the near future, but not sure. Cheers, Ronald