[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen/x86: fix build with CONFIG_HVM=n and -Og




On 2/13/25 7:50 PM, Stewart Hildebrand wrote:
When building with CONFIG_HVM=n and -Og, we encounter:

prelink.o: in function `pit_set_gate':
xen/xen/arch/x86/emul-i8254.c:195: undefined reference to `destroy_periodic_time'

Add an IS_ENABLED(CONFIG_HVM) check to assist with dead code
elimination.

Fixes: 14f42af3f52d ("x86/vPIT: account for "counter stopped" time")
Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
With proper review:
  Release-Acked-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
~ Oleksii
---
 xen/arch/x86/emul-i8254.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/emul-i8254.c b/xen/arch/x86/emul-i8254.c
index 144aa168a3f0..7bc4b31b2894 100644
--- a/xen/arch/x86/emul-i8254.c
+++ b/xen/arch/x86/emul-i8254.c
@@ -191,7 +191,7 @@ static void pit_set_gate(PITState *pit, int channel, int val)
         case 3:
         case 4:
             /* Disable counting. */
-            if ( !channel )
+            if ( IS_ENABLED(CONFIG_HVM) && !channel )
                 destroy_periodic_time(&pit->pt0);
             pit->count_stop_time[channel] = get_guest_time(v);
             break;

base-commit: b5b2f9877a8777af6b78944407527e0a450389a2

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.