[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <159083263646.17951.10745081487324300137.tip-bot2@tip-bot2>
Date: Sat, 30 May 2020 09:57:16 -0000
From: "tip-bot2 for Thomas Gleixner" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: x86/entry] x86/idt: Use proper constants for table size
The following commit has been merged into the x86/entry branch of tip:
Commit-ID: ab46346736ed50ed90f4bfb854f4bec61fecee9e
Gitweb: https://git.kernel.org/tip/ab46346736ed50ed90f4bfb854f4bec61fecee9e
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Thu, 28 May 2020 16:53:18 +02:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Sat, 30 May 2020 11:50:12 +02:00
x86/idt: Use proper constants for table size
Use the actual struct size to calculate the IDT table size instead of
hardcoded values.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://lkml.kernel.org/r/20200528145522.898591501@linutronix.de
---
arch/x86/kernel/idt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/idt.c b/arch/x86/kernel/idt.c
index 5ef82fc..b6e1a87 100644
--- a/arch/x86/kernel/idt.c
+++ b/arch/x86/kernel/idt.c
@@ -51,6 +51,7 @@ struct idt_data {
#define TSKG(_vector, _gdt) \
G(_vector, NULL, DEFAULT_STACK, GATE_TASK, DPL0, _gdt << 3)
+#define IDT_TABLE_SIZE (IDT_ENTRIES * sizeof(gate_desc))
static bool idt_setup_done __initdata;
@@ -168,7 +169,7 @@ static const __initconst struct idt_data early_pf_idts[] = {
gate_desc idt_table[IDT_ENTRIES] __page_aligned_bss;
struct desc_ptr idt_descr __ro_after_init = {
- .size = (IDT_ENTRIES * 2 * sizeof(unsigned long)) - 1,
+ .size = IDT_TABLE_SIZE - 1,
.address = (unsigned long) idt_table,
};
Powered by blists - more mailing lists