Received: by 10.223.185.116 with SMTP id b49csp2587184wrg; Thu, 15 Feb 2018 14:10:04 -0800 (PST) X-Google-Smtp-Source: AH8x227NSjK0BEAwaGQsc3RTobe+IjYwzgmdDnhTQdk2aOl1xUQQS6SeyQAmRUqQo5ZuMxFGn6Bv X-Received: by 2002:a17:902:2702:: with SMTP id c2-v6mr3865780plb.342.1518732604147; Thu, 15 Feb 2018 14:10:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518732604; cv=none; d=google.com; s=arc-20160816; b=CA3mIYaBwkXWE8OHFWS6uCz4d+RFSVMhH6hzRfKRlqmOOHJUA9p3yzZ3HAEcvnxemT FSRf3cH12IupEWc6hdoj0BlOXE5BnYI4idMZH6Ar/OMwuH0SOWf6tW6Hq34oTiTztT5g oovFcIV58nu+Pgri5i28N/mkjYpHUwzcyfXo7zpRHi/JO0UdB3apL9JNgotWE+o5QxNn gmrleNZTZnJiZB5Oiz69x4aVpcWIFGaONW7br6h85qxg1C5Cbygamn5L9wrFibO1Fwf4 dhV12qMDTRPI8coIYgNT8FwoZZ0DiFofFomWIWlinC291k2Jiskqo4CP/wB9wDnE3yQi bJAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Fo8oTYBm9RvshqtZw0BhIVvFqLlYOEa+mwgfHXrc1pQ=; b=FjVWfnunW11Wqx0SnbBUnfj4d/igeKFOvgbvK3VRKEMX0E31wSUqMPdATrXusYW+x7 d4rjkO+CH3jRYknLxSiHFDqwpYw/owxJ6dlZMQj5RURMOhIpvLoF0DS37x3+XF36Ww9Y 1zS8ZpWfwvJZvPBy9ZvO41OP5WK5IlhPnVRttJcXTSqqxR22cfyXNPxGZVhJQ8Adf1sT e9rWs8YSYJHg1dKnWggg8lYC4rXGIitEZU6l2jVXbS7dcWP6NPupPLUuROcGBoBnyuYc f4cDVQoBVx4P/Y58WiOICIYUtPhYHLcDAl8e51xF7NlkVbS7uGOvwQWxNe8Uevd48Dex fyKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o25si1588906pgv.520.2018.02.15.14.09.42; Thu, 15 Feb 2018 14:10:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1164236AbeBOPad (ORCPT + 99 others); Thu, 15 Feb 2018 10:30:33 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:55048 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164223AbeBOPa0 (ORCPT ); Thu, 15 Feb 2018 10:30:26 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id F0956110E; Thu, 15 Feb 2018 15:30:25 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Will Deacon , Laura Abbott , Ard Biesheuvel , Catalin Marinas , James Morse , Mark Rutland , Yury Norov Subject: [PATCH 4.14 022/195] arm64: move TASK_* definitions to Date: Thu, 15 Feb 2018 16:15:13 +0100 Message-Id: <20180215151706.863934153@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180215151705.738773577@linuxfoundation.org> References: <20180215151705.738773577@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yury Norov Commit eef94a3d09aa upstream. ILP32 series [1] introduces the dependency on for TASK_SIZE macro. Which in turn requires , and include , giving a circular dependency, because TASK_SIZE is currently located in . In other architectures, TASK_SIZE is defined in , and moving TASK_SIZE there fixes the problem. Discussion: https://patchwork.kernel.org/patch/9929107/ [1] https://github.com/norov/linux/tree/ilp32-next CC: Will Deacon CC: Laura Abbott Cc: Ard Biesheuvel Cc: Catalin Marinas Cc: James Morse Suggested-by: Mark Rutland Signed-off-by: Yury Norov Signed-off-by: Will Deacon Signed-off-by: Ard Biesheuvel Signed-off-by: Greg Kroah-Hartman --- arch/arm64/include/asm/memory.h | 15 --------------- arch/arm64/include/asm/processor.h | 21 +++++++++++++++++++++ arch/arm64/kernel/entry.S | 2 +- 3 files changed, 22 insertions(+), 16 deletions(-) --- a/arch/arm64/include/asm/memory.h +++ b/arch/arm64/include/asm/memory.h @@ -61,8 +61,6 @@ * KIMAGE_VADDR - the virtual address of the start of the kernel image * VA_BITS - the maximum number of bits for virtual addresses. * VA_START - the first kernel virtual address. - * TASK_SIZE - the maximum size of a user space task. - * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area. */ #define VA_BITS (CONFIG_ARM64_VA_BITS) #define VA_START (UL(0xffffffffffffffff) - \ @@ -77,19 +75,6 @@ #define PCI_IO_END (VMEMMAP_START - SZ_2M) #define PCI_IO_START (PCI_IO_END - PCI_IO_SIZE) #define FIXADDR_TOP (PCI_IO_START - SZ_2M) -#define TASK_SIZE_64 (UL(1) << VA_BITS) - -#ifdef CONFIG_COMPAT -#define TASK_SIZE_32 UL(0x100000000) -#define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \ - TASK_SIZE_32 : TASK_SIZE_64) -#define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \ - TASK_SIZE_32 : TASK_SIZE_64) -#else -#define TASK_SIZE TASK_SIZE_64 -#endif /* CONFIG_COMPAT */ - -#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 4)) #define KERNEL_START _text #define KERNEL_END _end --- a/arch/arm64/include/asm/processor.h +++ b/arch/arm64/include/asm/processor.h @@ -19,6 +19,10 @@ #ifndef __ASM_PROCESSOR_H #define __ASM_PROCESSOR_H +#define TASK_SIZE_64 (UL(1) << VA_BITS) + +#ifndef __ASSEMBLY__ + /* * Default implementation of macro that returns current * instruction pointer ("program counter"). @@ -37,6 +41,22 @@ #include #include +/* + * TASK_SIZE - the maximum size of a user space task. + * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area. + */ +#ifdef CONFIG_COMPAT +#define TASK_SIZE_32 UL(0x100000000) +#define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \ + TASK_SIZE_32 : TASK_SIZE_64) +#define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \ + TASK_SIZE_32 : TASK_SIZE_64) +#else +#define TASK_SIZE TASK_SIZE_64 +#endif /* CONFIG_COMPAT */ + +#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 4)) + #define STACK_TOP_MAX TASK_SIZE_64 #ifdef CONFIG_COMPAT #define AARCH32_VECTORS_BASE 0xffff0000 @@ -194,4 +214,5 @@ static inline void spin_lock_prefetch(co int cpu_enable_pan(void *__unused); int cpu_enable_cache_maint_trap(void *__unused); +#endif /* __ASSEMBLY__ */ #endif /* __ASM_PROCESSOR_H */ --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include