Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net/iucv: fix virtual vs physical address confusion

Fix virtual vs physical address confusion. This does not fix a bug
since virtual and physical address spaces are currently the same.

Acked-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Alexander Gordeev and committed by
David S. Miller
2210c548 fc136368

+8 -7
+8 -7
net/iucv/iucv.c
··· 286 286 */ 287 287 static inline int __iucv_call_b2f0(int command, union iucv_param *parm) 288 288 { 289 + unsigned long reg1 = virt_to_phys(parm); 289 290 int cc; 290 291 291 292 asm volatile( ··· 297 296 " srl %[cc],28\n" 298 297 : [cc] "=&d" (cc), "+m" (*parm) 299 298 : [reg0] "d" ((unsigned long)command), 300 - [reg1] "d" ((unsigned long)parm) 299 + [reg1] "d" (reg1) 301 300 : "cc", "0", "1"); 302 301 return cc; 303 302 } ··· 1124 1123 1125 1124 parm = iucv_param[smp_processor_id()]; 1126 1125 memset(parm, 0, sizeof(union iucv_param)); 1127 - parm->db.ipbfadr1 = (u32)(addr_t) buffer; 1126 + parm->db.ipbfadr1 = (u32)virt_to_phys(buffer); 1128 1127 parm->db.ipbfln1f = (u32) size; 1129 1128 parm->db.ipmsgid = msg->id; 1130 1129 parm->db.ippathid = path->pathid; ··· 1242 1241 parm->dpl.iptrgcls = msg->class; 1243 1242 memcpy(parm->dpl.iprmmsg, reply, min_t(size_t, size, 8)); 1244 1243 } else { 1245 - parm->db.ipbfadr1 = (u32)(addr_t) reply; 1244 + parm->db.ipbfadr1 = (u32)virt_to_phys(reply); 1246 1245 parm->db.ipbfln1f = (u32) size; 1247 1246 parm->db.ippathid = path->pathid; 1248 1247 parm->db.ipflags1 = flags; ··· 1294 1293 parm->dpl.ipmsgtag = msg->tag; 1295 1294 memcpy(parm->dpl.iprmmsg, buffer, 8); 1296 1295 } else { 1297 - parm->db.ipbfadr1 = (u32)(addr_t) buffer; 1296 + parm->db.ipbfadr1 = (u32)virt_to_phys(buffer); 1298 1297 parm->db.ipbfln1f = (u32) size; 1299 1298 parm->db.ippathid = path->pathid; 1300 1299 parm->db.ipflags1 = flags | IUCV_IPNORPY; ··· 1379 1378 parm->dpl.iptrgcls = msg->class; 1380 1379 parm->dpl.ipsrccls = srccls; 1381 1380 parm->dpl.ipmsgtag = msg->tag; 1382 - parm->dpl.ipbfadr2 = (u32)(addr_t) answer; 1381 + parm->dpl.ipbfadr2 = (u32)virt_to_phys(answer); 1383 1382 parm->dpl.ipbfln2f = (u32) asize; 1384 1383 memcpy(parm->dpl.iprmmsg, buffer, 8); 1385 1384 } else { ··· 1388 1387 parm->db.iptrgcls = msg->class; 1389 1388 parm->db.ipsrccls = srccls; 1390 1389 parm->db.ipmsgtag = msg->tag; 1391 - parm->db.ipbfadr1 = (u32)(addr_t) buffer; 1390 + parm->db.ipbfadr1 = (u32)virt_to_phys(buffer); 1392 1391 parm->db.ipbfln1f = (u32) size; 1393 - parm->db.ipbfadr2 = (u32)(addr_t) answer; 1392 + parm->db.ipbfadr2 = (u32)virt_to_phys(answer); 1394 1393 parm->db.ipbfln2f = (u32) asize; 1395 1394 } 1396 1395 rc = iucv_call_b2f0(IUCV_SEND, parm);