From: Christoph Lameter <christoph@scalex86.org>

Move syscall timer_hpet and the boot_cpu_data into the "mostly_readonly"
section.  And move the syscall table to readonly

Signed-off-by: Alok N Kataria <alokk@calsoftinc.com>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Christoph Lameter <christoph@scalex86.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 arch/i386/kernel/entry.S             |    2 ++
 arch/i386/kernel/setup.c             |    3 ++-
 arch/i386/kernel/syscall_table.S     |    1 -
 arch/i386/kernel/timers/timer_hpet.c |    2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)

diff -puN arch/i386/kernel/entry.S~move-some-more-structures-into-mostly_readonly-and-readonly arch/i386/kernel/entry.S
--- 25/arch/i386/kernel/entry.S~move-some-more-structures-into-mostly_readonly-and-readonly	2005-06-18 02:48:41.000000000 -0700
+++ 25-akpm/arch/i386/kernel/entry.S	2005-06-18 02:48:42.000000000 -0700
@@ -652,6 +652,8 @@ ENTRY(spurious_interrupt_bug)
 	pushl $do_spurious_interrupt_bug
 	jmp error_code
 
+.section .ro_data,"a"
 #include "syscall_table.S"
 
 syscall_table_size=(.-sys_call_table)
+.previous
diff -puN arch/i386/kernel/setup.c~move-some-more-structures-into-mostly_readonly-and-readonly arch/i386/kernel/setup.c
--- 25/arch/i386/kernel/setup.c~move-some-more-structures-into-mostly_readonly-and-readonly	2005-06-18 02:48:41.000000000 -0700
+++ 25-akpm/arch/i386/kernel/setup.c	2005-06-18 02:48:42.000000000 -0700
@@ -74,7 +74,8 @@ EXPORT_SYMBOL(efi_enabled);
 /* cpu data as detected by the assembly code in head.S */
 struct cpuinfo_x86 new_cpu_data __initdata = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
 /* common cpu data for all cpus */
-struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
+struct cpuinfo_x86 boot_cpu_data  __cacheline_aligned_mostly_readonly
+		= { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
 EXPORT_SYMBOL(boot_cpu_data);
 
 unsigned long mmu_cr4_features;
diff -puN arch/i386/kernel/syscall_table.S~move-some-more-structures-into-mostly_readonly-and-readonly arch/i386/kernel/syscall_table.S
--- 25/arch/i386/kernel/syscall_table.S~move-some-more-structures-into-mostly_readonly-and-readonly	2005-06-18 02:48:41.000000000 -0700
+++ 25-akpm/arch/i386/kernel/syscall_table.S	2005-06-18 02:48:42.000000000 -0700
@@ -1,4 +1,3 @@
-.data
 ENTRY(sys_call_table)
 	.long sys_restart_syscall	/* 0 - old "setup()" system call, used for restarting */
 	.long sys_exit
diff -puN arch/i386/kernel/timers/timer_hpet.c~move-some-more-structures-into-mostly_readonly-and-readonly arch/i386/kernel/timers/timer_hpet.c
--- 25/arch/i386/kernel/timers/timer_hpet.c~move-some-more-structures-into-mostly_readonly-and-readonly	2005-06-18 02:48:41.000000000 -0700
+++ 25-akpm/arch/i386/kernel/timers/timer_hpet.c	2005-06-18 02:48:42.000000000 -0700
@@ -180,7 +180,7 @@ static int __init init_hpet(char* overri
 /************************************************************/
 
 /* tsc timer_opts struct */
-static struct timer_opts timer_hpet = {
+static struct timer_opts timer_hpet __cacheline_aligned_mostly_readonly = {
 	.name = 		"hpet",
 	.mark_offset =		mark_offset_hpet,
 	.get_offset =		get_offset_hpet,
_