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=-16.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,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 F3629C07E96 for ; Thu, 8 Jul 2021 15:23:38 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9BA0E613FD for ; Thu, 8 Jul 2021 15:23:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9BA0E613FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:58010 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1VsH-0004M1-My for qemu-devel@archiver.kernel.org; Thu, 08 Jul 2021 11:23:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1Vmp-0008Vi-KL for qemu-devel@nongnu.org; Thu, 08 Jul 2021 11:17:59 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]:43815) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1Vmk-00088a-Hy for qemu-devel@nongnu.org; Thu, 08 Jul 2021 11:17:56 -0400 Received: by mail-ed1-x534.google.com with SMTP id l26so695522eda.10 for ; Thu, 08 Jul 2021 08:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JuwO9pM95hWiD6+ZUA7cnKjhEg+vgsiz1t0hFfkXw3E=; b=WiAMJ4m4gPXXp9ZD5R/8rouVnJUIJ9dAvbaa6A3wPAMdnlXqcXIOQ4aUOhQerAC7QA A4cxu7S6lHIh7WrfJqaSo9tkVOgzogoz8r+m6mVNUiHpsNDxXqfuGYEgc2YK12VOipWT T0Bcq9mv01WtjqzHLFYjIwIDICrLl6qo+NXpn/hTC8puYpx4lolFqFFM5QLnURK3dRH5 R2ROGIbiJIMqaL2a0Lq3KK2WcSk9CbTxwppZdq55daUcMisL+kpMRDelAE5I9Ygqx6iF qp0LXdw0ImSphm682GHRYkMMi5IWHZIiymZYe2bns1WfFbZ+n1VznX9fRHofxGhcrbxu 8oig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=JuwO9pM95hWiD6+ZUA7cnKjhEg+vgsiz1t0hFfkXw3E=; b=nKWqKXQHpP0GSPnRQc+HjI1H1qWLfJFXuo1nuj4BbPwkLIf/PhnPstPTrXDhrUJ+WW /9tJ5pAhzveUdEQ/3d0T0DbgekebKQkcB9njU+kPBcwFh9zODXa1ehrDRhws0EZcTT3G nI7p9pUeBakp9dDT1axMUqP/D1ltEpi+Wu0G5IErcwH2rjyuWVNa9DgT15GO4X7BOSGb BRsD18HqYjAI5KGh2gw0LsjcPGJFR00mVD5tqQOnBq7oZ1CrWvGaJT3qnbwh+2CpjSp6 ty35swKfOtTQ002AZUYcRr2m4F0R5e1Tq+Ae9nDruLrL1VRQcCbW/AZgHwuQyF1erWJX J1Ww== X-Gm-Message-State: AOAM530u1RoE1E6Bafh7VnTY5GnWX7YEyeK8vZZ1Z9VHd4eS1k9rmiNB WiO91iLjFmPVvtSnvBSRoIiEVP8SP4U= X-Google-Smtp-Source: ABdhPJxEVu4tkziyILN7f7At3VxWKtMT4ykal/sA5k6if6lyxIf6JQVbuOtjK9r8wOL2CSgoE9m4wQ== X-Received: by 2002:a05:6402:28b6:: with SMTP id eg54mr13058857edb.216.1625757473465; Thu, 08 Jul 2021 08:17:53 -0700 (PDT) Received: from avogadro.lan ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id ak16sm1103694ejc.17.2021.07.08.08.17.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jul 2021 08:17:53 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 05/48] modules: add modinfo macros Date: Thu, 8 Jul 2021 17:17:05 +0200 Message-Id: <20210708151748.408754-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210708151748.408754-1-pbonzini@redhat.com> References: <20210708151748.408754-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=paolo.bonzini@gmail.com; helo=mail-ed1-x534.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann , "Jose R . Ziviani" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Gerd Hoffmann Add macros for module info annotations. Instead of having that module meta-data stored in lists in util/module.c place directly in the module source code. Signed-off-by: Gerd Hoffmann Reviewed-by: Jose R. Ziviani Message-Id: <20210624103836.2382472-2-kraxel@redhat.com> Signed-off-by: Paolo Bonzini --- include/qemu/module.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/include/qemu/module.h b/include/qemu/module.h index 944d403cbd..81ef086da0 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -73,4 +73,29 @@ bool module_load_one(const char *prefix, const char *lib_name, bool mayfail); void module_load_qom_one(const char *type); void module_load_qom_all(void); +/* + * module info annotation macros + * + * scripts/modinfo-collect.py will collect module info, + * using the preprocessor and -DQEMU_MODINFO + */ +#ifdef QEMU_MODINFO +# define modinfo(kind, value) \ + MODINFO_START kind value MODINFO_END +#else +# define modinfo(kind, value) +#endif + +/* module implements QOM type */ +#define module_obj(name) modinfo(obj, name) + +/* module has a dependency on */ +#define module_dep(name) modinfo(dep, name) + +/* module is for target architecture */ +#define module_arch(name) modinfo(arch, name) + +/* module registers QemuOpts */ +#define module_opts(name) modinfo(opts, name) + #endif -- 2.31.1