diff options
author | Ravikiran G Thirumalai <kiran@scalex86.org> | 2005-09-06 18:17:45 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-07 19:57:33 -0400 |
commit | 6c231b7bab0aa6860cd9da2de8a064eddc34c146 (patch) | |
tree | 2a6d9dea348651ec6000b96b99fbf5bd9ccdb228 /arch/x86_64 | |
parent | 39ed3fdeec1290dd246dcf1da6b278566987a084 (diff) |
[PATCH] Additions to .data.read_mostly section
Mark variables which are usually accessed for reads with __readmostly.
Signed-off-by: Alok N Kataria <alokk@calsoftinc.com>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/kernel/genapic.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/io_apic.c | 10 | ||||
-rw-r--r-- | arch/x86_64/kernel/setup.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/setup64.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/smpboot.c | 10 | ||||
-rw-r--r-- | arch/x86_64/mm/numa.c | 6 |
6 files changed, 16 insertions, 16 deletions
diff --git a/arch/x86_64/kernel/genapic.c b/arch/x86_64/kernel/genapic.c index 30c843a5efdd..f062aa03bab7 100644 --- a/arch/x86_64/kernel/genapic.c +++ b/arch/x86_64/kernel/genapic.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #endif | 25 | #endif |
26 | 26 | ||
27 | /* which logical CPU number maps to which CPU (physical APIC ID) */ | 27 | /* which logical CPU number maps to which CPU (physical APIC ID) */ |
28 | u8 x86_cpu_to_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; | 28 | u8 x86_cpu_to_apicid[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = BAD_APICID }; |
29 | EXPORT_SYMBOL(x86_cpu_to_apicid); | 29 | EXPORT_SYMBOL(x86_cpu_to_apicid); |
30 | u8 x86_cpu_to_log_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; | 30 | u8 x86_cpu_to_log_apicid[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; |
31 | 31 | ||
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 76bcc4e6979d..ba1a744e9bf0 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -70,7 +70,7 @@ static struct irq_pin_list { | |||
70 | short apic, pin, next; | 70 | short apic, pin, next; |
71 | } irq_2_pin[PIN_MAP_SIZE]; | 71 | } irq_2_pin[PIN_MAP_SIZE]; |
72 | 72 | ||
73 | int vector_irq[NR_VECTORS] = { [0 ... NR_VECTORS - 1] = -1}; | 73 | int vector_irq[NR_VECTORS] __read_mostly = { [0 ... NR_VECTORS - 1] = -1}; |
74 | #ifdef CONFIG_PCI_MSI | 74 | #ifdef CONFIG_PCI_MSI |
75 | #define vector_to_irq(vector) \ | 75 | #define vector_to_irq(vector) \ |
76 | (platform_legacy_irq(vector) ? vector : vector_irq[vector]) | 76 | (platform_legacy_irq(vector) ? vector : vector_irq[vector]) |
@@ -683,7 +683,7 @@ static inline int IO_APIC_irq_trigger(int irq) | |||
683 | } | 683 | } |
684 | 684 | ||
685 | /* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */ | 685 | /* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */ |
686 | u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 }; | 686 | u8 irq_vector[NR_IRQ_VECTORS] __read_mostly = { FIRST_DEVICE_VECTOR , 0 }; |
687 | 687 | ||
688 | int assign_irq_vector(int irq) | 688 | int assign_irq_vector(int irq) |
689 | { | 689 | { |
@@ -1443,7 +1443,7 @@ static void set_ioapic_affinity_vector (unsigned int vector, | |||
1443 | * races. | 1443 | * races. |
1444 | */ | 1444 | */ |
1445 | 1445 | ||
1446 | static struct hw_interrupt_type ioapic_edge_type = { | 1446 | static struct hw_interrupt_type ioapic_edge_type __read_mostly = { |
1447 | .typename = "IO-APIC-edge", | 1447 | .typename = "IO-APIC-edge", |
1448 | .startup = startup_edge_ioapic, | 1448 | .startup = startup_edge_ioapic, |
1449 | .shutdown = shutdown_edge_ioapic, | 1449 | .shutdown = shutdown_edge_ioapic, |
@@ -1456,7 +1456,7 @@ static struct hw_interrupt_type ioapic_edge_type = { | |||
1456 | #endif | 1456 | #endif |
1457 | }; | 1457 | }; |
1458 | 1458 | ||
1459 | static struct hw_interrupt_type ioapic_level_type = { | 1459 | static struct hw_interrupt_type ioapic_level_type __read_mostly = { |
1460 | .typename = "IO-APIC-level", | 1460 | .typename = "IO-APIC-level", |
1461 | .startup = startup_level_ioapic, | 1461 | .startup = startup_level_ioapic, |
1462 | .shutdown = shutdown_level_ioapic, | 1462 | .shutdown = shutdown_level_ioapic, |
@@ -1529,7 +1529,7 @@ static void ack_lapic_irq (unsigned int irq) | |||
1529 | 1529 | ||
1530 | static void end_lapic_irq (unsigned int i) { /* nothing */ } | 1530 | static void end_lapic_irq (unsigned int i) { /* nothing */ } |
1531 | 1531 | ||
1532 | static struct hw_interrupt_type lapic_irq_type = { | 1532 | static struct hw_interrupt_type lapic_irq_type __read_mostly = { |
1533 | .typename = "local-APIC-edge", | 1533 | .typename = "local-APIC-edge", |
1534 | .startup = NULL, /* startup_irq() not used for IRQ0 */ | 1534 | .startup = NULL, /* startup_irq() not used for IRQ0 */ |
1535 | .shutdown = NULL, /* shutdown_irq() not used for IRQ0 */ | 1535 | .shutdown = NULL, /* shutdown_irq() not used for IRQ0 */ |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 116a491e2961..b356f8e6adfe 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -65,7 +65,7 @@ | |||
65 | * Machine setup.. | 65 | * Machine setup.. |
66 | */ | 66 | */ |
67 | 67 | ||
68 | struct cpuinfo_x86 boot_cpu_data; | 68 | struct cpuinfo_x86 boot_cpu_data __read_mostly; |
69 | 69 | ||
70 | unsigned long mmu_cr4_features; | 70 | unsigned long mmu_cr4_features; |
71 | 71 | ||
diff --git a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c index 34082c1cc41e..e3ffcacc8c90 100644 --- a/arch/x86_64/kernel/setup64.c +++ b/arch/x86_64/kernel/setup64.c | |||
@@ -36,7 +36,7 @@ struct desc_ptr idt_descr = { 256 * 16, (unsigned long) idt_table }; | |||
36 | 36 | ||
37 | char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned"))); | 37 | char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned"))); |
38 | 38 | ||
39 | unsigned long __supported_pte_mask = ~0UL; | 39 | unsigned long __supported_pte_mask __read_mostly = ~0UL; |
40 | static int do_not_nx __initdata = 0; | 40 | static int do_not_nx __initdata = 0; |
41 | 41 | ||
42 | /* noexec=on|off | 42 | /* noexec=on|off |
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index fa25e39fe54d..90aeccd15190 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c | |||
@@ -62,13 +62,13 @@ | |||
62 | /* Number of siblings per CPU package */ | 62 | /* Number of siblings per CPU package */ |
63 | int smp_num_siblings = 1; | 63 | int smp_num_siblings = 1; |
64 | /* Package ID of each logical CPU */ | 64 | /* Package ID of each logical CPU */ |
65 | u8 phys_proc_id[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; | 65 | u8 phys_proc_id[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = BAD_APICID }; |
66 | u8 cpu_core_id[NR_CPUS] = { [0 ... NR_CPUS-1] = BAD_APICID }; | 66 | u8 cpu_core_id[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = BAD_APICID }; |
67 | EXPORT_SYMBOL(phys_proc_id); | 67 | EXPORT_SYMBOL(phys_proc_id); |
68 | EXPORT_SYMBOL(cpu_core_id); | 68 | EXPORT_SYMBOL(cpu_core_id); |
69 | 69 | ||
70 | /* Bitmask of currently online CPUs */ | 70 | /* Bitmask of currently online CPUs */ |
71 | cpumask_t cpu_online_map; | 71 | cpumask_t cpu_online_map __read_mostly; |
72 | 72 | ||
73 | EXPORT_SYMBOL(cpu_online_map); | 73 | EXPORT_SYMBOL(cpu_online_map); |
74 | 74 | ||
@@ -88,8 +88,8 @@ struct cpuinfo_x86 cpu_data[NR_CPUS] __cacheline_aligned; | |||
88 | /* Set when the idlers are all forked */ | 88 | /* Set when the idlers are all forked */ |
89 | int smp_threads_ready; | 89 | int smp_threads_ready; |
90 | 90 | ||
91 | cpumask_t cpu_sibling_map[NR_CPUS] __cacheline_aligned; | 91 | cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly; |
92 | cpumask_t cpu_core_map[NR_CPUS] __cacheline_aligned; | 92 | cpumask_t cpu_core_map[NR_CPUS] __read_mostly; |
93 | EXPORT_SYMBOL(cpu_core_map); | 93 | EXPORT_SYMBOL(cpu_core_map); |
94 | 94 | ||
95 | /* | 95 | /* |
diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c index 6a156f5692ae..04f7a33e144c 100644 --- a/arch/x86_64/mm/numa.c +++ b/arch/x86_64/mm/numa.c | |||
@@ -22,14 +22,14 @@ | |||
22 | #define Dprintk(x...) | 22 | #define Dprintk(x...) |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | struct pglist_data *node_data[MAX_NUMNODES]; | 25 | struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; |
26 | bootmem_data_t plat_node_bdata[MAX_NUMNODES]; | 26 | bootmem_data_t plat_node_bdata[MAX_NUMNODES]; |
27 | 27 | ||
28 | int memnode_shift; | 28 | int memnode_shift; |
29 | u8 memnodemap[NODEMAPSIZE]; | 29 | u8 memnodemap[NODEMAPSIZE]; |
30 | 30 | ||
31 | unsigned char cpu_to_node[NR_CPUS] = { [0 ... NR_CPUS-1] = NUMA_NO_NODE }; | 31 | unsigned char cpu_to_node[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = NUMA_NO_NODE }; |
32 | cpumask_t node_to_cpumask[MAX_NUMNODES]; | 32 | cpumask_t node_to_cpumask[MAX_NUMNODES] __read_mostly; |
33 | 33 | ||
34 | int numa_off __initdata; | 34 | int numa_off __initdata; |
35 | 35 | ||