diff options
author | Andy Lutomirski <luto@amacapital.net> | 2015-03-05 22:19:05 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-03-06 02:32:58 -0500 |
commit | 24933b82c0d9a711475a5ef7904eb733f561e637 (patch) | |
tree | 662b18c8ad535c880c2a4d5b0d9e5bb772f78a04 /arch/x86/kernel | |
parent | 9d0c914c60f4d3123debb653340dc1f7cf44939d (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/kernel')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/entry_64.S | 2 | ||||
-rw-r--r-- | arch/x86/kernel/ioport.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/process.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/process_32.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/process_64.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/vm86_32.c | 4 |
7 files changed, 12 insertions, 12 deletions
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) | |||
979 | void enable_sep_cpu(void) | 979 | void 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 |
965 | ENTRY(\sym) | 965 | ENTRY(\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; |
41 | EXPORT_PER_CPU_SYMBOL_GPL(init_tss); | 41 | EXPORT_PER_CPU_SYMBOL_GPL(cpu_tss); |
42 | 42 | ||
43 | #ifdef CONFIG_X86_64 | 43 | #ifdef CONFIG_X86_64 |
44 | static DEFINE_PER_CPU(unsigned char, is_idle); | 44 | static 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, ¤t->thread); | 156 | load_sp0(tss, ¤t->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; |