Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3022642rwb; Thu, 29 Sep 2022 19:35:33 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4+ZbtfSRC+VH/eErt3BiiF6X2D9oqXDmmPnQ/Qatrn2tlmYLgNBOZFHzyv1Fi5gHRG7zW8 X-Received: by 2002:a17:906:854b:b0:782:4c6f:5ff6 with SMTP id h11-20020a170906854b00b007824c6f5ff6mr4777320ejy.603.1664505333542; Thu, 29 Sep 2022 19:35:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664505333; cv=none; d=google.com; s=arc-20160816; b=MVJLuZBHw18gtH5wIPMFtx4qiX5qYiCpHSW11dZWREKhf68azimtUxAnMr+2Co4dMP UZ89Ul8zTQlWxsE6EK/prUAJsqWNhXYRkHDjKRJiywt5/BdaUfL7VkA2bvYz+IM9ak40 gLwb4wX73m6RSQjoOHda55Evh8LsxI9w1hYnQ0nsFAOW1Bf0Qec2O+vAhTqze6EFQbgE 3PVG4+MIiCJOF2mXSitAjI1HyXtjSbdO34LihbrFqOfxKcTzEwI7AVF8KZRtEBisUXb7 /H5GwcMOEdR0H8nqBL9m4yl/UQTLtqdLFRmRPPT/3WmoCvf6gL8FdzpC6O2e+aFS/Gag BUxg== 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 :message-id:date:subject:cc:to:from; bh=12ylb9l7CsiaH0CCmdX9JhdZoKc7jK4nYoGuFEiM178=; b=i61uBqzJUrtCOB20Vp/gz3QoEI63pjL8YIPBS7zNxisIQbATa6THQZpD5U9GgCUFEe tDoEqqjmryUdwagpnAIf+dIuVTL+nvjxyLwkykQtG9f6Kmldt4sG+oT19lAMyrLqEEc6 AORwn5YSalfiDeAo13G6pOtT1KKJgUr+s+csXWLArGmRuOPBc73IWj2/wuxEdp4B+Pvh Dfsl8JHszw8hbQEKOl3lbu7/13HMfY8F1GYHowiH5VcI+LJKAqqVstklZSifTXFyifax Nl+qpAi+OEEMIFtYhmXcOw8FlGFE1bqmAFwNFvVBoBuBv96QjPONjea96m1qriLRyKlA mOWA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i2-20020a508702000000b004575571fbc6si1105242edb.321.2022.09.29.19.35.08; Thu, 29 Sep 2022 19:35:33 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbiI3CYv (ORCPT + 99 others); Thu, 29 Sep 2022 22:24:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229696AbiI3CYr (ORCPT ); Thu, 29 Sep 2022 22:24:47 -0400 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E585D20184 for ; Thu, 29 Sep 2022 19:24:42 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R841e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046051;MF=xhao@linux.alibaba.com;NM=1;PH=DS;RN=13;SR=0;TI=SMTPD_---0VR.tpaw_1664504677; Received: from localhost.localdomain(mailfrom:xhao@linux.alibaba.com fp:SMTPD_---0VR.tpaw_1664504677) by smtp.aliyun-inc.com; Fri, 30 Sep 2022 10:24:39 +0800 From: Xin Hao To: namit@vmware.com Cc: rdunlap@infradead.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, peterz@infradead.org, hpa@zytor.com, jroedel@suse.de, xhao@linux.alibaba.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v3] x86/mm/tlb: update some comments in pte_flags_need_flush Date: Fri, 30 Sep 2022 10:24:34 +0800 Message-Id: <20220930022434.51850-1-xhao@linux.alibaba.com> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL 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 There just changed the comment about 'flush_on_clear' check, which make the explanation more reasonable. Suggested-by: Nadav Amit Suggested-by: Randy Dunlap Signed-off-by: Xin Hao --- Changes from v2 (https://lore.kernel.org/lkml/20220929091040.45390-1-xhao@linux.alibaba.com/) - fix some comments suggested-by Nadav Amit and Randy Dunlap arch/x86/include/asm/tlbflush.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h index cda3118f3b27..2a17698fb194 100644 --- a/arch/x86/include/asm/tlbflush.h +++ b/arch/x86/include/asm/tlbflush.h @@ -291,8 +291,8 @@ static inline bool pte_flags_need_flush(unsigned long oldflags, diff &= ~_PAGE_ACCESSED; /* - * Did any of the 'flush_on_clear' flags was clleared set from between - * 'oldflags' and 'newflags'? + * Consider the 'flush_on_clear' flags that are set on 'oldflags', + * Flush if any of these flags is cleared on 'newflags'. */ if (diff & oldflags & flush_on_clear) return true; -- 2.31.0