[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 24/62] arm: Introduce a generic way to use a device from acpi



On 17/11/15 13:21, Shannon Zhao wrote:
>> AFAICT, it does only works for SPCR table used for UART device. For the
>> GIC you've hardcoded the value and I can't find any version number in
>> the table.
>>
> No, I didn't hardcode the GIC version. Since ACPI 6.0 introduces GIC
> version in generic distributor table, it could get the version from
> that. Please see [PATCH v3 28/62].

+    if ( dist->version == ACPI_MADT_GIC_VERSION_V2 )
+        rc = acpi_device_init(DEVICE_GIC, NULL, GIC_V2);
+    else if ( dist->version == ACPI_MADT_GIC_VERSION_V3 )
+        rc = acpi_device_init(DEVICE_GIC, NULL, GIC_V3);

Every single time a new GIC version will be added, we will had to add
another else if. I'm sorry but it's what I call hardcoding.

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.