# Re: \[PATCH v2 36/43\] powerpc/32: Set current-\>thread.regs in C interrupt entry

- From: Christophe Leroy \<hidden\>
- Date: 2021-03-11 12:39:06 
- List: linuxppc-dev
- Page: https://ratatoskr.run/linuxppc-dev/2021/03/6296736
- Thread: https://ratatoskr.run/linuxppc-dev/2021/03/6293534/t.md

```text


Le 11/03/2021 à 11:38, Christophe Leroy a écrit :
>
>
> Le 10/03/2021 à 02:33, Nicholas Piggin a écrit :
>> Excerpts from Christophe Leroy's message of March 9, 2021 10:10 pm:
>>> No need to do that is assembly, do it in C.
>>
>> Hmm. No issues with the patch as such, but why does ppc32 need this but
>> not 64? AFAIKS 64 sets this when a thread is created.
>
> Looks like ppc64 was doing the same in function save_remaining_regs() in arch/ppc64/kernel/head.S until commit https://github.com/mpe/linux-fullhistory/commit/e5bb080d
>
> But I can't find what happend to it in that commit.
>
> Where is it done now ? Maybe that's also already done for ppc32.
>

I digged a bit more and found a later bug fix which adds that setting of current->thread.regs at task creation: https://github.com/mpe/linux-fullhistory/commit/3eac1897

That was in the ppc64 tree only at that time, and was merged into the common powerpc tree via commit https://github.com/mpe/linux-fullhistory/commit/06d67d54

So we have it for both ppc32 and ppc64 and ppc32 doesn't need to do it at exception entry anymore. I'll remove it.

Thanks
Christophe
```
