diff options
-rw-r--r-- | arch/powerpc/crypto/sha1-powerpc-asm.S | 4 | ||||
-rw-r--r-- | arch/powerpc/include/asm/bitops.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/asm/reg.h | 3 | ||||
-rw-r--r-- | arch/powerpc/include/asm/systbl.h | 1 | ||||
-rw-r--r-- | arch/powerpc/include/asm/unistd.h | 2 | ||||
-rw-r--r-- | arch/powerpc/include/uapi/asm/unistd.h | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/cpu_setup_power.S | 5 | ||||
-rw-r--r-- | arch/powerpc/kernel/exceptions-64s.S | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/hvcserver.c | 5 | ||||
-rw-r--r-- | drivers/tty/hvc/hvcs.c | 9 |
10 files changed, 17 insertions, 19 deletions
diff --git a/arch/powerpc/crypto/sha1-powerpc-asm.S b/arch/powerpc/crypto/sha1-powerpc-asm.S index a5f8264d2d3c..125e16520061 100644 --- a/arch/powerpc/crypto/sha1-powerpc-asm.S +++ b/arch/powerpc/crypto/sha1-powerpc-asm.S | |||
@@ -113,7 +113,7 @@ | |||
113 | STEPUP4((t)+16, fn) | 113 | STEPUP4((t)+16, fn) |
114 | 114 | ||
115 | _GLOBAL(powerpc_sha_transform) | 115 | _GLOBAL(powerpc_sha_transform) |
116 | PPC_STLU r1,-STACKFRAMESIZE(r1) | 116 | PPC_STLU r1,-INT_FRAME_SIZE(r1) |
117 | SAVE_8GPRS(14, r1) | 117 | SAVE_8GPRS(14, r1) |
118 | SAVE_10GPRS(22, r1) | 118 | SAVE_10GPRS(22, r1) |
119 | 119 | ||
@@ -175,5 +175,5 @@ _GLOBAL(powerpc_sha_transform) | |||
175 | 175 | ||
176 | REST_8GPRS(14, r1) | 176 | REST_8GPRS(14, r1) |
177 | REST_10GPRS(22, r1) | 177 | REST_10GPRS(22, r1) |
178 | addi r1,r1,STACKFRAMESIZE | 178 | addi r1,r1,INT_FRAME_SIZE |
179 | blr | 179 | blr |
diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h index ef918a2328bb..08bd299c75b1 100644 --- a/arch/powerpc/include/asm/bitops.h +++ b/arch/powerpc/include/asm/bitops.h | |||
@@ -52,8 +52,6 @@ | |||
52 | #define smp_mb__before_clear_bit() smp_mb() | 52 | #define smp_mb__before_clear_bit() smp_mb() |
53 | #define smp_mb__after_clear_bit() smp_mb() | 53 | #define smp_mb__after_clear_bit() smp_mb() |
54 | 54 | ||
55 | #define BITOP_LE_SWIZZLE ((BITS_PER_LONG-1) & ~0x7) | ||
56 | |||
57 | /* Macro for generating the ***_bits() functions */ | 55 | /* Macro for generating the ***_bits() functions */ |
58 | #define DEFINE_BITOP(fn, op, prefix, postfix) \ | 56 | #define DEFINE_BITOP(fn, op, prefix, postfix) \ |
59 | static __inline__ void fn(unsigned long mask, \ | 57 | static __inline__ void fn(unsigned long mask, \ |
diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index e66586122030..c9c67fc888c9 100644 --- a/arch/powerpc/include/asm/reg.h +++ b/arch/powerpc/include/asm/reg.h | |||
@@ -266,7 +266,8 @@ | |||
266 | #define SPRN_HSRR0 0x13A /* Hypervisor Save/Restore 0 */ | 266 | #define SPRN_HSRR0 0x13A /* Hypervisor Save/Restore 0 */ |
267 | #define SPRN_HSRR1 0x13B /* Hypervisor Save/Restore 1 */ | 267 | #define SPRN_HSRR1 0x13B /* Hypervisor Save/Restore 1 */ |
268 | #define SPRN_FSCR 0x099 /* Facility Status & Control Register */ | 268 | #define SPRN_FSCR 0x099 /* Facility Status & Control Register */ |
269 | #define FSCR_TAR (1<<8) /* Enable Target Adress Register */ | 269 | #define FSCR_TAR (1 << (63-55)) /* Enable Target Address Register */ |
270 | #define FSCR_DSCR (1 << (63-61)) /* Enable Data Stream Control Register */ | ||
270 | #define SPRN_TAR 0x32f /* Target Address Register */ | 271 | #define SPRN_TAR 0x32f /* Target Address Register */ |
271 | #define SPRN_LPCR 0x13E /* LPAR Control Register */ | 272 | #define SPRN_LPCR 0x13E /* LPAR Control Register */ |
272 | #define LPCR_VPM0 (1ul << (63-0)) | 273 | #define LPCR_VPM0 (1ul << (63-0)) |
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index 535b6d8a41cc..ebbec52d21bd 100644 --- a/arch/powerpc/include/asm/systbl.h +++ b/arch/powerpc/include/asm/systbl.h | |||
@@ -358,3 +358,4 @@ SYSCALL_SPU(setns) | |||
358 | COMPAT_SYS(process_vm_readv) | 358 | COMPAT_SYS(process_vm_readv) |
359 | COMPAT_SYS(process_vm_writev) | 359 | COMPAT_SYS(process_vm_writev) |
360 | SYSCALL(finit_module) | 360 | SYSCALL(finit_module) |
361 | SYSCALL(ni_syscall) /* sys_kcmp */ | ||
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h index f25b5c45c435..1487f0f12293 100644 --- a/arch/powerpc/include/asm/unistd.h +++ b/arch/powerpc/include/asm/unistd.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #include <uapi/asm/unistd.h> | 12 | #include <uapi/asm/unistd.h> |
13 | 13 | ||
14 | 14 | ||
15 | #define __NR_syscalls 354 | 15 | #define __NR_syscalls 355 |
16 | 16 | ||
17 | #define __NR__exit __NR_exit | 17 | #define __NR__exit __NR_exit |
18 | #define NR_syscalls __NR_syscalls | 18 | #define NR_syscalls __NR_syscalls |
diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h index 8c478c6c6b1e..74cb4d72d673 100644 --- a/arch/powerpc/include/uapi/asm/unistd.h +++ b/arch/powerpc/include/uapi/asm/unistd.h | |||
@@ -376,6 +376,7 @@ | |||
376 | #define __NR_process_vm_readv 351 | 376 | #define __NR_process_vm_readv 351 |
377 | #define __NR_process_vm_writev 352 | 377 | #define __NR_process_vm_writev 352 |
378 | #define __NR_finit_module 353 | 378 | #define __NR_finit_module 353 |
379 | #define __NR_kcmp 354 | ||
379 | 380 | ||
380 | 381 | ||
381 | #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */ | 382 | #endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */ |
diff --git a/arch/powerpc/kernel/cpu_setup_power.S b/arch/powerpc/kernel/cpu_setup_power.S index d29facbf9a28..ea847abb0d0a 100644 --- a/arch/powerpc/kernel/cpu_setup_power.S +++ b/arch/powerpc/kernel/cpu_setup_power.S | |||
@@ -48,6 +48,7 @@ _GLOBAL(__restore_cpu_power7) | |||
48 | 48 | ||
49 | _GLOBAL(__setup_cpu_power8) | 49 | _GLOBAL(__setup_cpu_power8) |
50 | mflr r11 | 50 | mflr r11 |
51 | bl __init_FSCR | ||
51 | bl __init_hvmode_206 | 52 | bl __init_hvmode_206 |
52 | mtlr r11 | 53 | mtlr r11 |
53 | beqlr | 54 | beqlr |
@@ -56,13 +57,13 @@ _GLOBAL(__setup_cpu_power8) | |||
56 | mfspr r3,SPRN_LPCR | 57 | mfspr r3,SPRN_LPCR |
57 | oris r3, r3, LPCR_AIL_3@h | 58 | oris r3, r3, LPCR_AIL_3@h |
58 | bl __init_LPCR | 59 | bl __init_LPCR |
59 | bl __init_FSCR | ||
60 | bl __init_TLB | 60 | bl __init_TLB |
61 | mtlr r11 | 61 | mtlr r11 |
62 | blr | 62 | blr |
63 | 63 | ||
64 | _GLOBAL(__restore_cpu_power8) | 64 | _GLOBAL(__restore_cpu_power8) |
65 | mflr r11 | 65 | mflr r11 |
66 | bl __init_FSCR | ||
66 | mfmsr r3 | 67 | mfmsr r3 |
67 | rldicl. r0,r3,4,63 | 68 | rldicl. r0,r3,4,63 |
68 | beqlr | 69 | beqlr |
@@ -115,7 +116,7 @@ __init_LPCR: | |||
115 | 116 | ||
116 | __init_FSCR: | 117 | __init_FSCR: |
117 | mfspr r3,SPRN_FSCR | 118 | mfspr r3,SPRN_FSCR |
118 | ori r3,r3,FSCR_TAR | 119 | ori r3,r3,FSCR_TAR|FSCR_DSCR |
119 | mtspr SPRN_FSCR,r3 | 120 | mtspr SPRN_FSCR,r3 |
120 | blr | 121 | blr |
121 | 122 | ||
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S index a8a5361fb70c..87ef8f5ee5bc 100644 --- a/arch/powerpc/kernel/exceptions-64s.S +++ b/arch/powerpc/kernel/exceptions-64s.S | |||
@@ -74,13 +74,13 @@ END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE) \ | |||
74 | mflr r10 ; \ | 74 | mflr r10 ; \ |
75 | ld r12,PACAKBASE(r13) ; \ | 75 | ld r12,PACAKBASE(r13) ; \ |
76 | LOAD_HANDLER(r12, system_call_entry_direct) ; \ | 76 | LOAD_HANDLER(r12, system_call_entry_direct) ; \ |
77 | mtlr r12 ; \ | 77 | mtctr r12 ; \ |
78 | mfspr r12,SPRN_SRR1 ; \ | 78 | mfspr r12,SPRN_SRR1 ; \ |
79 | /* Re-use of r13... No spare regs to do this */ \ | 79 | /* Re-use of r13... No spare regs to do this */ \ |
80 | li r13,MSR_RI ; \ | 80 | li r13,MSR_RI ; \ |
81 | mtmsrd r13,1 ; \ | 81 | mtmsrd r13,1 ; \ |
82 | GET_PACA(r13) ; /* get r13 back */ \ | 82 | GET_PACA(r13) ; /* get r13 back */ \ |
83 | blr ; | 83 | bctr ; |
84 | #else | 84 | #else |
85 | /* We can branch directly */ | 85 | /* We can branch directly */ |
86 | #define SYSCALL_PSERIES_2_DIRECT \ | 86 | #define SYSCALL_PSERIES_2_DIRECT \ |
diff --git a/arch/powerpc/platforms/pseries/hvcserver.c b/arch/powerpc/platforms/pseries/hvcserver.c index fcf4b4cbeaf3..4557e91626c4 100644 --- a/arch/powerpc/platforms/pseries/hvcserver.c +++ b/arch/powerpc/platforms/pseries/hvcserver.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/list.h> | 23 | #include <linux/list.h> |
24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/string.h> | ||
26 | 27 | ||
27 | #include <asm/hvcall.h> | 28 | #include <asm/hvcall.h> |
28 | #include <asm/hvcserver.h> | 29 | #include <asm/hvcserver.h> |
@@ -188,9 +189,9 @@ int hvcs_get_partner_info(uint32_t unit_address, struct list_head *head, | |||
188 | = (unsigned int)last_p_partition_ID; | 189 | = (unsigned int)last_p_partition_ID; |
189 | 190 | ||
190 | /* copy the Null-term char too */ | 191 | /* copy the Null-term char too */ |
191 | strncpy(&next_partner_info->location_code[0], | 192 | strlcpy(&next_partner_info->location_code[0], |
192 | (char *)&pi_buff[2], | 193 | (char *)&pi_buff[2], |
193 | strlen((char *)&pi_buff[2]) + 1); | 194 | sizeof(next_partner_info->location_code)); |
194 | 195 | ||
195 | list_add_tail(&(next_partner_info->node), head); | 196 | list_add_tail(&(next_partner_info->node), head); |
196 | next_partner_info = NULL; | 197 | next_partner_info = NULL; |
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c index 1956593ee89d..81e939e90c4c 100644 --- a/drivers/tty/hvc/hvcs.c +++ b/drivers/tty/hvc/hvcs.c | |||
@@ -881,17 +881,12 @@ static struct vio_driver hvcs_vio_driver = { | |||
881 | /* Only called from hvcs_get_pi please */ | 881 | /* Only called from hvcs_get_pi please */ |
882 | static void hvcs_set_pi(struct hvcs_partner_info *pi, struct hvcs_struct *hvcsd) | 882 | static void hvcs_set_pi(struct hvcs_partner_info *pi, struct hvcs_struct *hvcsd) |
883 | { | 883 | { |
884 | int clclength; | ||
885 | |||
886 | hvcsd->p_unit_address = pi->unit_address; | 884 | hvcsd->p_unit_address = pi->unit_address; |
887 | hvcsd->p_partition_ID = pi->partition_ID; | 885 | hvcsd->p_partition_ID = pi->partition_ID; |
888 | clclength = strlen(&pi->location_code[0]); | ||
889 | if (clclength > HVCS_CLC_LENGTH) | ||
890 | clclength = HVCS_CLC_LENGTH; | ||
891 | 886 | ||
892 | /* copy the null-term char too */ | 887 | /* copy the null-term char too */ |
893 | strncpy(&hvcsd->p_location_code[0], | 888 | strlcpy(&hvcsd->p_location_code[0], |
894 | &pi->location_code[0], clclength + 1); | 889 | &pi->location_code[0], sizeof(hvcsd->p_location_code)); |
895 | } | 890 | } |
896 | 891 | ||
897 | /* | 892 | /* |