From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932486AbcLZKbW (ORCPT ); Mon, 26 Dec 2016 05:31:22 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:40413 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932263AbcLZKbV (ORCPT ); Mon, 26 Dec 2016 05:31:21 -0500 From: Guenter Roeck To: Catalin Marinas Cc: Will Deacon , Stefano Stabellini , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, Guenter Roeck , Linus Torvalds , Al Viro Subject: [PATCH] arm64: Do not include linux/uaccess.h from assembler files Date: Mon, 26 Dec 2016 02:31:08 -0800 Message-Id: <1482748268-10399-1-git-send-email-linux@roeck-us.net> X-Mailer: git-send-email 2.7.4 X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/arm64/kernel/entry.S | 1 - arch/arm64/lib/clear_user.S | 2 +- arch/arm64/lib/copy_from_user.S | 2 +- arch/arm64/lib/copy_in_user.S | 2 +- arch/arm64/lib/copy_to_user.S | 2 +- arch/arm64/mm/cache.S | 2 +- arch/arm64/xen/hypercall.S | 2 +- 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index a7504f40d7ee..fb93f8c25ff0 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -31,7 +31,6 @@ #include #include #include -#include #include /* diff --git a/arch/arm64/lib/clear_user.S b/arch/arm64/lib/clear_user.S index add4a1334085..d7150e30438a 100644 --- a/arch/arm64/lib/clear_user.S +++ b/arch/arm64/lib/clear_user.S @@ -17,7 +17,7 @@ */ #include -#include +#include .text diff --git a/arch/arm64/lib/copy_from_user.S b/arch/arm64/lib/copy_from_user.S index fd6cd05593f9..cfe13396085b 100644 --- a/arch/arm64/lib/copy_from_user.S +++ b/arch/arm64/lib/copy_from_user.S @@ -17,7 +17,7 @@ #include #include -#include +#include /* * Copy from user space to a kernel buffer (alignment handled by the hardware) diff --git a/arch/arm64/lib/copy_in_user.S b/arch/arm64/lib/copy_in_user.S index d828540ded6f..718b1c4e2f85 100644 --- a/arch/arm64/lib/copy_in_user.S +++ b/arch/arm64/lib/copy_in_user.S @@ -19,7 +19,7 @@ #include #include -#include +#include /* * Copy from user space to user space (alignment handled by the hardware) diff --git a/arch/arm64/lib/copy_to_user.S b/arch/arm64/lib/copy_to_user.S index 3e6ae2663b82..e99e31c9acac 100644 --- a/arch/arm64/lib/copy_to_user.S +++ b/arch/arm64/lib/copy_to_user.S @@ -17,7 +17,7 @@ #include #include -#include +#include /* * Copy to user space from a kernel buffer (alignment handled by the hardware) diff --git a/arch/arm64/mm/cache.S b/arch/arm64/mm/cache.S index 17f422a4dc55..da9576932322 100644 --- a/arch/arm64/mm/cache.S +++ b/arch/arm64/mm/cache.S @@ -23,7 +23,7 @@ #include #include #include -#include +#include /* * flush_icache_range(start,end) diff --git a/arch/arm64/xen/hypercall.S b/arch/arm64/xen/hypercall.S index 47cf3f9d89ff..b41aff25426d 100644 --- a/arch/arm64/xen/hypercall.S +++ b/arch/arm64/xen/hypercall.S @@ -49,7 +49,7 @@ #include #include -#include +#include #include -- 2.7.4