Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2604087rwb; Mon, 3 Oct 2022 03:20:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5EG13gkJXByh0MVtvBL/tJgJ+Tfr7sn4UBz4ImQbPG9noryBtGvInFoysmJHR8+ayeq7Je X-Received: by 2002:a17:907:97d0:b0:787:c0e9:ed0e with SMTP id js16-20020a17090797d000b00787c0e9ed0emr15073560ejc.274.1664792436242; Mon, 03 Oct 2022 03:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664792436; cv=none; d=google.com; s=arc-20160816; b=i4SSTijvIh0JUm8HGvPPRi4HjfeJXKclGpZXOqYoW3X8j4MHrB/7D3qE4B3gRuLwQv 5ykKkd9CV5qHRce+NdfqETGdn8pbdB4mexgcbeojKj1DqTV3FnRdO+ZP/RbcapLCn1uw P0arNk4uxpnGj6YELPhghKZxD5V8ruQz2SPRBvWsKcHFG1N2jPzhttV40XfKbrZb8Vaw u6EhBsOxJeph3ypaV9IfNhcpSWHchpg7Ra0D69jzV31KLNsW9xn9F+OQMVKKk02Wa5cF 6sc0v/Zoa9/1ck1kfs2La1zgurRMRH2Fm6Zba12CXsCTce1/vxqHf5PnTe7PmjJYuzYP 6T4A== 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=8/r73EhkED2B0ZzVymGoU8rA6tgf57XQ8++vs4I/XUg=; b=YCWvl0SdJxM5a/IrGbc8X9ONqH7K4GXgFdjf5e180YLegdIYd79UNoyQh0VyFLabYb d+OSoSR3RXgqgah9Jr30z/0utu2JUMlxcx1BPGvgsbjHCqJY5wxNZQFBXpgJYfL0SDGd DAEkK01248fRLOhPYONbxbbFr6VojefZUYMGg1xMOPrxcJeXo87brgn6nCOCyvwz8MFq Tjhp8b7mTaMt56Qe+eDMqxdHNxbeepBTiAwimrhOUSZ1HVYz9XkepGnMS6qNMlT+nGPT FTlx40AEDVAM6u07mHeiRn64v/eNPuDpdqzoBAoBqyuvIzzPVtNYTeWEf2iVa7bR8bvj UvjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nFLy9pPn; 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 ji16-20020a170907981000b007414dda0c62si8543589ejc.817.2022.10.03.03.20.09; Mon, 03 Oct 2022 03:20:36 -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=nFLy9pPn; 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 S230346AbiJCI2O (ORCPT + 99 others); Mon, 3 Oct 2022 04:28:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229973AbiJCI1t (ORCPT ); Mon, 3 Oct 2022 04:27:49 -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 A4AA8631C7; Mon, 3 Oct 2022 01:01:33 -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 D3C44B80E72; Mon, 3 Oct 2022 07:22:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CC47C433D6; Mon, 3 Oct 2022 07:22:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664781768; bh=cpCVBfEEkJqs7QBRYgWzX3T+LcvjhTXGSX8iyTgbex8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nFLy9pPnHUsJwzsiBHKRvPaPnNQXU9F+a37lG9phxn7eCBSPLJve5iQvPN7pcvFhV UbKOazaZFwaQ31QbFTc5hwFfQgjsOuaFfoV1KvueZapoOHsgc7oAaJaTtK8UoQ70ND q+9jOtGGJzH9/9B7poxk/ELZUof6EosLIDIcOnqs= 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 5.10 33/52] soc: sunxi: sram: Actually claim SRAM regions Date: Mon, 3 Oct 2022 09:11:40 +0200 Message-Id: <20221003070719.716633061@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221003070718.687440096@linuxfoundation.org> References: <20221003070718.687440096@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.1 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 d4c7bd59429e..5d1305483542 100644 --- a/drivers/soc/sunxi/sunxi_sram.c +++ b/drivers/soc/sunxi/sunxi_sram.c @@ -254,6 +254,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