@@ -61,6 +61,7 @@ struct target_cache {
enum {
NODE_ACCESS_CLASS_0 = 0,
NODE_ACCESS_CLASS_1,
+ NODE_ACCESS_CLASS_GENPORT_SINK,
NODE_ACCESS_CLASS_MAX,
};
@@ -327,10 +328,13 @@ static __init void hmat_update_target(unsigned int tgt_pxm, unsigned int init_px
{
struct memory_target *target = find_mem_target(tgt_pxm);
+ if (!target)
+ return;
+
if (mem_hier != ACPI_HMAT_MEMORY)
return;
- if (target && target->processor_pxm == init_pxm) {
+ if (target->processor_pxm == init_pxm) {
hmat_update_target_access(target, type, value,
NODE_ACCESS_CLASS_0);
/* If the node has a CPU, update access 1 */
@@ -338,6 +342,11 @@ static __init void hmat_update_target(unsigned int tgt_pxm, unsigned int init_px
hmat_update_target_access(target, type, value,
NODE_ACCESS_CLASS_1);
}
+
+ /* Update access from generic port target */
+ if (init_pxm == 0 && *(u16 *)target->gen_port_device_handle)
+ hmat_update_target_access(target, type, value,
+ NODE_ACCESS_CLASS_GENPORT_SINK);
}
static __init int hmat_parse_locality(union acpi_subtable_headers *header,