VMD PCH rootbus#4
Open
sdurawa wants to merge 3 commits into
Open
Conversation
mtkaczyk
approved these changes
Oct 24, 2024
| enum vmd_resource { | ||
| VMD_RES_CFGBAR = 0, | ||
| VMD_RES_MBAR_1, | ||
| VMD_RES_MBAR_2, |
There was a problem hiding this comment.
Suggested change
| VMD_RES_MBAR_2, | |
| /*VMD Resource MemoryBar 1 */ | |
| VMD_RES_MBAR_1, |
There was a problem hiding this comment.
And same for MBAR_2 - just to explain full meaning.
mtkaczyk
approved these changes
Oct 24, 2024
mtkaczyk
left a comment
There was a problem hiding this comment.
PATCH v2 LGTM, one small suggestion
| .flags = IORESOURCE_BUS | IORESOURCE_PCI_FIXED, | ||
| }; | ||
|
|
||
| if (vmd_has_pch_rootbus(vmd)) { |
There was a problem hiding this comment.
please put declarations inside if:
Suggested change
| if (vmd_has_pch_rootbus(vmd)) { | |
| u16 ioc_range = 0; | |
| u16 pch_range = 0; | |
| pci_read_config_word(vmd->dev, VMD_BUSRANGE0, &ioc_range); | |
| pci_read_config_word(vmd->dev, VMD_BUSRANGE1, &pch_range); |
mtkaczyk
reviewed
Oct 24, 2024
| */ | ||
| bus_number = (vmd_has_pch_rootbus(vmd) && | ||
| bus->number == VMD_PRIMARY_PCH_BUS) ? | ||
| vmd->busn_start[VMD_BUS_1] : bus->number; |
There was a problem hiding this comment.
formatting here
Suggested change
| vmd->busn_start[VMD_BUS_1] : bus->number; | |
| vmd->busn_start[VMD_BUS_1] : bus->number; |
21f8866 to
e79e17e
Compare
This function is too long and needs to be shortened to make it more readable. This clean up is a prework for enablement additional VMD bus range. It doesn't change functional behavior of vmd_enable_domain(). Suggested-by: Nirmal Patel <nirmal.patel@linux.intel.com> Reviewed-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> Signed-off-by: Szymon Durawa <szymon.durawa@linux.intel.com>
e79e17e to
6d128be
Compare
added 2 commits
October 25, 2024 12:38
Starting from Intel Arrow Lake VMD enhacement introduces separate rotbus for PCH. It means that all 3 MMIO BARs exposed by VMD are shared now between CPU IOC and PCH. This patch adds PCH bus enumeration and MMIO management for devices with VMD enhancement support. Suggested-by: Nirmal Patel <nirmal.patel@linux.intel.com> Reviewed-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> Signed-off-by: Szymon Durawa <szymon.durawa@linux.intel.com>
VMD PCH rootbus primary number is 0x80 and pci_scan_bridge_extend() cannot assign it as "hard-wired to 0" and marks setup as broken. To avoid this, PCH bus number has to be the same as PCH primary number. Suggested-by: Nirmal Patel <nirmal.patel@linux.intel.com> Reviewed-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> Signed-off-by: Szymon Durawa <szymon.durawa@linux.intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add PCH rootbus support