[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 05/10] target/ppc: Change parameter of cpu_interrupt_exitt
From: |
Nicholas Piggin |
Subject: |
Re: [PATCH v2 05/10] target/ppc: Change parameter of cpu_interrupt_exittb() to an env pointer |
Date: |
Thu, 15 Jun 2023 21:40:33 +1000 |
On Thu Jun 15, 2023 at 7:19 PM AEST, BALATON Zoltan wrote:
> On Thu, 15 Jun 2023, Nicholas Piggin wrote:
> > On Thu Jun 15, 2023 at 7:34 AM AEST, BALATON Zoltan wrote:
> >> Changing the parameter of cpu_interrupt_exittb() from CPUState to env
> >> allows removing some more local CPUState variables in callers.
> >
> > I think it's more consistent to keep cs, which is same as
> > cpu_interrupt().
>
> But with this patch it's more consistent with the other functions devlared
> in helper_regs.h and gets rid of the #ifdef in hreg_store_msr() so I'd
> still like to keep this patch. Callers already have env so it should not
> matter.
Being consistent with functions of the same file is not important or
really makes sense. It's important to be consistent with functions
of similar type. cpu_interrupt_exittb() is a helper to call
cpu_interrupt() so makes sense to be similar. At best it seems like
pointless churn.
Thanks,
Nick
[PATCH v2 04/10] target/ppc: Use env_cpu for cpu_abort in excp_helper, BALATON Zoltan, 2023/06/14
[PATCH v2 07/10] target/ppd: Remove unused define, BALATON Zoltan, 2023/06/14
[PATCH v2 08/10] target/ppc: Fix gen_sc to use correct nip, BALATON Zoltan, 2023/06/14
[PATCH v2 09/10] target/ppc: Simplify syscall exception handlers, BALATON Zoltan, 2023/06/14
[PATCH v2 06/10] target/ppc: Readability improvements in exception handlers, BALATON Zoltan, 2023/06/14