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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 44BB2C433F5 for ; Tue, 15 Feb 2022 16:07:36 +0000 (UTC) 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=TlJAQL2roY/emSTnvRgjPvRRnx5CX/eMs9you8NpwOU=; b=Uw1bxOUwBrmF41 5cloRl0b6iF9Qhx8CJe1hHY8jvKNAvBWO8OzZ13G3tgqc2h+1Olp4XYxHxgSuI1o/RH4R0BW6FDd8 8a+658M+sMHybK3l4ce8LcxyHxDswXit9Gx0RTitYmYRXnq9UAcY4Gz4QVLyE4lDRlzrVkfhdlJq8 /vbf2phgrvf1E06To0c7CSBrcJvUEOgnbPC76B8za/qHAaO3TeibBBRTJFAnjR/uOqk+QufVtwQYy 2uOMUnwC6oUzMxQFGfGFnd4Hy4sBHjhQ+1XsXmN5BQY4ftTtzp+FnwVJVbzVowD3ThGYYc4vMNyWy ZnMHPg9P0mS7TIO67rjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nK0L7-003Yg7-AC; Tue, 15 Feb 2022 16:06:05 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nK0Au-003Tkx-O3 for linux-arm-kernel@lists.infradead.org; Tue, 15 Feb 2022 15:55:37 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DA1B5615CE; Tue, 15 Feb 2022 15:55:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D4217C340EB; Tue, 15 Feb 2022 15:55:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644940531; bh=rEdVOFjT0HGlA49OJzxvyOmRa3ihSj4oeYEMdHqLxc8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Qg6cloOC/+1rNioOAJcELqOC8XKIn5npABZa1zYSYyoOgg2wTaokmGEXkddRSpH0D YwEBvJzVUB/eq1+t9aq+JLmmbHcH/RXV/vk3L7elbn499vmsz6JBPYjXLZlr7SibBs 5NJ4K/xy0ZJrQoVIK5oHBJBFtYKfnP9J2TC3RmwpuOpbyLQLg6Sk5D0Ay1MaG05YgW yXc6MllPoPnualGKXMhWJh3EfsMt3ogp98180yGRYCQ1RnpidxWVXv+LMecJzq0Wt8 gTeaTzqc1A10VInzBjW2nFX8tZRnMcxN5K5HKr500ybqTAjCPy7I3eKqc0JMP47XFp 7f7VX9hVzTOWw== Date: Tue, 15 Feb 2022 15:55:26 +0000 From: Will Deacon To: James Morse Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, Catalin Marinas , Marc Zyngier , Shuah Khan , Mark Brown Subject: Re: [PATCH 2/3] arm64: insn: Add tests for aarch64_insn_gen_logical_immediate() Message-ID: <20220215155525.GA8117@willie-the-truck> References: <20220127162127.2391947-1-james.morse@arm.com> <20220127162127.2391947-3-james.morse@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220127162127.2391947-3-james.morse@arm.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-20220215_075532_857662_AE785303 X-CRM114-Status: GOOD ( 15.67 ) 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, Jan 27, 2022 at 04:21:26PM +0000, James Morse wrote: > Aarch64 has instructions to generate reasonably complicated 32 or 64 > bit masks from only 13 bits of information. > aarch64_insn_gen_logical_immediate() has to created the immediate > encoding by spotting the patterns in the 32 or 64 bit immediate. > > Despite attempts to validate or model this code, or use it as-is outside > the kernel tree, bugs still exist. > > Add a self test module that tests this code in place against a golden > set of values. > > Signed-off-by: James Morse > --- > arch/arm64/Kconfig.debug | 3 + > arch/arm64/Makefile | 2 + > arch/arm64/lib/Makefile | 2 + > arch/arm64/lib/insn.c | 3 + > arch/arm64/lib/test_insn.c | 90 ++++++++++++++++++++++ Can we put the new tests under tools/testing/selftests/arm64 as well, please? It looks like there's precedence for having modules in there (e.g. bpf_testmod.c). In the meantime, I'll pick up patch 3. Cheers, Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel