-
Notifications
You must be signed in to change notification settings - Fork 103
CIX:Add OEM-specific ACPI OEM_ID check for default domain #1335
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: linux-6.6.y
Are you sure you want to change the base?
Changes from all commits
9466a08
5dbc460
da71ed2
4abada2
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 | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2880,6 +2880,34 @@ static int arm_smmu_dev_disable_feature(struct device *dev, | |||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| /* | ||||||||||||||||||||||||||||||||||
| * Check OEM_ID with a specific OEM provider. | ||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||
| #ifdef CONFIG_ACPI | ||||||||||||||||||||||||||||||||||
| static bool acpi_check_oem_id(struct device *dev, const char *oem_id) | ||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||
| if (oem_id && has_acpi_companion(dev)) { | ||||||||||||||||||||||||||||||||||
| struct acpi_table_header *iort_table; | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| acpi_status status = acpi_get_table(ACPI_SIG_IORT, 0, &iort_table); | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| if (ACPI_FAILURE(status)) { | ||||||||||||||||||||||||||||||||||
| if (status != AE_NOT_FOUND) { | ||||||||||||||||||||||||||||||||||
| const char *msg = acpi_format_exception(status); | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| pr_warn("Failed to get table, %s\n", msg); | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
| return 0; | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| if (!strncmp(iort_table->oem_id, oem_id, 6)) | ||||||||||||||||||||||||||||||||||
| return 1; | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+2892
to
+2904
|
||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
| return 0; | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+2900
to
+2907
|
||||||||||||||||||||||||||||||||||
| return 0; | |
| } | |
| if (!strncmp(iort_table->oem_id, oem_id, 6)) | |
| return 1; | |
| } | |
| return 0; | |
| return false; | |
| } | |
| if (!strncmp(iort_table->oem_id, oem_id, 6)) | |
| return true; | |
| } | |
| return false; |
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.
This suggestion should be applied
Copilot
AI
Dec 1, 2025
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.
[nitpick] Extra blank line. Remove one of the two consecutive blank lines to maintain consistent code formatting.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -174,8 +174,11 @@ static int reset_lookup_handle(const union acpi_object *obj, void *data) | |
|
|
||
| static int rmem_dev_set_dma(struct device *dev, phys_addr_t base, size_t size) | ||
| { | ||
| dev_err(dev, "==== dev[%s], dev->dma[%s]", dev ? "1": "NULL", dev->dma_mem ? "1": "NULL"); | ||
|
Member
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. 这个日志信息级别不应该是dev_err 缩进有问题 |
||
| if (!dev || dev->dma_mem) | ||
| return -EINVAL; | ||
| dev_err(dev, "==== memblock_is_region_memory[%d], memblock_is_map_memory[%d]", | ||
| memblock_is_region_memory(base, size), memblock_is_map_memory(base)); | ||
|
|
||
| if (!memblock_is_region_memory(base, size) | ||
| || memblock_is_map_memory(base)) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2071,3 +2071,4 @@ int cdnsp_gadget_init(struct cdns *cdns) | |
|
|
||
| return 0; | ||
| } | ||
| EXPORT_SYMBOL(cdnsp_gadget_init); | ||
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.
Magic number used without explanation. The value
6represents the size of the ACPI OEM_ID field. Define a constant (e.g.,ACPI_OEM_ID_SIZE) or useACPI_OEM_ID_SIZEfrom ACPI headers if available, to make the code more maintainable and self-documenting.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.
Avoid using magic number, at lease a line of comment