aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel
diff options
context:
space:
mode:
authorChris Zankel <chris@zankel.net>2012-11-28 19:53:51 -0500
committerChris Zankel <chris@zankel.net>2012-12-19 00:10:25 -0500
commitc4c4594b005d89b56964071bbbdeb07daac5bc76 (patch)
tree4c0b50ba3b87a53768bdd7161e90e9874b498127 /arch/xtensa/kernel
parent72100ed7efac290f24bd90a5e7c8bc9f231d167d (diff)
xtensa: clean up files to make them code-style compliant
Remove heading and trailing spaces, trim trailing lines, and wrap lines that are longer than 80 characters. Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa/kernel')
-rw-r--r--arch/xtensa/kernel/Makefile8
-rw-r--r--arch/xtensa/kernel/align.S3
-rw-r--r--arch/xtensa/kernel/asm-offsets.c4
-rw-r--r--arch/xtensa/kernel/coprocessor.S3
-rw-r--r--arch/xtensa/kernel/entry.S24
-rw-r--r--arch/xtensa/kernel/module.c2
-rw-r--r--arch/xtensa/kernel/platform.c1
-rw-r--r--arch/xtensa/kernel/process.c2
-rw-r--r--arch/xtensa/kernel/ptrace.c3
-rw-r--r--arch/xtensa/kernel/setup.c7
-rw-r--r--arch/xtensa/kernel/signal.c8
-rw-r--r--arch/xtensa/kernel/syscall.c1
-rw-r--r--arch/xtensa/kernel/traps.c7
-rw-r--r--arch/xtensa/kernel/vectors.S2
14 files changed, 33 insertions, 42 deletions
diff --git a/arch/xtensa/kernel/Makefile b/arch/xtensa/kernel/Makefile
index f36cef5a62f..c3a59d992ac 100644
--- a/arch/xtensa/kernel/Makefile
+++ b/arch/xtensa/kernel/Makefile
@@ -23,13 +23,13 @@ obj-$(CONFIG_MODULES) += xtensa_ksyms.o module.o
23# 23#
24# Replicate rules in scripts/Makefile.build 24# Replicate rules in scripts/Makefile.build
25 25
26sed-y = -e 's/\*(\(\.[a-z]*it\|\.ref\|\)\.text)/*(\1.literal \1.text)/g' \ 26sed-y = -e 's/\*(\(\.[a-z]*it\|\.ref\|\)\.text)/*(\1.literal \1.text)/g' \
27 -e 's/\.text\.unlikely/.literal.unlikely .text.unlikely/g' \ 27 -e 's/\.text\.unlikely/.literal.unlikely .text.unlikely/g' \
28 -e 's/\*(\(\.text\.[a-z]*\))/*(\1.literal \1)/g' 28 -e 's/\*(\(\.text\.[a-z]*\))/*(\1.literal \1)/g'
29 29
30quiet_cmd__cpp_lds_S = LDS $@ 30quiet_cmd__cpp_lds_S = LDS $@
31 cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ $< \ 31cmd__cpp_lds_S = $(CPP) $(cpp_flags) -P -C -Uxtensa -D__ASSEMBLY__ $< \
32 | sed $(sed-y) >$@ 32 | sed $(sed-y) >$@
33 33
34$(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE 34$(obj)/vmlinux.lds: $(src)/vmlinux.lds.S FORCE
35 $(call if_changed_dep,_cpp_lds_S) 35 $(call if_changed_dep,_cpp_lds_S)
diff --git a/arch/xtensa/kernel/align.S b/arch/xtensa/kernel/align.S
index 39d2f597382..aa2e87b8566 100644
--- a/arch/xtensa/kernel/align.S
+++ b/arch/xtensa/kernel/align.S
@@ -442,7 +442,7 @@ ENTRY(fast_unaligned)
442 mov a1, a2 442 mov a1, a2
443 443
444 rsr a0, ps 444 rsr a0, ps
445 bbsi.l a2, PS_UM_BIT, 1f # jump if user mode 445 bbsi.l a2, PS_UM_BIT, 1f # jump if user mode
446 446
447 movi a0, _kernel_exception 447 movi a0, _kernel_exception
448 jx a0 448 jx a0
@@ -453,4 +453,3 @@ ENTRY(fast_unaligned)
453ENDPROC(fast_unaligned) 453ENDPROC(fast_unaligned)
454 454
455#endif /* XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION */ 455#endif /* XCHAL_UNALIGNED_LOAD_EXCEPTION || XCHAL_UNALIGNED_STORE_EXCEPTION */
456
diff --git a/arch/xtensa/kernel/asm-offsets.c b/arch/xtensa/kernel/asm-offsets.c
index 845475afc68..0701fad170d 100644
--- a/arch/xtensa/kernel/asm-offsets.c
+++ b/arch/xtensa/kernel/asm-offsets.c
@@ -92,7 +92,8 @@ int main(void)
92#endif 92#endif
93 DEFINE(THREAD_XTREGS_USER, offsetof (struct thread_info, xtregs_user)); 93 DEFINE(THREAD_XTREGS_USER, offsetof (struct thread_info, xtregs_user));
94 DEFINE(XTREGS_USER_SIZE, sizeof(xtregs_user_t)); 94 DEFINE(XTREGS_USER_SIZE, sizeof(xtregs_user_t));
95 DEFINE(THREAD_CURRENT_DS, offsetof (struct task_struct, thread.current_ds)); 95 DEFINE(THREAD_CURRENT_DS, offsetof (struct task_struct, \
96 thread.current_ds));
96 97
97 /* struct mm_struct */ 98 /* struct mm_struct */
98 DEFINE(MM_USERS, offsetof(struct mm_struct, mm_users)); 99 DEFINE(MM_USERS, offsetof(struct mm_struct, mm_users));
@@ -109,4 +110,3 @@ int main(void)
109 110
110 return 0; 111 return 0;
111} 112}
112
diff --git a/arch/xtensa/kernel/coprocessor.S b/arch/xtensa/kernel/coprocessor.S
index 60bb1358924..64765748486 100644
--- a/arch/xtensa/kernel/coprocessor.S
+++ b/arch/xtensa/kernel/coprocessor.S
@@ -172,7 +172,7 @@ ENTRY(coprocessor_load)
172ENDPROC(coprocessor_load) 172ENDPROC(coprocessor_load)
173 173
174/* 174/*
175 * coprocessor_flush(struct task_info*, index) 175 * coprocessor_flush(struct task_info*, index)
176 * a2 a3 176 * a2 a3
177 * coprocessor_restore(struct task_info*, index) 177 * coprocessor_restore(struct task_info*, index)
178 * a2 a3 178 * a2 a3
@@ -354,4 +354,3 @@ ENTRY(coprocessor_owner)
354END(coprocessor_owner) 354END(coprocessor_owner)
355 355
356#endif /* XTENSA_HAVE_COPROCESSORS */ 356#endif /* XTENSA_HAVE_COPROCESSORS */
357
diff --git a/arch/xtensa/kernel/entry.S b/arch/xtensa/kernel/entry.S
index 4c2f2706ad5..3777fec85e7 100644
--- a/arch/xtensa/kernel/entry.S
+++ b/arch/xtensa/kernel/entry.S
@@ -874,7 +874,7 @@ ENTRY(fast_alloca)
874 874
875 _bnei a0, 1, 1f # no 'movsp a1, ax': jump 875 _bnei a0, 1, 1f # no 'movsp a1, ax': jump
876 876
877 /* Move the save area. This implies the use of the L32E 877 /* Move the save area. This implies the use of the L32E
878 * and S32E instructions, because this move must be done with 878 * and S32E instructions, because this move must be done with
879 * the user's PS.RING privilege levels, not with ring 0 879 * the user's PS.RING privilege levels, not with ring 0
880 * (kernel's) privileges currently active with PS.EXCM 880 * (kernel's) privileges currently active with PS.EXCM
@@ -1008,15 +1008,15 @@ ENDPROC(fast_syscall_user)
1008 1008
1009ENTRY(fast_syscall_unrecoverable) 1009ENTRY(fast_syscall_unrecoverable)
1010 1010
1011 /* Restore all states. */ 1011 /* Restore all states. */
1012 1012
1013 l32i a0, a2, PT_AREG0 # restore a0 1013 l32i a0, a2, PT_AREG0 # restore a0
1014 xsr a2, depc # restore a2, depc 1014 xsr a2, depc # restore a2, depc
1015 rsr a3, excsave1 1015 rsr a3, excsave1
1016 1016
1017 wsr a0, excsave1 1017 wsr a0, excsave1
1018 movi a0, unrecoverable_exception 1018 movi a0, unrecoverable_exception
1019 callx0 a0 1019 callx0 a0
1020 1020
1021ENDPROC(fast_syscall_unrecoverable) 1021ENDPROC(fast_syscall_unrecoverable)
1022 1022
@@ -1253,9 +1253,9 @@ fast_syscall_spill_registers_fixup:
1253 1253
1254 movi a3, exc_table 1254 movi a3, exc_table
1255 rsr a0, exccause 1255 rsr a0, exccause
1256 addx4 a0, a0, a3 # find entry in table 1256 addx4 a0, a0, a3 # find entry in table
1257 l32i a0, a0, EXC_TABLE_FAST_USER # load handler 1257 l32i a0, a0, EXC_TABLE_FAST_USER # load handler
1258 jx a0 1258 jx a0
1259 1259
1260fast_syscall_spill_registers_fixup_return: 1260fast_syscall_spill_registers_fixup_return:
1261 1261
@@ -1457,7 +1457,7 @@ ENTRY(_spill_registers)
1457 rsr a0, ps 1457 rsr a0, ps
1458 _bbci.l a0, PS_UM_BIT, 1f 1458 _bbci.l a0, PS_UM_BIT, 1f
1459 1459
1460 /* User space: Setup a dummy frame and kill application. 1460 /* User space: Setup a dummy frame and kill application.
1461 * Note: We assume EXC_TABLE_KSTK contains a valid stack pointer. 1461 * Note: We assume EXC_TABLE_KSTK contains a valid stack pointer.
1462 */ 1462 */
1463 1463
diff --git a/arch/xtensa/kernel/module.c b/arch/xtensa/kernel/module.c
index 451dda928c9..b715237bae6 100644
--- a/arch/xtensa/kernel/module.c
+++ b/arch/xtensa/kernel/module.c
@@ -53,7 +53,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
53 struct module *mod) 53 struct module *mod)
54{ 54{
55 unsigned int i; 55 unsigned int i;
56 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr; 56 Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr;
57 Elf32_Sym *sym; 57 Elf32_Sym *sym;
58 unsigned char *location; 58 unsigned char *location;
59 uint32_t value; 59 uint32_t value;
diff --git a/arch/xtensa/kernel/platform.c b/arch/xtensa/kernel/platform.c
index 97230e46cbe..44bf21c3769 100644
--- a/arch/xtensa/kernel/platform.c
+++ b/arch/xtensa/kernel/platform.c
@@ -44,4 +44,3 @@ _F(void, calibrate_ccount, (void),
44 ccount_per_jiffy = 10 * (1000000UL/HZ); 44 ccount_per_jiffy = 10 * (1000000UL/HZ);
45}); 45});
46#endif 46#endif
47
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c
index 1accf28da5f..0dd5784416d 100644
--- a/arch/xtensa/kernel/process.c
+++ b/arch/xtensa/kernel/process.c
@@ -108,7 +108,7 @@ void coprocessor_flush_all(struct thread_info *ti)
108 108
109void cpu_idle(void) 109void cpu_idle(void)
110{ 110{
111 local_irq_enable(); 111 local_irq_enable();
112 112
113 /* endless idle loop with no priority at all */ 113 /* endless idle loop with no priority at all */
114 while (1) { 114 while (1) {
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c
index 33eea4c16f1..61fb2e9e903 100644
--- a/arch/xtensa/kernel/ptrace.c
+++ b/arch/xtensa/kernel/ptrace.c
@@ -154,7 +154,7 @@ int ptrace_setxregs(struct task_struct *child, void __user *uregs)
154 coprocessor_flush_all(ti); 154 coprocessor_flush_all(ti);
155 coprocessor_release_all(ti); 155 coprocessor_release_all(ti);
156 156
157 ret |= __copy_from_user(&ti->xtregs_cp, &xtregs->cp0, 157 ret |= __copy_from_user(&ti->xtregs_cp, &xtregs->cp0,
158 sizeof(xtregs_coprocessor_t)); 158 sizeof(xtregs_coprocessor_t));
159#endif 159#endif
160 ret |= __copy_from_user(&regs->xtregs_opt, &xtregs->opt, 160 ret |= __copy_from_user(&regs->xtregs_opt, &xtregs->opt,
@@ -343,4 +343,3 @@ void do_syscall_trace_leave(struct pt_regs *regs)
343 && (current->ptrace & PT_PTRACED)) 343 && (current->ptrace & PT_PTRACED))
344 do_syscall_trace(); 344 do_syscall_trace();
345} 345}
346
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 64d80e4b0bd..24c1a57abb4 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -284,7 +284,7 @@ void __init init_arch(bp_tag_t *bp_start)
284 284
285 /* Parse boot parameters */ 285 /* Parse boot parameters */
286 286
287 if (bp_start) 287 if (bp_start)
288 parse_bootparam(bp_start); 288 parse_bootparam(bp_start);
289 289
290#ifdef CONFIG_OF 290#ifdef CONFIG_OF
@@ -460,7 +460,7 @@ void __init setup_arch(char **cmdline_p)
460 initrd_is_mapped = mem_reserve(__pa(initrd_start), 460 initrd_is_mapped = mem_reserve(__pa(initrd_start),
461 __pa(initrd_end), 0); 461 __pa(initrd_end), 0);
462 initrd_below_start_ok = 1; 462 initrd_below_start_ok = 1;
463 } else { 463 } else {
464 initrd_start = 0; 464 initrd_start = 0;
465 } 465 }
466#endif 466#endif
@@ -539,7 +539,7 @@ c_show(struct seq_file *f, void *slot)
539 "core ID\t\t: " XCHAL_CORE_ID "\n" 539 "core ID\t\t: " XCHAL_CORE_ID "\n"
540 "build ID\t: 0x%x\n" 540 "build ID\t: 0x%x\n"
541 "byte order\t: %s\n" 541 "byte order\t: %s\n"
542 "cpu MHz\t\t: %lu.%02lu\n" 542 "cpu MHz\t\t: %lu.%02lu\n"
543 "bogomips\t: %lu.%02lu\n", 543 "bogomips\t: %lu.%02lu\n",
544 XCHAL_BUILD_UNIQUE_ID, 544 XCHAL_BUILD_UNIQUE_ID,
545 XCHAL_HAVE_BE ? "big" : "little", 545 XCHAL_HAVE_BE ? "big" : "little",
@@ -681,4 +681,3 @@ const struct seq_operations cpuinfo_op =
681}; 681};
682 682
683#endif /* CONFIG_PROC_FS */ 683#endif /* CONFIG_PROC_FS */
684
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c
index 63c566f627b..de34d6be91c 100644
--- a/arch/xtensa/kernel/signal.c
+++ b/arch/xtensa/kernel/signal.c
@@ -212,7 +212,7 @@ restore_sigcontext(struct pt_regs *regs, struct rt_sigframe __user *frame)
212 if (err) 212 if (err)
213 return err; 213 return err;
214 214
215 /* The signal handler may have used coprocessors in which 215 /* The signal handler may have used coprocessors in which
216 * case they are still enabled. We disable them to force a 216 * case they are still enabled. We disable them to force a
217 * reloading of the original task's CP state by the lazy 217 * reloading of the original task's CP state by the lazy
218 * context-switching mechanisms of CP exception handling. 218 * context-switching mechanisms of CP exception handling.
@@ -396,7 +396,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
396 */ 396 */
397 397
398 /* Set up registers for signal handler */ 398 /* Set up registers for signal handler */
399 start_thread(regs, (unsigned long) ka->sa.sa_handler, 399 start_thread(regs, (unsigned long) ka->sa.sa_handler,
400 (unsigned long) frame); 400 (unsigned long) frame);
401 401
402 /* Set up a stack frame for a call4 402 /* Set up a stack frame for a call4
@@ -424,9 +424,9 @@ give_sigsegv:
424 return -EFAULT; 424 return -EFAULT;
425} 425}
426 426
427asmlinkage long xtensa_sigaltstack(const stack_t __user *uss, 427asmlinkage long xtensa_sigaltstack(const stack_t __user *uss,
428 stack_t __user *uoss, 428 stack_t __user *uoss,
429 long a2, long a3, long a4, long a5, 429 long a2, long a3, long a4, long a5,
430 struct pt_regs *regs) 430 struct pt_regs *regs)
431{ 431{
432 return do_sigaltstack(uss, uoss, regs->areg[1]); 432 return do_sigaltstack(uss, uoss, regs->areg[1]);
diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c
index 5702065f472..54fa8425cee 100644
--- a/arch/xtensa/kernel/syscall.c
+++ b/arch/xtensa/kernel/syscall.c
@@ -52,4 +52,3 @@ asmlinkage long xtensa_fadvise64_64(int fd, int advice,
52{ 52{
53 return sys_fadvise64_64(fd, offset, len, advice); 53 return sys_fadvise64_64(fd, offset, len, advice);
54} 54}
55
diff --git a/arch/xtensa/kernel/traps.c b/arch/xtensa/kernel/traps.c
index 691a792b01d..01e0111bf78 100644
--- a/arch/xtensa/kernel/traps.c
+++ b/arch/xtensa/kernel/traps.c
@@ -408,7 +408,8 @@ static inline void spill_registers(void)
408 "wsr a13, sar\n\t" 408 "wsr a13, sar\n\t"
409 "wsr a14, ps\n\t" 409 "wsr a14, ps\n\t"
410 :: "a" (&a0), "a" (&ps) 410 :: "a" (&a0), "a" (&ps)
411 : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15", "memory"); 411 : "a2", "a3", "a4", "a7", "a11", "a12", "a13", "a14", "a15",
412 "memory");
412} 413}
413 414
414void show_trace(struct task_struct *task, unsigned long *sp) 415void show_trace(struct task_struct *task, unsigned long *sp)
@@ -463,7 +464,7 @@ void show_stack(struct task_struct *task, unsigned long *sp)
463 464
464 if (!sp) 465 if (!sp)
465 sp = stack_pointer(task); 466 sp = stack_pointer(task);
466 stack = sp; 467 stack = sp;
467 468
468 printk("\nStack: "); 469 printk("\nStack: ");
469 470
@@ -534,5 +535,3 @@ void die(const char * str, struct pt_regs * regs, long err)
534 535
535 do_exit(err); 536 do_exit(err);
536} 537}
537
538
diff --git a/arch/xtensa/kernel/vectors.S b/arch/xtensa/kernel/vectors.S
index 9365ee5064d..68df35f66ce 100644
--- a/arch/xtensa/kernel/vectors.S
+++ b/arch/xtensa/kernel/vectors.S
@@ -485,5 +485,3 @@ ENTRY_ALIGN64(_WindowUnderflow12)
485ENDPROC(_WindowUnderflow12) 485ENDPROC(_WindowUnderflow12)
486 486
487 .text 487 .text
488
489