From nobody Tue Feb 10 01:58:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1486684960204252.55508905291094; Thu, 9 Feb 2017 16:02:40 -0800 (PST) Received: from localhost ([::1]:40917 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbyfe-00010o-2n for importer@patchew.org; Thu, 09 Feb 2017 19:02:38 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbyee-0000MA-2q for qemu-devel@nongnu.org; Thu, 09 Feb 2017 19:01:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cbyea-0000rO-Ua for qemu-devel@nongnu.org; Thu, 09 Feb 2017 19:01:36 -0500 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:34024) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cbyea-0000rD-Pj for qemu-devel@nongnu.org; Thu, 09 Feb 2017 19:01:32 -0500 Received: by mail-pg0-x241.google.com with SMTP id v184so1523153pgv.1 for ; Thu, 09 Feb 2017 16:01:32 -0800 (PST) Received: from bigtime.twiddle.net.com ([119.17.43.78]) by smtp.gmail.com with ESMTPSA id l22sm31595279pgc.43.2017.02.09.16.01.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Feb 2017 16:01:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=96AsFrK7AqyTzUlt5ObWIZuJJVuuw7pkCnRK0nIPxgI=; b=I4EOAkbHzUkrPsgjhT4INTwdGKYJxW8gplnDpDRYNIgAeK9Q9iFV1rX1wYpOGgzYHi PTY97UxOpLClSBpANbFkcu4Nle12nf1eLA9/yu7aUltcckmkOFFRj5YLTz1gBPqaIr4G ei+/laZnmXoaIV48rx1QWqxPOkP0Q0lU1qSxMygfVRWEoQRNSqx9zeosbQHxht1nWtQj PSxS7gsyLOfIOEJx/SLHcCC9WJGKTRXTseSF9dBCbmmPlGD4xWX1L1wb4xabMo16+3xG BmfpwBmanAPwuzRcnbUXQTdHMgNVNq1wHfzujOvpJAAuEytG0+lJvxBVSs47YBbxBCB4 wQSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=96AsFrK7AqyTzUlt5ObWIZuJJVuuw7pkCnRK0nIPxgI=; b=rDcVOGX8yzemLn0ozeSX9auzqtJnRdRXlW4K7DXExDrRAhLDPEp0Z+ox+51F+hHy46 dx1mhbzjT2syvqgkszwtyTjpxrLVG8SrR8p2KxVUGOx+3zXMP1C0bnx2aiMNerDK3P4g 80UEI2DC8KQGGHCpXVWD9UkHPS+PJmHaZ+BPac3xXIvCEiStdw79GFzfrst+Z1nmNFX8 YD2rrm8wlWySGntQLnm4OOB8OIL7o2SWFQMNKg8JHRv4DzmPnd3+lbwBb6UVsSNsWljx 1wrZ1d4ZtefLY5/+3dT1xe7DoWgmxcCLU4PZnoaoE86UM5cAKzXitFS/BomyeMxaJLDE iHGg== X-Gm-Message-State: AMke39mSaldVZrFYKZFBo1EUHOwJH333TupoK/RPtQr6XjnPNua2iBqBuCcphlfAk5GGKw== X-Received: by 10.99.127.28 with SMTP id a28mr7052791pgd.60.1486684891689; Thu, 09 Feb 2017 16:01:31 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 10 Feb 2017 10:01:22 +1000 Message-Id: <20170210000122.4173-1-rth@twiddle.net> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170209045154.16868-1-rth@twiddle.net> References: <20170209045154.16868-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c05::241 Subject: [Qemu-devel] [PATCH 23/22] linux-user: Honor CLONE_SETTLS for openrisc X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: shorne@gmail.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Threads work much better when you set the TLS register. This was fixed in the upstream kernel for Linux 4.9. Signed-off-by: Richard Henderson Reviewed-by: Stafford Horne --- linux-user/openrisc/target_cpu.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/linux-user/openrisc/target_cpu.h b/linux-user/openrisc/target_= cpu.h index a21ed1a..f283d96 100644 --- a/linux-user/openrisc/target_cpu.h +++ b/linux-user/openrisc/target_cpu.h @@ -30,9 +30,7 @@ static inline void cpu_clone_regs(CPUOpenRISCState *env, = target_ulong newsp) =20 static inline void cpu_set_tls(CPUOpenRISCState *env, target_ulong newtls) { - /* Linux kernel 3.10 does not pay any attention to CLONE_SETTLS - * in copy_thread(), so QEMU need not do so either. - */ + env->gpr[10] =3D newtls; } =20 #endif --=20 2.9.3