Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp6050529rwl; Mon, 9 Jan 2023 03:39:18 -0800 (PST) X-Google-Smtp-Source: AMrXdXtCKtZtgPuIsIP47/ytac5VaRZdEAAGLgq3BQRW2bA6oFTk2hO1OCpht7P2VBFVDk8AkIUM X-Received: by 2002:a17:903:32c6:b0:189:df3c:1ba1 with SMTP id i6-20020a17090332c600b00189df3c1ba1mr89216490plr.38.1673264357977; Mon, 09 Jan 2023 03:39:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673264357; cv=none; d=google.com; s=arc-20160816; b=w0T5Rp43H5BsOoXzhM4aXyJAIUzSVFJXFBnAF0bt5ifJ4zCGGgCb8B7dqE2jCijXu0 vOxKM0xmlX8p7FOUkkVeIn4yPVwpDr4o2eJGAMVIwLLDHZxCPUH7GzFyoKh/qkRqWrAr mGL++13Lbtvbp+zisT89jY4DUdTGrquy8upvzcmIgDrd5Uq8wtaZ6ftUyILbyj2dMVaA v0NVL078GBzQQH6aZGGEOIaM9vtE5y2t9VxpwEPImj36ZJ5e5eqeZPlnG46cyfYJoQos 7mNK14qkQdx5N8OnkD3tvPtN4bSPEkGzwhgGlWTrZfwcGfwmsKOEKzB5gQgHUr6byWR9 7cgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WvxdxW8ZHXLmCsU9EpE35YDlNZMGPm5wJIQfY7TWylQ=; b=zfKz+UW8mm9Mowv0xcckJp2zWbhULiOExfaXL98nI2eB3Yq6TPZWBdcSmJ26tmPIi+ mLkxfkvgVgB9lb9I05dAD/sg3+KKFlirL9IOvb/InKmAvcCUGexMV005RF9h+hcQQIhi oouW2r65gK4MxYDk9X3bhs3W8agjdgzUG47JDgDzqD5ynNjRPZRkvCcTV4L8eU1Le5G2 /TbweDzdDrbKKjat5gNURGqIUKqHbBsqFK4sSGz1RGyc5Cb2h9Lvq3Qsr2aIW3goCzEj fNAHr9MGRFv9fhXRZTIhl8Aar/42gNGsVKyeRMkmqT8HkBpo8WfLxlk4FBLyAc+W7dY4 yQgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=lQCc6DDu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u1-20020a170902e5c100b00189b279b8d3si9882898plf.45.2023.01.09.03.39.11; Mon, 09 Jan 2023 03:39:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=lQCc6DDu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233978AbjAILM1 (ORCPT + 53 others); Mon, 9 Jan 2023 06:12:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229689AbjAILMZ (ORCPT ); Mon, 9 Jan 2023 06:12:25 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5ACED1402E; Mon, 9 Jan 2023 03:12:24 -0800 (PST) Received: from zn.tnic (p5de8e9fe.dip0.t-ipconnect.de [93.232.233.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 9E0F91EC0589; Mon, 9 Jan 2023 12:12:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1673262742; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WvxdxW8ZHXLmCsU9EpE35YDlNZMGPm5wJIQfY7TWylQ=; b=lQCc6DDuUeoK44s+MIuuSls73wzOiBPbV9sWfB1M/tDY3xo+TA9dziLTnfy82wY5fyA4+u tH2rwrDYfEwvz/5JjDb/jJNaDWVKvlS4YaVPWYMvhXZF16Yh0NiU0Y81ONdQyaMLjTWc+3 fAhEYwnIPe+w3kJkRwvDgo0A580VguQ= Date: Mon, 9 Jan 2023 12:12:15 +0100 From: Borislav Petkov To: Jan =?utf-8?B?RMSFYnJvxZs=?= , "Limonciello, Mario" Cc: Borislav Petkov , Hans de Goede , Andy Shevchenko , 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 , Naveen Krishna Chatradhi , Yazen Ghannam Subject: Re: [PATCH -next 1/2] i2c: designware: Switch from using MMIO access to SMN access Message-ID: References: <60a52348-7d50-1056-a596-e154f87c99d2@amd.com> <33d5cc27-474b-fdec-a6b0-84ac16f7d386@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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