* [PATCH v1] intel_idle: Add __init annotation to matchup_vm_state_with_baremetal()
@ 2023-06-27 17:50 Rafael J. Wysocki
2023-06-27 20:06 ` Randy Dunlap
0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2023-06-27 17:50 UTC (permalink / raw)
To: Linux PM
Cc: LKML, Randy Dunlap, Zhang Rui, Artem Bityutskiy, Arjan van de Ven
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
The caller of (recently added) matchup_vm_state_with_baremetal() is an
__init function and it uses some __initdata data structures, so add the
__init annotation to it for consistency.
This addresses the following build warnings:
WARNING: modpost: vmlinux: section mismatch in reference: matchup_vm_state_with_baremetal+0x51 (section: .text) -> intel_idle_max_cstate_reached (section: .init.text)
WARNING: modpost: vmlinux: section mismatch in reference: matchup_vm_state_with_baremetal+0x62 (section: .text) -> cpuidle_state_table (section: .init.data)
WARNING: modpost: vmlinux: section mismatch in reference: matchup_vm_state_with_baremetal+0x79 (section: .text) -> icpu (section: .init.data)
Fixes: 0fac214bb75e ("intel_idle: Add a "Long HLT" C1 state for the VM guest mode")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/idle/intel_idle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-pm/drivers/idle/intel_idle.c
===================================================================
--- linux-pm.orig/drivers/idle/intel_idle.c
+++ linux-pm/drivers/idle/intel_idle.c
@@ -2147,7 +2147,7 @@ static void __init intel_idle_cpuidle_de
* All our short idle states are dominated by vmexit/vmenter latencies,
* not the underlying hardware latencies so we keep our values for these.
*/
-static void matchup_vm_state_with_baremetal(void)
+static void __init matchup_vm_state_with_baremetal(void)
{
int cstate;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v1] intel_idle: Add __init annotation to matchup_vm_state_with_baremetal()
2023-06-27 17:50 [PATCH v1] intel_idle: Add __init annotation to matchup_vm_state_with_baremetal() Rafael J. Wysocki
@ 2023-06-27 20:06 ` Randy Dunlap
0 siblings, 0 replies; 2+ messages in thread
From: Randy Dunlap @ 2023-06-27 20:06 UTC (permalink / raw)
To: Rafael J. Wysocki, Linux PM
Cc: LKML, Zhang Rui, Artem Bityutskiy, Arjan van de Ven
On 6/27/23 10:50, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> The caller of (recently added) matchup_vm_state_with_baremetal() is an
> __init function and it uses some __initdata data structures, so add the
> __init annotation to it for consistency.
>
> This addresses the following build warnings:
>
> WARNING: modpost: vmlinux: section mismatch in reference: matchup_vm_state_with_baremetal+0x51 (section: .text) -> intel_idle_max_cstate_reached (section: .init.text)
> WARNING: modpost: vmlinux: section mismatch in reference: matchup_vm_state_with_baremetal+0x62 (section: .text) -> cpuidle_state_table (section: .init.data)
> WARNING: modpost: vmlinux: section mismatch in reference: matchup_vm_state_with_baremetal+0x79 (section: .text) -> icpu (section: .init.data)
>
> Fixes: 0fac214bb75e ("intel_idle: Add a "Long HLT" C1 state for the VM guest mode")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
> ---
> drivers/idle/intel_idle.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: linux-pm/drivers/idle/intel_idle.c
> ===================================================================
> --- linux-pm.orig/drivers/idle/intel_idle.c
> +++ linux-pm/drivers/idle/intel_idle.c
> @@ -2147,7 +2147,7 @@ static void __init intel_idle_cpuidle_de
> * All our short idle states are dominated by vmexit/vmenter latencies,
> * not the underlying hardware latencies so we keep our values for these.
> */
> -static void matchup_vm_state_with_baremetal(void)
> +static void __init matchup_vm_state_with_baremetal(void)
> {
> int cstate;
>
>
>
>
--
~Randy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-27 20:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-27 17:50 [PATCH v1] intel_idle: Add __init annotation to matchup_vm_state_with_baremetal() Rafael J. Wysocki
2023-06-27 20:06 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox