[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 36/43] target/ppc/mmu-hash32: Remove some static inlines from
From: |
Nicholas Piggin |
Subject: |
Re: [PATCH 36/43] target/ppc/mmu-hash32: Remove some static inlines from header |
Date: |
Mon, 08 Jul 2024 17:06:58 +1000 |
On Sun Jul 7, 2024 at 6:18 AM AEST, BALATON Zoltan wrote:
> On Thu, 4 Jul 2024, Nicholas Piggin wrote:
> > On Mon May 27, 2024 at 9:13 AM AEST, BALATON Zoltan wrote:
> >> Two of these are not used anywhere and the other two are used only
> >> once and can be inlined and removed from the header.
> >
> > I'd prefer to put these in the .c file. Probably calculating the
> > base once would generate marginally better code since it would not
> > have to keep reloading it (since there is a barrier there it can't
> > cache the value).
>
> These aren't even used anywhere but one function and they are inefficient
> becuase they would call ppc_hash32_hpt_base() on each call. Next patch
> even removes base and calculates pte_addr once before the loop, then it's
> quite straight forward what these read from guest memory even without
> inline functions. I see no reason to keep these inline functions.
Make them take the hash base instead of cpu if that's the performance
issue to solve. And open coded access can always be converted to use
it.
Thanks,
Nick