Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp703776rdb; Thu, 22 Feb 2024 17:57:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV+sVzndMepbDP2Z+FSEHYHedNrJUhvYUaBbZbVOoRJAFiJt74aXLRXolzQ2RnsEi3b8mVNI1POEa7utMtsxbpumrnVpTx7+JVCzBl70Q== X-Google-Smtp-Source: AGHT+IGsS/+Tpb9ms/DkolVxxDoIuNgiASF4Q24vH9XftFIc4rLXfZcbkojeydHbL66ZXCQp9Df7 X-Received: by 2002:a2e:9b86:0:b0:2d2:4637:643 with SMTP id z6-20020a2e9b86000000b002d246370643mr406308lji.21.1708653466976; Thu, 22 Feb 2024 17:57:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708653466; cv=pass; d=google.com; s=arc-20160816; b=Gr2ngVuIlITzgv04eMqw4vibTWBKE9TK7B/STZR8OGTgU7JlZ404Coxf18f/q3i1XZ OLp2Ts5hbtD5cYJMywuVD7PXPAbSf9ZTZtKKPhwmSRNW75B41LVDnTF9mms+0nJNLJVw UXUTSukYRKl6oHHkRSfaaWsJGVce8wUrfVWNbSBWgZrNNB0pFaBOpbqSXPW1BognYz5j W9jdRlPfViHGA8dKt1G6dFyP5BCRqQ67EhuVG0ilBMeYdSOjO/ZrrClA+PCuvqrOta5x Hv40P7T0KmuI+laQwdhVo+7pnKxzijIX30r3HT378uIqkIFmWSHHwRe+4YNB49JYc3Qb InQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:date:message-id:from :references:cc:to:subject; bh=yjTpGihR5Ldu/fJrWNNd0BTmXRRf3z0cCpsJH8Mq8yQ=; fh=f+sUZCAwMuDPS8FDlOrNurGzlOxs8Na7cALsPU/2P6g=; b=l2fE5aPB4YYslRhZhls0oVDG/G4LmRvnb1FBFAmhEl0hO4LNkaO+p52vtt4i2bWmIg JAQJ4/pj982H5gcCKR34gGArlRL2ep+rNn1FfVfhY+YtoMwuptuBK/v/K+OKSbnCgKmX E4ziRALSH2Q1l0XpzswfBgDVaNU71MsjofMQJnxdN2b9Twzxk9CTl08zwkTun6pkU5Ex +J7wx+T664ZuZbU03tH4yk58qfEa7Az4M0WhjjGFWZCdbZzI8y+yh/8JoiFbipIgNJFJ 3hsxEUk/d+t+/CFmgRTaFpL6AledjlW0+drwg1m7K5RQMH1bbhH52utrFRdeKv4+Sa2G hkmw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-77663-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77663-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id cm3-20020a0564020c8300b0056406fb6d03si37739edb.42.2024.02.22.17.57.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 17:57:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77663-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-77663-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77663-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A4A1B1F2298E for ; Fri, 23 Feb 2024 01:57:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 50207BA34; Fri, 23 Feb 2024 01:57:36 +0000 (UTC) Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DCF1B2F3A for ; Fri, 23 Feb 2024 01:57:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.32 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708653455; cv=none; b=ia83MbI2UdVX13mYdqmtyJIqA39fMpfOuDayAgbG12dEtbd6hhW6hlDHQQyiIP3SBbOd1fRtLgRmrOL0Uzg/28ECtcsBuVZLuOrreMDCa7pKsJE5ccT4OIglDqEQOkNqU5+0O/9YSdIdQuTzV5WnJvLdtshSMcoVksmR4Rl61jQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708653455; c=relaxed/simple; bh=LjEijvE2jTF8EqZALMOAkjsf18Eu+9FEUVVEXfCmV2A=; h=Subject:To:CC:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=dllKMX7yoS4ZM4d7k6thtAYJqTkYwUwTP804zTAk1Ys0c99cCqV8bHnsCm0S/O3vMAlw5RDvPHB3Bso3+YUS+awIbPsM/DUH9OOthhbYNxMPFydWr3tvd1nMdBERhmkxXx71wlRHJcZljdTOPvnXy0bPD9WsicLohjqPrSpVXUA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.163]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4TgtRW1bmjz1vv81; Fri, 23 Feb 2024 09:56:55 +0800 (CST) Received: from dggpeml500005.china.huawei.com (unknown [7.185.36.59]) by mail.maildlp.com (Postfix) with ESMTPS id 1D22218001B; Fri, 23 Feb 2024 09:57:30 +0800 (CST) Received: from [10.174.178.155] (10.174.178.155) by dggpeml500005.china.huawei.com (7.185.36.59) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 23 Feb 2024 09:57:29 +0800 Subject: Re: [PATCH] arm: flush: check if the folio is reserved for IMO addresses To: Matthew Wilcox CC: , , , , , , , , , , References: <20240222140147.1880357-1-liuyongqiang13@huawei.com> From: Yongqiang Liu Message-ID: <16b0b45c-721b-2e61-65cf-306b160d713d@huawei.com> Date: Fri, 23 Feb 2024 09:57:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml500005.china.huawei.com (7.185.36.59) ?? 2024/2/22 22:05, Matthew Wilcox ะด??: > On Thu, Feb 22, 2024 at 10:01:47PM +0800, Yongqiang Liu wrote: >> @@ -296,6 +297,9 @@ void __sync_icache_dcache(pte_t pteval) >> return; >> >> folio = page_folio(pfn_to_page(pfn)); >> + if (test_bit(PG_reserved, &folio->flags)) >> + return; > Why are you using PG_foo directly instead of the helpers? > > if (folio_test_reserved(folio)) > . Sorry, I will send v2.