aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-12-10 15:48:20 -0500
committerDavid S. Miller <davem@davemloft.net>2014-12-10 15:48:20 -0500
commit22f10923dd39141785273e423b9acf347297e15f (patch)
treecc1f19103817433a426b3e329d6326f5e9d8e8f7 /arch
parent785c20a08bead1e58ad53f2dc324782da7a0c9ea (diff)
parent69204cf7eb9c5a72067ce6922d4699378251d053 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/ethernet/amd/xgbe/xgbe-desc.c drivers/net/ethernet/renesas/sh_eth.c Overlapping changes in both conflict cases. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/net/bpf_jit.c4
-rw-r--r--arch/s390/kernel/nmi.c8
-rw-r--r--arch/x86/net/bpf_jit_comp.c6
3 files changed, 8 insertions, 10 deletions
diff --git a/arch/mips/net/bpf_jit.c b/arch/mips/net/bpf_jit.c
index 9b55143d19db..9fd6834a2172 100644
--- a/arch/mips/net/bpf_jit.c
+++ b/arch/mips/net/bpf_jit.c
@@ -426,7 +426,7 @@ static inline void emit_mod(unsigned int dst, unsigned int src,
426 u32 *p = &ctx->target[ctx->idx]; 426 u32 *p = &ctx->target[ctx->idx];
427 uasm_i_divu(&p, dst, src); 427 uasm_i_divu(&p, dst, src);
428 p = &ctx->target[ctx->idx + 1]; 428 p = &ctx->target[ctx->idx + 1];
429 uasm_i_mflo(&p, dst); 429 uasm_i_mfhi(&p, dst);
430 } 430 }
431 ctx->idx += 2; /* 2 insts */ 431 ctx->idx += 2; /* 2 insts */
432} 432}
@@ -971,7 +971,7 @@ load_ind:
971 break; 971 break;
972 case BPF_ALU | BPF_MOD | BPF_K: 972 case BPF_ALU | BPF_MOD | BPF_K:
973 /* A %= k */ 973 /* A %= k */
974 if (k == 1 || optimize_div(&k)) { 974 if (k == 1) {
975 ctx->flags |= SEEN_A; 975 ctx->flags |= SEEN_A;
976 emit_jit_reg_move(r_A, r_zero, ctx); 976 emit_jit_reg_move(r_A, r_zero, ctx);
977 } else { 977 } else {
diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c
index dd1c24ceda50..3f51cf4e8f02 100644
--- a/arch/s390/kernel/nmi.c
+++ b/arch/s390/kernel/nmi.c
@@ -54,12 +54,8 @@ void s390_handle_mcck(void)
54 */ 54 */
55 local_irq_save(flags); 55 local_irq_save(flags);
56 local_mcck_disable(); 56 local_mcck_disable();
57 /* 57 mcck = *this_cpu_ptr(&cpu_mcck);
58 * Ummm... Does this make sense at all? Copying the percpu struct 58 memset(this_cpu_ptr(&cpu_mcck), 0, sizeof(mcck));
59 * and then zapping it one statement later?
60 */
61 memcpy(&mcck, this_cpu_ptr(&cpu_mcck), sizeof(mcck));
62 memset(&mcck, 0, sizeof(struct mcck_struct));
63 clear_cpu_flag(CIF_MCCK_PENDING); 59 clear_cpu_flag(CIF_MCCK_PENDING);
64 local_mcck_enable(); 60 local_mcck_enable();
65 local_irq_restore(flags); 61 local_irq_restore(flags);
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
index 626e01377a01..987514396c1e 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -178,7 +178,7 @@ static void jit_fill_hole(void *area, unsigned int size)
178} 178}
179 179
180struct jit_context { 180struct jit_context {
181 unsigned int cleanup_addr; /* epilogue code offset */ 181 int cleanup_addr; /* epilogue code offset */
182 bool seen_ld_abs; 182 bool seen_ld_abs;
183}; 183};
184 184
@@ -192,6 +192,7 @@ static int do_jit(struct bpf_prog *bpf_prog, int *addrs, u8 *image,
192 struct bpf_insn *insn = bpf_prog->insnsi; 192 struct bpf_insn *insn = bpf_prog->insnsi;
193 int insn_cnt = bpf_prog->len; 193 int insn_cnt = bpf_prog->len;
194 bool seen_ld_abs = ctx->seen_ld_abs | (oldproglen == 0); 194 bool seen_ld_abs = ctx->seen_ld_abs | (oldproglen == 0);
195 bool seen_exit = false;
195 u8 temp[BPF_MAX_INSN_SIZE + BPF_INSN_SAFETY]; 196 u8 temp[BPF_MAX_INSN_SIZE + BPF_INSN_SAFETY];
196 int i; 197 int i;
197 int proglen = 0; 198 int proglen = 0;
@@ -854,10 +855,11 @@ common_load:
854 goto common_load; 855 goto common_load;
855 856
856 case BPF_JMP | BPF_EXIT: 857 case BPF_JMP | BPF_EXIT:
857 if (i != insn_cnt - 1) { 858 if (seen_exit) {
858 jmp_offset = ctx->cleanup_addr - addrs[i]; 859 jmp_offset = ctx->cleanup_addr - addrs[i];
859 goto emit_jmp; 860 goto emit_jmp;
860 } 861 }
862 seen_exit = true;
861 /* update cleanup_addr */ 863 /* update cleanup_addr */
862 ctx->cleanup_addr = proglen; 864 ctx->cleanup_addr = proglen;
863 /* mov rbx, qword ptr [rbp-X] */ 865 /* mov rbx, qword ptr [rbp-X] */