Re: [Bug 7505] Linux-2.6.18 fails to boot on AMD64 machine

From: Stefano Takekawa
Date: Fri Dec 29 2006 - 05:16:43 EST


Il giorno gio, 28/12/2006 alle 15.51 -0800, Andrew Morton ha scritto:
> Could someone please test this?
> diff -puN drivers/pci/search.c~pci-avoid-taking-pci_bus_sem-early-in-boot drivers/pci/search.c
> --- a/drivers/pci/search.c~pci-avoid-taking-pci_bus_sem-early-in-boot
> +++ a/drivers/pci/search.c
> @@ -259,6 +259,16 @@ pci_get_subsys(unsigned int vendor, unsi
> struct pci_dev *dev;
>
> WARN_ON(in_interrupt());
> +
> + /*
> + * pci_get_subsys() can be called on the ide_setup() path, super-early
> + * in boot. But the down_read() will enable local interrupts, which
> + * can cause some machines to crash. So here we detect that situation
> + * and bail out early.
> + */
> + if (unlikely(list_empty(pci_devices)))
> + return NULL;
> +
> down_read(&pci_bus_sem);
> n = from ? from->global_list.next : pci_devices.next;
>
> _
>
Applied to 2.6.19 it returns error while compiling:

CC drivers/pci/search.o
drivers/pci/search.c: In function âpci_get_subsysâ:
drivers/pci/search.c:269: error: incompatible type for argument 1 of
âlist_emptyâ
make[2]: *** [drivers/pci/search.o] Error 1
make[1]: *** [drivers/pci] Error 2
make: *** [drivers] Error 2

drivers/pci/search.c
268 */
269 if (unlikely(list_empty(pci_devices)))
270 return NULL;


--
Stefano Takekawa
take@xxxxxxxxx

Frank: And why do days get longer in the summer?
Ernest: Because heat makes things expand!


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/