[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v5 05/30] ARM: GICv3: allocate LPI pending and property table
Hi Andre,
On 06/04/17 00:18, Andre Przywara wrote:
+static unsigned int max_lpi_bits = 20;
+integer_param("max_lpi_bits", max_lpi_bits);
+
+int gicv3_lpi_init_host_lpis(unsigned int host_lpi_bits)
+{
+ /* An implementation needs to support at least 14 bits of LPI IDs. */
+ max_lpi_bits = max(max_lpi_bits, 14U);
I think we should warn the user if we don't use his command line. He
might think he can disable LPIs using it.
+ lpi_data.max_host_lpi_ids = BIT_ULL(min(host_lpi_bits, max_lpi_bits));
+
+ /*
+ * Warn if the number of LPIs are quite high, as the user might not want
+ * to waste megabytes of memory for a mostly empty table.
+ * It's very unlikely that we need more than 24 bits worth of LPIs.
+ */
+ if ( lpi_data.max_host_lpi_ids > BIT(24) )
+ warning_add("Using high number of LPIs, limit memory usage with
max_lpi_bits\n");
+
+ printk("GICv3: using at most %llu LPIs on the host.\n", MAX_NR_HOST_LPIS);
+
+ return 0;
+}
Cheers,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|