Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965239AbbLRWKF (ORCPT ); Fri, 18 Dec 2015 17:10:05 -0500 Received: from foss.arm.com ([217.140.101.70]:43293 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752998AbbLRWKD (ORCPT ); Fri, 18 Dec 2015 17:10:03 -0500 Subject: Re: [PATCH v4] arm64: run-time detection for aarch32 support To: Mark Rutland References: <1450454429-22976-1-git-send-email-ynorov@caviumnetworks.com> <56743C4F.7060201@arm.com> <20151218174607.GE30229@leverpostej> Cc: Yury Norov , Catalin.Marinas@arm.com, klimov.linux@gmail.com, ddaney.cavm@gmail.com, ard.biesheuvel@linaro.org, will.deacon@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: "Suzuki K. Poulose" Message-ID: <56748437.2040905@arm.com> Date: Fri, 18 Dec 2015 22:09:59 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151218174607.GE30229@leverpostej> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1280 Lines: 28 On 18/12/15 17:46, Mark Rutland wrote: > On Fri, Dec 18, 2015 at 05:03:11PM +0000, Suzuki K. Poulose wrote: >> On 18/12/15 16:00, Yury Norov wrote: >>> Kernel option COMPAT defines the ability of executing aarch32 binaries. >> As per ARM ARM, AArch32 only ID register values are unknown if AArch32 is >> not implemented. So I think we need to skip accessing the AArch32 ID registers >> everywhere (feature tracking), if the CPU doesn't supports it, to avoid >> unnecessary SANITY failures and TAINTing the kernel. > > That all sounds good to me. > > After boot-time we should also fail hotplug of a CPU that doesn't > support AArch32, if we decided at boot-time that AArch32 was supported > accross the system. That should probably be added to your early cpu > feature verification [1]. You are right. I think we could add this as system capability to arm64_feautres which would make the check automatic. Also, the compat_elf_arch() check won't have to always to read_system_reg(), something like ARM64_HAS_32BIT_EL0. Thanks Suzuki -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/