From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sinmsgout03.his.huawei.com (sinmsgout03.his.huawei.com [119.8.177.38]) (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 F01E4347BDC for ; Tue, 27 Jan 2026 11:38:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=119.8.177.38 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769513898; cv=none; b=sk7L+lV0yKhMqQZ0hUuRUoxKvcs9Ipbeoq0i0AG4kqBtk3yuBXVPZ4Lb7RYVUYt0gAAim2Inrk8wSKFm76KX0+ua5oWSdyEVcIz9g6R8Kg0VRHWwwXL4hUkZlTlFzO4xMfhZ3/MzoYOAPhK0877RZu+ZZMyv1HDrfH5taPRHWNM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769513898; c=relaxed/simple; bh=9FTVMqVKgqt08AxdS1BYg9ykoQbh8BvGBEWJ44coxeA=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RDcLXEbNu2DkqNXU8+9ePaKoJ4z5EriWqRodw004j69u/93bl4a0Ah5jGQG6HxqWyi9PbFX2zKPS3TkrO+fuYcX4ctOZudIiAJY4tgCqywoQ6x17U1xa1UQ8XJUNdEgbXsRR+HiQ57yXcw9jcuhnazmk+CPATobBgJFnQejrj1I= 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; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b=KcpVPhoe; arc=none smtp.client-ip=119.8.177.38 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com header.b="KcpVPhoe" dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=M3pQH0+Xvo0atHy8WZVasR3Jkye0kkQ7vRG8byHAC/s=; b=KcpVPhoejq5YwlJtkffRxjpCGbeRESo/KtoPy4AzbHoJmyVpoW5BtpD2jNbPcMBohvyRaXfzv J+UD3r8qSSpfcbRiFvhUcy0wtZUJOxdsi/Gj0KYR8foxOYW+Mab0P3P5mJUwJgvXk5CVPRDaMRp 0NefCupA9wW1OKejGFcEZ7U= Received: from frasgout.his.huawei.com (unknown [172.18.146.32]) by sinmsgout03.his.huawei.com (SkyGuard) with ESMTPS id 4f0jXR1pR2zN0dp; Tue, 27 Jan 2026 19:16:39 +0800 (CST) Received: from mail.maildlp.com (unknown [172.18.224.150]) by frasgout.his.huawei.com (SkyGuard) with ESMTPS id 4f0jZR6nvyzHnH7h; Tue, 27 Jan 2026 19:18:23 +0800 (CST) Received: from dubpeml500005.china.huawei.com (unknown [7.214.145.207]) by mail.maildlp.com (Postfix) with ESMTPS id 61B5D40539; Tue, 27 Jan 2026 19:19:09 +0800 (CST) Received: from localhost (10.203.177.15) by dubpeml500005.china.huawei.com (7.214.145.207) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 27 Jan 2026 11:19:08 +0000 Date: Tue, 27 Jan 2026 11:19:07 +0000 From: Jonathan Cameron To: Ryan Roberts CC: Will Deacon , Ard Biesheuvel , Catalin Marinas , Mark Rutland , Linus Torvalds , Oliver Upton , Marc Zyngier , "Dev Jain" , Linu Cherian , , Subject: Re: [PATCH v2 02/13] arm64: mm: Introduce a C wrapper for by-range TLB invalidation Message-ID: <20260127111907.00004a78@huawei.com> In-Reply-To: <20260119172202.1681510-3-ryan.roberts@arm.com> References: <20260119172202.1681510-1-ryan.roberts@arm.com> <20260119172202.1681510-3-ryan.roberts@arm.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: lhrpeml500011.china.huawei.com (7.191.174.215) To dubpeml500005.china.huawei.com (7.214.145.207) On Mon, 19 Jan 2026 17:21:49 +0000 Ryan Roberts wrote: > As part of efforts to reduce our reliance on complex preprocessor macros > for TLB invalidation routines, introduce a new C wrapper for by-range > TLB invalidation which can be used instead of the __tlbi() macro and can > additionally be called from C code. > > Each specific tlbi range op is implemented as a C function and the > appropriate function pointer is passed to __tlbi_range(). Since > everything is declared inline and is statically resolvable, the compiler > will convert the indirect function call to a direct inline execution. > > Suggested-by: Linus Torvalds > Signed-off-by: Ryan Roberts It's a little awkward to have the __flush_tlb_range_op documentation 20 odd lines before the code, but I can see why you want to keep these new helpers tightly coupled with the macro in which they are used, so fair enough. Reviewed-by: Jonathan Cameron