public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: <tglx@linutronix.de>, <mingo@redhat.com>, <hpa@zytor.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH] x86: move interrupts[] to .rodata/.init.data
Date: Thu, 13 Dec 2007 09:37:22 +0000	[thread overview]
Message-ID: <47610B62.76E4.0078.0@novell.com> (raw)

The array is never written, and on 64-bits it's not even being used
past initial boot.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

 arch/x86/kernel/entry_32.S  |    2 +-
 arch/x86/kernel/i8259_64.c  |    2 +-
 include/asm-x86/hw_irq_32.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.24-rc5/arch/x86/kernel/entry_32.S	2007-12-12 11:28:18.000000000 +0100
+++ 2.6.24-rc5-x86-interrupt-section/arch/x86/kernel/entry_32.S	2007-12-04 16:25:04.000000000 +0100
@@ -583,7 +583,7 @@ END(syscall_badsys)
  * Build the entry stubs and pointer table with
  * some assembler magic.
  */
-.data
+.section .rodata,"a"
 ENTRY(interrupt)
 .text
 
--- linux-2.6.24-rc5/arch/x86/kernel/i8259_64.c	2007-12-12 11:28:18.000000000 +0100
+++ 2.6.24-rc5-x86-interrupt-section/arch/x86/kernel/i8259_64.c	2007-12-04 16:25:04.000000000 +0100
@@ -76,7 +76,7 @@ BUILD_16_IRQS(0xc) BUILD_16_IRQS(0xd) BU
 	IRQ(x,c), IRQ(x,d), IRQ(x,e), IRQ(x,f)
 
 /* for the irq vectors */
-static void (*interrupt[NR_VECTORS - FIRST_EXTERNAL_VECTOR])(void) = {
+static void (*__initdata interrupt[NR_VECTORS - FIRST_EXTERNAL_VECTOR])(void) = {
 					  IRQLIST_16(0x2), IRQLIST_16(0x3),
 	IRQLIST_16(0x4), IRQLIST_16(0x5), IRQLIST_16(0x6), IRQLIST_16(0x7),
 	IRQLIST_16(0x8), IRQLIST_16(0x9), IRQLIST_16(0xa), IRQLIST_16(0xb),
--- linux-2.6.24-rc5/include/asm-x86/hw_irq_32.h	2007-12-12 11:29:30.000000000 +0100
+++ 2.6.24-rc5-x86-interrupt-section/include/asm-x86/hw_irq_32.h	2007-12-04 16:25:04.000000000 +0100
@@ -26,7 +26,7 @@
  * Interrupt entry/exit code at both C and assembly level
  */
 
-extern void (*interrupt[NR_IRQS])(void);
+extern void (*const interrupt[NR_IRQS])(void);
 
 #ifdef CONFIG_SMP
 fastcall void reschedule_interrupt(void);




             reply	other threads:[~2007-12-13  9:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-13  9:37 Jan Beulich [this message]
2007-12-17 13:33 ` [PATCH] x86: move interrupts[] to .rodata/.init.data Ingo Molnar

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=47610B62.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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