From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755424AbdKBKFl (ORCPT ); Thu, 2 Nov 2017 06:05:41 -0400 Received: from foss.arm.com ([217.140.101.70]:57160 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752560AbdKBKFk (ORCPT ); Thu, 2 Nov 2017 06:05:40 -0400 Subject: Re: [PATCH] arm64: write_sysreg asm illegal for aarch32 To: Mark Salyzyn , linux-kernel@vger.kernel.org Cc: Catalin Marinas , Will Deacon , Christoffer Dall , Mark Rutland , Suzuki K Poulose , Stefan Traby , Dave Martin , linux-arm-kernel@lists.infradead.org References: <20171101170014.20931-1-salyzyn@android.com> From: Marc Zyngier Organization: ARM Ltd Message-ID: Date: Thu, 2 Nov 2017 10:05:35 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171101170014.20931-1-salyzyn@android.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/11/17 16:58, Mark Salyzyn wrote: > Cross compiling to aarch32 (for vdso32) using clang correctly > identifies that (the unused) write_sysreg inline asm directive is > illegal in that architectural context: > > arch/arm64/include/asm/arch_timer.h: error: invalid input constraint 'rZ' in asm > write_sysreg(cntkctl, cntkctl_el1); > ^ > arch/arm64/include/asm/sysreg.h: note: expanded from macro 'write_sysreg' > : : "rZ" (__val)); > ^ > > GCC normally checks for correctness everywhere. But uniquely for > unused asm, will optimize out and suppress the error report. -ENOTABUG. Please fix the build system instead (why on Earth are you using arm64 headers for an Aarch32 binary?), and don't introduce stuff that is making understanding the kernel more difficult to understand and maintain. Thanks, M. -- Jazz is not dead. It just smells funny...