.. | .. |
---|
40 | 40 | u16 mod_lvl; /* modification level */ |
---|
41 | 41 | } __attribute__ ((packed)); |
---|
42 | 42 | |
---|
43 | | -static inline int appldata_asm(struct appldata_product_id *id, |
---|
| 43 | + |
---|
| 44 | +static inline int appldata_asm(struct appldata_parameter_list *parm_list, |
---|
| 45 | + struct appldata_product_id *id, |
---|
44 | 46 | unsigned short fn, void *buffer, |
---|
45 | 47 | unsigned short length) |
---|
46 | 48 | { |
---|
47 | | - struct appldata_parameter_list parm_list; |
---|
48 | 49 | int ry; |
---|
49 | 50 | |
---|
50 | 51 | if (!MACHINE_IS_VM) |
---|
51 | 52 | return -EOPNOTSUPP; |
---|
52 | | - parm_list.diag = 0xdc; |
---|
53 | | - parm_list.function = fn; |
---|
54 | | - parm_list.parlist_length = sizeof(parm_list); |
---|
55 | | - parm_list.buffer_length = length; |
---|
56 | | - parm_list.product_id_addr = (unsigned long) id; |
---|
57 | | - parm_list.buffer_addr = virt_to_phys(buffer); |
---|
| 53 | + parm_list->diag = 0xdc; |
---|
| 54 | + parm_list->function = fn; |
---|
| 55 | + parm_list->parlist_length = sizeof(*parm_list); |
---|
| 56 | + parm_list->buffer_length = length; |
---|
| 57 | + parm_list->product_id_addr = (unsigned long) id; |
---|
| 58 | + parm_list->buffer_addr = virt_to_phys(buffer); |
---|
58 | 59 | diag_stat_inc(DIAG_STAT_X0DC); |
---|
59 | 60 | asm volatile( |
---|
60 | 61 | " diag %1,%0,0xdc" |
---|
61 | 62 | : "=d" (ry) |
---|
62 | | - : "d" (&parm_list), "m" (parm_list), "m" (*id) |
---|
| 63 | + : "d" (parm_list), "m" (*parm_list), "m" (*id) |
---|
63 | 64 | : "cc"); |
---|
64 | 65 | return ry; |
---|
65 | 66 | } |
---|