From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 540A3C4332F for ; Wed, 4 Jan 2023 15:58:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CA4A38E0002; Wed, 4 Jan 2023 10:58:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C559F8E0001; Wed, 4 Jan 2023 10:58:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AD90C8E0002; Wed, 4 Jan 2023 10:58:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 9AE4F8E0001 for ; Wed, 4 Jan 2023 10:58:51 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 6FDBE40B14 for ; Wed, 4 Jan 2023 15:58:51 +0000 (UTC) X-FDA: 80317574862.23.DCEED26 Received: from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com [66.111.4.224]) by imf08.hostedemail.com (Postfix) with ESMTP id 72F1116000E for ; Wed, 4 Jan 2023 15:58:49 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=arndb.de header.s=fm2 header.b=hwTQZRGk; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=EBZz60y6; spf=pass (imf08.hostedemail.com: domain of arnd@arndb.de designates 66.111.4.224 as permitted sender) smtp.mailfrom=arnd@arndb.de; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1672847929; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=H0UTR4kJzeAkAZivC7ap8DwhEwb/MXnY4XPO+uy9kKc=; b=ZpCU1PgCvDkzWNC6lyWnjA3nu0jefneQd+0g8Z3/9WlNMCp4pqX59nCBSUK0jGEvmfgR8x qR/NG8JRzEm9ajRL6hRHyL3riUVjD/fBl/0H3Xpu+mVTrkV7bjEea8n5LXbne6Rh68lNuX PwG8S8/nGJVsEwey5QV7oHy98kvxlyA= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=arndb.de header.s=fm2 header.b=hwTQZRGk; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=EBZz60y6; spf=pass (imf08.hostedemail.com: domain of arnd@arndb.de designates 66.111.4.224 as permitted sender) smtp.mailfrom=arnd@arndb.de; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1672847929; a=rsa-sha256; cv=none; b=7lDBAd20TrRan49dDe6ivfSTkuQMm96IJyDYJcPU0oOwGvyzGkkLo6XngHSSboojopheCE 4TAo7G/iT4NgtZgf4g7DrG94SFvgyFEyg2DNkw1qQ+LQQS4s1sW/HfLFl48W6Ed53RDbPV /13C+KZ95yL/CZqHBUOcjgwlczM02QM= Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id B92C65819C2; Wed, 4 Jan 2023 10:58:45 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Wed, 04 Jan 2023 10:58:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1672847925; x=1672855125; bh=H0UTR4kJze AkAZivC7ap8DwhEwb/MXnY4XPO+uy9kKc=; b=hwTQZRGkU58sEMAGHJklEKVGHg WJWpgYipnXvtEeYAwDQvOeb1YYnzUN7dY5MzHoTwe19XwLc7UHuy32W/jUv5aug4 xZ11Tf1cps6Lq3+wqn0IVghrKPgMPMOUtbDG1nmay8N4++VLitatsCjZFeqy2upu AXz63ODVZWX0yJgLrDun6rnSqOwzAEQojEQN0fl1CfeHdK9uf8pwdTaq2C09q2MG pzen/prquA9UpTBBm2HLQQAg4PR+8EfehAFbU/6wa929UKrzTMGYDV+aTsbnaB2H j1Y5L3PA5s1rPDAwI3NgOEEPqWdW9b92HJl1zoggxVLyIQepbtRm0zg5GXsQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1672847925; x=1672855125; bh=H0UTR4kJzeAkAZivC7ap8DwhEwb/ MXnY4XPO+uy9kKc=; b=EBZz60y6sFUvuYIrxbb/hh794amfA0A+wMLBwlho+Uh4 eToRLuAuWP5EJFrh/mAUHetT82fvFg+ukyYTRdsybjI/5buxgkoKTJyoweXTgZXG SG7LaI8CgEBGB87UFdUIgFDpG1ff+AECFi8c4R2xnpPOKS0awXal8fZeBoDJ+ggl Bnc6N9DoU46s3ZUicQZVqHNqQVJzhXkiTErrTiunf0cu+xKkeToJ9K7+0hz97nbu KwPN2wipgn5OKlLdyK8sqmA18G8dYi2kSRGJ9IOSIPEFdkTg9aDwR9xq0n60avso A5L8pbz3/2tdx+aU0izI1zK2oKJXVq2Np6xti5dzXQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrjeeigdekvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeevhfffledtgeehfeffhfdtgedvheejtdfgkeeuvefgudffteettdekkeeufeeh udenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomheprghrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 43F24B6008D; Wed, 4 Jan 2023 10:58:44 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1185-g841157300a-fm-20221208.002-g84115730 Mime-Version: 1.0 Message-Id: <7c531595-e987-422b-bcf7-48ad0ba49ce6@app.fastmail.com> In-Reply-To: <20230103164359.24347-1-ysionneau@kalray.eu> References: <20230103164359.24347-1-ysionneau@kalray.eu> Date: Wed, 04 Jan 2023 16:58:25 +0100 From: "Arnd Bergmann" To: "Yann Sionneau" Cc: "Albert Ou" , "Alexander Shishkin" , "Andrew Morton" , "Aneesh Kumar" , "Ard Biesheuvel" , "Arnaldo Carvalho de Melo" , "Boqun Feng" , bpf@vger.kernel.org, "Christian Brauner" , devicetree@vger.kernel.org, "Eric W. Biederman" , "Eric Paris" , "Ingo Molnar" , "Jan Kiszka" , "Jason Baron" , "Jiri Olsa" , "Jonathan Corbet" , "Josh Poimboeuf" , "Kees Cook" , "Kieran Bingham" , "Krzysztof Kozlowski" , Linux-Arch , linux-arm-kernel@lists.infradead.org, linux-audit@redhat.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-perf-users@vger.kernel.org, linux-pm@vger.kernel.org, linux-riscv@lists.infradead.org, "Marc Zyngier" , "Mark Rutland" , "Masami Hiramatsu" , "Namhyung Kim" , "Nicholas Piggin" , "Oleg Nesterov" , "Palmer Dabbelt" , "Paul Moore" , "Paul Walmsley" , "Peter Zijlstra" , "Rob Herring" , "Sebastian Reichel" , "Steven Rostedt" , "Thomas Gleixner" , "Waiman Long" , "Will Deacon" , "Alex Michon" , "Ashley Lesdalons" , "Benjamin Mugnier" , "Clement Leger" , "Guillaume Missonnier" , "Guillaume Thouvenin" , "Jean-Christophe Pince" , "Jonathan Borne" , "Jules Maselbas" , "Julian Vetter" , "Julien Hascoet" , "Julien Villette" , "Louis Morhet" , "Luc Michel" , =?UTF-8?Q?Marc_Poulhi=C3=A8s?= , "Marius Gligor" , "Samuel Jones" , "Thomas Costis" , "Vincent Chardon" Subject: Re: [RFC PATCH 00/25] Upstream kvx Linux port Content-Type: text/plain X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 72F1116000E X-Stat-Signature: qpbckewpimjkbqrx73j46q39a4bh4x4j X-HE-Tag: 1672847929-872989 X-HE-Meta: U2FsdGVkX192mThtzU1J6nvuFTuo3XA1Ledk4bIQKVJzmGUaUOnMuzroHWG9q61T1QYfBMOo2teBMA9acPNhoYckgXLRCHkYOzJcXFY1GqoKhq/49DJSrNTz5W25xADE037+qjvKo2I6ANlBOLhVIIvrsOCfRpwRyaL4EEG6fEEPZe+dQH0a6NkefUyb2h2DZHzf/505x4gELSb23o0Iq5jryf3L/n70/6tIxidGxO8Ue03GSod3eUMOCA1Y6tHPnxFaECUOXiMRHpsxJsg3g7SbbEiG4P/5JIlKuPNVy5QEZ71mwik1q/hm9khGZvP+nfkchFe/voD3Alrjv91xdGFb+sRfcsYwX2KAZ8CNYk5rCq6Y9adxS5gzJ+NDffbAxN6U881daQThcnXD4DUo7Mlw5LS72f2CQixEGsduCFqds6ztukEM+gmng8OVVxFGytCR+EOPPVwjZRQtTHxRflMQuPu/azO+/qmapfMaznnSL/3YMFEygrByhUfAQyIHXOxGAdfwlyS2Ccer/1yMT7tT7Bvw+MWQ9316cICuq/shT/i4PKf30KPwa5UeBmTdBGNQ9o+awlt0K7LjZXZlfqmm2GyB28W2DXlFXN3B0+HaiqEjoe7/IXzIMekew9DixpE3ghivrAX5B61Rl0KhzJakSO+XTVSBTOLKjsb4Vjn/WMGJdo7WPBRv/Re12X6PKoPZDM+7KJv8oO6U2rz24XcF+U4efAYcm8AfF7lLkJa0hPpAZabUqlxZPVX+sVBADf+1nGVFFCMWPVdYnccIajGVzdGVQOGdJ7nWfoa4GClIIz7OtTqpj23mNP+QjfzcAVCiLpfVYII4upPp33dRm3a6oZe4gwMSFQhjZvlhW8iBOTKbjqS+fV9uPoFJVadQHo+JbMU5Pf/c5CcFfGHJznfKdaYZBbYyWnFT2kSAQRQtTrwiozFqhBMjKIXNMGfnkuNRkojdjWb91y5G5BE upE3kCmf ehanK9CzDlvWMhwY= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jan 3, 2023, at 17:43, Yann Sionneau wrote: > This patch series adds support for the kv3-1 CPU architecture of the kvx family > found in the Coolidge (aka MPPA3-80) SoC of Kalray. > > This is an RFC, since kvx support is not yet upstreamed into gcc/binutils, > therefore this patch series cannot be merged into Linux for now. > > The goal is to have preliminary reviews and to fix problems early. > > The Kalray VLIW processor family (kvx) has the following features: > * 32/64 bits execution mode > * 6-issue VLIW architecture > * 64 x 64bits general purpose registers > * SIMD instructions > * little-endian > * deep learning co-processor Thanks for posting these, I had been wondering about the state of the port. Overall this looks really nice, I can see that you and the team have looked at other ports and generally made the right decisions. I commented on the syscall patch directly, I think it's important to stop using the deprecated syscalls as soon as possible to avoid having dependencies in too many libc binaries. Almost everything else can be changed easily as you get closer to upstream inclusion. I did not receive most of the other patches as I'm not subscribed to all the mainline lists. For future submissions, can you add the linux-arch list to Cc for all patches? Reading the rest of the series through lore.kernel.org, most of the comments I have are for improvements that you may find valuable rather than serious mistakes: - the {copy_to,copy_from,clear}_user functions are well worth optimizing better than the byte-at-a-time version you have, even just a C version built around your __get_user/__put_user inline asm should help, and could be added to lib/usercopy.c. - The __raw_{read,write}{b,w,l,q} helpers should normally be defined as inline asm instead of volatile pointer dereferences, I've seen cases where the compiler ends up splitting the access or does other things you may not want on MMIO areas. - I would recomment implementing HAVE_ARCH_VMAP_STACK as well as IRQ stacks, both of these help to avoid data corruption from stack overflow that you will eventually run into. - You use qspinlock as the only available spinlock implementation, but only support running on a single cluster of 16 cores. It may help to use the generic ticket spinlock instead, or leave it as a Kconfig option, in particular since you only have the emulated xchg16() atomic for qspinlock. - Your defconfig file enables CONFIG_EMBEDDED, which in turn enables CONFIG_EXPERT. This is probably not what you want, so better turn off both of these. - The GENERIC_CALIBRATE_DELAY should not be necessary since you have a get_cycles() based delay loop. Just set loops_per_jiffy to the correct value based on the frequency of the cycle counter, to save a little time during boot and get a more accurate delay loop. Arnd