aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/unaligned.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2013-01-22 06:59:30 -0500
committerRalf Baechle <ralf@linux-mips.org>2013-02-01 04:00:22 -0500
commit7034228792cc561e79ff8600f02884bd4c80e287 (patch)
tree89b77af37d087d9de236fc5d21f60bf552d0a2c6 /arch/mips/kernel/unaligned.c
parent405ab01c70e18058d9c01a1256769a61fc65413e (diff)
MIPS: Whitespace cleanup.
Having received another series of whitespace patches I decided to do this once and for all rather than dealing with this kind of patches trickling in forever. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/unaligned.c')
-rw-r--r--arch/mips/kernel/unaligned.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c
index 9c58bdf58f23..6087a54c86a0 100644
--- a/arch/mips/kernel/unaligned.c
+++ b/arch/mips/kernel/unaligned.c
@@ -21,11 +21,11 @@
21 * 21 *
22 * For now I enable fixing of address errors by default to make life easier. 22 * For now I enable fixing of address errors by default to make life easier.
23 * I however intend to disable this somewhen in the future when the alignment 23 * I however intend to disable this somewhen in the future when the alignment
24 * problems with user programs have been fixed. For programmers this is the 24 * problems with user programs have been fixed. For programmers this is the
25 * right way to go. 25 * right way to go.
26 * 26 *
27 * Fixing address errors is a per process option. The option is inherited 27 * Fixing address errors is a per process option. The option is inherited
28 * across fork(2) and execve(2) calls. If you really want to use the 28 * across fork(2) and execve(2) calls. If you really want to use the
29 * option in your user programs - I discourage the use of the software 29 * option in your user programs - I discourage the use of the software
30 * emulation strongly - use the following code in your userland stuff: 30 * emulation strongly - use the following code in your userland stuff:
31 * 31 *
@@ -43,34 +43,34 @@
43 * #include <sys/sysmips.h> 43 * #include <sys/sysmips.h>
44 * 44 *
45 * struct foo { 45 * struct foo {
46 * unsigned char bar[8]; 46 * unsigned char bar[8];
47 * }; 47 * };
48 * 48 *
49 * main(int argc, char *argv[]) 49 * main(int argc, char *argv[])
50 * { 50 * {
51 * struct foo x = {0, 1, 2, 3, 4, 5, 6, 7}; 51 * struct foo x = {0, 1, 2, 3, 4, 5, 6, 7};
52 * unsigned int *p = (unsigned int *) (x.bar + 3); 52 * unsigned int *p = (unsigned int *) (x.bar + 3);
53 * int i; 53 * int i;
54 * 54 *
55 * if (argc > 1) 55 * if (argc > 1)
56 * sysmips(MIPS_FIXADE, atoi(argv[1])); 56 * sysmips(MIPS_FIXADE, atoi(argv[1]));
57 * 57 *
58 * printf("*p = %08lx\n", *p); 58 * printf("*p = %08lx\n", *p);
59 * 59 *
60 * *p = 0xdeadface; 60 * *p = 0xdeadface;
61 * 61 *
62 * for(i = 0; i <= 7; i++) 62 * for(i = 0; i <= 7; i++)
63 * printf("%02x ", x.bar[i]); 63 * printf("%02x ", x.bar[i]);
64 * printf("\n"); 64 * printf("\n");
65 * } 65 * }
66 * 66 *
67 * Coprocessor loads are not supported; I think this case is unimportant 67 * Coprocessor loads are not supported; I think this case is unimportant
68 * in the practice. 68 * in the practice.
69 * 69 *
70 * TODO: Handle ndc (attempted store to doubleword in uncached memory) 70 * TODO: Handle ndc (attempted store to doubleword in uncached memory)
71 * exception for the R6000. 71 * exception for the R6000.
72 * A store crossing a page boundary might be executed only partially. 72 * A store crossing a page boundary might be executed only partially.
73 * Undo the partial store in this case. 73 * Undo the partial store in this case.
74 */ 74 */
75#include <linux/mm.h> 75#include <linux/mm.h>
76#include <linux/signal.h> 76#include <linux/signal.h>
@@ -86,7 +86,7 @@
86#include <asm/inst.h> 86#include <asm/inst.h>
87#include <asm/uaccess.h> 87#include <asm/uaccess.h>
88 88
89#define STR(x) __STR(x) 89#define STR(x) __STR(x)
90#define __STR(x) #x 90#define __STR(x) #x
91 91
92enum { 92enum {