Re: [git pull] "big box" x86 changes, PCI

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Yinghai Lu
Date: Monday, April 28, 2008 - 3:53 pm

On Mon, Apr 28, 2008 at 1:34 PM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:

        for (i = 0; i < pci_mmcfg_config_num; i++) {
                int valid = 0;
                u32 size = (cfg->end_bus_number + 1) << 20;
                cfg = &pci_mmcfg_config[i];
                printk(KERN_NOTICE "PCI: MCFG configuration %d: base %lx "
                       "segment %hu buses %u - %u\n",
                       i, (unsigned long)cfg->address, cfg->pci_segment,
                       (unsigned int)cfg->start_bus_number,
                       (unsigned int)cfg->end_bus_number);

                if (!early &&
============================================> early check..
                    is_acpi_reserved(cfg->address, cfg->address + size - 1)) {
                        printk(KERN_NOTICE "PCI: MCFG area at %Lx reserved "
                               "in ACPI motherboard resources\n",
                               cfg->address);
                        valid = 1;
                }

                if (valid)
                        continue;

                if (!early)
=================================================> check early
                        printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %Lx is not"
                               " reserved in ACPI motherboard resources\n",
                               cfg->address);
                /* Don't try to do this check unless configuration
                   type 1 is available. how about type 2 ?*/
                if (raw_pci_ops && e820_all_mapped(cfg->address,
                                                  cfg->address + size - 1,
                                                  E820_RESERVED)) {
                        printk(KERN_NOTICE
                               "PCI: MCFG area at %Lx reserved in E820\n",
                               cfg->address);
                        valid = 1;
                }

                if (!valid)
                        goto reject;
        }

        return;

only two early check ... , if split that we will get almost same
duplicated lines.


by hand, will need to check if mmconf is enabled or not.
will check if can factor out it.

YH
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC git pull] &quot;big box&quot; x86 changes, Ingo Molnar, (Sat Apr 26, 11:55 am)
Re: [RFC git pull] &quot;big box&quot; x86 changes, Stefan Richter, (Sat Apr 26, 12:05 pm)
Re: [RFC git pull] &quot;big box&quot; x86 changes, Linus Torvalds, (Sat Apr 26, 12:12 pm)
Re: [RFC git pull] &quot;big box&quot; x86 changes, Ingo Molnar, (Sat Apr 26, 12:21 pm)
[RFC git pull] &quot;big box&quot; x86 changes, GART, Ingo Molnar, (Sat Apr 26, 1:24 pm)
[git pull] &quot;big box&quot; x86 changes, PCI, Ingo Molnar, (Sat Apr 26, 2:55 pm)
Re: [RFC git pull] &quot;big box&quot; x86 changes, Andi Kleen, (Sat Apr 26, 3:17 pm)
Re: [git pull] &quot;big box&quot; x86 changes, boot protocol, Jeremy Fitzhardinge, (Sat Apr 26, 4:37 pm)
Re: [RFC git pull] &quot;big box&quot; x86 changes, Yinghai Lu, (Sat Apr 26, 8:14 pm)
Re: [RFC git pull] &quot;big box&quot; x86 changes, Andi Kleen, (Sun Apr 27, 1:30 am)
Re: [git pull] &quot;big box&quot; x86 changes, PCI, Jesse Barnes, (Sun Apr 27, 9:30 am)
[patch] mm: node-setup agnostic free_bootmem(), Ingo Molnar, (Sun Apr 27, 5:40 pm)
Re: [patch] mm: node-setup agnostic free_bootmem(), Yinghai Lu, (Sun Apr 27, 6:48 pm)
Re: [git pull] &quot;big box&quot; x86 changes, PCI, Ingo Molnar, (Mon Apr 28, 8:38 am)
Re: [patch] mm: node-setup agnostic free_bootmem(), Johannes Weiner, (Mon Apr 28, 9:49 am)
Re: [patch] mm: node-setup agnostic free_bootmem(), Johannes Weiner, (Mon Apr 28, 9:54 am)
Re: [patch] mm: node-setup agnostic free_bootmem(), Yinghai Lu, (Mon Apr 28, 12:11 pm)
Re: [patch] mm: node-setup agnostic free_bootmem(), Yinghai Lu, (Mon Apr 28, 12:55 pm)
Re: [git pull] &quot;big box&quot; x86 changes, PCI, Jesse Barnes, (Mon Apr 28, 1:34 pm)
Re: [git pull] "big box" x86 changes, PCI, Yinghai Lu, (Mon Apr 28, 3:53 pm)
Re: [patch] mm: node-setup agnostic free_bootmem(), Ingo Molnar, (Tue Apr 29, 7:25 am)
Re: [patch] mm: node-setup agnostic free_bootmem(), Johannes Weiner, (Wed Apr 30, 3:50 am)
Re: [patch] mm: node-setup agnostic free_bootmem(), Johannes Weiner, (Wed Apr 30, 3:52 am)
Re: [patch] mm: node-setup agnostic free_bootmem(), Yinghai Lu, (Wed Apr 30, 9:22 am)
Re: [patch] mm: node-setup agnostic free_bootmem(), Johannes Weiner, (Wed Apr 30, 10:52 am)
Re: [patch] mm: node-setup agnostic free_bootmem(), Yinghai Lu, (Wed Apr 30, 1:30 pm)