diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-10-06 08:01:11 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-10-06 08:01:11 -0400 |
commit | 8df22a4d6f5b81c9c1703579d4907b57002689ed (patch) | |
tree | 064e9662d427a82076e1151fcd9aa78a1066f9f4 /arch/sparc/net/bpf_jit_comp.c | |
parent | 0cae90a96c15f2fd3bd139ba5505755c9c9ef2eb (diff) | |
parent | a5448c88b812390a3622e76d774e10c0da1fb970 (diff) |
Merge tag 'asoc-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v3.18
- More componentisation work from Lars-Peter, this time mainly
cleaning up the suspend and bias level transition callbacks.
- Real system support for the Intel drivers and a bunch of fixes and
enhancements for the associated CODEC drivers, this is going to need
a lot quirks over time due to the lack of any firmware description of
the boards.
- Jack detect support for simple card from Dylan Reid.
- A bunch of small fixes and enhancements for the Freescale drivers.
- New drivers for Analog Devices SSM4567, Cirrus Logic CS35L32, Everest
Semiconductor ES8328 and Freescale cards using the ASRC in newer i.MX
processors.
Diffstat (limited to 'arch/sparc/net/bpf_jit_comp.c')
-rw-r--r-- | arch/sparc/net/bpf_jit_comp.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/arch/sparc/net/bpf_jit_comp.c b/arch/sparc/net/bpf_jit_comp.c index 1f76c22a6a75..ece4af0575e9 100644 --- a/arch/sparc/net/bpf_jit_comp.c +++ b/arch/sparc/net/bpf_jit_comp.c | |||
@@ -184,7 +184,7 @@ do { \ | |||
184 | */ | 184 | */ |
185 | #define emit_alu_K(OPCODE, K) \ | 185 | #define emit_alu_K(OPCODE, K) \ |
186 | do { \ | 186 | do { \ |
187 | if (K) { \ | 187 | if (K || OPCODE == AND || OPCODE == MUL) { \ |
188 | unsigned int _insn = OPCODE; \ | 188 | unsigned int _insn = OPCODE; \ |
189 | _insn |= RS1(r_A) | RD(r_A); \ | 189 | _insn |= RS1(r_A) | RD(r_A); \ |
190 | if (is_simm13(K)) { \ | 190 | if (is_simm13(K)) { \ |
@@ -234,12 +234,18 @@ do { BUILD_BUG_ON(FIELD_SIZEOF(STRUCT, FIELD) != sizeof(u8)); \ | |||
234 | __emit_load8(BASE, STRUCT, FIELD, DEST); \ | 234 | __emit_load8(BASE, STRUCT, FIELD, DEST); \ |
235 | } while (0) | 235 | } while (0) |
236 | 236 | ||
237 | #define emit_ldmem(OFF, DEST) \ | 237 | #ifdef CONFIG_SPARC64 |
238 | do { *prog++ = LD32I | RS1(FP) | S13(-(OFF)) | RD(DEST); \ | 238 | #define BIAS (STACK_BIAS - 4) |
239 | #else | ||
240 | #define BIAS (-4) | ||
241 | #endif | ||
242 | |||
243 | #define emit_ldmem(OFF, DEST) \ | ||
244 | do { *prog++ = LD32I | RS1(SP) | S13(BIAS - (OFF)) | RD(DEST); \ | ||
239 | } while (0) | 245 | } while (0) |
240 | 246 | ||
241 | #define emit_stmem(OFF, SRC) \ | 247 | #define emit_stmem(OFF, SRC) \ |
242 | do { *prog++ = LD32I | RS1(FP) | S13(-(OFF)) | RD(SRC); \ | 248 | do { *prog++ = ST32I | RS1(SP) | S13(BIAS - (OFF)) | RD(SRC); \ |
243 | } while (0) | 249 | } while (0) |
244 | 250 | ||
245 | #ifdef CONFIG_SMP | 251 | #ifdef CONFIG_SMP |
@@ -615,10 +621,11 @@ void bpf_jit_compile(struct bpf_prog *fp) | |||
615 | case BPF_ANC | SKF_AD_VLAN_TAG: | 621 | case BPF_ANC | SKF_AD_VLAN_TAG: |
616 | case BPF_ANC | SKF_AD_VLAN_TAG_PRESENT: | 622 | case BPF_ANC | SKF_AD_VLAN_TAG_PRESENT: |
617 | emit_skb_load16(vlan_tci, r_A); | 623 | emit_skb_load16(vlan_tci, r_A); |
618 | if (code == (BPF_ANC | SKF_AD_VLAN_TAG)) { | 624 | if (code != (BPF_ANC | SKF_AD_VLAN_TAG)) { |
619 | emit_andi(r_A, VLAN_VID_MASK, r_A); | 625 | emit_alu_K(SRL, 12); |
626 | emit_andi(r_A, 1, r_A); | ||
620 | } else { | 627 | } else { |
621 | emit_loadimm(VLAN_TAG_PRESENT, r_TMP); | 628 | emit_loadimm(~VLAN_TAG_PRESENT, r_TMP); |
622 | emit_and(r_A, r_TMP, r_A); | 629 | emit_and(r_A, r_TMP, r_A); |
623 | } | 630 | } |
624 | break; | 631 | break; |
@@ -630,15 +637,19 @@ void bpf_jit_compile(struct bpf_prog *fp) | |||
630 | emit_loadimm(K, r_X); | 637 | emit_loadimm(K, r_X); |
631 | break; | 638 | break; |
632 | case BPF_LD | BPF_MEM: | 639 | case BPF_LD | BPF_MEM: |
640 | seen |= SEEN_MEM; | ||
633 | emit_ldmem(K * 4, r_A); | 641 | emit_ldmem(K * 4, r_A); |
634 | break; | 642 | break; |
635 | case BPF_LDX | BPF_MEM: | 643 | case BPF_LDX | BPF_MEM: |
644 | seen |= SEEN_MEM | SEEN_XREG; | ||
636 | emit_ldmem(K * 4, r_X); | 645 | emit_ldmem(K * 4, r_X); |
637 | break; | 646 | break; |
638 | case BPF_ST: | 647 | case BPF_ST: |
648 | seen |= SEEN_MEM; | ||
639 | emit_stmem(K * 4, r_A); | 649 | emit_stmem(K * 4, r_A); |
640 | break; | 650 | break; |
641 | case BPF_STX: | 651 | case BPF_STX: |
652 | seen |= SEEN_MEM | SEEN_XREG; | ||
642 | emit_stmem(K * 4, r_X); | 653 | emit_stmem(K * 4, r_X); |
643 | break; | 654 | break; |
644 | 655 | ||