aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorAndy Lutomirski <luto@amacapital.net>2015-03-05 22:19:05 -0500
committerIngo Molnar <mingo@kernel.org>2015-03-06 02:32:58 -0500
commit24933b82c0d9a711475a5ef7904eb733f561e637 (patch)
tree662b18c8ad535c880c2a4d5b0d9e5bb772f78a04 /arch/x86
parent9d0c914c60f4d3123debb653340dc1f7cf44939d (diff)
x86/asm/entry: Rename 'init_tss' to 'cpu_tss'
It has nothing to do with init -- there's only one TSS per cpu. Other names considered include: - current_tss: Confusing because we never switch the tss. - singleton_tss: Too long. This patch was generated with 's/init_tss/cpu_tss/g'. Followup patches will fix INIT_TSS and INIT_TSS_IST by hand. Signed-off-by: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/da29fb2a793e4f649d93ce2d1ed320ebe8516262.1425611534.git.luto@amacapital.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/ia32/ia32entry.S2
-rw-r--r--arch/x86/include/asm/processor.h4
-rw-r--r--arch/x86/kernel/cpu/common.c6
-rw-r--r--arch/x86/kernel/entry_64.S2
-rw-r--r--arch/x86/kernel/ioport.c2
-rw-r--r--arch/x86/kernel/process.c6
-rw-r--r--arch/x86/kernel/process_32.c2
-rw-r--r--arch/x86/kernel/process_64.c2
-rw-r--r--arch/x86/kernel/vm86_32.c4
-rw-r--r--arch/x86/power/cpu.c2
10 files changed, 16 insertions, 16 deletions
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S
index 719db63b35c4..ad9efef65a6b 100644
--- a/arch/x86/ia32/ia32entry.S
+++ b/arch/x86/ia32/ia32entry.S
@@ -113,7 +113,7 @@ ENTRY(ia32_sysenter_target)
113 CFI_DEF_CFA rsp,0 113 CFI_DEF_CFA rsp,0
114 CFI_REGISTER rsp,rbp 114 CFI_REGISTER rsp,rbp
115 SWAPGS_UNSAFE_STACK 115 SWAPGS_UNSAFE_STACK
116 movq PER_CPU_VAR(init_tss + TSS_sp0), %rsp 116 movq PER_CPU_VAR(cpu_tss + TSS_sp0), %rsp
117 /* 117 /*
118 * No need to follow this irqs on/off section: the syscall 118 * No need to follow this irqs on/off section: the syscall
119 * disabled irqs, here we enable it straight after entry: 119 * disabled irqs, here we enable it straight after entry:
diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index 71c3a826a690..117ee65473e2 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -282,7 +282,7 @@ struct tss_struct {
282 282
283} ____cacheline_aligned; 283} ____cacheline_aligned;
284 284
285DECLARE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss); 285DECLARE_PER_CPU_SHARED_ALIGNED(struct tss_struct, cpu_tss);
286 286
287/* 287/*
288 * Save the original ist values for checking stack pointers during debugging 288 * Save the original ist values for checking stack pointers during debugging
@@ -566,7 +566,7 @@ static inline void native_swapgs(void)
566 566
567static inline unsigned long this_cpu_sp0(void) 567static inline unsigned long this_cpu_sp0(void)
568{ 568{
569 return this_cpu_read_stable(init_tss.x86_tss.sp0); 569 return this_cpu_read_stable(cpu_tss.x86_tss.sp0);
570} 570}
571 571
572#ifdef CONFIG_PARAVIRT 572#ifdef CONFIG_PARAVIRT
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 2346c95c6ab1..5d0f0cc7ea26 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -979,7 +979,7 @@ static void syscall32_cpu_init(void)
979void enable_sep_cpu(void) 979void enable_sep_cpu(void)
980{ 980{
981 int cpu = get_cpu(); 981 int cpu = get_cpu();
982 struct tss_struct *tss = &per_cpu(init_tss, cpu); 982 struct tss_struct *tss = &per_cpu(cpu_tss, cpu);
983 983
984 if (!boot_cpu_has(X86_FEATURE_SEP)) { 984 if (!boot_cpu_has(X86_FEATURE_SEP)) {
985 put_cpu(); 985 put_cpu();
@@ -1307,7 +1307,7 @@ void cpu_init(void)
1307 */ 1307 */
1308 load_ucode_ap(); 1308 load_ucode_ap();
1309 1309
1310 t = &per_cpu(init_tss, cpu); 1310 t = &per_cpu(cpu_tss, cpu);
1311 oist = &per_cpu(orig_ist, cpu); 1311 oist = &per_cpu(orig_ist, cpu);
1312 1312
1313#ifdef CONFIG_NUMA 1313#ifdef CONFIG_NUMA
@@ -1391,7 +1391,7 @@ void cpu_init(void)
1391{ 1391{
1392 int cpu = smp_processor_id(); 1392 int cpu = smp_processor_id();
1393 struct task_struct *curr = current; 1393 struct task_struct *curr = current;
1394 struct tss_struct *t = &per_cpu(init_tss, cpu); 1394 struct tss_struct *t = &per_cpu(cpu_tss, cpu);
1395 struct thread_struct *thread = &curr->thread; 1395 struct thread_struct *thread = &curr->thread;
1396 1396
1397 wait_for_master_cpu(cpu); 1397 wait_for_master_cpu(cpu);
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index 622ce4254893..0c00fd80249a 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -959,7 +959,7 @@ apicinterrupt IRQ_WORK_VECTOR \
959/* 959/*
960 * Exception entry points. 960 * Exception entry points.
961 */ 961 */
962#define INIT_TSS_IST(x) PER_CPU_VAR(init_tss) + (TSS_ist + ((x) - 1) * 8) 962#define INIT_TSS_IST(x) PER_CPU_VAR(cpu_tss) + (TSS_ist + ((x) - 1) * 8)
963 963
964.macro idtentry sym do_sym has_error_code:req paranoid=0 shift_ist=-1 964.macro idtentry sym do_sym has_error_code:req paranoid=0 shift_ist=-1
965ENTRY(\sym) 965ENTRY(\sym)
diff --git a/arch/x86/kernel/ioport.c b/arch/x86/kernel/ioport.c
index 4ddaf66ea35f..37dae792dbbe 100644
--- a/arch/x86/kernel/ioport.c
+++ b/arch/x86/kernel/ioport.c
@@ -54,7 +54,7 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
54 * because the ->io_bitmap_max value must match the bitmap 54 * because the ->io_bitmap_max value must match the bitmap
55 * contents: 55 * contents:
56 */ 56 */
57 tss = &per_cpu(init_tss, get_cpu()); 57 tss = &per_cpu(cpu_tss, get_cpu());
58 58
59 if (turn_on) 59 if (turn_on)
60 bitmap_clear(t->io_bitmap_ptr, from, num); 60 bitmap_clear(t->io_bitmap_ptr, from, num);
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index ff5c9088b1c5..6f6087349231 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -37,8 +37,8 @@
37 * section. Since TSS's are completely CPU-local, we want them 37 * section. Since TSS's are completely CPU-local, we want them
38 * on exact cacheline boundaries, to eliminate cacheline ping-pong. 38 * on exact cacheline boundaries, to eliminate cacheline ping-pong.
39 */ 39 */
40__visible DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, init_tss) = INIT_TSS; 40__visible DEFINE_PER_CPU_SHARED_ALIGNED(struct tss_struct, cpu_tss) = INIT_TSS;
41EXPORT_PER_CPU_SYMBOL_GPL(init_tss); 41EXPORT_PER_CPU_SYMBOL_GPL(cpu_tss);
42 42
43#ifdef CONFIG_X86_64 43#ifdef CONFIG_X86_64
44static DEFINE_PER_CPU(unsigned char, is_idle); 44static DEFINE_PER_CPU(unsigned char, is_idle);
@@ -110,7 +110,7 @@ void exit_thread(void)
110 unsigned long *bp = t->io_bitmap_ptr; 110 unsigned long *bp = t->io_bitmap_ptr;
111 111
112 if (bp) { 112 if (bp) {
113 struct tss_struct *tss = &per_cpu(init_tss, get_cpu()); 113 struct tss_struct *tss = &per_cpu(cpu_tss, get_cpu());
114 114
115 t->io_bitmap_ptr = NULL; 115 t->io_bitmap_ptr = NULL;
116 clear_thread_flag(TIF_IO_BITMAP); 116 clear_thread_flag(TIF_IO_BITMAP);
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index 603c4f99cb5a..d3460af3d27a 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -248,7 +248,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
248 struct thread_struct *prev = &prev_p->thread, 248 struct thread_struct *prev = &prev_p->thread,
249 *next = &next_p->thread; 249 *next = &next_p->thread;
250 int cpu = smp_processor_id(); 250 int cpu = smp_processor_id();
251 struct tss_struct *tss = &per_cpu(init_tss, cpu); 251 struct tss_struct *tss = &per_cpu(cpu_tss, cpu);
252 fpu_switch_t fpu; 252 fpu_switch_t fpu;
253 253
254 /* never put a printk in __switch_to... printk() calls wake_up*() indirectly */ 254 /* never put a printk in __switch_to... printk() calls wake_up*() indirectly */
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 854b5981b327..2cd562f96c1f 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -277,7 +277,7 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p)
277 struct thread_struct *prev = &prev_p->thread; 277 struct thread_struct *prev = &prev_p->thread;
278 struct thread_struct *next = &next_p->thread; 278 struct thread_struct *next = &next_p->thread;
279 int cpu = smp_processor_id(); 279 int cpu = smp_processor_id();
280 struct tss_struct *tss = &per_cpu(init_tss, cpu); 280 struct tss_struct *tss = &per_cpu(cpu_tss, cpu);
281 unsigned fsindex, gsindex; 281 unsigned fsindex, gsindex;
282 fpu_switch_t fpu; 282 fpu_switch_t fpu;
283 283
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c
index e8edcf52e069..fc9db6ef2a95 100644
--- a/arch/x86/kernel/vm86_32.c
+++ b/arch/x86/kernel/vm86_32.c
@@ -150,7 +150,7 @@ struct pt_regs *save_v86_state(struct kernel_vm86_regs *regs)
150 do_exit(SIGSEGV); 150 do_exit(SIGSEGV);
151 } 151 }
152 152
153 tss = &per_cpu(init_tss, get_cpu()); 153 tss = &per_cpu(cpu_tss, get_cpu());
154 current->thread.sp0 = current->thread.saved_sp0; 154 current->thread.sp0 = current->thread.saved_sp0;
155 current->thread.sysenter_cs = __KERNEL_CS; 155 current->thread.sysenter_cs = __KERNEL_CS;
156 load_sp0(tss, &current->thread); 156 load_sp0(tss, &current->thread);
@@ -318,7 +318,7 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk
318 tsk->thread.saved_fs = info->regs32->fs; 318 tsk->thread.saved_fs = info->regs32->fs;
319 tsk->thread.saved_gs = get_user_gs(info->regs32); 319 tsk->thread.saved_gs = get_user_gs(info->regs32);
320 320
321 tss = &per_cpu(init_tss, get_cpu()); 321 tss = &per_cpu(cpu_tss, get_cpu());
322 tsk->thread.sp0 = (unsigned long) &info->VM86_TSS_ESP0; 322 tsk->thread.sp0 = (unsigned long) &info->VM86_TSS_ESP0;
323 if (cpu_has_sep) 323 if (cpu_has_sep)
324 tsk->thread.sysenter_cs = 0; 324 tsk->thread.sysenter_cs = 0;
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
index 3e32ed5648a0..757678fb26e1 100644
--- a/arch/x86/power/cpu.c
+++ b/arch/x86/power/cpu.c
@@ -134,7 +134,7 @@ static void do_fpu_end(void)
134static void fix_processor_context(void) 134static void fix_processor_context(void)
135{ 135{
136 int cpu = smp_processor_id(); 136 int cpu = smp_processor_id();
137 struct tss_struct *t = &per_cpu(init_tss, cpu); 137 struct tss_struct *t = &per_cpu(cpu_tss, cpu);
138#ifdef CONFIG_X86_64 138#ifdef CONFIG_X86_64
139 struct desc_struct *desc = get_cpu_gdt_table(cpu); 139 struct desc_struct *desc = get_cpu_gdt_table(cpu);
140 tss_desc tss; 140 tss_desc tss;