[S390] Use copy_to_absolute_zero() instead of "stura/sturg"
Use the new copy_to_absolute_zero() function instead of manual "stura" and "sturg" to make the code shorter and more readable. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:

committed by
Martin Schwidefsky

parent
4c1051e37a
commit
b43445ff6c
@@ -1498,30 +1498,12 @@ static struct shutdown_action __refdata dump_action = {
|
|||||||
|
|
||||||
static void dump_reipl_run(struct shutdown_trigger *trigger)
|
static void dump_reipl_run(struct shutdown_trigger *trigger)
|
||||||
{
|
{
|
||||||
preempt_disable();
|
u32 csum;
|
||||||
/*
|
|
||||||
* Bypass dynamic address translation (DAT) when storing IPL parameter
|
csum = csum_partial(reipl_block_actual, reipl_block_actual->hdr.len, 0);
|
||||||
* information block address and checksum into the prefix area
|
copy_to_absolute_zero(&S390_lowcore.ipib_checksum, &csum, sizeof(csum));
|
||||||
* (corresponding to absolute addresses 0-8191).
|
copy_to_absolute_zero(&S390_lowcore.ipib, &reipl_block_actual,
|
||||||
* When enhanced DAT applies and the STE format control in one,
|
sizeof(reipl_block_actual));
|
||||||
* the absolute address is formed without prefixing. In this case a
|
|
||||||
* normal store (stg/st) into the prefix area would no more match to
|
|
||||||
* absolute addresses 0-8191.
|
|
||||||
*/
|
|
||||||
#ifdef CONFIG_64BIT
|
|
||||||
asm volatile("sturg %0,%1"
|
|
||||||
:: "a" ((unsigned long) reipl_block_actual),
|
|
||||||
"a" (&lowcore_ptr[smp_processor_id()]->ipib));
|
|
||||||
#else
|
|
||||||
asm volatile("stura %0,%1"
|
|
||||||
:: "a" ((unsigned long) reipl_block_actual),
|
|
||||||
"a" (&lowcore_ptr[smp_processor_id()]->ipib));
|
|
||||||
#endif
|
|
||||||
asm volatile("stura %0,%1"
|
|
||||||
:: "a" (csum_partial(reipl_block_actual,
|
|
||||||
reipl_block_actual->hdr.len, 0)),
|
|
||||||
"a" (&lowcore_ptr[smp_processor_id()]->ipib_checksum));
|
|
||||||
preempt_enable();
|
|
||||||
dump_run(trigger);
|
dump_run(trigger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user