Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp13441636rwl; Wed, 4 Jan 2023 08:12:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXu1IzANa3ylmsOO3Dub8wIjvCEdYqWUKJgg+sj0lVm4Gi0MGGnUHwiQcZGknk8XBr7zX1HX X-Received: by 2002:a17:907:6d12:b0:7c1:79f5:9545 with SMTP id sa18-20020a1709076d1200b007c179f59545mr59018306ejc.42.1672848748718; Wed, 04 Jan 2023 08:12:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672848748; cv=none; d=google.com; s=arc-20160816; b=J7WBckAyunwWcC6nCiVAvsmwsWfQZWg5ojbpbLXRQ/X6dUKjXsWsDRI9Hhn59LnyMw qoKDE41bSKxBUDCbAO9tm0ETRyttljwIWvRVDI8JbEq5t6+dCmnpd281FMWijbCFN57K 7b9rcSDOjVS0BYvCXkyvm3KbaVTYAgim6riV14SIfj1yDp3xBxj5VKhhVYt8AmdGtREC B1ew3HJfAWCCrnIQSc1hz5QIKTJVmDGLz+otToGJaDImu75+C8sgWUgaxpjcI5ai6zcU 8Hawm6LcpLJdiiQwBafJu0bkz5m8EiPXi8lpuRIyZRDFnfMH/5myVkzKvejjxuXKZT4a JXBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=H0UTR4kJzeAkAZivC7ap8DwhEwb/MXnY4XPO+uy9kKc=; b=ahBCJirlvmCZ8FzzcvwUYTmOzZgpNkb1VCCS1gC3bS/tVbLbkfzV/H+FuUBG+/id3H U/oU6Yb1+SvupqmOHaTDZkBYm130Q0/3VKgRvwh0wA3X7sYZ4kMoGs1bwrAHeUmxSMX/ fr23MOS7UPOQ2QeIrb/7HOuGIH/ulnrMequf861On2fC71O+FZiwnL0tjlfGTuWlaGmg F//tOe5ZrCuHLrETMJJtzUOO/FABBNcJXjoe0F59/2reAq4MEdLlYaQOc85tyBdduTWq YUJWkE245tMXk9di6hi1UCwGQWT5HTO/AUEDrnstzM/HGV4hrmEX/h5lhJTiG3DAbLik dYZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=U8pU6dYS; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=HgaFI40s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr7-20020a170907720700b0078c4a772ea7si31202513ejc.11.2023.01.04.08.12.15; Wed, 04 Jan 2023 08:12:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm2 header.b=U8pU6dYS; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=HgaFI40s; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239786AbjADP7Y (ORCPT + 57 others); Wed, 4 Jan 2023 10:59:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239739AbjADP6t (ORCPT ); Wed, 4 Jan 2023 10:58:49 -0500 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A551413F6B; Wed, 4 Jan 2023 07:58:47 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 284635C00D1; 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=1672934325; bh=H0UTR4kJze AkAZivC7ap8DwhEwb/MXnY4XPO+uy9kKc=; b=U8pU6dYSVrl/CVJUPPEqx1R9Aq lRxcqMgYm/TyRX26ZRhyXa5uD+cs/yqjcy+nxmXyUIG+GTv181nQJi14UJAOIAjf 9og92IBPb31uZ6dMCyYRlMnZEfzQ6xvntOWmT3FWGrbwUq5HC7doLJZu6KqzASKI hx0t/iE+7VsGIErLSpVMU0gFj5/H+ZQaKAZypwzKqJpGCyYDp223hOv+Zz4SLqW0 aap4i0c2yXuHQ0fuFazE/+lmbeVPJ9sjpKCGtqT+ziNxFO9URfDlN8d6S8yyG2Kc gfoSMJGJPpNha+B3JWXggdUNoTtSLSxTxQuqa+jy3h74M4/4siNT+25L+AnA== 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=1672934325; bh=H0UTR4kJzeAkAZivC7ap8DwhEwb/ MXnY4XPO+uy9kKc=; b=HgaFI40sC8yMY8VOy7QQ2F4//wyS3hYp0LPxGg03HAWk qEtLjRM+JzoyCdjTkYPOh/vyRMocCgEQJJqgRHD5+URJ6Ih4+/PWfKLiNnp0SZ5c 2eVHhYC4JvCfKwLmmEFnjnFQRQl/X6q87HzGKYozVQvf+hOjcXLbChRn7u4v6rVv A7h6PsV/16E/QY06UxPPdbXrMJQ3AXHk2Coz61RWuHtjaXz5GAT/CtwzH0J/hC6Z 8GBNd2fU1eV3VheOX6SEI3N2hK9df+iJYKLxk619yg08GulRxfRBLXa5HcZVP0mX atQsepbklOuSYA/wRkqz2dILaWkGdP1/uzO37OwLPg== 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-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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