Re: [patch 5/3] fastboot: sync the async execution before late_initcall and move level 6s (sync) first

Rene Herman
2008-07-29T20:58:17Z

On 20-07-08 18:00, Arjan van de Ven wrote:

> From: Arjan van de Ven <arjan@linux.intel.com>
> Subject: [PATCH] fastboot: sync the async execution before late_initcall and move level 6s (sync) first

> Second, this patch makes sure that level 6s (sync) happens before the async code starts,
> and puts a user in driver/pci in this category that needs to happen before device init.

[ ... ]

> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
> index 44a46c9..d75295d 100644
> --- a/drivers/pci/pci.c
> +++ b/drivers/pci/pci.c
> @@ -1889,7 +1889,7 @@ static int __devinit pci_setup(char *str)
> }
> early_param("pci", pci_setup);
>
> -device_initcall(pci_init);
> +device_initcall_sync(pci_init);
>
> EXPORT_SYMBOL(pci_reenable_device);
> EXPORT_SYMBOL(pci_enable_device_io);
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index 39c1afc..514dbdf 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -372,11 +372,12 @@
> *(.initcall5.init) \
> *(.initcall5s.init) \
> *(.initcallrootfs.init) \
> + *(.initcall6s.init) \
> __async_initcall_start = .; \
> *(.initcall6a.init) \
> __async_initcall_end = .; \
> *(.initcall6.init) \
> - *(.initcall6s.init) \
> + __device_initcall_end = .; \
> *(.initcall7.init) \
> *(.initcall7s.init)

Isn't this a bit confusing? All the other sync levels are directly after
their respective levels. I can see why you want another level now, but
shouldn't that mean late_initcall now wants to be 8, device_initcall 7
and your new 6s just 6 (device_core_initcall or something...)?

Rene.