[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOtMz3MWnmdMbw_CKxBKVt=TJpLNJuZUzpxvnDi+QnigaLozLA@mail.gmail.com>
Date: Fri, 28 Oct 2022 10:32:20 +0200
From: Jan Dąbroś <jsd@...ihalf.com>
To: Borislav Petkov <bp@...e.de>
Cc: Hans de Goede <hdegoede@...hat.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
"Limonciello, Mario" <mario.limonciello@....com>,
linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
jarkko.nikula@...ux.intel.com, wsa@...nel.org,
rrangel@...omium.org, upstream@...ihalf.com,
Muralidhara M K <muralimk@....com>,
Naveen Krishna Chatradhi <nchatrad@....com>
Subject: Re: [PATCH -next 1/2] i2c: designware: Switch from using MMIO access
to SMN access
Hi,
Sorry for a late reply. I did some research and experiments and right
now got stuck with this problem.
It's not enough for running init_amd_nbs() to have only
pci_arch_init() done. We need the pci bus to be created and registered
with all devices found on the bus. We are traversing through them and
trying to find northbridge VID/DID. Due to the above, we need to run
init_amd_nbs() only after acpi_scan_init() that is invoked from
acpi_init() which is registered as subsys_initcall. That's why the
trick with switching init_amd_nbs() to arch_initcall_sync will not
work.
So to summarize everything, I would like below order:
acpi_init() -> init_amd_nbs() -> dw_i2c_init_driver()
^--subsys_initcall ^--fs_initicall ^--subsys_initcall
but I don't have a clear idea how to achieve this in a clean way.
The only option seems to be to register init_amd_nbs() as
subsys_initcall and force it to execute after acpi_init() and before
dw_i2c_init_drvier(). However the only option (if I'm not mistaken)
for forcing order on initcalls placed on the same level is to modify
their order within Makefile, so that linker puts them in the "init"
section with addresses in desired order. This doesn't seem to be an
option for upstream.
Do you have any clue how to solve this problem?
Best Regards,
Jan
pon., 26 wrz 2022 o 16:45 Borislav Petkov <bp@...e.de> napisał(a):
>
> On Mon, Sep 26, 2022 at 02:49:12PM +0200, Jan Dąbroś wrote:
> > What do you think about this?
>
> I don't mind as long as it is tested properly so that nothing breaks
> - I can help out on my end as I have a lot of AMD hw - and then
> properly documented in a comment above it *why* it needs to be
> arch_initcall_sync().
>
> Thx.
>
> --
> Regards/Gruss,
> Boris.
>
> SUSE Software Solutions Germany GmbH
> GF: Ivo Totev, Andrew Myers, Andrew McDonald, Martje Boudien Moerman
> (HRB 36809, AG Nürnberg)
Powered by blists - more mailing lists