Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp206801ybb; Fri, 3 Apr 2020 00:52:54 -0700 (PDT) X-Google-Smtp-Source: APiQypLaWEYrSyPg36Lu+7LvAlLPTaiNcCQQmydCeP5NIE5qtZGdymakUbL3DEaqNAtlsHftV0Fj X-Received: by 2002:a05:6830:1d67:: with SMTP id l7mr5222778oti.72.1585900374274; Fri, 03 Apr 2020 00:52:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585900374; cv=none; d=google.com; s=arc-20160816; b=qdkCbCvJtYwX4+0EYtlKUkhCMtlWNI0TzrZB4BbQB2fSZZfTUYBWJzUJsEfaa1N70o sNUjiEND3I53sgxSqrj5RipQYL1L/j+0k+Yq22CvxcqR+a3Sc5GoB1J7XyViu5cqIMBa qcWtoT6V4bdF+SZFBdwzjaoJU5gPvhsjruxN2KpaNt6kw/EZSBphTtMrzYi5tqDEiK9w U6sENVQBPL7fVg3mZ2mIyMmaO6yiHGNKXo2pkVNzr1T5Hy8pRy8tJBZsjk26CVCQdSO+ tUqBlV4x2wK8ro1EiANMWgW2SZcORCV/29mKD/HgZKwK2yfAv2QhlwQmK08g77SGDETb I9Fg== 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:message-id :user-agent:mime-version:in-reply-to:references:cc:to:subject:from :date:dkim-signature; bh=6eTQPyddv5f9SRxTrCu1HpU/mZFl02NaYZhT7ltXJvM=; b=dcWKcnc8zFjKqMW7u/MNb7XjEerRpMJCqphI4EANfNBtQkw9f+SsmSI4KdFdFas17m 6nyVnObSjFOgyZFUqiUe2ex6Z3ONLvVTw/sJamKxDe6rINFGKgOgXUyvSZJOh8pDSlEJ LTVJdmiclfKbzHlOKLPI6GOwDWIoMAtgpvx4KQiUNaE5+pa2dkrFBta8SFUm2JWXG9mY Tqtaodw6yYB+rJ/CuRZMJ7C43zRmfDwk6I7YjIM8fLOI2TDqLyPJ68QxtHFW/CTDm7bd J5FiLUTQ3byyVPTdlEiiafAdgT9fuwSkSD0eHuYshUdaRXO9simOEpYiIbAZA4hApevD UDAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DIpxYzwc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k19si3315213otb.279.2020.04.03.00.52.41; Fri, 03 Apr 2020 00:52:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DIpxYzwc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390200AbgDCHdq (ORCPT + 99 others); Fri, 3 Apr 2020 03:33:46 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:45325 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388873AbgDCHdq (ORCPT ); Fri, 3 Apr 2020 03:33:46 -0400 Received: by mail-pg1-f196.google.com with SMTP id o26so3099838pgc.12 for ; Fri, 03 Apr 2020 00:33:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :user-agent:message-id:content-transfer-encoding; bh=6eTQPyddv5f9SRxTrCu1HpU/mZFl02NaYZhT7ltXJvM=; b=DIpxYzwc7IBK/NsPfM0wzUov+Iv1OcKRReEWjT2bmDGtKez3CWY5TXWaIQMzsoUgtU NIClVMRucU+ZGL4X3rND3J/Sv5+cPTJGKLNhRuL3g/1jq+O1PnA/AbdgkxCOxux7Z3Ee 05BisU9HXpM13G6inAt73sB+MxkGslDj0WX6KeoUU+IK+CfqfE6CThK5m87JlMCwcMR9 2n+z65y9hXathwW164UwoutNkcR83FebyA7fsHe1SZDx9fleqlPOOR4/YEvT+FHHHNF1 NUMWfJ0JwslkFzifHLGMtNoO2YqvXlAohajKqffSl0TVy4OxM3oldUugnckD5X2nPYHW qMOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:user-agent:message-id:content-transfer-encoding; bh=6eTQPyddv5f9SRxTrCu1HpU/mZFl02NaYZhT7ltXJvM=; b=L22tumUNdz0J3b3MsBee6PQRzpDgnD947idKiUfw0zGT2YRV1y9ciLOsuGyAYzVV5k HX8cwdtTUwLaDE9urnhVdnq16rutMOYVA8cHejz4Ns7S2aiDHT2dAHmCHYy9DUxJgRsy sWg21Sz5KeokLUpqgzlRCa6T9wK3DtiLn3zFPm10eQ3+jiTMoFSLS+SHb/Cn7zLy9kLj ilBqZevCBQTWV1Wn1QTUHHMYKdIoYKrVOsicEPjshNTLC1wRYhR+le/h+GvMtJ/pmDlk OTdrbRgm6/BVtgOAlY6eWnmsRVMRVX4vtzkBFK0uXSnHTgWkYvCvJYsDpAKnO4uNzhwe EOdA== X-Gm-Message-State: AGi0PuYSCSpnrkmu/9cQKjkOsskUhkzcccNEEMVGuVbeBEmkPR95yXcX Hj5jTE8Dgg5mtBuB1SQXIww= X-Received: by 2002:aa7:9f42:: with SMTP id h2mr6792832pfr.22.1585899225368; Fri, 03 Apr 2020 00:33:45 -0700 (PDT) Received: from localhost (60-241-117-97.tpgi.com.au. [60.241.117.97]) by smtp.gmail.com with ESMTPSA id h4sm4750410pgg.67.2020.04.03.00.33.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Apr 2020 00:33:44 -0700 (PDT) Date: Fri, 03 Apr 2020 17:33:38 +1000 From: Nicholas Piggin Subject: Re: [RFC WIP PATCH] powerpc/32: system call implement entry/exit logic in C To: Benjamin Herrenschmidt , Christophe Leroy , Michael Ellerman , msuchanek@suse.de, Paul Mackerras Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <059c1abd-6be2-25ea-83e0-dcd411b7951b@c-s.fr> In-Reply-To: <059c1abd-6be2-25ea-83e0-dcd411b7951b@c-s.fr> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1585898897.1jwur86s6a.astroid@bobo.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Christophe Leroy's on April 1, 2020 9:48 pm: >=20 >=20 > Le 31/03/2020 =C3=A0 17:22, Christophe Leroy a =C3=A9crit=C2=A0: >> That's first try to port PPC64 syscall entry/exit logic in C to PPC32. >> I've do the minimum to get it work. I have not reworked calls >> to sys_fork() and friends for instance. >>=20 >> For the time being, it seems to work more or less but: >> - ping reports EINVAL on recvfrom >> - strace shows NULL instead of strings in call like open() for instance. >=20 > For the two above problems, that's because system_call_exception()=20 > doesn't set orig_gpr3 whereas DoSycall() does in entry_32.S . Is that=20 > only done on PPC32 ? >=20 > With the following line at the begining of system_call_exception(), it=20 > works perfectly: >=20 > regs->orig_gpr3 =3D r3; Oh great, nice work. We should be able to make some simple helpers or move some things a bit to reduce the amount of ifdefs in the C code. It doesn't look too bad though. > I will now focus on performance to see if we can do something about it. What's the performance difference between current asm code just with always saving NVGPRS vs C? Thanks, Nick =