Re: [PATCH v2 07/10] s390x: smp: Use full PSW to bringup new cpu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/24/20 1:23 PM, David Hildenbrand wrote:
> On 24.04.20 13:16, Janosch Frank wrote:
>> On 4/24/20 12:09 PM, David Hildenbrand wrote:
>>> On 23.04.20 11:10, Janosch Frank wrote:
>>>> Up to now we ignored the psw mask and only used the psw address when
>>>> bringing up a new cpu. For DAT we need to also load the mask, so let's
>>>> do that.
>>>>
>>>> Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
>>>> Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>
>>>> ---
>>>>  lib/s390x/smp.c  | 2 ++
>>>>  s390x/cstart64.S | 3 ++-
>>>>  2 files changed, 4 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/lib/s390x/smp.c b/lib/s390x/smp.c
>>>> index 3f86243..6ef0335 100644
>>>> --- a/lib/s390x/smp.c
>>>> +++ b/lib/s390x/smp.c
>>>> @@ -202,6 +202,8 @@ int smp_cpu_setup(uint16_t addr, struct psw psw)
>>>>  	cpu->stack = (uint64_t *)alloc_pages(2);
>>>>  
>>>>  	/* Start without DAT and any other mask bits. */
>>>> +	cpu->lowcore->sw_int_psw.mask = psw.mask;
>>>> +	cpu->lowcore->sw_int_psw.addr = psw.addr;
>>>>  	cpu->lowcore->sw_int_grs[14] = psw.addr;
>>>
>>> Do we still have to set sw_int_grs[14] ?
>>>
>> r14 is saved to restart_new so we don't go through setup twice.
>> We could instead copy cpu->lowcore->sw_int_psw.addr to restart new, but
>> that means more changes than the removal of one line.
>>
>> Also, what about backtraces or plain old debug?
>> Having r14 is a good backup to have IMHO.
>>
> 
> Fine with me
> 
> Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>
> 

Thanks!
Also we need that if the cpu returns from its assigned function, so it
drops into the infinite loop.

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux