diff options
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/byteorder.h | 22 | ||||
-rw-r--r-- | arch/sparc/include/asm/kdebug_32.h | 1 | ||||
-rw-r--r-- | arch/sparc/include/asm/processor_64.h | 4 | ||||
-rw-r--r-- | arch/sparc/include/asm/termbits.h | 11 | ||||
-rw-r--r-- | arch/sparc/include/asm/uaccess_64.h | 4 | ||||
-rw-r--r-- | arch/sparc/include/asm/unistd_32.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/unistd_64.h | 3 | ||||
-rw-r--r-- | arch/sparc/kernel/head.S | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/of_device.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/systbls.S | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/time.c | 27 |
11 files changed, 29 insertions, 53 deletions
diff --git a/arch/sparc/include/asm/byteorder.h b/arch/sparc/include/asm/byteorder.h index bcd83aa351c5..5a70f137f1f7 100644 --- a/arch/sparc/include/asm/byteorder.h +++ b/arch/sparc/include/asm/byteorder.h | |||
@@ -4,15 +4,14 @@ | |||
4 | #include <asm/types.h> | 4 | #include <asm/types.h> |
5 | #include <asm/asi.h> | 5 | #include <asm/asi.h> |
6 | 6 | ||
7 | #ifdef __GNUC__ | 7 | #define __BIG_ENDIAN |
8 | 8 | ||
9 | #ifdef CONFIG_SPARC32 | 9 | #ifdef CONFIG_SPARC32 |
10 | #define __SWAB_64_THRU_32__ | 10 | #define __SWAB_64_THRU_32__ |
11 | #endif | 11 | #endif |
12 | 12 | ||
13 | #ifdef CONFIG_SPARC64 | 13 | #ifdef CONFIG_SPARC64 |
14 | 14 | static inline __u16 __arch_swab16p(const __u16 *addr) | |
15 | static inline __u16 ___arch__swab16p(const __u16 *addr) | ||
16 | { | 15 | { |
17 | __u16 ret; | 16 | __u16 ret; |
18 | 17 | ||
@@ -21,8 +20,9 @@ static inline __u16 ___arch__swab16p(const __u16 *addr) | |||
21 | : "r" (addr), "i" (ASI_PL)); | 20 | : "r" (addr), "i" (ASI_PL)); |
22 | return ret; | 21 | return ret; |
23 | } | 22 | } |
23 | #define __arch_swab16p __arch_swab16p | ||
24 | 24 | ||
25 | static inline __u32 ___arch__swab32p(const __u32 *addr) | 25 | static inline __u32 __arch_swab32p(const __u32 *addr) |
26 | { | 26 | { |
27 | __u32 ret; | 27 | __u32 ret; |
28 | 28 | ||
@@ -31,8 +31,9 @@ static inline __u32 ___arch__swab32p(const __u32 *addr) | |||
31 | : "r" (addr), "i" (ASI_PL)); | 31 | : "r" (addr), "i" (ASI_PL)); |
32 | return ret; | 32 | return ret; |
33 | } | 33 | } |
34 | #define __arch_swab32p __arch_swab32p | ||
34 | 35 | ||
35 | static inline __u64 ___arch__swab64p(const __u64 *addr) | 36 | static inline __u64 __arch_swab64p(const __u64 *addr) |
36 | { | 37 | { |
37 | __u64 ret; | 38 | __u64 ret; |
38 | 39 | ||
@@ -41,17 +42,10 @@ static inline __u64 ___arch__swab64p(const __u64 *addr) | |||
41 | : "r" (addr), "i" (ASI_PL)); | 42 | : "r" (addr), "i" (ASI_PL)); |
42 | return ret; | 43 | return ret; |
43 | } | 44 | } |
44 | 45 | #define __arch_swab64p __arch_swab64p | |
45 | #define __arch__swab16p(x) ___arch__swab16p(x) | ||
46 | #define __arch__swab32p(x) ___arch__swab32p(x) | ||
47 | #define __arch__swab64p(x) ___arch__swab64p(x) | ||
48 | 46 | ||
49 | #endif /* CONFIG_SPARC64 */ | 47 | #endif /* CONFIG_SPARC64 */ |
50 | 48 | ||
51 | #define __BYTEORDER_HAS_U64__ | 49 | #include <linux/byteorder.h> |
52 | |||
53 | #endif | ||
54 | |||
55 | #include <linux/byteorder/big_endian.h> | ||
56 | 50 | ||
57 | #endif /* _SPARC_BYTEORDER_H */ | 51 | #endif /* _SPARC_BYTEORDER_H */ |
diff --git a/arch/sparc/include/asm/kdebug_32.h b/arch/sparc/include/asm/kdebug_32.h index f69fe7d84b3c..1d0b240222ef 100644 --- a/arch/sparc/include/asm/kdebug_32.h +++ b/arch/sparc/include/asm/kdebug_32.h | |||
@@ -60,6 +60,7 @@ static inline void sp_enter_debugger(void) | |||
60 | 60 | ||
61 | enum die_val { | 61 | enum die_val { |
62 | DIE_UNUSED, | 62 | DIE_UNUSED, |
63 | DIE_OOPS, | ||
63 | }; | 64 | }; |
64 | 65 | ||
65 | #endif /* !(__ASSEMBLY__) */ | 66 | #endif /* !(__ASSEMBLY__) */ |
diff --git a/arch/sparc/include/asm/processor_64.h b/arch/sparc/include/asm/processor_64.h index 137a6bd72fc8..59fcebb8f440 100644 --- a/arch/sparc/include/asm/processor_64.h +++ b/arch/sparc/include/asm/processor_64.h | |||
@@ -36,10 +36,10 @@ | |||
36 | #define VPTE_SIZE (1 << (VA_BITS - PAGE_SHIFT + 3)) | 36 | #define VPTE_SIZE (1 << (VA_BITS - PAGE_SHIFT + 3)) |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #define TASK_SIZE ((unsigned long)-VPTE_SIZE) | ||
40 | #define TASK_SIZE_OF(tsk) \ | 39 | #define TASK_SIZE_OF(tsk) \ |
41 | (test_tsk_thread_flag(tsk,TIF_32BIT) ? \ | 40 | (test_tsk_thread_flag(tsk,TIF_32BIT) ? \ |
42 | (1UL << 32UL) : TASK_SIZE) | 41 | (1UL << 32UL) : ((unsigned long)-VPTE_SIZE)) |
42 | #define TASK_SIZE TASK_SIZE_OF(current) | ||
43 | #ifdef __KERNEL__ | 43 | #ifdef __KERNEL__ |
44 | 44 | ||
45 | #define STACK_TOP32 ((1UL << 32UL) - PAGE_SIZE) | 45 | #define STACK_TOP32 ((1UL << 32UL) - PAGE_SIZE) |
diff --git a/arch/sparc/include/asm/termbits.h b/arch/sparc/include/asm/termbits.h index d6ca3e2754f5..d72dfed1f9d7 100644 --- a/arch/sparc/include/asm/termbits.h +++ b/arch/sparc/include/asm/termbits.h | |||
@@ -29,10 +29,11 @@ struct termios { | |||
29 | tcflag_t c_cflag; /* control mode flags */ | 29 | tcflag_t c_cflag; /* control mode flags */ |
30 | tcflag_t c_lflag; /* local mode flags */ | 30 | tcflag_t c_lflag; /* local mode flags */ |
31 | cc_t c_line; /* line discipline */ | 31 | cc_t c_line; /* line discipline */ |
32 | #ifndef __KERNEL__ | ||
32 | cc_t c_cc[NCCS]; /* control characters */ | 33 | cc_t c_cc[NCCS]; /* control characters */ |
33 | #ifdef __KERNEL__ | 34 | #else |
35 | cc_t c_cc[NCCS+2]; /* kernel needs 2 more to hold vmin/vtime */ | ||
34 | #define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t)) | 36 | #define SIZEOF_USER_TERMIOS sizeof (struct termios) - (2*sizeof (cc_t)) |
35 | cc_t _x_cc[2]; /* We need them to hold vmin/vtime */ | ||
36 | #endif | 37 | #endif |
37 | }; | 38 | }; |
38 | 39 | ||
@@ -42,8 +43,7 @@ struct termios2 { | |||
42 | tcflag_t c_cflag; /* control mode flags */ | 43 | tcflag_t c_cflag; /* control mode flags */ |
43 | tcflag_t c_lflag; /* local mode flags */ | 44 | tcflag_t c_lflag; /* local mode flags */ |
44 | cc_t c_line; /* line discipline */ | 45 | cc_t c_line; /* line discipline */ |
45 | cc_t c_cc[NCCS]; /* control characters */ | 46 | cc_t c_cc[NCCS+2]; /* control characters */ |
46 | cc_t _x_cc[2]; /* padding to match ktermios */ | ||
47 | speed_t c_ispeed; /* input speed */ | 47 | speed_t c_ispeed; /* input speed */ |
48 | speed_t c_ospeed; /* output speed */ | 48 | speed_t c_ospeed; /* output speed */ |
49 | }; | 49 | }; |
@@ -54,8 +54,7 @@ struct ktermios { | |||
54 | tcflag_t c_cflag; /* control mode flags */ | 54 | tcflag_t c_cflag; /* control mode flags */ |
55 | tcflag_t c_lflag; /* local mode flags */ | 55 | tcflag_t c_lflag; /* local mode flags */ |
56 | cc_t c_line; /* line discipline */ | 56 | cc_t c_line; /* line discipline */ |
57 | cc_t c_cc[NCCS]; /* control characters */ | 57 | cc_t c_cc[NCCS+2]; /* control characters */ |
58 | cc_t _x_cc[2]; /* We need them to hold vmin/vtime */ | ||
59 | speed_t c_ispeed; /* input speed */ | 58 | speed_t c_ispeed; /* input speed */ |
60 | speed_t c_ospeed; /* output speed */ | 59 | speed_t c_ospeed; /* output speed */ |
61 | }; | 60 | }; |
diff --git a/arch/sparc/include/asm/uaccess_64.h b/arch/sparc/include/asm/uaccess_64.h index 296ef30e05c8..c64e767a3e4b 100644 --- a/arch/sparc/include/asm/uaccess_64.h +++ b/arch/sparc/include/asm/uaccess_64.h | |||
@@ -265,8 +265,8 @@ extern long __strnlen_user(const char __user *, long len); | |||
265 | 265 | ||
266 | #define strlen_user __strlen_user | 266 | #define strlen_user __strlen_user |
267 | #define strnlen_user __strnlen_user | 267 | #define strnlen_user __strnlen_user |
268 | #define __copy_to_user_inatomic __copy_to_user | 268 | #define __copy_to_user_inatomic ___copy_to_user |
269 | #define __copy_from_user_inatomic __copy_from_user | 269 | #define __copy_from_user_inatomic ___copy_from_user |
270 | 270 | ||
271 | #endif /* __ASSEMBLY__ */ | 271 | #endif /* __ASSEMBLY__ */ |
272 | 272 | ||
diff --git a/arch/sparc/include/asm/unistd_32.h b/arch/sparc/include/asm/unistd_32.h index 648643a9f139..0d13d2a4c76f 100644 --- a/arch/sparc/include/asm/unistd_32.h +++ b/arch/sparc/include/asm/unistd_32.h | |||
@@ -338,8 +338,9 @@ | |||
338 | #define __NR_dup3 320 | 338 | #define __NR_dup3 320 |
339 | #define __NR_pipe2 321 | 339 | #define __NR_pipe2 321 |
340 | #define __NR_inotify_init1 322 | 340 | #define __NR_inotify_init1 322 |
341 | #define __NR_accept4 323 | ||
341 | 342 | ||
342 | #define NR_SYSCALLS 323 | 343 | #define NR_SYSCALLS 324 |
343 | 344 | ||
344 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, | 345 | /* Sparc 32-bit only has the "setresuid32", "getresuid32" variants, |
345 | * it never had the plain ones and there is no value to adding those | 346 | * it never had the plain ones and there is no value to adding those |
diff --git a/arch/sparc/include/asm/unistd_64.h b/arch/sparc/include/asm/unistd_64.h index c5cc0e052321..fa5d3c0343c7 100644 --- a/arch/sparc/include/asm/unistd_64.h +++ b/arch/sparc/include/asm/unistd_64.h | |||
@@ -340,8 +340,9 @@ | |||
340 | #define __NR_dup3 320 | 340 | #define __NR_dup3 320 |
341 | #define __NR_pipe2 321 | 341 | #define __NR_pipe2 321 |
342 | #define __NR_inotify_init1 322 | 342 | #define __NR_inotify_init1 322 |
343 | #define __NR_accept4 323 | ||
343 | 344 | ||
344 | #define NR_SYSCALLS 323 | 345 | #define NR_SYSCALLS 324 |
345 | 346 | ||
346 | #ifdef __KERNEL__ | 347 | #ifdef __KERNEL__ |
347 | #define __ARCH_WANT_IPC_PARSE_VERSION | 348 | #define __ARCH_WANT_IPC_PARSE_VERSION |
diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S index 2fe2c117e772..2d325fd84579 100644 --- a/arch/sparc/kernel/head.S +++ b/arch/sparc/kernel/head.S | |||
@@ -465,7 +465,6 @@ gokernel: | |||
465 | mov %o7, %g4 ! Save %o7 | 465 | mov %o7, %g4 ! Save %o7 |
466 | 466 | ||
467 | /* Jump to it, and pray... */ | 467 | /* Jump to it, and pray... */ |
468 | __INIT | ||
469 | current_pc: | 468 | current_pc: |
470 | call 1f | 469 | call 1f |
471 | nop | 470 | nop |
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c index 0837bd52e28f..0a83bd737654 100644 --- a/arch/sparc/kernel/of_device.c +++ b/arch/sparc/kernel/of_device.c | |||
@@ -563,9 +563,9 @@ build_resources: | |||
563 | op->dev.parent = parent; | 563 | op->dev.parent = parent; |
564 | op->dev.bus = &of_platform_bus_type; | 564 | op->dev.bus = &of_platform_bus_type; |
565 | if (!parent) | 565 | if (!parent) |
566 | strcpy(op->dev.bus_id, "root"); | 566 | dev_set_name(&op->dev, "root"); |
567 | else | 567 | else |
568 | sprintf(op->dev.bus_id, "%08x", dp->node); | 568 | dev_set_name(&op->dev, "%08x", dp->node); |
569 | 569 | ||
570 | if (of_device_register(op)) { | 570 | if (of_device_register(op)) { |
571 | printk("%s: Could not register of device.\n", | 571 | printk("%s: Could not register of device.\n", |
diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S index e1b9233b90ab..7d0807586442 100644 --- a/arch/sparc/kernel/systbls.S +++ b/arch/sparc/kernel/systbls.S | |||
@@ -81,4 +81,4 @@ sys_call_table: | |||
81 | /*305*/ .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait | 81 | /*305*/ .long sys_set_mempolicy, sys_kexec_load, sys_move_pages, sys_getcpu, sys_epoll_pwait |
82 | /*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate | 82 | /*310*/ .long sys_utimensat, sys_signalfd, sys_timerfd_create, sys_eventfd, sys_fallocate |
83 | /*315*/ .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 | 83 | /*315*/ .long sys_timerfd_settime, sys_timerfd_gettime, sys_signalfd4, sys_eventfd2, sys_epoll_create1 |
84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1 | 84 | /*320*/ .long sys_dup3, sys_pipe2, sys_inotify_init1, sys_accept4 |
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c index 62c1d94cb434..00f7383c7657 100644 --- a/arch/sparc/kernel/time.c +++ b/arch/sparc/kernel/time.c | |||
@@ -119,35 +119,16 @@ static unsigned char mostek_read_byte(struct device *dev, u32 ofs) | |||
119 | { | 119 | { |
120 | struct platform_device *pdev = to_platform_device(dev); | 120 | struct platform_device *pdev = to_platform_device(dev); |
121 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; | 121 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; |
122 | void __iomem *regs = pdata->ioaddr; | 122 | |
123 | unsigned char val = readb(regs + ofs); | 123 | return readb(pdata->ioaddr + ofs); |
124 | |||
125 | /* the year 0 is 1968 */ | ||
126 | if (ofs == pdata->offset + M48T59_YEAR) { | ||
127 | val += 0x68; | ||
128 | if ((val & 0xf) > 9) | ||
129 | val += 6; | ||
130 | } | ||
131 | return val; | ||
132 | } | 124 | } |
133 | 125 | ||
134 | static void mostek_write_byte(struct device *dev, u32 ofs, u8 val) | 126 | static void mostek_write_byte(struct device *dev, u32 ofs, u8 val) |
135 | { | 127 | { |
136 | struct platform_device *pdev = to_platform_device(dev); | 128 | struct platform_device *pdev = to_platform_device(dev); |
137 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; | 129 | struct m48t59_plat_data *pdata = pdev->dev.platform_data; |
138 | void __iomem *regs = pdata->ioaddr; | 130 | |
139 | 131 | writeb(val, pdata->ioaddr + ofs); | |
140 | if (ofs == pdata->offset + M48T59_YEAR) { | ||
141 | if (val < 0x68) | ||
142 | val += 0x32; | ||
143 | else | ||
144 | val -= 0x68; | ||
145 | if ((val & 0xf) > 9) | ||
146 | val += 6; | ||
147 | if ((val & 0xf0) > 0x9A) | ||
148 | val += 0x60; | ||
149 | } | ||
150 | writeb(val, regs + ofs); | ||
151 | } | 132 | } |
152 | 133 | ||
153 | static struct m48t59_plat_data m48t59_data = { | 134 | static struct m48t59_plat_data m48t59_data = { |