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 558B2C2B9F8 for ; Tue, 25 May 2021 11:20:45 +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 0D6166141C for ; Tue, 25 May 2021 11:20:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D6166141C 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=eacurmi23+3x8sjJ/RB/+18V2czuotbE7UuSDk54k58=; b=o3o3qWFzWpHXCO gcEuCft3vlrdfzK56NSTL0Geb/spSshFoonC318sMtZMvwbBKzAahsZRppfiED9JNoJ6TOJnjwxOt 4BOGdeMWThUgftsDbVMlqEXlOJejPpo2wauIG5iWZBvjyfRAnzkHitzLJnN+Lwc7SDJbA920slFhS SaQeH3tMnxm7/o3WV7loQ2dVe+LGwF1Hr5KewC/8j1PDr71mR6EpHAMj6az/ikQlY1tLjRArGm1R5 t1FJepyA2iImAOUuVya3en7Ux58VOK6br3fYA9UhKnO5S6CzVPEBFnb/l0IOgjRb4mo2eSMKWpiHd fARZWkGyteIXRe05V9+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1llV51-004iQ0-Ac; Tue, 25 May 2021 11:18:35 +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 1llV4x-004iOh-02 for linux-arm-kernel@lists.infradead.org; Tue, 25 May 2021 11:18:32 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 111EE6140B; Tue, 25 May 2021 11:18:28 +0000 (UTC) Date: Tue, 25 May 2021 12:18:26 +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 v3 06/18] arm64: Do not enable uaccess for invalidate_icache_range Message-ID: <20210525111826.GF15564@arm.com> References: <20210520124406.2731873-1-tabba@google.com> <20210520124406.2731873-7-tabba@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210520124406.2731873-7-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_041831_647365_B88EF77F X-CRM114-Status: GOOD ( 11.38 ) 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 Thu, May 20, 2021 at 01:43:54PM +0100, Fuad Tabba wrote: > invalidate_icache_range() works on the kernel linear map, 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/ > 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