From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 869ACC2B9F8 for ; Tue, 25 May 2021 11:22:46 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4B1826141B for ; Tue, 25 May 2021 11:22:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B1826141B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sOtdu63XA+MME5Yb7oTmHFC3nB0ji0Fah0hpg+FnIpQ=; b=zxcu0GZiFzR8Fz x/F/p1RR8s7LEOtXXYf3mdkbElAOJnjTgnqwW9c7U9uAj5UsQ5MT6wIz4ZDlE5K21TMx5zM4u0W8/ NI4Cs6FVUSk6cGwyZNCtyK4adDY8g7LsF9DscPicSW5dNy9/ue4qWkECMgnKHhX9MkEES/pC1ocDR d/TancL8umSB2LzNBcP6fyKfH9T1sLbyCp0GeWjUnTzZuArP0xCr/awGUtlZezEc4apIWxDlSuSJv nbu0kut15+MiowEbRGMuw/YIvWnnRtezn7goVB7ULiiZS70ZNjwe2cBPUP2g7FyBHlnWTxMj4lXf0 j3WRvwuyK238sN3c7GVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1llV7m-004jID-SZ; Tue, 25 May 2021 11:21:27 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1llV7j-004jGu-26 for linux-arm-kernel@lists.infradead.org; Tue, 25 May 2021 11:21:24 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 249A56140B; Tue, 25 May 2021 11:21:21 +0000 (UTC) Date: Tue, 25 May 2021 12:21:18 +0100 From: Catalin Marinas To: Fuad Tabba Cc: linux-arm-kernel@lists.infradead.org, will@kernel.org, mark.rutland@arm.com, maz@kernel.org, ardb@kernel.org, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, robin.murphy@arm.com Subject: Re: [PATCH v4 05/18] arm64: Do not enable uaccess for invalidate_icache_range Message-ID: <20210525112118.GI15564@arm.com> References: <20210524083001.2586635-1-tabba@google.com> <20210524083001.2586635-6-tabba@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210524083001.2586635-6-tabba@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210525_042123_147369_522A1D00 X-CRM114-Status: GOOD ( 11.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, May 24, 2021 at 09:29:48AM +0100, Fuad Tabba wrote: > invalidate_icache_range() works on kernel addresses, and doesn't > need uaccess. Remove the code that toggles uaccess_ttbr0_enable, > as well as the code that emits an entry into the exception table > (via the macro invalidate_icache_by_line). > > Changes return type of invalidate_icache_range() from int (which > used to indicate a fault) to void, since it doesn't need uaccess > and won't fault. Note that return value was never checked by any > of the callers. > > No functional change intended. > Possible performance impact due to the reduced number of > instructions. > > Reported-by: Catalin Marinas > Reported-by: Will Deacon > Link: https://lore.kernel.org/linux-arch/20200511110014.lb9PEahJ4hVOYrbwIb_qUHXyNy9KQzNFdb_I3YlzY6A@z/ > Acked-by: Mark Rutland > Signed-off-by: Fuad Tabba Acked-by: Catalin Marinas _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel