Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3224259ybt; Mon, 22 Jun 2020 19:01:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaMyUtLkMEwhaQtLhOY+FrFud2l2AVDcnqnzosmSmOSIYFX1neODclI5xq6eJi0WGuY5Lx X-Received: by 2002:a05:6402:cbc:: with SMTP id cn28mr20197253edb.220.1592877668983; Mon, 22 Jun 2020 19:01:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592877668; cv=none; d=google.com; s=arc-20160816; b=s0SYURbpSRRe6oKQ73u1EWZfs9mMGGmzMdJfVYZXkAmSByfz/e4BhnWUmZj6/7+WRg pjnsuyZv/QhM4dKcC4o1CfT6+F0nkXVxXiG3NfEwOSO6Ejf4BqxPZacrilVfghLZUMng du6kcvHDRXP8k3cJgivqriRGkOKCKVVKyVrYutnEhUTCzNH/RZRCj/2+ALRH62NyT3GZ klRZqWjN4UsOYeyunaru/+NIG18zcDGwnfGGf28MrQWIug2+tRWgQLFnMR6NA7PGraUn 0fIWCcVWfsoTlmqS78kcABP8aOu0Gf929HuC2XRjM/zRN8lZBLQ/f6M1+cM8nBD+4utd jEXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=T5ERPKm8Hxhml2COWRgYZudNdzc9VLtlxML3mV4Yea8=; b=z+H86ebegB7ci0QveBDIShnegOVNULIAfz9wRRR6f4CaZvBaW61viWDz/4qHLgQRxn wP+cnFKmY+2Ca6zzGr6yRVgXBysmElxhTbzj7XsAcxp7sUcqQzozK3t1psdZYw3L91xb mJ13iJN+KGyVJCzBn5Ouuzq1wUOBUT6kqy4eWi4jJhp2hHX8qsDa419XfMkj0xKGIntE CM25YrtwufpQoiwntkoPtGIWSBKoRZJaPPgyly9zb0uPPPYMuk7PRyc7PkFQtd+Qf0Es iJgOKNjjFmQYAKdHJTit8t3oERMT5tlASRZIZXwjo5iRa73fM8owk8K3Y/tOq83zRobs 50Tw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si5085386ejw.207.2020.06.22.19.00.46; Mon, 22 Jun 2020 19:01:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731169AbgFVXqO (ORCPT + 99 others); Mon, 22 Jun 2020 19:46:14 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:54764 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730678AbgFVXqI (ORCPT ); Mon, 22 Jun 2020 19:46:08 -0400 Received: from ip5f5af08c.dynamic.kabel-deutschland.de ([95.90.240.140] helo=wittgenstein.fritz.box) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jnW8c-0005DO-65; Mon, 22 Jun 2020 23:46:06 +0000 From: Christian Brauner To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Christian Brauner , "David S . Miller" , Arnd Bergmann , Guo Ren , linux-csky@vger.kernel.org, sparclinux@vger.kernel.org Subject: [PATCH 04/17] sparc: unconditionally enable HAVE_COPY_THREAD_TLS Date: Tue, 23 Jun 2020 01:43:13 +0200 Message-Id: <20200622234326.906346-5-christian.brauner@ubuntu.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200622234326.906346-1-christian.brauner@ubuntu.com> References: <20200622234326.906346-1-christian.brauner@ubuntu.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that both sparc and sparc64 support copy_thread_tls() and don't rely on do_fork() anymore, turn on HAVE_COPY_THREAD_TLS unconditionally. Once all architectures are switched over this macro will be removed and the old do_fork() calling convention fully abandoned in favor of the cleaner struct kernel_clone_args one. Signed-off-by: Christian Brauner Acked-by: David S. Miller Cc: Arnd Bergmann Cc: "David S. Miller" Cc: Guo Ren Cc: linux-csky@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: sparclinux@vger.kernel.org Link: https://lore.kernel.org/r/20200512171527.570109-4-christian.brauner@ubuntu.com --- arch/sparc/Kconfig | 2 +- arch/sparc/kernel/process_32.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index e2bb4956e130..66213c0cb557 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig @@ -48,6 +48,7 @@ config SPARC select LOCKDEP_SMALL if LOCKDEP select NEED_DMA_MAP_STATE select NEED_SG_DMA_LENGTH + select HAVE_COPY_THREAD_TLS config SPARC32 def_bool !64BIT @@ -94,7 +95,6 @@ config SPARC64 select ARCH_HAS_PTE_SPECIAL select PCI_DOMAINS if PCI select ARCH_HAS_GIGANTIC_PAGE - select HAVE_COPY_THREAD_TLS config ARCH_PROC_KCORE_TEXT def_bool y diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c index 229a10bab74a..3e1f7b639e9a 100644 --- a/arch/sparc/kernel/process_32.c +++ b/arch/sparc/kernel/process_32.c @@ -273,8 +273,9 @@ clone_stackframe(struct sparc_stackf __user *dst, extern void ret_from_fork(void); extern void ret_from_kernel_thread(void); -int copy_thread(unsigned long clone_flags, unsigned long sp, - unsigned long arg, struct task_struct *p) +int copy_thread_tls(unsigned long clone_flags, unsigned long sp, + unsigned long arg, struct task_struct *p, + unsigned long tls) { struct thread_info *ti = task_thread_info(p); struct pt_regs *childregs, *regs = current_pt_regs(); @@ -376,7 +377,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp, regs->u_regs[UREG_I1] = 0; if (clone_flags & CLONE_SETTLS) - childregs->u_regs[UREG_G7] = regs->u_regs[UREG_I3]; + childregs->u_regs[UREG_G7] = tls; return 0; } -- 2.27.0