device/path: rename domain path struct element to 'domain_id'
Rename the 'domain' element of the 'domain_path' struct to 'domain_id' to clarify that this element is the domain ID. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Suggested-by: Martin Roth <gaumless@gmail.com> Change-Id: I3995deb83a669699434f0073aed0e12b688bf6e7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/83677 Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Shuo Liu <shuo.liu@intel.com>
This commit is contained in:
		| @@ -118,7 +118,7 @@ static int path_eq(const struct device_path *path1, | |||||||
| 		equal = (path1->apic.apic_id == path2->apic.apic_id); | 		equal = (path1->apic.apic_id == path2->apic.apic_id); | ||||||
| 		break; | 		break; | ||||||
| 	case DEVICE_PATH_DOMAIN: | 	case DEVICE_PATH_DOMAIN: | ||||||
| 		equal = (path1->domain.domain == path2->domain.domain); | 		equal = (path1->domain.domain_id == path2->domain.domain_id); | ||||||
| 		break; | 		break; | ||||||
| 	case DEVICE_PATH_CPU_CLUSTER: | 	case DEVICE_PATH_CPU_CLUSTER: | ||||||
| 		equal = (path1->cpu_cluster.cluster | 		equal = (path1->cpu_cluster.cluster | ||||||
|   | |||||||
| @@ -109,7 +109,7 @@ u32 dev_path_encode(const struct device *dev) | |||||||
| 		ret |= dev->path.apic.apic_id; | 		ret |= dev->path.apic.apic_id; | ||||||
| 		break; | 		break; | ||||||
| 	case DEVICE_PATH_DOMAIN: | 	case DEVICE_PATH_DOMAIN: | ||||||
| 		ret |= dev->path.domain.domain; | 		ret |= dev->path.domain.domain_id; | ||||||
| 		break; | 		break; | ||||||
| 	case DEVICE_PATH_CPU_CLUSTER: | 	case DEVICE_PATH_CPU_CLUSTER: | ||||||
| 		ret |= dev->path.cpu_cluster.cluster; | 		ret |= dev->path.cpu_cluster.cluster; | ||||||
| @@ -193,7 +193,7 @@ const char *dev_path(const struct device *dev) | |||||||
| 			break; | 			break; | ||||||
| 		case DEVICE_PATH_DOMAIN: | 		case DEVICE_PATH_DOMAIN: | ||||||
| 			snprintf(buffer, sizeof(buffer), "DOMAIN: %08x", | 			snprintf(buffer, sizeof(buffer), "DOMAIN: %08x", | ||||||
| 				dev->path.domain.domain); | 				dev->path.domain.domain_id); | ||||||
| 			break; | 			break; | ||||||
| 		case DEVICE_PATH_CPU_CLUSTER: | 		case DEVICE_PATH_CPU_CLUSTER: | ||||||
| 			snprintf(buffer, sizeof(buffer), "CPU_CLUSTER: %01x", | 			snprintf(buffer, sizeof(buffer), "CPU_CLUSTER: %01x", | ||||||
| @@ -273,12 +273,12 @@ unsigned int dev_get_domain_id(const struct device *dev) | |||||||
| 		return 0; | 		return 0; | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	return domain_dev->path.domain.domain; | 	return domain_dev->path.domain.domain_id; | ||||||
| } | } | ||||||
|  |  | ||||||
| bool is_domain0(const struct device *dev) | bool is_domain0(const struct device *dev) | ||||||
| { | { | ||||||
| 	return dev && dev->path.type == DEVICE_PATH_DOMAIN && dev->path.domain.domain == 0; | 	return dev && dev->path.type == DEVICE_PATH_DOMAIN && dev->path.domain.domain_id == 0; | ||||||
| } | } | ||||||
|  |  | ||||||
| bool is_dev_on_domain0(const struct device *dev) | bool is_dev_on_domain0(const struct device *dev) | ||||||
|   | |||||||
| @@ -53,7 +53,7 @@ enum device_path_type { | |||||||
| } | } | ||||||
|  |  | ||||||
| struct domain_path { | struct domain_path { | ||||||
| 	unsigned int domain; | 	unsigned int domain_id; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| struct pci_path { | struct pci_path { | ||||||
|   | |||||||
| @@ -30,7 +30,7 @@ static inline void init_xeon_domain_path(struct device_path *path, int socket, | |||||||
| 		.bus = bus, | 		.bus = bus, | ||||||
| 	}; | 	}; | ||||||
| 	path->type = DEVICE_PATH_DOMAIN; | 	path->type = DEVICE_PATH_DOMAIN; | ||||||
| 	path->domain.domain = dp.domain_path; | 	path->domain.domain_id = dp.domain_path; | ||||||
| }; | }; | ||||||
|  |  | ||||||
| /* | /* | ||||||
|   | |||||||
| @@ -44,7 +44,7 @@ static struct device *const create_ioat_domain(const union xeon_domain_path dp, | |||||||
| 	struct device_path path = { | 	struct device_path path = { | ||||||
| 		.type = DEVICE_PATH_DOMAIN, | 		.type = DEVICE_PATH_DOMAIN, | ||||||
| 		.domain = { | 		.domain = { | ||||||
| 			.domain = new_path.domain_path, | 			.domain_id = new_path.domain_path, | ||||||
| 		}, | 		}, | ||||||
| 	}; | 	}; | ||||||
| 	struct device *const domain = alloc_find_dev(upstream, &path); | 	struct device *const domain = alloc_find_dev(upstream, &path); | ||||||
|   | |||||||
| @@ -859,7 +859,7 @@ static struct device *new_device_with_path(struct bus *parent, | |||||||
| 		break; | 		break; | ||||||
|  |  | ||||||
| 	case DOMAIN: | 	case DOMAIN: | ||||||
| 		new_d->path = ".type=DEVICE_PATH_DOMAIN,{.domain={ .domain = 0x%x }}"; | 		new_d->path = ".type=DEVICE_PATH_DOMAIN,{.domain={ .domain_id = 0x%x }}"; | ||||||
| 		break; | 		break; | ||||||
|  |  | ||||||
| 	case GENERIC: | 	case GENERIC: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user