|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [RFC PATCH 10/19] arm/its: Keep track of BASER regs
On 2/2/26 18:14, Mykyta Poturai wrote:
> Keep all the info about BASER regs in host_its structure to be able to easily
> access it later.
>
> Signed-off-by: Mykyta Poturai <mykyta_poturai@xxxxxxxx>
> ---
> xen/arch/arm/gic-v3-its.c | 36 +++++++++++++++++++++------
> xen/arch/arm/include/asm/gic_v3_its.h | 14 +++++++++++
> 2 files changed, 43 insertions(+), 7 deletions(-)
>
> diff --git a/xen/arch/arm/gic-v3-its.c b/xen/arch/arm/gic-v3-its.c
> index c628959f42..2328595a85 100644
> --- a/xen/arch/arm/gic-v3-its.c
> +++ b/xen/arch/arm/gic-v3-its.c
> @@ -430,16 +430,32 @@ static void *its_map_cbaser(struct host_its *its)
> /* The ITS BASE registers work with page sizes of 4K, 16K or 64K. */
> #define BASER_PAGE_BITS(sz) ((sz) * 2 + 12)
>
> +struct its_baser *its_get_baser(struct host_its *hw_its, uint32_t type)
> +{
> + unsigned int i;
> +
> + for ( i = 0; i < GITS_BASER_NR_REGS; i++ )
> + {
> + if (GITS_BASER_TYPE(hw_its->tables[i].val) == type)
> + return &hw_its->tables[i];
> + }
> +
> + return NULL;
> +}
> +
> static int its_map_baser(void __iomem *basereg, uint64_t regc,
> - unsigned int nr_items)
> + unsigned int nr_items, struct its_baser *baser)
> {
> uint64_t attr, reg;
> unsigned int entry_size = GITS_BASER_ENTRY_SIZE(regc);
> - unsigned int pagesz = 2; /* try 64K pages first, then go down. */
> + unsigned int page_size[4] = {SZ_4K, SZ_16K, SZ_64K, SZ_64K};
> + unsigned int pagesz = 0; /* try 64K pages first, then go down. */
Comment says "try 64K pages first", but pagesz starts from 0 (from 4K).
And there is a check at the end of this function:
if ( pagesz-- > 0 )
goto retry;
which doesn't work at all when pagesz = 0;
BR, Dmytro.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |