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

Re: [Xen-devel] [PATCH v4 17/24] arm/acpi: Create min DT stub for Dom0




On 2016/2/29 23:05, Stefano Stabellini wrote:
>> +static int acpi_make_hypervisor_node(const struct kernel_info *kinfo,
>> > +                                     struct membank tbl_add[])
>> > +{
>> > +    const char compat[] =
>> > +        
>> > "xen,xen-"__stringify(XEN_VERSION)"."__stringify(XEN_SUBVERSION)"\0"
>> > +        "xen,xen";
>> > +    int res;
>> > +    /* Convenience alias */
>> > +    void *fdt = kinfo->fdt;
>> > +
>> > +    DPRINT("Create hypervisor node\n");
>> > +
>> > +    /* See linux Documentation/devicetree/bindings/arm/xen.txt */
>> > +    res = fdt_begin_node(fdt, "hypervisor");
>> > +    if ( res )
>> > +        return res;
>> > +
>> > +    /* Cannot use fdt_property_string due to embedded nulls */
>> > +    res = fdt_property(fdt, "compatible", compat, sizeof(compat));
>> > +    if ( res )
>> > +        return res;
>> > +
>> > +    res = arm_acpi_make_efi_nodes(fdt, tbl_add);
>> > +    if ( res )
>> > +        return res;
>> > +
>> > +    res = fdt_end_node(fdt);
>> > +
>> > +    return res;
>> > +}
> Please refactor the existing make_hypervisor_node into a shared function
> and use that instead.
> 
Not sure this works since the parameters of them are different and it
will add a uefi node under hypervisor node in new function.

-- 
Shannon


_______________________________________________
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®.