Linux-Modules Archive mirror
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@gmail.com>
To: linux-modules@vger.kernel.org
Cc: Dave Airlie <airlied@redhat.com>,
	Luis Chamberlain <mcgrof@kernel.org>,
	dri-devel@lists.freedesktop.org
Subject: [PATCH] modules/firmware: add a new option to denote a firmware group to choose one.
Date: Wed, 19 Apr 2023 14:36:52 +1000	[thread overview]
Message-ID: <20230419043652.1773413-1-airlied@gmail.com> (raw)

From: Dave Airlie <airlied@redhat.com>

This adds a tag that will go into the module info, only one firmware from
the group given needs to be available for this driver to work. This allows
dracut to avoid adding in firmware that aren't needed.

This just brackets a module list in the modinfo, the modules in the list
will get entries in reversed order so the last module in the list is the
preferred one.

The corresponding dracut code it at:
https://github.com/dracutdevs/dracut/pull/2309

Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: linux-modules@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 include/linux/module.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/module.h b/include/linux/module.h
index 4435ad9439ab..f02448ed5e2b 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -289,6 +289,8 @@ extern typeof(name) __mod_##type##__##name##_device_table		\
  * files require multiple MODULE_FIRMWARE() specifiers */
 #define MODULE_FIRMWARE(_firmware) MODULE_INFO(firmware, _firmware)
 
+#define MODULE_FIRMWARE_GROUP_ONLY_ONE(_grpname) MODULE_INFO(firmware_group_only_one, _grpname)
+
 #define MODULE_IMPORT_NS(ns)	MODULE_INFO(import_ns, __stringify(ns))
 
 struct notifier_block;
-- 
2.39.2


             reply	other threads:[~2023-04-19  4:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19  4:36 Dave Airlie [this message]
2023-04-20 19:09 ` [PATCH] modules/firmware: add a new option to denote a firmware group to choose one Lucas De Marchi
2023-04-24  5:44   ` Dave Airlie
2023-04-24 17:01     ` Lucas De Marchi
2023-04-24 22:56       ` Luis Chamberlain
2023-05-02 18:11         ` Lucas De Marchi
2023-05-02 22:10           ` Luis Chamberlain
2023-05-03  3:19           ` Dave Airlie
2023-05-24  5:26             ` Luis Chamberlain
2023-05-24  5:35               ` David Airlie
2023-05-24  5:40                 ` Luis Chamberlain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230419043652.1773413-1-airlied@gmail.com \
    --to=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).