From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH] x86: drop unused header asm/segment.h and modes.h headers
Date: Mon,  3 Nov 2025 08:47:02 +0100	[thread overview]
Message-ID: <20251103074703.305235-1-a.fatoum@barebox.org> (raw)
This headers are left-overs from the legacy BIOS support that has been
removed a few years ago and are not included anywhere.
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 arch/x86/include/asm/modes.h   | 48 ----------------------------------
 arch/x86/include/asm/segment.h | 26 ------------------
 2 files changed, 74 deletions(-)
 delete mode 100644 arch/x86/include/asm/modes.h
 delete mode 100644 arch/x86/include/asm/segment.h
diff --git a/arch/x86/include/asm/modes.h b/arch/x86/include/asm/modes.h
deleted file mode 100644
index b33df858921c..000000000000
--- a/arch/x86/include/asm/modes.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/* SPDX-FileCopyrightText: 2009 Juergen Beisert, Pengutronix */
-
-/**
- * @file
- * @brief Declarations to bring some light in the real/protected/flat mode darkness
- */
-#ifndef _ASM_X86_MODES_H
-#define _ASM_X86_MODES_H
-
-#ifndef __ASSEMBLY__
-
-#include <types.h>
-
-extern uint64_t gdt[];
-extern unsigned gdt_size;
-
-#endif
-
-/** to simplify GDT entry generation */
-#define GDT_ENTRY(flags, base, limit)			\
-	((((base)  & 0xff000000ULL) << (56-24)) |	\
-	 (((flags) & 0x0000f0ffULL) << 40) |		\
-	 (((limit) & 0x000f0000ULL) << (48-16)) |	\
-	 (((base)  & 0x00ffffffULL) << 16) |		\
-	 (((limit) & 0x0000ffffULL)))
-
-/** 32 bit barebox text */
-#define GDT_ENTRY_BOOT_CS	2
-#define __BOOT_CS		(GDT_ENTRY_BOOT_CS * 8)
-
-/** 32 bit barebox data */
-#define GDT_ENTRY_BOOT_DS	3
-#define __BOOT_DS		(GDT_ENTRY_BOOT_DS * 8)
-
-/** 16 bit barebox text */
-#define GDT_ENTRY_REAL_CS	4
-#define __REAL_CS		(GDT_ENTRY_REAL_CS * 8)
-
-/** 16 bit barebox data */
-#define GDT_ENTRY_REAL_DS	5
-#define __REAL_DS		(GDT_ENTRY_REAL_DS * 8)
-
-/** Something to make others happy */
-#define GDT_ENTRY_BOOT_TSS	6
-#define __BOOT_TSS		(GDT_ENTRY_BOOT_TSS * 8)
-
-#endif /* _ASM_X86_MODES_H */
diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h
deleted file mode 100644
index 9e1d897b0386..000000000000
--- a/arch/x86/include/asm/segment.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/* SPDX-FileCopyrightText: 2009 Juergen Beisert, Pengutronix */
-
-#ifndef _ASM_X86_SEGMENT_H
-#define _ASM_X86_SEGMENT_H
-
-#include <linux/compiler.h>
-
-/**
- * @file
- * @brief To be able to mark functions running in real _and_ flat mode
- */
-
-/**
- * Section for every program code needed to bring barebox from real mode
- * to flat mode
- */
-#define __bootcode	__section(.boot.text)
-
-/**
- * Section for every data needed to bring barebox from real mode
- * to flat mode
- */
-#define __bootdata	__section(.boot.data)
-
-#endif /* _ASM_X86_SEGMENT_H */
-- 
2.47.3
next             reply	other threads:[~2025-11-03  7:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-03  7:47 Ahmad Fatoum [this message]
2025-11-03  8:42 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=20251103074703.305235-1-a.fatoum@barebox.org \
    --to=a.fatoum@barebox.org \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox