Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3154855ybt; Mon, 22 Jun 2020 16:48:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybpqLNGmwmRxup5MsylOVaF2VIJh88QtFuVk3BP99XG6sg4pYRrA+kMYhjpl1uUD4F22fp X-Received: by 2002:a17:906:cd2:: with SMTP id l18mr6405528ejh.18.1592869738357; Mon, 22 Jun 2020 16:48:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592869738; cv=none; d=google.com; s=arc-20160816; b=dauMPEweu05g+XN12BtGa/7gQqGHr4Re8KHM00iFif53HhMYthXhLD09gWO1+0tCwm uSeB6A2qLs5BHUcaMrl2zvi14V+1bFNEU2lH+1XbyOlGpwhKVBA3407JHW2Tz/R6ws+A 2bsuarS391xoN9TYjGtI67v6boQLGGLFhQJRDsyToVwvDct71UpNGlNof0HWVEtKs7r2 cqF3HALY4igwHb8cwyUPhcrZWDNEfjGzlr1tOWkLoe1VV3OF8mtxIu2ed1N6Nu25GvQq kbewtl2FDA+wjUNNRdHs9GVLNCK4rdvPDzHpglDaAxEaOzh5T9FDfPnV6iQz8/Y6wEBM mpZA== 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=+ce5pQ3/2cBL3FCaPljACoZtSuzmlp9SAIQ83YQOL2M=; b=TWX+s4eRmvGAE1cN7HedvP/PYvqV9qiY6RMajR4syu8LMkx2gJFwSIThcMWJ0SmTM7 OggOzhZsB6f9XcXeewJUGrVi/4jIwo/s2zqkh/tWg1L9W0+h8GsSIWHlOrWxfaNMMy8u C0Qw4mT8TsZ8FV8ZUaOCNr1R/+ASkW/ovBlkHx1Lr6A7OkYVT966w/ke8Gnfg4a4MU0R X1PBSdTprCy3KWSR9IzZDjF7cFvD1bdWf0wf8iw7lJQhLcYqZknYir0waraoB2RxpQzR p34rUxmbSyPkWYFp0qSA5/VrphtciBNRETPrXGY4/aUU8iFo8gCWt2yHD1YHClZl9YJM DqeA== 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 l21si9968796eds.400.2020.06.22.16.48.36; Mon, 22 Jun 2020 16:48:58 -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 S1731373AbgFVXqb (ORCPT + 99 others); Mon, 22 Jun 2020 19:46:31 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:54800 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731100AbgFVXqM (ORCPT ); Mon, 22 Jun 2020 19:46:12 -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 1jnW8f-0005DO-F7; Mon, 22 Jun 2020 23:46:09 +0000 From: Christian Brauner To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Christian Brauner , Brian Cain , linux-hexagon@vger.kernel.org Subject: [PATCH 11/17] hexagon: switch to copy_thread_tls() Date: Tue, 23 Jun 2020 01:43:20 +0200 Message-Id: <20200622234326.906346-12-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: Brian Cain Cc: linux-hexagon@vger.kernel.org Signed-off-by: Christian Brauner --- arch/hexagon/Kconfig | 1 + arch/hexagon/kernel/process.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig index 667cfc511cf9..19bc2f2ee331 100644 --- a/arch/hexagon/Kconfig +++ b/arch/hexagon/Kconfig @@ -31,6 +31,7 @@ config HEXAGON select GENERIC_CLOCKEVENTS_BROADCAST select MODULES_USE_ELF_RELA select GENERIC_CPU_DEVICES + select HAVE_COPY_THREAD_TLS help Qualcomm Hexagon is a processor architecture designed for high performance and low power across a wide variety of applications. diff --git a/arch/hexagon/kernel/process.c b/arch/hexagon/kernel/process.c index ac07f5f4b76b..d756f9556dd7 100644 --- a/arch/hexagon/kernel/process.c +++ b/arch/hexagon/kernel/process.c @@ -50,8 +50,8 @@ void arch_cpu_idle(void) /* * Copy architecture-specific thread state */ -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 hexagon_switch_stack *ss; @@ -100,7 +100,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, * ugp is used to provide TLS support. */ if (clone_flags & CLONE_SETTLS) - childregs->ugp = childregs->r04; + childregs->ugp = tls; /* * Parent sees new pid -- not necessary, not even possible at -- 2.27.0