public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: "Jan Dąbroś" <jsd@semihalf.com>,
	"Limonciello, Mario" <mario.limonciello@amd.com>
Cc: Borislav Petkov <bp@suse.de>, Hans de Goede <hdegoede@redhat.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
	jarkko.nikula@linux.intel.com, wsa@kernel.org,
	rrangel@chromium.org, upstream@semihalf.com,
	Muralidhara M K <muralimk@amd.com>,
	Naveen Krishna Chatradhi <nchatrad@amd.com>,
	Yazen Ghannam <yazen.ghannam@amd.com>
Subject: Re: [PATCH -next 1/2] i2c: designware: Switch from using MMIO access to SMN access
Date: Mon, 9 Jan 2023 12:12:15 +0100	[thread overview]
Message-ID: <Y7v2j92Ol6dL3FLE@zn.tnic> (raw)
In-Reply-To: <CAOtMz3MWnmdMbw_CKxBKVt=TJpLNJuZUzpxvnDi+QnigaLozLA@mail.gmail.com>

Another forgotten thread... ;-\

+ Yazen.

On Fri, Oct 28, 2022 at 10:32:20AM +0200, Jan Dąbroś wrote:
> 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?

Make init_amd_nbs() arch_initcall_sync() so that it executes after PCI init.

By the time subsys_initcalls come, they'll have all the facilities they need,
prepared for them...

Along with big fat comment why.

Btw, note to myself as I keep wondering about it each time: the sync calls come
after the regular ones, in link order if you look at preprocessed linker script
arch/x86/kernel/vmlinux.lds:

__initcall_start = .;
 KEEP(*(.initcallearly.init)) __initcall0_start = .;
 KEEP(*(.initcall0.init)) KEEP(*(.initcall0s.init)) __initcall1_start = .;
 KEEP(*(.initcall1.init)) KEEP(*(.initcall1s.init)) __initcall2_start = .;
 KEEP(*(.initcall2.init)) KEEP(*(.initcall2s.init)) __initcall3_start = .;
 KEEP(*(.initcall3.init)) KEEP(*(.initcall3s.init)) __initcall4_start = .;
 KEEP(*(.initcall4.init)) KEEP(*(.initcall4s.init)) __initcall5_start = .;
 KEEP(*(.initcall5.init)) KEEP(*(.initcall5s.init)) __initcallrootfs_start = .;
 KEEP(*(.initcallrootfs.init)) KEEP(*(.initcallrootfss.init)) __initcall6_start = .;
 KEEP(*(.initcall6.init)) KEEP(*(.initcall6s.init)) __initcall7_start = .;
 KEEP(*(.initcall7.init)) KEEP(*(.initcall7s.init)) __initcall_end = .;

Mario, is that something that would work for what you wanna do too?

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  reply	other threads:[~2023-01-09 11:12 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16 13:18 [PATCH -next 0/2] Add i2c arbitration support for new SoCs Jan Dabros
2022-09-16 13:18 ` [PATCH -next 1/2] i2c: designware: Switch from using MMIO access to SMN access Jan Dabros
2022-09-16 17:38   ` Limonciello, Mario
2022-09-20 16:24     ` Jan Dąbroś
2022-09-21 20:12       ` Borislav Petkov
2022-09-21 20:19         ` Limonciello, Mario
2022-09-21 20:50           ` Borislav Petkov
2022-09-22  9:49             ` Andy Shevchenko
2022-09-22  9:51               ` Andy Shevchenko
2022-09-22 13:48                 ` Hans de Goede
2022-09-22 14:04                   ` Borislav Petkov
2022-09-22 14:29                     ` Hans de Goede
2022-09-26 12:49                       ` Jan Dąbroś
2022-09-26 14:44                         ` Borislav Petkov
2022-10-28  8:32                           ` Jan Dąbroś
2023-01-09 11:12                             ` Borislav Petkov [this message]
2023-01-09 17:10                               ` Limonciello, Mario
2023-01-16 10:19                               ` Jan Dąbroś
2023-01-16 12:38                                 ` Andy Shevchenko
2023-01-16 16:22                                   ` Limonciello, Mario
2023-01-16 17:48                                     ` Andy Shevchenko
2023-01-16 17:54                                       ` Andy Shevchenko
2023-01-16 21:59                                 ` Borislav Petkov
2022-09-19 13:59   ` Andy Shevchenko
2022-09-20 16:27     ` Jan Dąbroś
2022-09-16 13:18 ` [PATCH -next 2/2] i2c: designware: Add support for new SoCs in AMDPSP driver Jan Dabros
2022-09-19 13:59   ` Andy Shevchenko
2023-03-17 19:18   ` Mark Hasemeyer
2023-03-20  0:16     ` Mario Limonciello
2022-09-19 13:59 ` [PATCH -next 0/2] Add i2c arbitration support for new SoCs Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y7v2j92Ol6dL3FLE@zn.tnic \
    --to=bp@alien8.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bp@suse.de \
    --cc=hdegoede@redhat.com \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jsd@semihalf.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=muralimk@amd.com \
    --cc=nchatrad@amd.com \
    --cc=rrangel@chromium.org \
    --cc=upstream@semihalf.com \
    --cc=wsa@kernel.org \
    --cc=yazen.ghannam@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox