Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp499758lqd; Wed, 24 Apr 2024 08:31:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUVqOsxK0YYyMDaaPIWWLoBDJZGBSbhqIimvHYndY9P7BIFtOdY7qA2u/JVxEnrsnN3YXNH7TVPisXq/MrASkhuaE7P/xg9xmmRtc35qA== X-Google-Smtp-Source: AGHT+IEnxDjqzzR2sbM2AYgn4YpxZtjTXhEcC3Wb6GUy0CmAClXd8Tz7EdN8fEZ1vR8zQWeEzMmL X-Received: by 2002:a05:6a00:4b53:b0:6eb:1d5:6e43 with SMTP id kr19-20020a056a004b5300b006eb01d56e43mr3498090pfb.11.1713972675314; Wed, 24 Apr 2024 08:31:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713972675; cv=pass; d=google.com; s=arc-20160816; b=WLDi1/RwGQ6WPpy4eNIavjmBjunBA2rMBn2B+kes1NJOrUuUhDEwXLC+AdR7v8MaTJ 7RTGmLXYk0wRDum0CobPN1YJm1inDF6A3l5ofLy2pENSG72+48lTV/oqez0t1fwt1spW DkjMWf/KGxyWyPJJWmGNWY1gq2XA4YqT60tRU8DrR4WrT7C27cyzKUWLF+uzunHycCtB JSSJxZFTkCe7radKpWTnJQdrgEf/UM7TbI5afZgHeR/5Uc+pKHHGplM8F/eXaIMRx4vo 9227eQeM4Q9abEBYg5AOkC14vdE9E0jm42CEGyaYdyssobBzstYJTCDRaHvm0+RhxXDd PwOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:in-reply-to:from:dkim-signature; bh=5esocC9ZFW0Dfcow+sGknBU1wI/0vCj6NFX+zWkQdjU=; fh=rY69FR89CxVCtBgo1wwehB9E08fa0MYuJWKjte7BvmA=; b=kBq1/0/mVITsymVNWNVl/fxF9kNsLNf45x/fPZJ1Ig4t3L5D4q8EwPVTB3l5SXwKhY Cf56jpVwDlG2krE2IQCgFrczaj1P0qzsgM3GfXWMpwlfR+hn3UHMhWMh5PlnlEvt2MQS nt0R4FOH7rXdEDdyf1yo56/31MYV7JB97ilix2hdCUW3fFOP1ZaTK8JJQJI3dzYneisY QGwNgb4WAEhp9ORU8OQd3B9IVxnSKrWI16CQZgsR44HrNJHdrm71gY0TmTvwCKB+Ayro hKokqB3o49h08IbqKKR30SMmmQtDCOXdtz+yCHVBikDApmcleqPdXfZFzw50yNTIstvg hxMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=DA021eMb; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-kernel+bounces-157143-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157143-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x24-20020a656ab8000000b005dc7e971180si11337784pgu.543.2024.04.24.08.31.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 08:31:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157143-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=DA021eMb; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-kernel+bounces-157143-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157143-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id DAB43B22E7F for ; Wed, 24 Apr 2024 14:58:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2369915F3EC; Wed, 24 Apr 2024 14:57:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b="DA021eMb" Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1ED3C15EFB7 for ; Wed, 24 Apr 2024 14:57:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.188.122 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713970668; cv=none; b=cMIplbI/EGrcAvRVhaKIw6uG0puzlw++jl7GV3HpVvLXhGzgFULsZzJ2BycUwdhIieYEiOpl8wrbDACqbX8l4wyfYshBpCiU0iwtZkd9n9eu9haQiJurrtHKxta2yY1ThxmuIHlbq8p/boGTREaRClN2rYFId0Q/3joaR9UBXhg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713970668; c=relaxed/simple; bh=QMslz113vv9u8rbbuaQqQeBM4KeubIHYp+3TNEFioH4=; h=From:In-Reply-To:References:Mime-Version:Date:Message-ID:Subject: To:Cc:Content-Type; b=cjgKYNTPM4N9fuR4YgRgAbFoXxkDJlWHLXqmc/iN3KCdA0pU0Irmr0Y27kraWFLkdktuHoNe47pjlsdISxaDfS/6c/ylRSbjvQhESFVnzdl0Epm/PGwj88FEI+I/3C5Uh6cLO/CCPoc2oqfV/+kzgOER1goTOwSGUXgY6JJ8ptk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com; spf=pass smtp.mailfrom=canonical.com; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b=DA021eMb; arc=none smtp.client-ip=185.125.188.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Received: from mail-yw1-f200.google.com (mail-yw1-f200.google.com [209.85.128.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 466E540590 for ; Wed, 24 Apr 2024 14:57:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1713970664; bh=5esocC9ZFW0Dfcow+sGknBU1wI/0vCj6NFX+zWkQdjU=; h=From:In-Reply-To:References:Mime-Version:Date:Message-ID:Subject: To:Cc:Content-Type; b=DA021eMbB/XsGVtLKMIMG1mKtATTf63AUeW8Lt7+LvgkjAHISZm3JwefjHtBM0H/i qSqXIZdulN2d2BUMAaxs8t7v4xqrKHa3Y8R/Ip/+qfN9otkde3ASQZz/WuUtz3FRkK nGsWCwKXm5bybhYdQsmbsp6SjRONllK815yO0yGLODAgp/FNunveRRRttpzMLf1Kt1 ofhkg+UJAa2TYjZmLyFfGJTSw+360rGIGvmL8unD0q9lzqewXSe2JIN8Jcm8iCyugq n6bJ+5afDhLXHDjSDSjc6DQQAd7y2qfyfXbYwEBaIIj9u7DD4Sk+zWur+W0SpX7INQ +Dl6pccMipFcQ== Received: by mail-yw1-f200.google.com with SMTP id 00721157ae682-61ae546adf3so110293037b3.2 for ; Wed, 24 Apr 2024 07:57:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713970663; x=1714575463; h=content-transfer-encoding:cc:to:subject:message-id:date :mime-version:references:in-reply-to:from:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=5esocC9ZFW0Dfcow+sGknBU1wI/0vCj6NFX+zWkQdjU=; b=wEfJtBVfCKT0TVqbhG6t8k5OXAUq4ZsYdM5lC+wCMDLaYBe1hXBrZrYlwiGGSHSDok pXSizoYiMRH4SlDMtM3vzfbypHoK9LgZcwtWIVb5SWY4Bl38FdeNJ6c0wyqc5khDoOcP OpUPkuGvMGIh8Ac5xTUZYR2pguh0PdYnag6XcohzkrhARhZTZacG3Zv2YwIYHC3dofLW 326ITXsVjQ9zsDJC+TQssXvaBCNw8CcU0eteSjtSLASfB2TceCPngp/3vyTuFFNkcuUs 8o6uwxuvozQ8zllh6Zw9V0QSMP47XLzlUUIt5LVEaXXNhxiPF5G2iTR+N9Z5M0kfuhey pP4A== X-Forwarded-Encrypted: i=1; AJvYcCVq36DtJ9kJMApcmW07mUsThVMhlBzt4jcs98T1MysI7sZBk/GqsX8kV6vuU439nXq5amijAydgMwq7XIVz3b3aHQAudkcAFIOCRbzh X-Gm-Message-State: AOJu0YxOfFN4om9OTPSQV5McHfvHbcLxiEQ/x71oSrrrojuz1BlZmPUv IxM6nqdPouiVaQrqBdTooJgkd5pKq+Sk6UndIo6xDfe/x0JGz6AySmva6vvyE5OqPTz+NEDNYO0 27nt3OPvOSW3+Oh2p1FYsDeDiMHBbE4/YGAEr8nifqYOq+SSCka1XjcI3N4UkTNswT0uJhbyK3n QOB3VjuUqBIFGkqUFy5TW0VKd61HQSZ3QPpiTe7OkKMHyuCdHqBk9+ X-Received: by 2002:a05:690c:3612:b0:609:ff22:1a88 with SMTP id ft18-20020a05690c361200b00609ff221a88mr3109067ywb.44.1713970663329; Wed, 24 Apr 2024 07:57:43 -0700 (PDT) X-Received: by 2002:a05:690c:3612:b0:609:ff22:1a88 with SMTP id ft18-20020a05690c361200b00609ff221a88mr3109036ywb.44.1713970662973; Wed, 24 Apr 2024 07:57:42 -0700 (PDT) Received: from 348282803490 named unknown by gmailapi.google.com with HTTPREST; Wed, 24 Apr 2024 07:57:42 -0700 From: Emil Renner Berthing In-Reply-To: References: <20240424075856.145850-1-joshua.yeong@starfivetech.com> <20240424075856.145850-2-joshua.yeong@starfivetech.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Date: Wed, 24 Apr 2024 07:57:42 -0700 Message-ID: Subject: RE: [PATCH v3 1/2] cache: Add StarFive StarLink cache management for StarFive JH8100 To: Joshua Yeong , Emil Renner Berthing , "robh@kernel.org" , "krzk+dt@kernel.org" , "conor+dt@kernel.org" , "conor@kernel.org" , "paul.walmsley@sifive.com" , "palmer@dabbelt.com" , "aou@eecs.berkeley.edu" , Leyfoon Tan , JeeHeng Sia Cc: "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-riscv@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Joshua Yeong wrote: > Emil Renner Berthing wrote: > > Joshua Yeong wrote: > > > > > > > > > Emil Renner Berthing wrote: > > > > Joshua Yeong wrote: > > > > > Emil Renner Berthing wrote: > > > > > > Joshua Yeong wrote: > > > > > > > Add StarFive Starlink cache management driver for > > > > > > > JH8100 SoC. This driver enables RISC-V non-standard cache > > > > > > > operation on > > > > > > > JH8100 that does not support Zicbom extension instructions. > > > > > > > > > > > > > > Signed-off-by: Joshua Yeong > > > > > > > --- > > > > > > > drivers/cache/Kconfig | 9 ++ > > > > > > > drivers/cache/Makefile | 5 +- > > > > > > > drivers/cache/starfive_starlink_cache.c | 135 > > > > > > > ++++++++++++++++++++++++ > > > > > > > 3 files changed, 147 insertions(+), 2 deletions(-) create > > > > > > > mode > > > > > > > 100644 drivers/cache/starfive_starlink_cache.c > > > > > > > > > > > > > > diff --git a/drivers/cache/Kconfig b/drivers/cache/Kconfig > > > > > > > index > > > > > > > 9345ce4976d7..9181cd391f53 100644 > > > > > > > --- a/drivers/cache/Kconfig > > > > > > > +++ b/drivers/cache/Kconfig > > > > > > > @@ -14,4 +14,13 @@ config SIFIVE_CCACHE > > > > > > > help > > > > > > > Support for the composable cache controller on SiFive > > platforms. > > > > > > > > > > > > > > +config STARFIVE_STARLINK_CACHE > > > > > > > + bool "StarFive StarLink Cache controller" > > > > > > > + depends on RISCV > > > > > > > + depends on ARCH_STARFIVE > > > > > > > + select RISCV_DMA_NONCOHERENT > > > > > > > + select RISCV_NONSTANDARD_CACHE_OPS > > > > > > > + help > > > > > > > + Support for the StarLink cache controller on StarFive > > platforms. > > > > > > > > > > > > This is a bit misleading. The JH71x0s don't have this. It's onl= y > > > > > > on the JH8100 so far, and hopefully later SoCs will just > > > > > > implement RISC-V > > > > standards for this. > > > > > > So maybe something like > > > > > > > > > > > > "Support for the StarLink cache controller on the StarFive JH81= 00 SoC." > > > > > > > > > > > > > > > > Hi Emil, > > > > > > > > > > The StarLink-500 cache controller is not designed exclusively for= JH8100 > > SoC. > > > > > While it is true that it currently exists on the StarFive > > > > > platform, CPU/SoC that does not come with Zicbom extensions > > > > > supported would need to rely on this cache drive to do cache > > > > > management operations. I think we don=E2=80=99t need to mentioned= 'JH8100 > > SoC' here. > > > > > > > > Wait, in the previous mail you said that future designs will > > > > implement Zicbom and not need this work-around, but here you're > > > > talking about other SoCs that do need it. So which is it? > > > > > > If you visit the company website and look for StarLink-500, you will > > > find that it is a standalone IP that the company is selling as an > > > interconnect. Anyone who integrates StarLink without Zicbom extension= s > > > may utilize the cache management operation from this IP. > > > > So then the "on StarFive platforms" part is wrong? Or will this always = go > > together with the Dubhe cores? > > It would be 'on StarFive platform' without 'JH8100 SoC' that you suggeste= d. > StarFive's newer cores that will have Zicbom extensions supported. Those > CPU core will not need to have this cache controller enabled. No, what I meant was that if you're selling the "StarLink-500" IP to other = SoC manufacturors then it will not be restricted to StarFive platforms. So then "Support for the StarLink cache controller _on StarFive platforms_" is no l= onger true, right? /Emil