Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp8870819rwi; Tue, 25 Oct 2022 11:55:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ZZqlmMWn/IaaFkbcl/pNHIRQbt7UgwPDkGhtRsVkn+dbskCfFr9GHiR/cb5X0oLEz7SOG X-Received: by 2002:a17:907:60c7:b0:78e:1cc:57de with SMTP id hv7-20020a17090760c700b0078e01cc57demr34024542ejc.33.1666724118952; Tue, 25 Oct 2022 11:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666724118; cv=none; d=google.com; s=arc-20160816; b=Nu4jDZmlG27B2qFjXooIaM4gYBoT61xozVuGhtwXYuOAVvlhxtV9ss8Fqhrtad3qdY lN45K4trw82/oBfJFYvw7t5YaCNOdQGZtT39w9VnQL3upv05HlYUvPHrDRdQelSK09qR nt9z3nsivzupD0XsNDyh5/JOCv3z7r4DpHTWELlBX4oMoYo18XhJd6jRwkS/JD6lbbr1 OaK6zMW8sG8DSRtMhC8C2mRxPdluDA+qulw8Umfp2nk+hzu0M0GwPp3ptnWt75I1zJOA +yFw8yA1Kar9vBweygEFSfqwrKEO9shyNe3dayhx0ewoWHYrekHbBX75oKtXz6jWUVQv DA6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=upBc2hvAhnFz0aypqupjVKjhXLPHHpQCKVw6zRR9ZEc=; b=MLa2jcR0G2wKTUURwgbaukcTw+kUGIy9tZ774fzbE2tMdlyVLSTvqdZFEbYCpJlT4k vBBWEw+y/6SeGtHdHTl1MQmKpN40c8nTa1rVFb8hC18o8gvApQF2ZsS3mxnb3vv38O9g B64MGIVrx/pwWLFIZ5C+yqTrct/24TwDsC06Uzp94yJpxoI9l/l9fZy7RMiMx5f7A/5p 7Z++ywqB6muPvO/Tc78FKFnuL7+LRn6hYbe5TylUY9oCPmYSnx0bkdMkeUryKDSWr3yN siQAepsekDLRt/UBfXIEx+ANWKHQyeZwsXXogBSW/1RHaevs96VGYiGqt4i9UHYZYoeF 221A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=yc8ZsK5C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e10-20020a056402088a00b0045d15503bb8si3148948edy.224.2022.10.25.11.54.53; Tue, 25 Oct 2022 11:55:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=yc8ZsK5C; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232464AbiJYS0m (ORCPT + 99 others); Tue, 25 Oct 2022 14:26:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232067AbiJYS0l (ORCPT ); Tue, 25 Oct 2022 14:26:41 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE226EAC94 for ; Tue, 25 Oct 2022 11:26:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=upBc2hvAhnFz0aypqupjVKjhXLPHHpQCKVw6zRR9ZEc=; b=yc8ZsK5Cl5C6Ud+WSnbva6aGuy 9VeR8Z4+E9ExtPkFz2JcRTqTxC5YQ0Q02MFkfPpo22uS6pcygB2+Oy7sYThoXlxWS4i2eEXHRul/v SW996uGp+eE1H/MDt3eEQXMQ8pLJH2Ih0+vV+11OwtPQWtPTfPnW4ZwyoK5pKOBodI1RjXclX9aq4 XPaUATK+xAg8YhBTKgkPcZHUqocUc3VqpCUpklar1Vz9yEfAH7EIkt2Ls3gYWRTpCBaM0Z0qyxXxc +t4XD+lQK33vHHbR2lZINZaoJc4THf1oF9ihglojwQUvATYDcw/Qk3Gng+wo0sX6HUMXkKtGmz8XU pomsxMew==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34952) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1onOdB-0004np-BL; Tue, 25 Oct 2022 19:26:30 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1onOd2-0008Iw-HX; Tue, 25 Oct 2022 19:26:20 +0100 Date: Tue, 25 Oct 2022 19:26:20 +0100 From: "Russell King (Oracle)" To: Yury Norov Cc: Linus Torvalds , Catalin Marinas , Mark Rutland , Will Deacon , linux-arm-kernel@lists.infradead.org, Linux Kernel Mailing List , Alexey Klimov , Andy Shevchenko , Andy Whitcroft , Dennis Zhou , Geert Uytterhoeven , Guenter Roeck , Kees Cook , Rasmus Villemoes Subject: Re: [PATCH 1/2] bitmap: add sanity check function for find_bit() Message-ID: References: <20221020032024.1804535-1-yury.norov@gmail.com> <20221020032024.1804535-2-yury.norov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 25, 2022 at 10:11:51AM -0700, Yury Norov wrote: > ARMv6 may or may not support unaligned access depending on SCTLR.U > bit. This is what Russell was concerned about in the other email. > As far as I understand, linux enables that feature. However, we still support ARMv5 and ARMv4, both of which _trap_ every unaligned access, which will make a findbit call with an unaligned pointer using word loads painfully expensive. This is the main reason we haven't used word loads in the findbit ops. As mentioned, I have patches that do change that (and convert the thing to use assembly macros to make updates much easier.) -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!