From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78AD0C433EF for ; Thu, 31 Mar 2022 16:30:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239966AbiCaQcS (ORCPT ); Thu, 31 Mar 2022 12:32:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233616AbiCaQcR (ORCPT ); Thu, 31 Mar 2022 12:32:17 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B768E18F21E for ; Thu, 31 Mar 2022 09:30:29 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id E1BDD80DB; Thu, 31 Mar 2022 16:28:18 +0000 (UTC) Date: Thu, 31 Mar 2022 19:30:26 +0300 From: Tony Lindgren To: Arnd Bergmann Cc: linux-omap , Linux ARM , Ard Biesheuvel Subject: Re: [PATCH] ARM: OMAP2+: Fix regression for smc calls for vmap stack Message-ID: References: <20220331144225.56553-1-tony@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org * Arnd Bergmann [220331 15:25]: > On Thu, Mar 31, 2022 at 4:42 PM Tony Lindgren wrote: > > diff --git a/arch/arm/mach-omap2/omap-secure.c b/arch/arm/mach-omap2/omap-secure.c > > --- a/arch/arm/mach-omap2/omap-secure.c > > +++ b/arch/arm/mach-omap2/omap-secure.c > > @@ -59,8 +59,8 @@ static void __init omap_optee_init_check(void) > > u32 omap_secure_dispatcher(u32 idx, u32 flag, u32 nargs, u32 arg1, u32 arg2, > > u32 arg3, u32 arg4) > > { > > + static u32 param[5]; > > u32 ret; > > - u32 param[5]; > > I think for this one, you do need to use a DEFINE_PER_CPU() to make it > work when multiple cores run into the function concurrently. This is entered > on OMAP44xx from irq_notifier() with cmd==CPU_CLUSTER_PM_ENTER > and from start_secondary(). I suspect that one can show these never happen > on more than one CPU at a time, but I have not been able to prove that > myself. Yeah makes sense. Will post v2. Regards, Tony