diff options
author | Michael Holzheu <holzheu@linux.vnet.ibm.com> | 2015-01-15 04:23:46 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-01-15 05:10:41 -0500 |
commit | fe82bbae36943fbead5e326aab1665d001a87dd7 (patch) | |
tree | dbe55ddb71a08c232eda91e2f7906962fe7f1bc5 /arch/s390 | |
parent | 1a92b2deaf5c1b71f995ef571076200a391aac66 (diff) |
s390/bpf: Zero extend parameters before calling C function
The s390x ABI requires to zero extend parameters before functions
are called.
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/net/bpf_jit.S | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/s390/net/bpf_jit.S b/arch/s390/net/bpf_jit.S index e2f2111bd107..ba44c9f55346 100644 --- a/arch/s390/net/bpf_jit.S +++ b/arch/s390/net/bpf_jit.S | |||
@@ -46,7 +46,7 @@ sk_load_word_slow: | |||
46 | lgr %r9,%r2 # save %r2 | 46 | lgr %r9,%r2 # save %r2 |
47 | lgr %r3,%r1 # offset | 47 | lgr %r3,%r1 # offset |
48 | la %r4,160(%r15) # pointer to temp buffer | 48 | la %r4,160(%r15) # pointer to temp buffer |
49 | lhi %r5,4 # 4 bytes | 49 | lghi %r5,4 # 4 bytes |
50 | brasl %r14,skb_copy_bits # get data from skb | 50 | brasl %r14,skb_copy_bits # get data from skb |
51 | l %r5,160(%r15) # load result from temp buffer | 51 | l %r5,160(%r15) # load result from temp buffer |
52 | ltgr %r2,%r2 # set cc to (%r2 != 0) | 52 | ltgr %r2,%r2 # set cc to (%r2 != 0) |
@@ -72,7 +72,7 @@ sk_load_half_slow: | |||
72 | lgr %r9,%r2 # save %r2 | 72 | lgr %r9,%r2 # save %r2 |
73 | lgr %r3,%r1 # offset | 73 | lgr %r3,%r1 # offset |
74 | la %r4,162(%r15) # pointer to temp buffer | 74 | la %r4,162(%r15) # pointer to temp buffer |
75 | lhi %r5,2 # 2 bytes | 75 | lghi %r5,2 # 2 bytes |
76 | brasl %r14,skb_copy_bits # get data from skb | 76 | brasl %r14,skb_copy_bits # get data from skb |
77 | xc 160(2,%r15),160(%r15) | 77 | xc 160(2,%r15),160(%r15) |
78 | l %r5,160(%r15) # load result from temp buffer | 78 | l %r5,160(%r15) # load result from temp buffer |
@@ -97,8 +97,9 @@ ENTRY(sk_load_byte) | |||
97 | 97 | ||
98 | sk_load_byte_slow: | 98 | sk_load_byte_slow: |
99 | lgr %r9,%r2 # save %r2 | 99 | lgr %r9,%r2 # save %r2 |
100 | lgr %r3,%r1 # offset | ||
100 | la %r4,163(%r15) # pointer to temp buffer | 101 | la %r4,163(%r15) # pointer to temp buffer |
101 | lhi %r5,1 # 1 bytes | 102 | lghi %r5,1 # 1 byte |
102 | brasl %r14,skb_copy_bits # get data from skb | 103 | brasl %r14,skb_copy_bits # get data from skb |
103 | xc 160(3,%r15),160(%r15) | 104 | xc 160(3,%r15),160(%r15) |
104 | l %r5,160(%r15) # load result from temp buffer | 105 | l %r5,160(%r15) # load result from temp buffer |
@@ -120,8 +121,9 @@ ENTRY(sk_load_byte_msh) | |||
120 | 121 | ||
121 | sk_load_byte_msh_slow: | 122 | sk_load_byte_msh_slow: |
122 | lgr %r9,%r2 # save %r2 | 123 | lgr %r9,%r2 # save %r2 |
124 | lgr %r3,%r1 # offset | ||
123 | la %r4,163(%r15) # pointer to temp buffer | 125 | la %r4,163(%r15) # pointer to temp buffer |
124 | lhi %r5,1 # 1 bytes | 126 | lghi %r5,1 # 1 byte |
125 | brasl %r14,skb_copy_bits # get data from skb | 127 | brasl %r14,skb_copy_bits # get data from skb |
126 | xc 160(3,%r15),160(%r15) | 128 | xc 160(3,%r15),160(%r15) |
127 | l %r12,160(%r15) # load result from temp buffer | 129 | l %r12,160(%r15) # load result from temp buffer |