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

[PATCH] x86/efi: remove unreachable efi_halt_system() function


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Tue, 24 Feb 2026 21:07:08 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rJa/HdC4Kas9p2+hCTJKxBWMalwg8ZXGBwrBt1brkig=; b=q+FRhmUqxP+1AtYHUdETmuga/I8qir9m48W6iHG+Cy5ODhHn8ShZOdCFnuR45FZ4zdg5afm8zCUzyP3RUjv4/W/EPrF3DW8XMQZagSrRXGDvekA8ZcBwdmgILDLRf73TSPoPD2F1nwpm9bMHdF2XFZ0wdnAAm0e5LiGxtNY/TjGLJ1/PNgRkZdtNhnxoRGRLlTCHvs4ThxGv0YIKirB8viBlB3FTkEmRK1QzWgwpbcEK9MKvEudJLWuzZsIhVi/gw43esE3UZex5nrkWb+e7noT5Jzuxmm1SB5EMxGUNX75LdPpHqKh0f2KHH4hgZzhyKkY2QHoykR2ecAmZBxkO+A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=eUT6zptSmrJ0qsc4qS1UT6NNp8cFcPeW/qkIMElQskriU8+51SGf8q3hR9Dg2R/9OYrbN2ieh6LfjfUCppFT2INtFv3QcJlQv2IuuXFGRRPEXigXqF70/inrEApeNL9Mwir0h1p700O0TOUswd9Cc0G6s+j2UAXcGhW3wTv9MY/dtzrycRt50DIf5pxYSAVOugdXedicxSYGEApgTrMsk2d2mh0mYx8HCov6kqE5wWaifZMSJMVan4xRh6w3AeEMoMAy8LEgmKLx5Vf7b6vOcRgdgH6ABwrM50UV55gn+McIsRiNPNHOtR52IjTUXQ9GnFp5VIqYcE76sjovfGnjeA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Tue, 24 Feb 2026 20:09:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxx>
---
 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




 


Rackspace

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