Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1479583lqh; Mon, 6 May 2024 08:52:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXGnOE9Y3cRLPSJlwrZigglIHODwGusPbQpRm5b2+8ej8JlBTeqxlDJLnpqJuTxagtdQV79CU62m9MYXxqTUAQ8SK2OYgF9Em6cR3EsmQ== X-Google-Smtp-Source: AGHT+IFgqng7jfsW0R8V7Qf8t/zCDKBC8aFNZPR10sHa5S0+cZ7pls/5Bw4dlqyoUPieFaCBrB0a X-Received: by 2002:a17:907:3d8e:b0:a59:dd9d:6da5 with SMTP id he14-20020a1709073d8e00b00a59dd9d6da5mr1413376ejc.3.1715010758546; Mon, 06 May 2024 08:52:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715010758; cv=pass; d=google.com; s=arc-20160816; b=a200VllehZJuA/0mZMO7+/kQRVYyW4yM3fxov8eciy7pwLWZOk/hmEr67h23R4Jt75 u1TUOoAVIGFFyZAPi0D3vb8EtVYynAhLQ5Pmi7NtC6rrrLer2/Kqbfnnpnj4ILXUI+Nw Hge2SY1G55sU7ieOimv2ZUtcx2/agQruCKF5Tq/vk3OsQ8YbpSmm0+y5o6nSlGx4kZwr pvDAuax1lL9S9BOLRWpiWUQ/ZTzZikMMeVa5CA2ERzc8tb59bRUS1Rj130p9L2CvR5PC BTXqArKGAj/EtH9daRaZ1gJyGtjarccMDPftkuLBaIrvJwKIkmzMsNLHFIAMQkk6+1mD jbnQ== 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=TKTzSti+PtAcGWZfYR7jaBIBKKIAPqWETl5mtmtjZos=; fh=ZaPvTvk3greVAhtlw/faBL7y/bcze5JBULOYO1tsevI=; b=umyRksFqxlM96G/dzS6Nl9u8mk5EFFuM+bo1W6E2ZQe/a4zdAXwvAd0tEo3SEQnfX0 0mNdefaAWdVXciHq4UbN9MiEBToiO2oP6uiV/mD08ADOlAZEfPV6iXMeljtZvYcKkGZU 5Sneg1ykkSHQ9mP7rh0QeYmJqJ9ypswfKIeAFM/LfplwONzrFVAaoWUxD6MYVb9u61+3 le2AsY5DIkQRTuTv8+l3awoz/nQZ/GQZghtIO+Hiqkv/BvX0zsjMcitoz1dP5avP1iMF ITHBbDhaFNkdiWG8bNJxH7HHw38n3tQdVV/24UICONGdyCsxRnpvHxmKnZZdn1PR/L/l hNBA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@antgroup.com header.s=default header.b=w+V0SPVu; 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-170099-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170099-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=antgroup.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id lz10-20020a170906fb0a00b00a599e63439asi3485011ejb.342.2024.05.06.08.52.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 08:52:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170099-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@antgroup.com header.s=default header.b=w+V0SPVu; 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-170099-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170099-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5D3621F21DA6 for ; Mon, 6 May 2024 15:52:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0565A15572D; Mon, 6 May 2024 15:52:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="w+V0SPVu" 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 D6DC9142E8A for ; Mon, 6 May 2024 15:52:11 +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=1715010735; cv=none; b=s6Bh6J8VpFQmXXspnMafUXtI2P9N/RSyL7CJG+Cs7SGdvFvKwfp+cb3qrxwKpDzEJEhwWICW0RxmzsZHzYxVAoUvp/+vg0hNm6lnEgbrYfb3+hQt/AMUqvBWowuZkaU0x+CNqjwt/0DnHQ0vY2BvyFsUbqeHORmrvSrDaKPhMWc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715010735; c=relaxed/simple; bh=IDDpkgBKjbOqR7QDCBIzGc24eoXl3y9UB7IfT/1YoPk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=C6oPC+g+tYEeygR2Ug4lWYbg/uaxbDtvebHa8BHO7t2gtaRG4D/ns/gRdxVHNJPoIftzjXbYb7f34s6I6Q+of+ZIsYFO+7YW1pFOUBwRTSQIkVSWUkgS1WqkgV30ye5QFH7HQRFKpy6a+sJmzhrwP4vg55uLIldXxy6bo5EF6P4= 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=w+V0SPVu; 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=1715010724; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=TKTzSti+PtAcGWZfYR7jaBIBKKIAPqWETl5mtmtjZos=; b=w+V0SPVuonnfJf9NVwOnfJbb/mdo+nhnNuGiA/ZfDGzieFgOjoPCCrU7rFCbEvnUd0/G+Cm1gpIQ3eiZaAt/ywabQuNnULKp/sDCJQ/LiRxRaiTNclvzxsx768bHYzpmWYxS82kSDYVaFkWcTjfxi0z2UlgvD1CJbZOdsvR+fek= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018047201;MF=libang.li@antgroup.com;NM=1;PH=DS;RN=16;SR=0;TI=SMTPD_---.XTd3ClE_1715010722; Received: from localhost(mailfrom:libang.li@antgroup.com fp:SMTPD_---.XTd3ClE_1715010722) by smtp.aliyun-inc.com; Mon, 06 May 2024 23:52:02 +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 v2 1/5] LoongArch: Add update_mmu_tlb_range() Date: Mon, 06 May 2024 23:51:16 +0800 Message-Id: <20240506155120.83105-2-libang.li@antgroup.com> X-Mailer: git-send-email 2.19.1.6.gb485710b In-Reply-To: <20240506155120.83105-1-libang.li@antgroup.com> References: <20240506155120.83105-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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/loongarch/include/asm/pgtable.h b/arch/loongarch/include/asm/pgtable.h index af3acdf3481a..924b6b031f06 100644 --- a/arch/loongarch/include/asm/pgtable.h +++ b/arch/loongarch/include/asm/pgtable.h @@ -470,6 +470,10 @@ 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 __HAVE_ARCH_UPDATE_MMU_TLB_RANGE +#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