Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3224316ybt; Mon, 22 Jun 2020 19:01:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcN2Ccj4vkzyB8JPm4dKOXttj/o61TQhn+YIMeadafsVrFZi2btwzj45fm8v/QgutSz88a X-Received: by 2002:a50:e387:: with SMTP id b7mr19127810edm.190.1592877673745; Mon, 22 Jun 2020 19:01:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592877673; cv=none; d=google.com; s=arc-20160816; b=NGWGp1VdgGaAirz4JwhPsulYNMywRD5+so6cdA3PzrOJWx6ufLbbmW6sIH9WrlH1y6 HKrdhTwZQWP5rkmzLRxqAX3MJqDrfrWWa1NbeuHetVpw3Po38MDbnl5HsnhqPcdwEefi LXuOwouP/ecfVuvCpooC2Ni9z/xr9oj99fuChE895ctu33i6RpubuoPIxcoTJqDlH+PH g/iN9BMF5c8vkUrETtDUXH10qlf5wyzXXfNs6/aBc3926qBAiEp9vxzBUAbFcyIQJVUi iIAQEljvJFP8TD94UPyun0UHoHi2jrDF0lcylpvWACmfgOYmx5c1bX+iddC/DU0jeVpF +1SA== 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=chWEn9+tqjDscPo0H1zMKgpeQx9nCXEvZMKWBiQZ0GU=; b=BxY982kr0HciZZ1eDOmiM1zeiDWw9G1buZiZPf+GyldeOncFWoOG0NQ9KDw2xnp0hf Jb4QHC1JPa47pXNQMDAMr9/cIETbMYz2eKEhq6cvpGNKODJn2y60mO1biE4Ra0h5LtKr xCavE8ce0WA7DKBjUVFA4FDZY8G09eaBn+RIo8y25hh0ankwpWzw2396ts0lGffmljtI ohabWhQhZEHKzyetY42+SdME6yL+GqdDGhy20+dWKUzbK/idajsQ99NjTH3QGbMo0K/p GOnTNAs/hB4XSAtOImORTBo5oouAEBU8CQqllWVOiDH4YnadTz9q+FNvLld9YjKS7TuA 90Sg== 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 ot25si5110288ejb.647.2020.06.22.19.00.51; Mon, 22 Jun 2020 19:01:13 -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 S1731414AbgFVXqh (ORCPT + 99 others); Mon, 22 Jun 2020 19:46:37 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:54813 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731131AbgFVXqO (ORCPT ); Mon, 22 Jun 2020 19:46:14 -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 1jnW8g-0005DO-Rl; Mon, 22 Jun 2020 23:46:11 +0000 From: Christian Brauner To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Christian Brauner , Rich Felker , Yoshinori Sato , linux-sh@vger.kernel.org Subject: [PATCH 14/17] sh: switch to copy_thread_tls() Date: Tue, 23 Jun 2020 01:43:23 +0200 Message-Id: <20200622234326.906346-15-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 Use the copy_thread_tls() calling convention which passes tls through a register. This is required so we can remove the copy_thread{_tls}() split and remove the HAVE_COPY_THREAD_TLS macro. Cc: Rich Felker Cc: Yoshinori Sato Cc: linux-sh@vger.kernel.org Signed-off-by: Christian Brauner --- arch/sh/Kconfig | 1 + arch/sh/kernel/process_32.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 9fc2b010e938..e10118d61ce7 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -70,6 +70,7 @@ config SUPERH select ARCH_HIBERNATION_POSSIBLE if MMU select SPARSE_IRQ select HAVE_STACKPROTECTOR + select HAVE_COPY_THREAD_TLS help The SuperH is a RISC processor targeted for use in embedded systems and consumer electronics; it was also used in the Sega Dreamcast diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c index 456cc8d171f7..537a82d80616 100644 --- a/arch/sh/kernel/process_32.c +++ b/arch/sh/kernel/process_32.c @@ -115,8 +115,8 @@ EXPORT_SYMBOL(dump_fpu); asmlinkage void ret_from_fork(void); asmlinkage void ret_from_kernel_thread(void); -int copy_thread(unsigned long clone_flags, unsigned long usp, - unsigned long arg, struct task_struct *p) +int copy_thread_tls(unsigned long clone_flags, unsigned long usp, + unsigned long arg, struct task_struct *p, unsigned long tls) { struct thread_info *ti = task_thread_info(p); struct pt_regs *childregs; @@ -158,7 +158,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, ti->addr_limit = USER_DS; if (clone_flags & CLONE_SETTLS) - childregs->gbr = childregs->regs[0]; + childregs->gbr = tls; childregs->regs[0] = 0; /* Set return value for child */ p->thread.pc = (unsigned long) ret_from_fork; -- 2.27.0