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 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 77D25C433EF for ; Thu, 31 Mar 2022 16:31:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ri1sR/5u0C3K3tJgY+uh7gJsGtR5s1HcJaPjYE6ezPA=; b=TkhWQz2jkaSAiy jW+Ac9DDz22adgpz2oMx/1zRNq7RAfL7dxrqLgql4cAMH5xLKv3o7fWs/ssixymiLSPno6tMwjZgs SnnXvLU2cZ1JJ1k9XRzqlAe2zRyyNt6SdiUfeCOQSyzaFxZ3Q1irOF9xucg7ZFE6mmJUhHOmhUg4Q PPHOaxIsa0IUo6W/te0BlokwWchof0ZH4ZDKiHuaT/eF8ykzA387D9BAnzb2FomaqRxvtkMDWXn5G RsI7R6MvbZHBGecOERf2WdzfxRMuQSTWQ5ZtVkwfOibUqRo7Tiwk+0d39sG9f7CjbDi2xyWKwzJXX bmzv9VeXSOI9drTpWzBw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZxgy-002yZP-Jn; Thu, 31 Mar 2022 16:30:36 +0000 Received: from muru.com ([72.249.23.125]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZxgu-002yYo-Hi for linux-arm-kernel@lists.infradead.org; Thu, 31 Mar 2022 16:30:34 +0000 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-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220331_093032_657456_CD57E8D9 X-CRM114-Status: GOOD ( 14.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel