Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751075AbcL1IN5 (ORCPT ); Wed, 28 Dec 2016 03:13:57 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:43848 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750966AbcL1INz (ORCPT ); Wed, 28 Dec 2016 03:13:55 -0500 Date: Wed, 28 Dec 2016 09:04:07 +0100 From: Thomas Petazzoni To: Guenter Roeck Cc: Catalin Marinas , Stefano Stabellini , Will Deacon , linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, Linus Torvalds , linux-arm-kernel@lists.infradead.org, Al Viro Subject: Re: [PATCH] arm64: Do not include linux/uaccess.h from assembler files Message-ID: <20161228090407.515543df@free-electrons.com> In-Reply-To: <1482748268-10399-1-git-send-email-linux@roeck-us.net> References: <1482748268-10399-1-git-send-email-linux@roeck-us.net> Organization: Free Electrons X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1700 Lines: 49 Hello, On Mon, 26 Dec 2016 02:31:08 -0800, Guenter Roeck wrote: > Including linux/uaccess.h from assembler files in arm64 builds results > in the following build errors. > > In file included from arm64/include/asm/asm-offsets.h:1:0, > from arch/arm64/include/asm/assembler.h:26, > from arch/arm64/include/asm/alternative.h:68, > from arch/arm64/kernel/entry.S > > include/linux/sched/prio.h: Assembler messages: > include/linux/sched/prio.h:47: Error: > unknown mnemonic `static' -- > `static inline long nice_to_rlimit(long nice)' > build/include/linux/sched/prio.h:48: Error: > junk at end of line, first unrecognized character is `{' > > [and many more] > > If asm/uaccess.h is not included, many of the affected files fail to build > with errors such as the following. > > arch/arm64/lib/copy_to_user.S: Assembler messages: > arch/arm64/lib/copy_to_user.S:66: Error: > unknown mnemonic `uaccess_enable_not_uao' -- > `uaccess_enable_not_uao x3,x4' > arch/arm64/lib/copy_template.S:71: Error: > unknown mnemonic `uao_user_alternative' -- > `uao_user_alternative 9998f,strb,st trb,tmp1w,dst,#1' > > Either drop the include if unnecessary or, if needed, replace with > asm/uaccess.h. > > Fixes: 7c0f6ba682b9 ("Replace with globally") > Cc: Linus Torvalds > Cc: Al Viro > Signed-off-by: Guenter Roeck Tested-by: Thomas Petazzoni (fixes the arm64 build, result boot tested on real HW) Thanks, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com