All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/efi: remove unreachable efi_halt_system() function
@ 2026-02-24 20:07 Roger Pau Monne
  2026-02-24 19:05 ` Jason Andryuk
  0 siblings, 1 reply; 3+ messages in thread
From: Roger Pau Monne @ 2026-02-24 20:07 UTC (permalink / raw)
  To: xen-devel
  Cc: Roger Pau Monne, Daniel P. Smith, Marek Marczykowski-Górecki,
	Jan Beulich, Andrew Cooper, Anthony PERARD, Michal Orzel,
	Julien Grall, Stefano Stabellini

After e4c3755d4dd7 the function efi_halt_system() is unreachable, remove it
from the file.

No functional change expected, as the function is not called.

Fixes: e4c3755d4dd7 ("x86-64/EFI: don't call EfiResetSystem() from machine_halt()")
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/common/efi/common-stub.c |  1 -
 xen/common/efi/runtime.c     | 13 -------------
 xen/include/xen/efi.h        |  1 -
 3 files changed, 15 deletions(-)

diff --git a/xen/common/efi/common-stub.c b/xen/common/efi/common-stub.c
index 77f138a6c574..9dc8aa538cc1 100644
--- a/xen/common/efi/common-stub.c
+++ b/xen/common/efi/common-stub.c
@@ -18,7 +18,6 @@ unsigned long efi_get_time(void)
     return 0;
 }
 
-void efi_halt_system(void) { }
 void efi_reset_system(bool warm) { }
 
 int efi_get_info(uint32_t idx, union xenpf_efi_info *info)
diff --git a/xen/common/efi/runtime.c b/xen/common/efi/runtime.c
index f786ceb00763..ba27c62132d2 100644
--- a/xen/common/efi/runtime.c
+++ b/xen/common/efi/runtime.c
@@ -188,19 +188,6 @@ unsigned long efi_get_time(void)
                   time.Hour, time.Minute, time.Second);
 }
 
-void efi_halt_system(void)
-{
-    EFI_STATUS status;
-    struct efi_rs_state state = efi_rs_enter();
-
-    if ( !state.cr3 )
-        return;
-    status = efi_rs->ResetSystem(EfiResetShutdown, EFI_SUCCESS, 0, NULL);
-    efi_rs_leave(&state);
-
-    printk(XENLOG_WARNING "EFI: could not halt system (%#lx)\n", status);
-}
-
 void efi_reset_system(bool warm)
 {
     EFI_STATUS status;
diff --git a/xen/include/xen/efi.h b/xen/include/xen/efi.h
index 723cb8085270..2e36b01e205b 100644
--- a/xen/include/xen/efi.h
+++ b/xen/include/xen/efi.h
@@ -42,7 +42,6 @@ void efi_init_memory(void);
 bool efi_boot_mem_unused(unsigned long *start, unsigned long *end);
 bool efi_rs_using_pgtables(void);
 unsigned long efi_get_time(void);
-void efi_halt_system(void);
 void efi_reset_system(bool warm);
 #ifndef COMPAT
 int efi_get_info(uint32_t idx, union xenpf_efi_info *info);
-- 
2.51.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-02 15:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-24 20:07 [PATCH] x86/efi: remove unreachable efi_halt_system() function Roger Pau Monne
2026-02-24 19:05 ` Jason Andryuk
2026-03-02 15:54   ` Marek Marczykowski-Górecki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.