Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4876054pjb; Mon, 27 Jul 2020 07:22:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJznCJfsDp7LmeLHOBD0BnT/lVPaDiqVzefHq0pC3JjLKY6Ci/3NgfcmmTh2gHbuVlAlzUlJ X-Received: by 2002:a05:6402:31b5:: with SMTP id dj21mr1368804edb.154.1595859766649; Mon, 27 Jul 2020 07:22:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595859766; cv=none; d=google.com; s=arc-20160816; b=K3p881HEz8f5LIWKHgehWR5ghsiYHPoBImXiuzco8sbTMLnm45x8QNCKyuVpT+OfI2 NzeWo31ay1auVyguDQQfcDccdKDOhdtVdPTtNrZXCzWkUWJ/YqIpcLkkp9zIXySw3Wzx QJ5GwHQ3rew6Z904mTK5sTsR7KGKaBQnqDU2aSABWVjImtvxDACfjy8IJu8P3DNsJTWZ 0XAFlFuKBwbbAa/elWFkc6ozpcTtIQqZafFTPds42nr2fTM00ii9+PlNOwhoTI4Cc4DU tQR4PYg7HSnoXvP+OgUXhZmn8pchf5XuZQ274m5O6MM/P7yl+raiEE5CkmfW8s18VzjN 0JKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OCENUv3b2SH39qLJ5RL4jXjIOkP557XSqNo9PJAABw8=; b=X/7z2L0YO55efvAMJGME3FVq6yvU/4tRI+0LGWbEZ4Ti3UWBEvXtQM9G2CMRcroC8p 11R24Cs6SJmXk+FH5xRZMFkriEwzZhu1UQ010PYal6nLty+59UT3g/IoLc1fkO+u0PTi MGQNU3c6+YKoFprAHbPYDTpiSVYssE22oWVw1sfc29EPGlWASaO1if1+fGh9LI82hPLN l/C2cLzPcqgPfXD8UePaJdWtL7HGuLBvk0bqsT8UTjfdRfahepYJzzJoy4353aeORtvH DzMi+7B7UceT4I6GqgIlqI46VU0m5Vfqt6QpN1ZkX45g70MNtjN8fnq81O9uIXcNwUcH dB3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KksyPU0Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ss14si4679857ejb.651.2020.07.27.07.22.23; Mon, 27 Jul 2020 07:22:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KksyPU0Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731337AbgG0OTB (ORCPT + 99 others); Mon, 27 Jul 2020 10:19:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:46768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731323AbgG0OS6 (ORCPT ); Mon, 27 Jul 2020 10:18:58 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 33D5D2070A; Mon, 27 Jul 2020 14:18:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859537; bh=58KyAkNxzlfX9Tzbg4tc1CYwtIyYcUOiqkzipU7lwEI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KksyPU0QGm2qWQKYFWOXgbk+kZJ5sIg4PyH8MwiaglD1n/v3kBIs20btSUwhYXDhC 1GkdWWg4SaXnh6Zyrj1tLClacXMCAKt5VUQTUP+Bf+KNfGd/0WDACYR3G0edrdb1fs qZbonwYiVPuuxd7j/HcBPPyS3ueQrTPlvghxlZmI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthias Kaehlcke , Bjorn Andersson , Stephen Boyd , Douglas Anderson , Maulik Shah Subject: [PATCH 5.7 001/179] soc: qcom: rpmh: Dirt can only make you dirtier, not cleaner Date: Mon, 27 Jul 2020 16:02:56 +0200 Message-Id: <20200727134932.738157576@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134932.659499757@linuxfoundation.org> References: <20200727134932.659499757@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Douglas Anderson commit 35bb4b22f606c0cc8eedf567313adc18161b1af4 upstream. Adding an item into the cache should never be able to make the cache cleaner. Use "|=" rather than "=" to update the dirty flag. Reviewed-by: Matthias Kaehlcke Reviewed-by: Maulik Shah Thanks, Maulik Reviewed-by: Bjorn Andersson Fixes: bb7000677a1b ("soc: qcom: rpmh: Update dirty flag only when data changes") Reported-by: Stephen Boyd Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/20200417141531.1.Ia4b74158497213eabad7c3d474c50bfccb3f342e@changeid Signed-off-by: Bjorn Andersson Signed-off-by: Greg Kroah-Hartman --- drivers/soc/qcom/rpmh.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/soc/qcom/rpmh.c +++ b/drivers/soc/qcom/rpmh.c @@ -150,10 +150,10 @@ existing: break; } - ctrlr->dirty = (req->sleep_val != old_sleep_val || - req->wake_val != old_wake_val) && - req->sleep_val != UINT_MAX && - req->wake_val != UINT_MAX; + ctrlr->dirty |= (req->sleep_val != old_sleep_val || + req->wake_val != old_wake_val) && + req->sleep_val != UINT_MAX && + req->wake_val != UINT_MAX; unlock: spin_unlock_irqrestore(&ctrlr->cache_lock, flags);