From: Joerg Roedel <joro@8bytes.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Arnd Bergmann <arnd@arndb.de>,
Mostafa Saleh <smostafa@google.com>,
Jason Gunthorpe <jgg@ziepe.ca>,
Lu Baolu <baolu.lu@linux.intel.com>,
Rob Clark <robdclark@chromium.org>,
Kunkun Jiang <jiangkunkun@huawei.com>,
Ashish Mhetre <amhetre@nvidia.com>,
Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>,
linux-arm-kernel@lists.infradead.org, iommu@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v2] iommu/io-pgtable-arm: dynamically allocate selftest device struct
Date: Mon, 28 Apr 2025 13:21:36 +0200 [thread overview]
Message-ID: <aA9kwHff-88QVkLa@8bytes.org> (raw)
In-Reply-To: <20250423164826.2931382-1-arnd@kernel.org>
On Wed, Apr 23, 2025 at 06:48:16PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> In general a 'struct device' is way too large to be put on the kernel
> stack. Apparently something just caused it to grow a slightly larger,
> which pushed the arm_lpae_do_selftests() function over the warning
> limit in some configurations:
>
> drivers/iommu/io-pgtable-arm.c:1423:19: error: stack frame size (1032) exceeds limit (1024) in 'arm_lpae_do_selftests' [-Werror,-Wframe-larger-than]
> 1423 | static int __init arm_lpae_do_selftests(void)
> | ^
>
> Change the function to use a dynamically allocated faux_device
> instead of the on-stack device structure.
>
> Fixes: ca25ec247aad ("iommu/io-pgtable-arm: Remove iommu_dev==NULL special case")
> Link: https://lore.kernel.org/all/ab75a444-22a1-47f5-b3c0-253660395b5a@arm.com/
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2: use faux device instead of platform_device, as Robin suggested.
> The faux device is more appropriate here since the is no actual physical
> device, though on the other hand the v1 patch had the advantage of not
> actually needing to register the device.
> ---
> drivers/iommu/io-pgtable-arm.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
Applied, thanks.
prev parent reply other threads:[~2025-04-28 11:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 16:48 [PATCH] [v2] iommu/io-pgtable-arm: dynamically allocate selftest device struct Arnd Bergmann
2025-04-23 17:02 ` Robin Murphy
2025-04-28 11:21 ` Joerg Roedel [this message]
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=aA9kwHff-88QVkLa@8bytes.org \
--to=joro@8bytes.org \
--cc=amhetre@nvidia.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=baolu.lu@linux.intel.com \
--cc=iommu@lists.linux.dev \
--cc=jgg@ziepe.ca \
--cc=jiangkunkun@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@chromium.org \
--cc=robin.murphy@arm.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=smostafa@google.com \
--cc=will@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.