From nobody Wed Nov 27 16:40:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 169173841044669.12412453749596; Fri, 11 Aug 2023 00:20:10 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.582279.911946 (Exim 4.92) (envelope-from ) id 1qUMR9-0003ic-Qj; Fri, 11 Aug 2023 07:19:55 +0000 Received: by outflank-mailman (output) from mailman id 582279.911946; Fri, 11 Aug 2023 07:19:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qUMR9-0003hx-L7; Fri, 11 Aug 2023 07:19:55 +0000 Received: by outflank-mailman (input) for mailman id 582279; Fri, 11 Aug 2023 07:19:53 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qUMR7-0003ey-Ot for xen-devel@lists.xenproject.org; Fri, 11 Aug 2023 07:19:53 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 77448417-3817-11ee-b284-6b7b168915f2; Fri, 11 Aug 2023 09:19:53 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 985C04EE0742; Fri, 11 Aug 2023 09:19:52 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 77448417-3817-11ee-b284-6b7b168915f2 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini Subject: [XEN PATCH 1/6] x86/hpet: make variable 'per_cpu__cpu_bc_channel' static Date: Fri, 11 Aug 2023 09:19:26 +0200 Message-Id: <5e13888db7b69cee21e5367ce8750fbdc1e22d5c.1691676251.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1691738411838100001 Content-Type: text/plain; charset="utf-8" The variable is only ever used inside the file where it's defined, therefore it can have static storage. This also resolves a violation of MISRA C:2012 Rule 8.4 due to the absence of a declaration prior to the definition. Signed-off-by: Nicola Vetrini Fixes: 3ba523ff957c ("CPUIDLE: enable MSI capable HPET for timer broadcast") Acked-by: Jan Beulich Reviewed-by: Stefano Stabellini --- xen/arch/x86/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c index a2df1c7df401..79c07f6a9e09 100644 --- a/xen/arch/x86/hpet.c +++ b/xen/arch/x86/hpet.c @@ -49,7 +49,7 @@ static struct hpet_event_channel *__read_mostly hpet_even= ts; /* msi hpet channels used for broadcast */ static unsigned int __read_mostly num_hpets_used; =20 -DEFINE_PER_CPU(struct hpet_event_channel *, cpu_bc_channel); +static DEFINE_PER_CPU(struct hpet_event_channel *, cpu_bc_channel); =20 unsigned long __initdata hpet_address; int8_t __initdata opt_hpet_legacy_replacement =3D -1; --=20 2.34.1 From nobody Wed Nov 27 16:40:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1691738414018134.77262167870867; Fri, 11 Aug 2023 00:20:14 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.582280.911954 (Exim 4.92) (envelope-from ) id 1qUMRA-0003mb-6J; Fri, 11 Aug 2023 07:19:56 +0000 Received: by outflank-mailman (output) from mailman id 582280.911954; Fri, 11 Aug 2023 07:19:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qUMR9-0003lV-TG; Fri, 11 Aug 2023 07:19:55 +0000 Received: by outflank-mailman (input) for mailman id 582280; Fri, 11 Aug 2023 07:19:54 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qUMR8-0003ey-H9 for xen-devel@lists.xenproject.org; Fri, 11 Aug 2023 07:19:54 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 77998ba3-3817-11ee-b284-6b7b168915f2; Fri, 11 Aug 2023 09:19:53 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 2F49E4EE0741; Fri, 11 Aug 2023 09:19:53 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 77998ba3-3817-11ee-b284-6b7b168915f2 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini Subject: [XEN PATCH 2/6] x86/setup: add missing headers Date: Fri, 11 Aug 2023 09:19:27 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1691738415782100001 Content-Type: text/plain; charset="utf-8" The missing headers declare variables 'xen_cpuidle' and 'use_invpcid' that are then defined inside the file. This is undesirable and also violates MISRA C:2012 Rule 8.4. Adding suitable "#include"s resolves the issue. The type of the variable 'xen_cpuidle' also changes according to s/s8/int8_t/. Signed-off-by: Nicola Vetrini Fixes: 3eab82196b02 ("x86: PIT broadcast to fix local APIC timer stop issue= for Deep C state") Fixes: 63dc135aeaf9 ("x86: invpcid support") Acked-by: Jan Beulich Reviewed-by: Stefano Stabellini --- xen/arch/x86/setup.c | 4 +++- xen/include/xen/cpuidle.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 80ae973d64e4..2bfc1fd00f8c 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -47,10 +47,12 @@ #include /* for generic_apic_probe */ #include #include +#include #include #include #include #include +#include #include #include #include @@ -88,7 +90,7 @@ boolean_param("noapic", skip_ioapic_setup); =20 /* **** Linux config option: propagated to domain0. */ /* xen_cpuidle: xen control cstate. */ -s8 __read_mostly xen_cpuidle =3D -1; +int8_t __read_mostly xen_cpuidle =3D -1; boolean_param("cpuidle", xen_cpuidle); =20 #ifndef NDEBUG diff --git a/xen/include/xen/cpuidle.h b/xen/include/xen/cpuidle.h index 521a8deb04c2..705d0c1135f0 100644 --- a/xen/include/xen/cpuidle.h +++ b/xen/include/xen/cpuidle.h @@ -86,7 +86,7 @@ struct cpuidle_governor void (*reflect) (struct acpi_processor_power *dev); }; =20 -extern s8 xen_cpuidle; +extern int8_t xen_cpuidle; extern struct cpuidle_governor *cpuidle_current_governor; =20 bool cpuidle_using_deep_cstate(void); --=20 2.34.1 From nobody Wed Nov 27 16:40:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1691738415450216.6111872139544; Fri, 11 Aug 2023 00:20:15 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.582282.911969 (Exim 4.92) (envelope-from ) id 1qUMRB-0004JM-AI; Fri, 11 Aug 2023 07:19:57 +0000 Received: by outflank-mailman (output) from mailman id 582282.911969; Fri, 11 Aug 2023 07:19:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qUMRB-0004Gy-4t; Fri, 11 Aug 2023 07:19:57 +0000 Received: by outflank-mailman (input) for mailman id 582282; Fri, 11 Aug 2023 07:19:56 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qUMRA-00039t-08 for xen-devel@lists.xenproject.org; Fri, 11 Aug 2023 07:19:56 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 77ea5903-3817-11ee-8613-37d641c3527e; Fri, 11 Aug 2023 09:19:54 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id B9CCF4EE0744; Fri, 11 Aug 2023 09:19:53 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 77ea5903-3817-11ee-8613-37d641c3527e From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini Subject: [XEN PATCH 3/6] x86/vm_event: add missing include Date: Fri, 11 Aug 2023 09:19:28 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1691738415949100003 Content-Type: text/plain; charset="utf-8" The missing header included by this patch provides declarations for the functions 'vm_event_{fill_regs,set_registers,monitor_next_interrupt}' that are defined in the source file. This also resolves violations of MISRA C:2012 Rule 8.4. Signed-off-by: Nicola Vetrini Fixes: adc75eba8b15 ("x86/vm_event: consolidate hvm_event_fill_regs and p2m= _vm_event_fill_regs") Fixes: 975efd3baa8d ("introduce VM_EVENT_FLAG_SET_REGISTERS") Fixes: 9864841914c2 ("x86/vm_event: add support for VM_EVENT_REASON_INTERRU= PT") --- xen/arch/x86/vm_event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/vm_event.c b/xen/arch/x86/vm_event.c index 7027c08a926b..499b6b349d79 100644 --- a/xen/arch/x86/vm_event.c +++ b/xen/arch/x86/vm_event.c @@ -20,6 +20,7 @@ =20 #include #include +#include #include =20 /* Implicitly serialized by the domctl lock. */ --=20 2.34.1 From nobody Wed Nov 27 16:40:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1691738418141395.11791423600584; Fri, 11 Aug 2023 00:20:18 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.582284.911984 (Exim 4.92) (envelope-from ) id 1qUMRC-0004gG-Hx; Fri, 11 Aug 2023 07:19:58 +0000 Received: by outflank-mailman (output) from mailman id 582284.911984; Fri, 11 Aug 2023 07:19:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qUMRC-0004cy-A5; Fri, 11 Aug 2023 07:19:58 +0000 Received: by outflank-mailman (input) for mailman id 582284; Fri, 11 Aug 2023 07:19:57 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qUMRB-00039t-0F for xen-devel@lists.xenproject.org; Fri, 11 Aug 2023 07:19:57 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 7842eadc-3817-11ee-8613-37d641c3527e; Fri, 11 Aug 2023 09:19:55 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 47C104EE0743; Fri, 11 Aug 2023 09:19:54 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 7842eadc-3817-11ee-8613-37d641c3527e From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini Subject: [XEN PATCH 4/6] cpufreq: add missing include of header 'pmstat.h' Date: Fri, 11 Aug 2023 09:19:29 +0200 Message-Id: <424e0523b9ec68eda5cf5b41a7bb6c980df2a52d.1691676251.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1691738419833100001 Content-Type: text/plain; charset="utf-8" The missing header included by this patch provides a declaration for 'set_px_pminfo' that is visible prior to the definition in this file. This also resolves a violation of MISRA C:2012 Rule 8.4. Signed-off-by: Nicola Vetrini Fixes: 452119c09420 ("x86 and ia64: move cpufreq notify code to commone pla= ce") Acked-by: Jan Beulich Reviewed-by: Stefano Stabellini --- xen/drivers/cpufreq/cpufreq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/drivers/cpufreq/cpufreq.c b/xen/drivers/cpufreq/cpufreq.c index 2321c7dd07b1..4482bbe53a1e 100644 --- a/xen/drivers/cpufreq/cpufreq.c +++ b/xen/drivers/cpufreq/cpufreq.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include =20 --=20 2.34.1 From nobody Wed Nov 27 16:40:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1691738421958340.01539055743365; Fri, 11 Aug 2023 00:20:21 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.582285.911998 (Exim 4.92) (envelope-from ) id 1qUMRD-00056H-Qt; Fri, 11 Aug 2023 07:19:59 +0000 Received: by outflank-mailman (output) from mailman id 582285.911998; Fri, 11 Aug 2023 07:19:59 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qUMRD-000541-K7; Fri, 11 Aug 2023 07:19:59 +0000 Received: by outflank-mailman (input) for mailman id 582285; Fri, 11 Aug 2023 07:19:58 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qUMRC-00039t-0I for xen-devel@lists.xenproject.org; Fri, 11 Aug 2023 07:19:58 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 78aef6c2-3817-11ee-8613-37d641c3527e; Fri, 11 Aug 2023 09:19:55 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id D4EA64EE0746; Fri, 11 Aug 2023 09:19:54 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 78aef6c2-3817-11ee-8613-37d641c3527e From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini Subject: [XEN PATCH 5/6] vpic/msix: make 'get_slot' static Date: Fri, 11 Aug 2023 09:19:30 +0200 Message-Id: <6ff95436f704c852e6397a584eef65f9d1713999.1691676251.git.nicola.vetrini@bugseng.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1691738423466100001 Content-Type: text/plain; charset="utf-8" The function can become static since it's used only within this file. This also resolves a violation of MISRA C:2012 Rule 8.4 due to the absence of a declaration before the function definition. Signed-off-by: Nicola Vetrini Fixes: b177892d2d0e ("vpci/msix: handle accesses adjacent to the MSI-X tabl= e") Reviewed-by: Stefano Stabellini --- xen/drivers/vpci/msix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/vpci/msix.c b/xen/drivers/vpci/msix.c index 25bde77586a4..f9df506f29bf 100644 --- a/xen/drivers/vpci/msix.c +++ b/xen/drivers/vpci/msix.c @@ -223,7 +223,7 @@ static void __iomem *get_table(const struct vpci *vpci,= unsigned int slot) return msix->table[slot]; } =20 -unsigned int get_slot(const struct vpci *vpci, unsigned long addr) +static unsigned int get_slot(const struct vpci *vpci, unsigned long addr) { unsigned long pfn =3D PFN_DOWN(addr); =20 --=20 2.34.1 From nobody Wed Nov 27 16:40:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1691738423981589.5392222557629; Fri, 11 Aug 2023 00:20:23 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.582283.911977 (Exim 4.92) (envelope-from ) id 1qUMRB-0004Rd-UK; Fri, 11 Aug 2023 07:19:57 +0000 Received: by outflank-mailman (output) from mailman id 582283.911977; Fri, 11 Aug 2023 07:19:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qUMRB-0004Ot-JZ; Fri, 11 Aug 2023 07:19:57 +0000 Received: by outflank-mailman (input) for mailman id 582283; Fri, 11 Aug 2023 07:19:56 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qUMRA-0003ey-J0 for xen-devel@lists.xenproject.org; Fri, 11 Aug 2023 07:19:56 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 78e422eb-3817-11ee-b284-6b7b168915f2; Fri, 11 Aug 2023 09:19:56 +0200 (CEST) Received: from nico.bugseng.com (unknown [147.123.100.131]) by support.bugseng.com (Postfix) with ESMTPSA id 5DBD54EE0745; Fri, 11 Aug 2023 09:19:55 +0200 (CEST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 78e422eb-3817-11ee-b284-6b7b168915f2 From: Nicola Vetrini To: xen-devel@lists.xenproject.org Cc: sstabellini@kernel.org, michal.orzel@amd.com, xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com, consulting@bugseng.com, Nicola Vetrini Subject: [XEN PATCH 6/6] drivers/video: make declarations of defined functions available Date: Fri, 11 Aug 2023 09:19:31 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1691738425792100001 Content-Type: text/plain; charset="utf-8" The declarations for 'vesa_{init,early_init,endboot}' needed by 'xen/drivers/video/vesa.c' and 'fill_console_start_info' in 'vga.c' are now available by moving the relative code inside 'vga.h' and including "" respectively. This also resolves violations of MISRA C:2012 Rule 8.4. Signed-off-by: Nicola Vetrini Fixes: ebb26b509f1a ("xen/x86: make VGA support selectable") Fixes: 6d9199bd0f22 ("x86-64: enable hypervisor output on VESA frame buffer= ") Reviewed-by: Stefano Stabellini --- xen/arch/x86/include/asm/setup.h | 6 ------ xen/drivers/video/vga.c | 9 +-------- xen/include/xen/vga.h | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/xen/arch/x86/include/asm/setup.h b/xen/arch/x86/include/asm/se= tup.h index b0e6a39e2365..dfdd9e555149 100644 --- a/xen/arch/x86/include/asm/setup.h +++ b/xen/arch/x86/include/asm/setup.h @@ -25,12 +25,6 @@ void subarch_init_memory(void); =20 void init_IRQ(void); =20 -#ifdef CONFIG_VIDEO -void vesa_init(void); -#else -static inline void vesa_init(void) {}; -#endif - int construct_dom0( struct domain *d, const module_t *image, unsigned long image_headroom, diff --git a/xen/drivers/video/vga.c b/xen/drivers/video/vga.c index 0a03508bee60..b62a47e000e7 100644 --- a/xen/drivers/video/vga.c +++ b/xen/drivers/video/vga.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include =20 @@ -54,14 +55,6 @@ string_param("vga", opt_vga); static unsigned int columns, lines; #define ATTRIBUTE 7 =20 -#ifdef CONFIG_X86 -void vesa_early_init(void); -void vesa_endboot(bool_t keep); -#else -#define vesa_early_init() ((void)0) -#define vesa_endboot(x) ((void)0) -#endif - void __init video_init(void) { char *p; diff --git a/xen/include/xen/vga.h b/xen/include/xen/vga.h index f72b63d446b1..ffd73c9db135 100644 --- a/xen/include/xen/vga.h +++ b/xen/include/xen/vga.h @@ -15,4 +15,18 @@ extern struct xen_vga_console_info vga_console_info; #endif =20 +#ifdef CONFIG_X86 +void vesa_early_init(void); +void vesa_endboot(bool_t keep); +#else +#define vesa_early_init() ((void)0) +#define vesa_endboot(x) ((void)0) +#endif + +#ifdef CONFIG_VIDEO +void vesa_init(void); +#else +static inline void vesa_init(void) {}; +#endif + #endif /* _XEN_VGA_H */ --=20 2.34.1