Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6809298rwi; Mon, 24 Oct 2022 06:26:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5oozxPdOeUDc090nmU0Krgeo2brGJ+A/P5NikQRdBDi3VMFMUO4y/xcXr3+z+J5aNjPovZ X-Received: by 2002:a17:906:cc0f:b0:7a0:b91c:855f with SMTP id ml15-20020a170906cc0f00b007a0b91c855fmr10910591ejb.26.1666617974219; Mon, 24 Oct 2022 06:26:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666617974; cv=none; d=google.com; s=arc-20160816; b=lcbI93HkYiE94Es/h1e0e6MmmMWbqJja+D9kM27cps7sdv2UaBc/Faph4BhT+u7TjA MQzpQrDUtMVs2oVtEiiLrcOTPdWeECiVS9sMOzAt5rsWyFrMLUTIX6WLrhOxneBl8L3G ee/QvVRvpFnz+cthkOqsjF9806HlIhfU3RrSFvJFZa0I2412WxBi+WfctTpRZwsKn3j/ bC9HCF38aeghE6lbaRbKI9DjFgJyR/+58lA8f8L0VuKoP24P2mZAhyIiFzsuWZmBM6a7 RLOmVQ6ejLbzXcCGKrvi4yVHvHqAS3xKzd2azL7VoiFjH8TdSSX5CbV7E/x9WfBFvWN1 oTcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Mff6Wq2CHDJjuHXooZbjA5R9abR1cVLwkQ6ZvK/C0iI=; b=ZJacfrZmPjSZmuKB6GfDryor3PKuZWUyAksxm4aYBi+btLHadKkvngwgi2iSGrz+3K qeP0poyKqKUBFxvDVVU69pI295+v8uicficFuTxjGt1mewc2FrK2kMq7qP2chus9tbFO MaXycEf4duDADSIm/7WJKWavOCRPtRfOd7+1ed5BeN5TYNG6Hwv+H1hmPN0mtl8IDCmr ZRCmBRjgWsFw1PUz5hqcLRn/RiVcB2idTEH/ZTWOr9Pxi2VD5axTEC1iomxzRo992Vx4 IRLA3CWwCT8EbLntTrY5Uwu3zCnlwupb3xsgl3mk3mmR3P7PoelcxHxCrvNiq1gyT4rI kDnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=15Xvcaeg; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id di8-20020a170906730800b00777be437681si27654917ejc.984.2022.10.24.06.25.47; Mon, 24 Oct 2022 06:26:14 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=15Xvcaeg; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232276AbiJXMAV (ORCPT + 99 others); Mon, 24 Oct 2022 08:00:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230372AbiJXL62 (ORCPT ); Mon, 24 Oct 2022 07:58:28 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 286D67C1BB; Mon, 24 Oct 2022 04:47:45 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7820EB8113A; Mon, 24 Oct 2022 11:45:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE9EBC433D6; Mon, 24 Oct 2022 11:45:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666611941; bh=bv+YjerPCNsSGuoXywI9SmTXpCLVVrrMngsjwcsVIM0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=15Xvcaegzk2rwwH57XeJT3iqaqfx7qLd3rALYTmgwX3hH0F8uhhxef24vcMRoSL60 JXKML8p7POrv9szbZD5yX9rur6ejLnbuPNXZRnM6GAyD1f5KnVGoy1mXMMXh4wqbcp LCo0VS1mVbluvm3g6EZlczHdC1fXPDU4Ty2KpPgA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jernej Skrabec , Samuel Holland , Heiko Stuebner , Sasha Levin Subject: [PATCH 4.14 010/210] soc: sunxi: sram: Actually claim SRAM regions Date: Mon, 24 Oct 2022 13:28:47 +0200 Message-Id: <20221024112957.223383204@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112956.797777597@linuxfoundation.org> References: <20221024112956.797777597@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Samuel Holland [ Upstream commit fd362baad2e659ef0fb5652f023a606b248f1781 ] sunxi_sram_claim() checks the sram_desc->claimed flag before updating the register, with the intent that only one device can claim a region. However, this was ineffective because the flag was never set. Fixes: 4af34b572a85 ("drivers: soc: sunxi: Introduce SoC driver to map SRAMs") Reviewed-by: Jernej Skrabec Signed-off-by: Samuel Holland Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner Signed-off-by: Jernej Skrabec Link: https://lore.kernel.org/r/20220815041248.53268-4-samuel@sholland.org Signed-off-by: Sasha Levin --- drivers/soc/sunxi/sunxi_sram.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/soc/sunxi/sunxi_sram.c b/drivers/soc/sunxi/sunxi_sram.c index 882be5ed7e84..97bb4d8007ff 100644 --- a/drivers/soc/sunxi/sunxi_sram.c +++ b/drivers/soc/sunxi/sunxi_sram.c @@ -253,6 +253,7 @@ int sunxi_sram_claim(struct device *dev) writel(val | ((device << sram_data->offset) & mask), base + sram_data->reg); + sram_desc->claimed = true; spin_unlock(&sram_lock); return 0; -- 2.35.1