Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4890155pjb; Mon, 27 Jul 2020 07:41:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQihwDHmXk+dpcwUyNw5SGy8jsiJR1pE1Lgv20bIAArAF7qRJIQXy7y7Im4tXUsvvTCC1g X-Received: by 2002:a17:906:3acd:: with SMTP id z13mr21666318ejd.69.1595860918748; Mon, 27 Jul 2020 07:41:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595860918; cv=none; d=google.com; s=arc-20160816; b=Tc7n0MsIkGWCS6Pplibh7DgrUgCVCi097y1oPkfD5WsfzWfkIocICy/yQkZoPuYe+L q3xsSYyy13PGKD9hp7scVITft9fwFHJr7vAprI+n43NxvrE7xaWUAGezZFIrYymSapoL HISmCw42U4zJ+jASXFb7AIUzZalC6wlIPvMvE5D4lb7eD1eQhbfypz5+fU0YvFgOlDPm ARJKf/MqE04mWd8b4IYLIN0bIWjg6pEfRvIR76c7Ljr39Cd80kgo8EU/kQCO7xky3LYy m9k8EgXPmF0tAIFffi73CJDlvZeq9VXYJRQ/8BILAXtEmgN2ritoJAvbq51CvfZYQZv/ 6BhQ== 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=fnBYL6VIUfuNFYvG0bYesuY6oarhZHxJr9+8fdVozl3QqjA1/f7Tr0yZZ5I7Eszl+v rhcD5kc0oj4lwKLrO32nZ3cWTFUXrtZb78/khaPOQWYgr4e6QeAfAxGURRpXaTR5rWq/ XLUH55xpZUfq1L1PfbXyxBsgDaMu+KHMHEFRscswd1H0K99a7glBpCfwg88dZhOZnTsm 55egLSOMKvWgdCeOYwtGlavjkIaFsA2CtON2boHdjcRE3kluL5V/kQSjLaLTo+71tUp/ +Nyiha2cL3K2yjTMdHfqxdG1L7ci6z/lXtl6p+h5rqHTYOx5s4v89VAnqb/XKilk7wy3 mbkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=sbaqLnG3; 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 e21si2343058ejx.379.2020.07.27.07.41.36; Mon, 27 Jul 2020 07:41:58 -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=sbaqLnG3; 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 S1729547AbgG0OJM (ORCPT + 99 others); Mon, 27 Jul 2020 10:09:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:59096 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728852AbgG0OJL (ORCPT ); Mon, 27 Jul 2020 10:09:11 -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 5F9FB2073E; Mon, 27 Jul 2020 14:09:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595858950; bh=58KyAkNxzlfX9Tzbg4tc1CYwtIyYcUOiqkzipU7lwEI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sbaqLnG3vAa6l+CiMnc0TfaHNGL6q7ydqZT5zOGy0vE+UEvCs5/QyAdBFOtEwMbkL TiBukCt8c7t2JiuFnJTkAxiho5tvQT7E5iVU7E/s4tVzBojLfbw0Sb2EFObiU30OvD xDmZIqiECnoScCvI4/n+tZuOUTNah+9UrA9lcKk0= 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 4.19 01/86] soc: qcom: rpmh: Dirt can only make you dirtier, not cleaner Date: Mon, 27 Jul 2020 16:03:35 +0200 Message-Id: <20200727134914.387358933@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134914.312934924@linuxfoundation.org> References: <20200727134914.312934924@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);