Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp542265pxj; Thu, 3 Jun 2021 13:03:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw47RC48v9wDygvmfFsWlmYoBPKQOdgo9SKhkXK66rucOuvB5mFqXgOjfgweQggqG45z/nm X-Received: by 2002:a17:906:b210:: with SMTP id p16mr901121ejz.100.1622750615130; Thu, 03 Jun 2021 13:03:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622750615; cv=none; d=google.com; s=arc-20160816; b=s8cWESJNipqvJFo1uU6CZpea/j34+eisBpUNHPg1f4sWtswBN6xldWMmoFrMlzCsjQ dtFVd4y0sC3AvYPLBof324XdPKgl0O8alEgCvTgW6Y0uvbg8459ETNzrkO8vb1it1Ajp p6xRVBX28M7vRxbJ5W5JlgxJKEmHA8qYUsZ0ulNnwNeDK5QHNaC7v1L0GD/zFNb/M7bO YPPOpmUd7OTXov0y8gIs1fPBGnUwybpGzFC5S9Y8o46om8BgQb04ln/MBsgpYOdyUhVa 741eDdzyIkWNke+Sj50Oyc9IhFKxfBRSsdPex96p0jEAmFsuREnQVZaZ5m3FTqrwDxLq XpgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=BEYsjPnESImNBEGwhMXDC2um6RdSngGlDT82Ae20uqc=; b=0xjEDbhgIZhp8AN3rqUwgBrk9siIEtrbuyo+vY0X8YRIQ1jkQeynrkSPrOI4ehZ3kB feVrZrIfpU0aETa9dCcV5GhlE7zjvd24eKRdk7iaSltITkNbBpU+iRRNwTAd0MDg1iZM wWTVatnXqAk86n2RbjEePp/fn98zvg9m+zJhRSPPjD5XcFjJyBDf76+h/AV6g1heHoY/ 29+nwvMqNbKLSbFUPQjJ1S6OqHhOOERzJS1ct2lvVS6rqRvmeE6qv3H8n85Qf7o0gUVX tu+tUuW5AF0RMAii/N1V0yUWsxwbW+Exm2ilY0yyP8m7TYRoHZP0wv9C9qTECEGIwqzv oFxQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d8si2970658edv.484.2021.06.03.13.03.09; Thu, 03 Jun 2021 13:03:35 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229625AbhFCUBv (ORCPT + 99 others); Thu, 3 Jun 2021 16:01:51 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:52746 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229576AbhFCUBu (ORCPT ); Thu, 3 Jun 2021 16:01:50 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id 155A81F434F7 From: Adrian Ratiu To: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" , Andrew Morton , kernel@collabora.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/1] Initialize debugfs/ksysfs earlier? In-Reply-To: References: <20210603125534.638672-1-adrian.ratiu@collabora.com> Date: Thu, 03 Jun 2021 23:00:00 +0300 Message-ID: <87y2bqwwfz.fsf@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi and thank you for the quick response! On Thu, 03 Jun 2021, Greg Kroah-Hartman wrote: > On Thu, Jun 03, 2021 at 03:55:33PM +0300, Adrian Ratiu wrote: >> Hi Greg & all, I would like to add a new debugfs file like in >> the next patch but I'm having a problem with commit >> 56348560d495 ("debugfs: do not attempt to create a new file >> before the filesystem is initalized"). > > You should have had a problem before that commit happened as > well, right? > Actually no, it works without problems before commit 56348560d495 and also works if I revert that commit or move the debugfs_init() and its dependency ksysfs_init() before the driver core init. All these 3 cases work without issues while testing, but none of them seem to be viable ideas and especially moving debugfs init earlier just to add this new attr file to the driver core is some thin reasoning, so that's why I asked via this RFC. :) >> The problem is debugfs is initialized after the driver core, >> during the core initcall, so I get an -ENOENT failure due to >> the above commit. My first reaction is to move the >> ksysfs_init() and debugfs_init() calls before the driver core >> init which works. Would that be ok? An alternative would be >> to create the new debugfs file somewhere else than the driver >> core, but I'm not sure where would be a good location, maybe in >> debugfs_init()? Doesn't seem right. > > I don't really want the driver core to be messing with debugfs > at all, why is that needed? I'll respond on your patch... KernelCI maintainers asked me to add some tests for driver probe() results similar to how the -EPROBE_DEFER is tested via the existing debugfs devices_deferred and at the same time to add a new debugfs interface similar to devices_deferred to avoid parsing the printk buffer for non-EPROBE_DEFER results. If you think adding such an interface is a bad idea, please just tell me so and I will use it as amunition to push back and get the info from printk. :) > > thanks, > > greg k-h