[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] xen/arm: gic-v3-lpi: Allocate the pending table while preparing the CPU
On 16/05/2022 10:50, Julien Grall wrote:
@@ -381,6 +410,7 @@ integer_param("max_lpi_bits", max_lpi_bits);
int gicv3_lpi_init_host_lpis(unsigned int host_lpi_bits)
{
unsigned int nr_lpi_ptrs;
+ int rc;
/* We rely on the data structure being atomically accessible. */
BUILD_BUG_ON(sizeof(union host_lpi) > sizeof(unsigned long));
@@ -413,7 +443,14 @@ int gicv3_lpi_init_host_lpis(unsigned int
host_lpi_bits)
printk("GICv3: using at most %lu LPIs on the host.\n",
MAX_NR_HOST_LPIS);
- return 0;
+ /* Register the CPU notifier and allocate memory for the boot
CPU */
+ register_cpu_notifier(&cpu_nfb);
+ rc = gicv3_lpi_allocate_pendtable(smp_processor_id());
+ if ( rc )
+ printk(XENLOG_ERR "Unable to allocate the pendtable for
CPU%u\n",
+ smp_processor_id());
On secondary cores nothing equivalent will be printed and in the cal
path there
will be nothing printed at all which could make debugging complex.
Can you move this print into gicv3_lpi_allocate_pendtable ?
Good point. I will do that in the next version.
I decided to duplicate the error message in the notifier instead. I felt
it was better over adding goto in gicv3_lpi_allocate_pendtable(). I am
fine to use goto if that's preferred.
Cheers,
--
Julien Grall
|