From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C35CAC47082 for ; Thu, 3 Jun 2021 12:55:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AA337613B1 for ; Thu, 3 Jun 2021 12:55:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231147AbhFCM5c (ORCPT ); Thu, 3 Jun 2021 08:57:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230131AbhFCM5b (ORCPT ); Thu, 3 Jun 2021 08:57:31 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64B32C06174A for ; Thu, 3 Jun 2021 05:55:47 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id 6EF3C1F43044 From: Adrian Ratiu To: Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: Andrew Morton , kernel@collabora.com, linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/1] Initialize debugfs/ksysfs earlier? Date: Thu, 3 Jun 2021 15:55:33 +0300 Message-Id: <20210603125534.638672-1-adrian.ratiu@collabora.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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"). 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. Any guidance is appreciated, thank you, Adrian Adrian Ratiu (1): drivers: base: Expose probe failures via debugfs drivers/base/core.c | 76 +++++++++++++++++++++++++++++++++++++++++++-- lib/Kconfig.debug | 23 ++++++++++++++ 2 files changed, 96 insertions(+), 3 deletions(-) -- 2.31.1