Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1270356lqa; Mon, 29 Apr 2024 03:45:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV9iACHGTFn/hj/8smxJEjvUIfp98RVFZJEp8//msf+0OSJwgsx4coFiYy1p980PXwHf3PCKlcBpLnGtFX7Y22t8bKdUodVyGNgXNCHKQ== X-Google-Smtp-Source: AGHT+IHXzoR91+MuM7QTptWN/RTny5Zl1qo2loLlMSy6+DHNVd41N0CYAm1XquNkNWneCCx21XGI X-Received: by 2002:a05:6830:e0b:b0:6ed:91e5:ebde with SMTP id do11-20020a0568300e0b00b006ed91e5ebdemr10506213otb.26.1714387538272; Mon, 29 Apr 2024 03:45:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714387538; cv=pass; d=google.com; s=arc-20160816; b=Hat5VbdLU93EuR/SmdMtk+DBUmmZnJ6z2eoNfAejY8JyW0XnELEOyqa61q9wb6MUJr bcfB0dDbC9QxfETaJCwOUUvi+sPB4KEB2RXuoONDSuJ+E4eDFjW2Svg02WmHrwLue7Md QhzZ9vGl72JG8rUkUmkhjqRMbjLTWpgre8bSbB+uqvzzmaKUZB7KLWBypHjaGUg+ZL/z o5y/JIuodpRcjHq/GLnGdAaAVBR6evDidgiZCiLec22F8S1ZPj8jj5kxXZGiTc7JJk+/ /ArIaV3giLEUG5scicnZlF8aFMrcOtpyFFkdXbIVsPN1n1RIf9sYwJ/sN5k0bL0/dKla xTmA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=6Lf/KTNGeV9HQ9Bw8oLzpkcGoRQJ7Qoem8o9ZsWDa00=; fh=9xlVfU6l1eaRMALSOTbrulKFFu6LW6R2I2OsjpORYlM=; b=PP8baO2YbwtzdBb3NJ49AAkGoJqs1uFbKS+ZnmWwhefqw5QEi/bFDwwmtBUD/xgeSU xxE0RXsq5NtQEvmfowpf6cFngiuNohUivm6dJKA8f5ue+ObvNAYKJWDbJsFmVoltHVuT c1MsNUtgT4DS68yerxGc9Zh9mFTnqQepUM33SG3WLdotXcOtgWJm9E4HWPTFrwnHlTFz 8pCVb3ONm+OdQeuN8pUIIYSiTcHYdOsfcF3wZY569iodQrJz58UpkNsK2LP/nfQOSSoi xf5x4sy6KMbXFnuwlAIkCL0oK95cqH3Q/vPpCSf6oXofnmgAtAzymhNcdgJOy5yJAEi5 FQwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@antgroup.com header.s=default header.b=WiL+qiQq; arc=pass (i=1 spf=pass spfdomain=antgroup.com dkim=pass dkdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-162069-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162069-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id h70-20020a636c49000000b005d8c1d4553bsi1338112pgc.894.2024.04.29.03.45.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 03:45:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162069-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@antgroup.com header.s=default header.b=WiL+qiQq; arc=pass (i=1 spf=pass spfdomain=antgroup.com dkim=pass dkdomain=antgroup.com dmarc=pass fromdomain=antgroup.com); spf=pass (google.com: domain of linux-kernel+bounces-162069-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162069-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6AAF2B23267 for ; Mon, 29 Apr 2024 10:37:29 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3EDB847F60; Mon, 29 Apr 2024 10:36:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="WiL+qiQq" Received: from out0-198.mail.aliyun.com (out0-198.mail.aliyun.com [140.205.0.198]) (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 CA8B14778E; Mon, 29 Apr 2024 10:36:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.205.0.198 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714386964; cv=none; b=pOnzPUDZbJ0x2XHkTljB8MwlGBNO505JEHlD2s6XPhUnVrz7FJZYHnUJOXhwzr+1lQOujHrBQDsVlfYIOU72uA7lnoyM3bsbhGaMcTNH8VmET/CfRBwkJfwqiwvgJiCAVIQYsLF/An+v7A2uaK1juXwQBdKeum2HUPbeCOnyJNM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714386964; c=relaxed/simple; bh=kik5XO6svGpEoUGKapTye8QDGY88f/SLWUpm40ED15Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XmstYwuazKCo1KpWRlRrk5X8ctjXBREH5pfr/myHHpR92YAVyEN830t0aBB16LvvKoZRZ0r6j7D5rjqo+PU5mRAKWrcuhhe3L0aTXjxp8bMVBZFiHj9sso0YJOK87zZS9u5gZmFlCIwTowx6sIt1zUvqqOZF0NY+CI2YK2OiOsI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=WiL+qiQq; arc=none smtp.client-ip=140.205.0.198 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1714386954; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=6Lf/KTNGeV9HQ9Bw8oLzpkcGoRQJ7Qoem8o9ZsWDa00=; b=WiL+qiQq5ggcx6KKouoOmmZdbRu4tyn6tVR+PSDU5+g4LD/aG7bh/F+kWEy0F1E9p8rWRXZiHBUAWW7PX579FC6dQiUgUk9xNK2yMzX3LUka9AgQPSqlKtbMXXHD0AU+0AS1Mpo/4+vlWn3JfM9lNMp2eHNxyknvhk/ymbLEbnc= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047203;MF=libang.li@antgroup.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---.XOEanKl_1714386951; Received: from localhost(mailfrom:libang.li@antgroup.com fp:SMTPD_---.XOEanKl_1714386951) by smtp.aliyun-inc.com; Mon, 29 Apr 2024 18:35:52 +0800 From: "Bang Li" To: akpm@linux-foundation.org, chenhuacai@kernel.org, tsbogend@alpha.franken.de, paul.walmsley@sifive.com, palmer@dabbelt.com, chris@zankel.net, jcmvbkbc@gmail.com Cc: , , , , , , , , , "Bang Li" Subject: [PATCH v1 1/5] LoongArch: Add update_mmu_tlb_range() Date: Mon, 29 Apr 2024 18:33:42 +0800 Message-Id: <20240429103346.59115-2-libang.li@antgroup.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20240429103346.59115-1-libang.li@antgroup.com> References: <20240429103346.59115-1-libang.li@antgroup.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Added update_mmu_tlb_range function, we can batch update tlb of an address range. Signed-off-by: Bang Li --- arch/loongarch/include/asm/pgtable.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/loongarch/include/asm/pgtable.h b/arch/loongarch/include/asm/pgtable.h index af3acdf3481a..5ccc2a3a6f7a 100644 --- a/arch/loongarch/include/asm/pgtable.h +++ b/arch/loongarch/include/asm/pgtable.h @@ -469,6 +469,8 @@ static inline void update_mmu_cache_range(struct vm_fault *vmf, #define __HAVE_ARCH_UPDATE_MMU_TLB #define update_mmu_tlb update_mmu_cache +#define update_mmu_tlb_range(vma, addr, ptep, nr) \ + update_mmu_cache_range(NULL, vma, addr, ptep, nr) static inline void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp) -- 2.19.1.6.gb485710b