Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drivers/clocksource/hyper-v: non ACPI support in hyperv clock

Add a placeholder function for the hv_setup_stimer0_irq API to accommodate
systems without ACPI support. Since this function is not utilized on
x86/x64 systems and non-ACPI support is only intended for x86/x64 systems,
a placeholder function is sufficient for now and can be improved upon if
necessary in the future.

Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/1679298460-11855-2-git-send-email-ssengar@linux.microsoft.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>

authored by

Saurabh Sengar and committed by
Wei Liu
a4fea9b7 6a8f57ae

+13 -2
+13 -2
drivers/clocksource/hyperv_timer.c
··· 49 49 50 50 static int stimer0_irq = -1; 51 51 static int stimer0_message_sint; 52 - static DEFINE_PER_CPU(long, stimer0_evt); 52 + static __maybe_unused DEFINE_PER_CPU(long, stimer0_evt); 53 53 54 54 /* 55 55 * Common code for stimer0 interrupts coming via Direct Mode or ··· 68 68 * stimer0 interrupt handler for architectures that support 69 69 * per-cpu interrupts, which also implies Direct Mode. 70 70 */ 71 - static irqreturn_t hv_stimer0_percpu_isr(int irq, void *dev_id) 71 + static irqreturn_t __maybe_unused hv_stimer0_percpu_isr(int irq, void *dev_id) 72 72 { 73 73 hv_stimer0_isr(); 74 74 return IRQ_HANDLED; ··· 196 196 { 197 197 }; 198 198 199 + #ifdef CONFIG_ACPI 199 200 /* Called only on architectures with per-cpu IRQs (i.e., not x86/x64) */ 200 201 static int hv_setup_stimer0_irq(void) 201 202 { ··· 231 230 stimer0_irq = -1; 232 231 } 233 232 } 233 + #else 234 + static int hv_setup_stimer0_irq(void) 235 + { 236 + return 0; 237 + } 238 + 239 + static void hv_remove_stimer0_irq(void) 240 + { 241 + } 242 + #endif 234 243 235 244 /* hv_stimer_alloc - Global initialization of the clockevent and stimer0 */ 236 245 int hv_stimer_alloc(bool have_percpu_irqs)