Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3154908ybt; Mon, 22 Jun 2020 16:49:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyouUCmJ7xs+8IRYcY61wh4H2cVkvf0iAvWo3aHObZFbyaOyFtcC/J0HT5Z5CME49KDVtcG X-Received: by 2002:a17:906:5418:: with SMTP id q24mr17684381ejo.266.1592869744147; Mon, 22 Jun 2020 16:49:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592869744; cv=none; d=google.com; s=arc-20160816; b=WLm03nKYouE21y5o9W+058ZIwVHWcETFQ5X4dZSMIAH/DDtIPtJ29n5wE8FlFnwbC2 vBdE1sQCQPibfYiuj9oZXlCW5gN4U0Y1mLIR9t/FEq+XaWnxukjPhydxGRYgi+REVEi9 b5BW48580glQhGMjUIxCfqBP5pD1fSSX9qAnRJqSJ4Dsg7BJD7qU/4uDLNjyUdaqkc/a E3mLUJqfIAW3IhC8UreR+OCK3m6n7TdUvf8QhDAtFPTgliGPrMK1tn+Rc8ZjquXo8b4R sbhNLX4HLXgOATeIu/bijCH40jTWXUVGpS6boygGfv7mYObvodtaaPBNHuT3+pfMqkTL x9Lw== 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=6yqaB9A0E+3AYgbAZcpj0PAQBZsxRzGcbhLt2LG+VWM=; b=PevKiWdQM45OXTcC4jGuqKbW+NC5AoXopRWwFQMQktLEwKAMmr/Qva+LOwoP3Obyv5 ziKYnWAPbbgYlI9HEPJ8zRVS4ZVoCrEd0wLnBfIWIjoYxjlV+6aD8CgVSJT9jSh2Lah5 RbcBPCfqhqqwjMd9Sqs452NLuwxRqdWBi8FM4OYtdBEwJF4zkyO4ODuxQBdrVKUzSPHu vwxVZhLDGKl0vyvTpQ3yxhKl959S16/1WPqVWkoTKwA2fohXa9A8TxTWvY6JxFP+nBcU qsN3viyl6W5lJdZzQV6EhutB1S3+eEFftXJI815jIxBZeqD5CpqtkLbwMb96g8Y1/xSR 7iUA== 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 dt5si13532512ejc.335.2020.06.22.16.48.42; Mon, 22 Jun 2020 16:49:04 -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 S1731394AbgFVXqe (ORCPT + 99 others); Mon, 22 Jun 2020 19:46:34 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:54840 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731162AbgFVXqP (ORCPT ); Mon, 22 Jun 2020 19:46:15 -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 1jnW8h-0005DO-9d; Mon, 22 Jun 2020 23:46:11 +0000 From: Christian Brauner To: linux-kernel@vger.kernel.org Cc: Linus Torvalds , Christian Brauner , Guan Xuetao Subject: [PATCH 15/17] unicore: switch to copy_thread_tls() Date: Tue, 23 Jun 2020 01:43:24 +0200 Message-Id: <20200622234326.906346-16-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: Guan Xuetao Signed-off-by: Christian Brauner --- arch/unicore32/Kconfig | 1 + arch/unicore32/kernel/process.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig index 11ba1839d198..01451cf500d2 100644 --- a/arch/unicore32/Kconfig +++ b/arch/unicore32/Kconfig @@ -22,6 +22,7 @@ config UNICORE32 select MODULES_USE_ELF_REL select NEED_DMA_MAP_STATE select MMU_GATHER_NO_RANGE if MMU + select HAVE_COPY_THREAD_TLS help UniCore-32 is 32-bit Instruction Set Architecture, including a series of low-power-consumption RISC chip diff --git a/arch/unicore32/kernel/process.c b/arch/unicore32/kernel/process.c index b4fd3a604a18..49a305565a53 100644 --- a/arch/unicore32/kernel/process.c +++ b/arch/unicore32/kernel/process.c @@ -219,9 +219,9 @@ void release_thread(struct task_struct *dead_task) asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); asmlinkage void ret_from_kernel_thread(void) __asm__("ret_from_kernel_thread"); -int -copy_thread(unsigned long clone_flags, unsigned long stack_start, - unsigned long stk_sz, struct task_struct *p) +int copy_thread_tls(unsigned long clone_flags, unsigned long stack_start, + unsigned long stk_sz, struct task_struct *p, + unsigned long tls) { struct thread_info *thread = task_thread_info(p); struct pt_regs *childregs = task_pt_regs(p); @@ -241,7 +241,7 @@ copy_thread(unsigned long clone_flags, unsigned long stack_start, childregs->UCreg_sp = stack_start; if (clone_flags & CLONE_SETTLS) - childregs->UCreg_16 = childregs->UCreg_03; + childregs->UCreg_16 = tls; } return 0; } -- 2.27.0