@@ -65,10 +65,10 @@ unsigned int num_processors;
65
65
unsigned disabled_cpus ;
66
66
67
67
/* Processor that is doing the boot up */
68
- unsigned int boot_cpu_physical_apicid = -1U ;
68
+ unsigned int boot_cpu_physical_apicid __ro_after_init = -1U ;
69
69
EXPORT_SYMBOL_GPL (boot_cpu_physical_apicid );
70
70
71
- u8 boot_cpu_apic_version ;
71
+ u8 boot_cpu_apic_version __ro_after_init ;
72
72
73
73
/*
74
74
* The highest APIC ID seen during enumeration.
@@ -85,13 +85,13 @@ physid_mask_t phys_cpu_present_map;
85
85
* disable_cpu_apicid=<int>, mostly used for the kdump 2nd kernel to
86
86
* avoid undefined behaviour caused by sending INIT from AP to BSP.
87
87
*/
88
- static unsigned int disabled_cpu_apicid __read_mostly = BAD_APICID ;
88
+ static unsigned int disabled_cpu_apicid __ro_after_init = BAD_APICID ;
89
89
90
90
/*
91
91
* This variable controls which CPUs receive external NMIs. By default,
92
92
* external NMIs are delivered only to the BSP.
93
93
*/
94
- static int apic_extnmi = APIC_EXTNMI_BSP ;
94
+ static int apic_extnmi __ro_after_init = APIC_EXTNMI_BSP ;
95
95
96
96
/*
97
97
* Map cpu index to physical APIC ID
@@ -114,7 +114,7 @@ EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_acpiid);
114
114
DEFINE_EARLY_PER_CPU_READ_MOSTLY (int , x86_cpu_to_logical_apicid , BAD_APICID );
115
115
116
116
/* Local APIC was disabled by the BIOS and enabled by the kernel */
117
- static int enabled_via_apicbase ;
117
+ static int enabled_via_apicbase __ro_after_init ;
118
118
119
119
/*
120
120
* Handle interrupt mode configuration register (IMCR).
@@ -172,23 +172,23 @@ static __init int setup_apicpmtimer(char *s)
172
172
__setup ("apicpmtimer" , setup_apicpmtimer );
173
173
#endif
174
174
175
- unsigned long mp_lapic_addr ;
176
- int disable_apic ;
175
+ unsigned long mp_lapic_addr __ro_after_init ;
176
+ int disable_apic __ro_after_init ;
177
177
/* Disable local APIC timer from the kernel commandline or via dmi quirk */
178
178
static int disable_apic_timer __initdata ;
179
179
/* Local APIC timer works in C2 */
180
- int local_apic_timer_c2_ok ;
180
+ int local_apic_timer_c2_ok __ro_after_init ;
181
181
EXPORT_SYMBOL_GPL (local_apic_timer_c2_ok );
182
182
183
183
/*
184
184
* Debug level, exported for io_apic.c
185
185
*/
186
- int apic_verbosity ;
186
+ int apic_verbosity __ro_after_init ;
187
187
188
- int pic_mode ;
188
+ int pic_mode __ro_after_init ;
189
189
190
190
/* Have we found an MP table */
191
- int smp_found_config ;
191
+ int smp_found_config __ro_after_init ;
192
192
193
193
static struct resource lapic_resource = {
194
194
.name = "Local APIC" ,
@@ -199,7 +199,7 @@ unsigned int lapic_timer_period = 0;
199
199
200
200
static void apic_pm_activate (void );
201
201
202
- static unsigned long apic_phys ;
202
+ static unsigned long apic_phys __ro_after_init ;
203
203
204
204
/*
205
205
* Get the LAPIC version
@@ -1278,7 +1278,7 @@ void __init sync_Arb_IDs(void)
1278
1278
APIC_INT_LEVELTRIG | APIC_DM_INIT );
1279
1279
}
1280
1280
1281
- enum apic_intr_mode_id apic_intr_mode ;
1281
+ enum apic_intr_mode_id apic_intr_mode __ro_after_init ;
1282
1282
1283
1283
static int __init apic_intr_mode_select (void )
1284
1284
{
0 commit comments