linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Kartik <kkartik@nvidia.com>,
	arnd@arndb.de, digetx@gmail.com, frank.li@vivo.com,
	jonathanh@nvidia.com, linux-kernel@vger.kernel.org,
	linux-tegra@vger.kernel.org, pdeschrijver@nvidia.com,
	petlozup@nvidia.com, pshete@nvidia.com, robh@kernel.org,
	stefank@nvidia.com, sumitg@nvidia.com, windhl@126.com
Subject: Re: [PATCH 1/6] soc/tegra: fuse: Add tegra_acpi_init_apbmisc()
Date: Tue, 22 Aug 2023 09:52:29 +0200	[thread overview]
Message-ID: <ZORpPYYczxRN_wuI@orome> (raw)
In-Reply-To: <ZONZaZ1QaWKBCMYj@smile.fi.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1622 bytes --]

On Mon, Aug 21, 2023 at 03:32:41PM +0300, Andy Shevchenko wrote:
> On Mon, Aug 21, 2023 at 05:02:20PM +0530, Kartik wrote:
> > On Fri, 2023-08-18 at 16:21 +0300, Andy Shevchenko wrote:
> 
> ...
> 
> > >>  void tegra_init_revision(void);
> > >>  void tegra_init_apbmisc(void);
> > >> +void tegra_acpi_init_apbmisc(void);
> > >
> > >Why do you  need a separate function?
> > 
> > Function tegra_init_apbmisc() is called from tegra_init_fuse() which
> > is invoked at early init and it also has `__init` keyword. If we use
> > the same function for both ACPI/DT, then we will get init section
> > mismatches when the Tegra Fuse driver probes using ACPI.
> > 
> > We can use the same function by dropping the `init` keyword. But
> > the way we are getting the resources for device-tree and on ACPI is
> > slightly different. Hence, I kept a separate function for ACPI
> > and move the common bits to a function shared between
> > tegra_init_apbmisc() and tegra_acpi_init_apbmisc().
> 
> So, you mean that behaviour is different for ACPI and DT cases.
> Then obvious question why DT case can't be delayed to not so early
> stage to be run? This requires some explanations, more than given
> in the commit message and here.

We've done some experiments in the past to unify this and unfortunately
we can't. The reason is that some of the old 32-bit ARM code needs some
information from the APBMISC registers very early during boot (among
other things for SMP support), so delaying this doesn't work.

I agree that it would be good to put this into some comment for later
reference.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-08-22  7:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18  9:30 [PATCH 0/6] soc/tegra: fuse: Add ACPI support Kartik
2023-08-18  9:30 ` [PATCH 1/6] soc/tegra: fuse: Add tegra_acpi_init_apbmisc() Kartik
2023-08-18 13:21   ` Andy Shevchenko
2023-08-21 11:32     ` Kartik
2023-08-21 12:32       ` Andy Shevchenko
2023-08-22  7:52         ` Thierry Reding [this message]
2023-08-22  3:12   ` kernel test robot
2023-08-22  4:01   ` kernel test robot
2023-08-18  9:30 ` [PATCH 2/6] soc/tegra: fuse: Add function to register nvmem Kartik
2023-08-18 13:50   ` Andy Shevchenko
2023-08-21 11:34     ` Kartik
2023-08-18  9:30 ` [PATCH 3/6] soc/tegra: fuse: Add function to add lookups Kartik
2023-08-18 14:06   ` Andy Shevchenko
2023-08-21 11:36     ` Kartik
2023-08-18  9:30 ` [PATCH 4/6] soc/tegra: fuse: Add function to print SKU info Kartik
2023-08-22  7:55   ` Thierry Reding
2023-08-18  9:30 ` [PATCH 5/6] soc/tegra: fuse: Add ACPI support for Tegra194 and Tegra234 Kartik
2023-08-18 15:07   ` Andy Shevchenko
2023-08-21 11:38     ` Kartik
2023-08-21 12:45       ` Andy Shevchenko
2023-08-18  9:30 ` [PATCH 6/6] soc/tegra: fuse: Add support for Tegra241 Kartik
2023-08-18 15:10   ` Andy Shevchenko
2023-08-21 11:40     ` Kartik
2023-08-21 12:47       ` 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=ZORpPYYczxRN_wuI@orome \
    --to=thierry.reding@gmail.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=digetx@gmail.com \
    --cc=frank.li@vivo.com \
    --cc=jonathanh@nvidia.com \
    --cc=kkartik@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=pdeschrijver@nvidia.com \
    --cc=petlozup@nvidia.com \
    --cc=pshete@nvidia.com \
    --cc=robh@kernel.org \
    --cc=stefank@nvidia.com \
    --cc=sumitg@nvidia.com \
    --cc=windhl@126.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;
as well as URLs for NNTP newsgroup(s).