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

Re: [Xen-devel] [PATCH v4 10/21] acpi/table: Introduce acpi_table_get_entry_madt to get specified entry

On 2016/1/25 23:02, Jan Beulich wrote:
>>>> On 23.01.16 at 10:20, <zhaoshenglong@xxxxxxxxxx> wrote:
>> > From: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
>> > 
>> > This function could get the specified index entry of MADT table. This
>> > would be useful when it needs to get the contens of the entry.
>> > 
>> > Cc: Jan Beulich <jbeulich@xxxxxxxx>
>> > Signed-off-by: Shannon Zhao <shannon.zhao@xxxxxxxxxx>
> Again - if this is the counterpart to a Linux side change, please name
> that change. If it isn't, besides needing a better explanation of why
> you need it whether neither Linux nor x86 Xen does is needed,

This is not a Linux commit. The reason is that on ARM Xen must create
MADT table for Dom0 and it needs to get the contents of the physical
MADT entry to make up that for Dom0.

> a few code issues would need to be addressed too: Pointer type
> function parameters should be constified as much as possible, use of
> plain int should be avoided unless you truly need a signed type, and
> ...
>> > +struct acpi_subtable_header * __init
>> > +acpi_table_get_entry_madt(enum acpi_madt_type id, unsigned int 
>> > entry_index)
>> > +{
>> > +  struct acpi_table_header *table_header = NULL;
>> > +
>> > +  acpi_get_table(ACPI_SIG_MADT, acpi_apic_instance, &table_header);
>> > +  if (!table_header) {
> ... you should use the return value of the function instead of pre-
> setting table_header to NULL and then checking whether it changed.
Ok, will update. But looking the codes in this file, there are some
places using this way.


Xen-devel mailing list



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