diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2007-02-13 07:26:20 -0500 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-02-13 07:26:20 -0500 |
commit | 429d512e532ec9c969aa6f66ddbc542f3a5fe4da (patch) | |
tree | 0c3eb4dece9fa05fed66bbcfe906b0221cbbe4be /arch/x86_64 | |
parent | a4ec1b2c9fe9492c9ab30261b411d836527fe0b6 (diff) |
[PATCH] mmconfig: minor cleanup in mmconfig code
This just cleans up.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/pci/mmconfig.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/arch/x86_64/pci/mmconfig.c b/arch/x86_64/pci/mmconfig.c index 50512a8fc9e8..918fc5b95a06 100644 --- a/arch/x86_64/pci/mmconfig.c +++ b/arch/x86_64/pci/mmconfig.c | |||
@@ -13,10 +13,6 @@ | |||
13 | 13 | ||
14 | #include "pci.h" | 14 | #include "pci.h" |
15 | 15 | ||
16 | /* Verify the first 16 busses. We assume that systems with more busses | ||
17 | get MCFG right. */ | ||
18 | #define PCI_MMCFG_MAX_CHECK_BUS 16 | ||
19 | |||
20 | /* Static virtual mapping of the MMCONFIG aperture */ | 16 | /* Static virtual mapping of the MMCONFIG aperture */ |
21 | struct mmcfg_virt { | 17 | struct mmcfg_virt { |
22 | struct acpi_mcfg_allocation *cfg; | 18 | struct acpi_mcfg_allocation *cfg; |
@@ -26,17 +22,13 @@ static struct mmcfg_virt *pci_mmcfg_virt; | |||
26 | 22 | ||
27 | static char __iomem *get_virt(unsigned int seg, unsigned bus) | 23 | static char __iomem *get_virt(unsigned int seg, unsigned bus) |
28 | { | 24 | { |
29 | int cfg_num = -1; | ||
30 | struct acpi_mcfg_allocation *cfg; | 25 | struct acpi_mcfg_allocation *cfg; |
26 | int cfg_num; | ||
31 | 27 | ||
32 | while (1) { | 28 | for (cfg_num = 0; cfg_num < pci_mmcfg_config_num; cfg_num++) { |
33 | ++cfg_num; | ||
34 | if (cfg_num >= pci_mmcfg_config_num) | ||
35 | break; | ||
36 | cfg = pci_mmcfg_virt[cfg_num].cfg; | 29 | cfg = pci_mmcfg_virt[cfg_num].cfg; |
37 | if (cfg->pci_segment != seg) | 30 | if (cfg->pci_segment == seg && |
38 | continue; | 31 | (cfg->start_bus_number <= bus) && |
39 | if ((cfg->start_bus_number <= bus) && | ||
40 | (cfg->end_bus_number >= bus)) | 32 | (cfg->end_bus_number >= bus)) |
41 | return pci_mmcfg_virt[cfg_num].virt; | 33 | return pci_mmcfg_virt[cfg_num].virt; |
42 | } | 34 | } |