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=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 A4EE4C433E0 for ; Wed, 3 Mar 2021 23:37:04 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 24FAF64F23 for ; Wed, 3 Mar 2021 23:37:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24FAF64F23 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Pn5DWCSRtD3WJDzFNZNOB/WTSe/j+OApoOLR0pZu4qY=; b=M+ed0murH5bNewrjejf14l7OV rrCf6oolK8wNpBNoT6no7kL7uQx3ZU7dzq0V1qTvn/EI45b9oRAxRRYgc52Rjuvusvjk+XElnnsAc LvxHRGbZuuVv4TpMAS2a0uSZfkAr5Y0g7ngOcEcDpiYWwxDaWFiu954mltWa0GtxJrBdi4g7zKEOG MzUEnlnNnBZwHlrh5UxbOfRCWMvUPo043ApOgVh36psHmy1dwiUyyyZOGu+J6tpfVGQBMZ6IJusk8 wLvgCFIsLlZpOdvtPes2xVwV4PC+wVe5FjAL+epODawDshngimMk8lMtwY+E2CKUvUjMaaMEYNxQ/ 9zwxXIWoA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHb01-006yYK-99; Wed, 03 Mar 2021 23:33:50 +0000 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHUyD-005jQw-Tw for linux-arm-kernel@lists.infradead.org; Wed, 03 Mar 2021 17:07:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614791252; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Yk5hew9EWxKSUOJsRRgQSnvH+BMlTy0ZCJsrZVtQ1Oc=; b=TfjUPRhOQCy4GP8ARrw+C6vBzqNIiU4JZDuLQhmhm37G1ueD2NsaGzP1r7SiaY6zFjZv5e KW7unntt5bXPnOw8FTZOKAyOE4aIxeSC4z+QkDEI2iZ0lzTTmLQCqzqtBmjRuHrmtBEcQy 1N9gp4dO6ALdks1Hzcd0ccdTdtvkBy0= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-569-Da7gQmKUO9GA5oBIt3aHYw-1; Wed, 03 Mar 2021 12:06:02 -0500 X-MC-Unique: Da7gQmKUO9GA5oBIt3aHYw-1 Received: by mail-wr1-f69.google.com with SMTP id e13so12988534wrg.4 for ; Wed, 03 Mar 2021 09:06:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Yk5hew9EWxKSUOJsRRgQSnvH+BMlTy0ZCJsrZVtQ1Oc=; b=d9AwCDbxpwdnlvj66oN0JTuXHegpCzPqhGkIJ9wcz73JNWS8mMeNAkoHWNZhi1jnWE Vi/KJTAzuh+z9KwrGgCfuAiJcTxxBLQJ+/a2pLETGZIbyW0T3P76X1T/sHOpEyt0omGS D5/AbgYbT51YaKtMchul3yVF2O98xMYWTSFodfNlcKBwoxFw9p8CxehG9RhYPNvBH3+x 3liqN+VgYPxzL87/KPeqQuP1MHfvGPI/V3CFeHSy/5/Z6WXAM6ENHlxn2lMo5prYlm1N S9mBmvQo/kbz8hJUWlw8IuwDjpSIKgqry3gSmh+Q2isvGKU5ormHW6W3qeofM8E73WPZ PUmg== X-Gm-Message-State: AOAM531QvPLD5WKDtIu+67NsQGOYBro13Yku0WjL22Qbqm5lDVrk0PGI d8hkVJ3O94xyVHjfW4drWEutrf3bXHJOHtm0Bl7Sy0xoLiWIOZ8NUFWEtkzVR47jiSYYILm4s9l AzRchHmH54yYMOW+Gz1BasvoBBhmc7CBhT9E= X-Received: by 2002:adf:de92:: with SMTP id w18mr27975096wrl.217.1614791161391; Wed, 03 Mar 2021 09:06:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVb38s51jSJeLfyUquwBfMh6UgqoJPoyXtTvGV66gDQkofnbwtYWw0E77rPTtrMzUBW9GCjg== X-Received: by 2002:adf:de92:: with SMTP id w18mr27975085wrl.217.1614791161210; Wed, 03 Mar 2021 09:06:01 -0800 (PST) Received: from redfedo.redhat.com ([2a01:cb14:499:3d00:cd47:f651:9d80:157a]) by smtp.gmail.com with ESMTPSA id d29sm32957827wra.51.2021.03.03.09.06.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Mar 2021 09:06:00 -0800 (PST) From: Julien Thierry To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, broonie@kernel.org, ycote@redhat.com, Julien Thierry Subject: [RFC PATCH v2 4/8] arm64: Move instruction encoder/decoder under lib/ Date: Wed, 3 Mar 2021 18:05:32 +0100 Message-Id: <20210303170536.1838032-5-jthierry@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20210303170536.1838032-1-jthierry@redhat.com> References: <20210303170536.1838032-1-jthierry@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jthierry@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 Aarch64 instruction set encoding and decoding logic can prove useful for some features/tools both part of the kernel and outside the kernel. Isolate the function dealing only with encoding/decoding instructions, with minimal dependency on kernel utilities in order to be able to reuse that code. Code was only moved, no code should have been added, removed nor modifier. Signed-off-by: Julien Thierry --- arch/arm64/kernel/Makefile | 2 +- arch/arm64/lib/Makefile | 6 +++--- arch/arm64/{kernel => lib}/insn.c | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename arch/arm64/{kernel => lib}/insn.c (100%) diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index 790af8c69338..027f06cb75ff 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile @@ -13,7 +13,7 @@ CFLAGS_REMOVE_return_address.o = $(CC_FLAGS_FTRACE) obj-y := debug-monitors.o entry.o irq.o fpsimd.o \ entry-common.o entry-fpsimd.o process.o ptrace.o \ setup.o signal.o sys.o stacktrace.o time.o traps.o \ - io.o vdso.o hyp-stub.o psci.o cpu_ops.o insn.o \ + io.o vdso.o hyp-stub.o psci.o cpu_ops.o \ return_address.o cpuinfo.o cpu_errata.o \ cpufeature.o alternative.o cacheinfo.o \ smp.o smp_spin_table.o topology.o smccc-call.o \ diff --git a/arch/arm64/lib/Makefile b/arch/arm64/lib/Makefile index d31e1169d9b8..9cd83908717d 100644 --- a/arch/arm64/lib/Makefile +++ b/arch/arm64/lib/Makefile @@ -1,9 +1,9 @@ # SPDX-License-Identifier: GPL-2.0 lib-y := clear_user.o delay.o copy_from_user.o \ copy_to_user.o copy_in_user.o copy_page.o \ - clear_page.o csum.o memchr.o memcpy.o memmove.o \ - memset.o memcmp.o strcmp.o strncmp.o strlen.o \ - strnlen.o strchr.o strrchr.o tishift.o + clear_page.o csum.o insn.o memchr.o memcpy.o \ + memmove.o memset.o memcmp.o strcmp.o strncmp.o \ + strlen.o strnlen.o strchr.o strrchr.o tishift.o ifeq ($(CONFIG_KERNEL_MODE_NEON), y) obj-$(CONFIG_XOR_BLOCKS) += xor-neon.o diff --git a/arch/arm64/kernel/insn.c b/arch/arm64/lib/insn.c similarity index 100% rename from arch/arm64/kernel/insn.c rename to arch/arm64/lib/insn.c -- 2.25.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel