-
Notifications
You must be signed in to change notification settings - Fork 10
Nvidia stable 10.1 ankita bugfixes 1216 #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: nvidia_stable-10.1
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -145,20 +145,56 @@ static void acpi_generic_initiator_class_init(ObjectClass *oc, const void *data) | |
| "NUMA node associated with the PCI device"); | ||
| } | ||
|
|
||
| static int build_acpi_generic_initiator(Object *obj, void *opaque) | ||
| static gint memory_device_addr_sort(gconstpointer a, gconstpointer b) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM |
||
| { | ||
| const AcpiGenericInitiator *gi_a = a; | ||
| const AcpiGenericInitiator *gi_b = b; | ||
|
|
||
| if (gi_a->node > gi_b->node) { | ||
| return 1; | ||
| } else if (gi_a->node < gi_b->node) { | ||
| return -1; | ||
| } | ||
| return 0; | ||
| } | ||
|
|
||
| static int acpi_generic_initiator_list(Object *obj, void *opaque) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM |
||
| { | ||
| GSList **list = opaque; | ||
|
|
||
| if (object_dynamic_cast(obj, TYPE_ACPI_GENERIC_INITIATOR)) { | ||
| *list = g_slist_insert_sorted(*list, ACPI_GENERIC_INITIATOR(obj), | ||
| memory_device_addr_sort); | ||
| } | ||
|
|
||
| object_child_foreach(obj, acpi_generic_initiator_list, opaque); | ||
| return 0; | ||
| } | ||
|
|
||
| /* | ||
| * Identify Generic Initiator objects and link them into the list which is | ||
| * returned to the caller. | ||
| * | ||
| * Note: it is the caller's responsibility to free the list to avoid | ||
| * memory leak. | ||
| */ | ||
| static GSList *acpi_generic_initiator_get_list(void) | ||
| { | ||
| GSList *list = NULL; | ||
|
|
||
| object_child_foreach(object_get_root(), | ||
| acpi_generic_initiator_list, &list); | ||
| return list; | ||
| } | ||
|
|
||
| static int build_acpi_generic_initiator(AcpiGenericInitiator *gi, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM |
||
| GArray *table_data) | ||
| { | ||
| MachineState *ms = MACHINE(qdev_get_machine()); | ||
| AcpiGenericInitiator *gi; | ||
| GArray *table_data = opaque; | ||
| int32_t devfn; | ||
| uint8_t bus; | ||
| Object *o; | ||
|
|
||
| if (!object_dynamic_cast(obj, TYPE_ACPI_GENERIC_INITIATOR)) { | ||
| return 0; | ||
| } | ||
|
|
||
| gi = ACPI_GENERIC_INITIATOR(obj); | ||
| if (gi->node >= ms->numa_state->num_nodes) { | ||
| error_printf("%s: Specified node %d is invalid.\n", | ||
| TYPE_ACPI_GENERIC_INITIATOR, gi->node); | ||
|
|
@@ -182,6 +218,19 @@ static int build_acpi_generic_initiator(Object *obj, void *opaque) | |
| return 0; | ||
| } | ||
|
|
||
| static void build_all_acpi_generic_initiators(GArray *table_data) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM |
||
| { | ||
| GSList *gi_list, *list = acpi_generic_initiator_get_list(); | ||
| AcpiGenericInitiator *gi; | ||
|
|
||
| for (gi_list = list; gi_list; gi_list = gi_list->next) { | ||
| gi = gi_list->data; | ||
| build_acpi_generic_initiator(gi, table_data); | ||
| } | ||
|
|
||
| g_slist_free(list); | ||
| } | ||
|
|
||
| typedef struct AcpiGenericPort { | ||
| /* private */ | ||
| Object parent; | ||
|
|
@@ -295,9 +344,8 @@ static int build_acpi_generic_port(Object *obj, void *opaque) | |
|
|
||
| void build_srat_generic_affinity_structures(GArray *table_data) | ||
| { | ||
| object_child_foreach_recursive(object_get_root(), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM |
||
| build_acpi_generic_initiator, | ||
| table_data); | ||
| build_all_acpi_generic_initiators(table_data); | ||
|
|
||
| object_child_foreach_recursive(object_get_root(), build_acpi_generic_port, | ||
| table_data); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -252,7 +252,7 @@ int vfio_region_mmap(VFIORegion *region) | |
| prot |= region->flags & VFIO_REGION_INFO_FLAG_WRITE ? PROT_WRITE : 0; | ||
|
|
||
| for (i = 0; i < region->nr_mmaps; i++) { | ||
| size_t align = MIN(1ULL << ctz64(region->mmaps[i].size), 1 * GiB); | ||
| size_t align = MIN(pow2ceil(region->mmaps[i].size), 1 * GiB); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM |
||
| void *map_base, *map_align; | ||
|
|
||
| /* | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM