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 77E15C3DA7A for ; Thu, 5 Jan 2023 10:40:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 032258E0005; Thu, 5 Jan 2023 05:40:28 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EFD4D8E0002; Thu, 5 Jan 2023 05:40:27 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D29748E0005; Thu, 5 Jan 2023 05:40:27 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id BB1988E0002 for ; Thu, 5 Jan 2023 05:40:27 -0500 (EST) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 86AC6C0116 for ; Thu, 5 Jan 2023 10:40:27 +0000 (UTC) X-FDA: 80320401294.04.02D3741 Received: from fx308.security-mail.net (smtpout30.security-mail.net [85.31.212.38]) by imf28.hostedemail.com (Postfix) with ESMTP id 432B2C000A for ; Thu, 5 Jan 2023 10:40:23 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=kalray.eu header.s=sec-sig-email header.b=cfFVXXSJ; dkim=pass header.d=kalray.eu header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=pKs+CePZ; spf=pass (imf28.hostedemail.com: domain of jmaselbas@kalray.eu designates 85.31.212.38 as permitted sender) smtp.mailfrom=jmaselbas@kalray.eu; dmarc=pass (policy=quarantine) header.from=kalray.eu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1672915224; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rBdSTEj4sEHV5aOdgiMVbZa0c1+4vHmKGKt/utxqTFU=; b=cPDjkFgEKAb86jmQzsk8Tb8Iz2EAwsHsmZYGAMKSBUM03NzlMijpeWnQqFHdTYlwclWpO7 BtJ8T2/WBMrJ5Tpog1LYr52g6PaDVJ16DVNod2zgKAtfB/1LtnI1iOJmiMh3EobGWKnwFP uHwcGpNJFOII8vZbYWoLoNJheaNb5ps= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=kalray.eu header.s=sec-sig-email header.b=cfFVXXSJ; dkim=pass header.d=kalray.eu header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=pKs+CePZ; spf=pass (imf28.hostedemail.com: domain of jmaselbas@kalray.eu designates 85.31.212.38 as permitted sender) smtp.mailfrom=jmaselbas@kalray.eu; dmarc=pass (policy=quarantine) header.from=kalray.eu ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1672915224; a=rsa-sha256; cv=none; b=s+JrGoIUBRzZLuCqMsJDJb/7b2NK9yr6aNJRv+/KipTvVIR0eLASUUTYa/OjDiw1o74OMV jps5pWu6pPagibcjWLBNu4UUl1ggY82kElzrk9SqFZvn0cWB8OSRjj76LG59oHdoq5bkto 1iQsuTZJPje2Q4vPfQOejI2NL9dGGwE= Received: from localhost (localhost [127.0.0.1]) by fx308.security-mail.net (Postfix) with ESMTP id F242E75A93F for ; Thu, 5 Jan 2023 11:40:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kalray.eu; s=sec-sig-email; t=1672915222; bh=HozEVKpsnPTz1W+OmWAJHb2nflwGQpHJX/pPziyjbkU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=cfFVXXSJrvWYb7bdzwP7aVNzQ8MAq9GQHcRjNxV16nZxpd1+wEHcpAVc+7X5CHu9S 25MVzy1pzaEknWwOQVPqDcRddsrabcmc/UdRHgeaCPNO5N9bUaGomu/wMfS6PQSWQw dxRm8ra3/lYBU3I1ZJVHsqU81b+KPzmmZJ8KspLM= Received: from fx308 (localhost [127.0.0.1]) by fx308.security-mail.net (Postfix) with ESMTP id C07AC75ACED; Thu, 5 Jan 2023 11:40:21 +0100 (CET) Received: from zimbra2.kalray.eu (unknown [217.181.231.53]) by fx308.security-mail.net (Postfix) with ESMTPS id 3D21375A27A; Thu, 5 Jan 2023 11:40:21 +0100 (CET) Received: from zimbra2.kalray.eu (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTPS id F015B27E02E4; Thu, 5 Jan 2023 11:40:20 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id C37DC27E031D; Thu, 5 Jan 2023 11:40:20 +0100 (CET) Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 8CA9XU0N7s2D; Thu, 5 Jan 2023 11:40:20 +0100 (CET) Received: from tellis.lin.mbt.kalray.eu (unknown [192.168.36.206]) by zimbra2.kalray.eu (Postfix) with ESMTPSA id 5854D27E02AC; Thu, 5 Jan 2023 11:40:20 +0100 (CET) X-Virus-Scanned: E-securemail Secumail-id: <141bc.63b6a915.3c2fc.0> DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu C37DC27E031D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1672915220; bh=rBdSTEj4sEHV5aOdgiMVbZa0c1+4vHmKGKt/utxqTFU=; h=Date:From:To:Message-ID:MIME-Version; b=pKs+CePZ3R3W41fZHlmw/owOk940TBb9jGKa8X1N/B6at/r5t/99lcM7BYNSm1sbm GgU4FIb/vUiDD0dGYY0QwPK6QJVEAcqdlcP4MzXTRQlqlJaTfeeQw469yNJ0IyFuvr H4nRIuARzCz4d0RA5Dr/HYW0RULCkMt83j3YDunc= Date: Thu, 5 Jan 2023 11:40:19 +0100 From: Jules Maselbas To: Arnd Bergmann Cc: Yann Sionneau , 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 , Julian Vetter , Julien Hascoet , Julien Villette , Louis Morhet , Luc Michel , Marc =?utf-8?b?UG91bGhpw6hz?= , Marius Gligor , Samuel Jones , Thomas Costis , Vincent Chardon Subject: Re: [RFC PATCH 00/25] Upstream kvx Linux port Message-ID: <20230105104019.GA7446@tellis.lin.mbt.kalray.eu> References: <20230103164359.24347-1-ysionneau@kalray.eu> <7c531595-e987-422b-bcf7-48ad0ba49ce6@app.fastmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <7c531595-e987-422b-bcf7-48ad0ba49ce6@app.fastmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-ALTERMIMEV2_out: done X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 432B2C000A X-Stat-Signature: 5xf3nfeo7o8mhn9nbhuqin1g4yy3ef9m X-HE-Tag: 1672915223-123480 X-HE-Meta: U2FsdGVkX1/dE4x0+lf1IDm45d4EG3zAWKHPNR+FG1OkmKIOKLpFZfKCbOrLHtqIsgHDUnt+YcisrohAUlCIDH9VPp2UEmabpFpV6TcRpcNfhyK0SKWTlLzelBCCUA2rzigq+IX+fowA7ncs36URDFRP8OYLBATVgzgQTim1ETl06i6F0mp5OyMBqVuKDQaMnKQ0wQwd6j/wDGcz9w+Dc+jzv0u/WqnwEEj5hzzDOktmcdbYS4HWXu3qQob+KAg3YY2dDi41Q+wgqw1TGzB+3Uzezqh3Uus1wixaBbKGamSejRkE0iotTU2iatQgIngl4osJR9ivKwor2Sa9vayoq7v59dJUSdUq+PBV4uZCdSe+RbRztgMuQ1BTn9zniXRBy5w6xqUnVWB1KsBa5y4u71RKN5gExvsy6KD8ClQAuVRRQa+HDdR+iTk5fwpFeQ4VoOkrZajldy2xX+Y7GV0Iy08h5Msoooty3qmgmM7YdD4nppkOP5k32zA4Hs63oN/2WDKv4tC6qzXkaFMdeHM8jOFyofuW+MjdkFsKPdEd6evdj14mhV+yzNOqdozaNPx+kBdQ3fazI7DsSNS1gSBNrRRql2fS8eUXkaUXksBTyrfh/dWAWDZpCeD5s06zge6vglZb0Nm5VCMKnqRVnhDDiFq003hpMH3oYjHRBzUVn9EyvcxglOKaRNf9Nmd1mXQ71CJPqy/i6Fmgz43PdzMJexoM4DEhIIIOCFTsWlHc7Zb9lkcnHQelnbF3seh+htwWGhZrO2r/Hrjzr4Ia6T/othUffd6E1w/hTsWV2XAU3pFp8qNnOs3EWXCuhCQSvDXpLyTwv2E+r1AYgNqbR9TdqlVZhjPl/g6fkdooxV0gKvgQvbkpwu2V4FbZvPbI3rV86vRoktxZaQA7QUnuOwPZPehPkkg9yvtxApyTRh5hfIqbD5GZmPAUvyXztKTOtC3DXMrxbUoTutfLM/K9H+z zF3xoD+3 loH+2EkjEnaSHZQHV6CjVMg634QcOCBo29NHUvelq5vEUVOKgT06bLy6LyDsO5KMWSWpfkr1wEaiDjcGYf9eBPRJpBURm2i411fwDXLM7SHFYAqepZNty6s23bVB53E8Xkrhj9f/g/ShI06y2g/qXcekgTg== 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: Hi, On Wed, Jan 04, 2023 at 04:58:25PM +0100, Arnd Bergmann wrote: > 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. Thank you and all for the reviews. We are currently going through every remarks and we are trying to do our best to send a new patch series with everything addressed. > 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? We misused get_maintainers.pl, running it on each patch instead of using it on the whole series. next time every one will be in copy of every patch in the series and including linux-arch. > 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. right, we are using memcpy for {copy_to,copy_from}_user_page which has a simple optimized version introduced in (kvx: Add some library functions). I wonder if it is possible to do the same for copy_*_user functions. > - 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. > Ack ! Jules