aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaolo Ciarrocchi <paolo.ciarrocchi@gmail.com>2008-02-24 05:57:22 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:50 -0400
commitdb96598494f2a2ab9ab79999dd8fc365a906914b (patch)
treea7466ea98b5efee94f1d0cb7fac427516e707906 /arch
parent7ebed39ff7eec204850736a662828da0b942b8c0 (diff)
x86: coding style fixes to arch/x86/power/cpu_32.c
Before: total: 15 errors, 3 warnings, 133 lines checked After: total: 0 errors, 0 warnings, 138 lines checked No code changed: arch/x86/power/cpu_32.o: text data bss dec hex filename 739 0 84 823 337 cpu_32.o.before 739 0 84 823 337 cpu_32.o.after md5: eb0726223a5e26b195e65f0ae2c0ec66 cpu_32.o.before.asm eb0726223a5e26b195e65f0ae2c0ec66 cpu_32.o.after.asm Signed-off-by: Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/power/cpu_32.c41
1 files changed, 23 insertions, 18 deletions
diff --git a/arch/x86/power/cpu_32.c b/arch/x86/power/cpu_32.c
index 7f9c6da04a4c..7dc5d5cf50a2 100644
--- a/arch/x86/power/cpu_32.c
+++ b/arch/x86/power/cpu_32.c
@@ -27,17 +27,17 @@ static void __save_processor_state(struct saved_context *ctxt)
27 /* 27 /*
28 * descriptor tables 28 * descriptor tables
29 */ 29 */
30 store_gdt(&ctxt->gdt); 30 store_gdt(&ctxt->gdt);
31 store_idt(&ctxt->idt); 31 store_idt(&ctxt->idt);
32 store_tr(ctxt->tr); 32 store_tr(ctxt->tr);
33 33
34 /* 34 /*
35 * segment registers 35 * segment registers
36 */ 36 */
37 savesegment(es, ctxt->es); 37 savesegment(es, ctxt->es);
38 savesegment(fs, ctxt->fs); 38 savesegment(fs, ctxt->fs);
39 savesegment(gs, ctxt->gs); 39 savesegment(gs, ctxt->gs);
40 savesegment(ss, ctxt->ss); 40 savesegment(ss, ctxt->ss);
41 41
42 /* 42 /*
43 * control registers 43 * control registers
@@ -48,10 +48,12 @@ static void __save_processor_state(struct saved_context *ctxt)
48 ctxt->cr4 = read_cr4(); 48 ctxt->cr4 = read_cr4();
49} 49}
50 50
51/* Needed by apm.c */
51void save_processor_state(void) 52void save_processor_state(void)
52{ 53{
53 __save_processor_state(&saved_context); 54 __save_processor_state(&saved_context);
54} 55}
56EXPORT_SYMBOL(save_processor_state);
55 57
56static void do_fpu_end(void) 58static void do_fpu_end(void)
57{ 59{
@@ -64,9 +66,14 @@ static void do_fpu_end(void)
64static void fix_processor_context(void) 66static void fix_processor_context(void)
65{ 67{
66 int cpu = smp_processor_id(); 68 int cpu = smp_processor_id();
67 struct tss_struct * t = &per_cpu(init_tss, cpu); 69 struct tss_struct *t = &per_cpu(init_tss, cpu);
68 70
69 set_tss_desc(cpu,t); /* This just modifies memory; should not be necessary. But... This is necessary, because 386 hardware has concept of busy TSS or some similar stupidity. */ 71 set_tss_desc(cpu, t); /*
72 * This just modifies memory; should not be
73 * necessary. But... This is necessary, because
74 * 386 hardware has concept of busy TSS or some
75 * similar stupidity.
76 */
70 77
71 load_TR_desc(); /* This does ltr */ 78 load_TR_desc(); /* This does ltr */
72 load_LDT(&current->active_mm->context); /* This does lldt */ 79 load_LDT(&current->active_mm->context); /* This does lldt */
@@ -100,16 +107,16 @@ static void __restore_processor_state(struct saved_context *ctxt)
100 * now restore the descriptor tables to their proper values 107 * now restore the descriptor tables to their proper values
101 * ltr is done i fix_processor_context(). 108 * ltr is done i fix_processor_context().
102 */ 109 */
103 load_gdt(&ctxt->gdt); 110 load_gdt(&ctxt->gdt);
104 load_idt(&ctxt->idt); 111 load_idt(&ctxt->idt);
105 112
106 /* 113 /*
107 * segment registers 114 * segment registers
108 */ 115 */
109 loadsegment(es, ctxt->es); 116 loadsegment(es, ctxt->es);
110 loadsegment(fs, ctxt->fs); 117 loadsegment(fs, ctxt->fs);
111 loadsegment(gs, ctxt->gs); 118 loadsegment(gs, ctxt->gs);
112 loadsegment(ss, ctxt->ss); 119 loadsegment(ss, ctxt->ss);
113 120
114 /* 121 /*
115 * sysenter MSRs 122 * sysenter MSRs
@@ -123,11 +130,9 @@ static void __restore_processor_state(struct saved_context *ctxt)
123 mcheck_init(&boot_cpu_data); 130 mcheck_init(&boot_cpu_data);
124} 131}
125 132
133/* Needed by apm.c */
126void restore_processor_state(void) 134void restore_processor_state(void)
127{ 135{
128 __restore_processor_state(&saved_context); 136 __restore_processor_state(&saved_context);
129} 137}
130
131/* Needed by apm.c */
132EXPORT_SYMBOL(save_processor_state);
133EXPORT_SYMBOL(restore_processor_state); 138EXPORT_SYMBOL(restore_processor_state);