From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752981AbdH2LVW (ORCPT ); Tue, 29 Aug 2017 07:21:22 -0400 Received: from terminus.zytor.com ([65.50.211.136]:37501 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752463AbdH2LVT (ORCPT ); Tue, 29 Aug 2017 07:21:19 -0400 Date: Tue, 29 Aug 2017 04:15:36 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: dvlasenk@redhat.com, rostedt@goodmis.org, tglx@linutronix.de, mingo@kernel.org, brgerst@gmail.com, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org, jpoimboe@redhat.com, bp@alien8.de, luto@kernel.org, peterz@infradead.org, hpa@zytor.com Reply-To: luto@kernel.org, peterz@infradead.org, hpa@zytor.com, jpoimboe@redhat.com, linux-kernel@vger.kernel.org, bp@alien8.de, tglx@linutronix.de, mingo@kernel.org, brgerst@gmail.com, torvalds@linux-foundation.org, dvlasenk@redhat.com, rostedt@goodmis.org In-Reply-To: <20170828064958.445862201@linutronix.de> References: <20170828064958.445862201@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/apic] x86/idt: Move 32-bit idt_descr to C code Git-Commit-ID: 16bc18d895cee95f12bd722e5a3016676dfcf084 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 16bc18d895cee95f12bd722e5a3016676dfcf084 Gitweb: http://git.kernel.org/tip/16bc18d895cee95f12bd722e5a3016676dfcf084 Author: Thomas Gleixner AuthorDate: Mon, 28 Aug 2017 08:47:44 +0200 Committer: Ingo Molnar CommitDate: Tue, 29 Aug 2017 12:07:26 +0200 x86/idt: Move 32-bit idt_descr to C code 32-bit kernels have the idt_descr defined in the low level assembly entry code, but there is no good reason for that. Move it into the C file and use the 64-bit version of it. Signed-off-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20170828064958.445862201@linutronix.de Signed-off-by: Ingo Molnar --- arch/x86/kernel/head_32.S | 6 ------ arch/x86/kernel/idt.c | 10 +++++----- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index 29da959..ce8c6ed 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S @@ -622,7 +622,6 @@ int_msg: .data .globl boot_gdt_descr -.globl idt_descr ALIGN # early boot GDT descriptor (must use 1:1 address mapping) @@ -631,11 +630,6 @@ boot_gdt_descr: .word __BOOT_DS+7 .long boot_gdt - __PAGE_OFFSET - .word 0 # 32-bit align idt_desc.address -idt_descr: - .word IDT_ENTRIES*8-1 # idt contains 256 entries - .long idt_table - # boot GDT descriptor (later on used by CPU#0): .word 0 # 32 bit align gdt_desc.address ENTRY(early_gdt_descr) diff --git a/arch/x86/kernel/idt.c b/arch/x86/kernel/idt.c index 3d19cad..86e5912 100644 --- a/arch/x86/kernel/idt.c +++ b/arch/x86/kernel/idt.c @@ -10,15 +10,15 @@ /* Must be page-aligned because the real IDT is used in a fixmap. */ gate_desc idt_table[IDT_ENTRIES] __page_aligned_bss; -#ifdef CONFIG_X86_64 -/* No need to be aligned, but done to keep all IDTs defined the same way. */ -gate_desc debug_idt_table[IDT_ENTRIES] __page_aligned_bss; - struct desc_ptr idt_descr __ro_after_init = { - .size = IDT_ENTRIES * 16 - 1, + .size = (IDT_ENTRIES * 2 * sizeof(unsigned long)) - 1, .address = (unsigned long) idt_table, }; +#ifdef CONFIG_X86_64 +/* No need to be aligned, but done to keep all IDTs defined the same way. */ +gate_desc debug_idt_table[IDT_ENTRIES] __page_aligned_bss; + const struct desc_ptr debug_idt_descr = { .size = IDT_ENTRIES * 16 - 1, .address = (unsigned long) debug_idt_table,