Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp969706rwe; Fri, 14 Apr 2023 12:11:39 -0700 (PDT) X-Google-Smtp-Source: AKy350ZdfUmgKaMnlkN2IaEY0nD5RboIXltONx768gmDwZDwqJOE+bKOcO20yP0fFldPf69n3Vp8 X-Received: by 2002:a05:6a20:41e:b0:dc:4369:16a4 with SMTP id a30-20020a056a20041e00b000dc436916a4mr6594251pza.19.1681499498943; Fri, 14 Apr 2023 12:11:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681499498; cv=none; d=google.com; s=arc-20160816; b=mnS41YKjMgzoiPhzbfmNSdLOzXXy3XbhdrhEF1uLP5ChpWxH0du3/FKba49z+Eh9Rq h1aFVERdWxVX8JnaC6WkLgJAuuisO2G8YtDY32BhUdRR0LPr2MDnXQvTgatBvJA1Ax8D U7smmK5E0bF9u6Oy4owROHQXdXz4q8dSft3YxecjdZF5LjG2L9EsZTQtwFLq0dL4Lre/ gdMfdXzblLNsmEcCz3ap5qJ0j27evzOZ/mUYQVvCKf0KNQN14aSd3aiZAxXHGNo+duPW 4Jjlzj8PFIeeFEAXL7fq/RrSXbDs0m9yJLHLZ6LDQL+DKGBx3BKKszO6gPTC4d/VfDb+ xvLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=yWR09PnwXA83YCTdrYoULV0/Df8/NB3IaqlxX19sB5E=; b=O5/LvuJDX8+QPbRHwNOTUxXs4g9eT3lsYpOtQ/wCvENvwsJZQZ027x1OFWAxcYi7qU 4qft23qbkaeRL9uv3eMpBrbR86kYBBt6Ae3tDXPRgAt6nFMXK5JN3KapwL6qABrvidmS LS6OpSxclfkDKrFPMIoVGlTUHunDtFCzog4XfMi+Yf+et1kBW5e6R1o0mzzgxIB7VcWW 6tA9TJKRNRTQVJG2RBy5ya0YB1AKT9fY+aJNZn59bD3pCBwjmWThs0XSNzQXwmCzi5TT gxHkh4hbEQhVSWu8oOa83tcuytNmVZLOzrHKY2d8qGBcfIylfnyBRcFr/6G7n/77UeBI qxrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=sS9TNcxH; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y72-20020a638a4b000000b0051b7f3f862esi1162238pgd.824.2023.04.14.12.11.26; Fri, 14 Apr 2023 12:11:38 -0700 (PDT) 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=@gmail.com header.s=20221208 header.b=sS9TNcxH; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229491AbjDNTAT (ORCPT + 99 others); Fri, 14 Apr 2023 15:00:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41100 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbjDNTAR (ORCPT ); Fri, 14 Apr 2023 15:00:17 -0400 Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90B42A24D; Fri, 14 Apr 2023 12:00:04 -0700 (PDT) Received: by mail-io1-xd31.google.com with SMTP id k13so19048964iov.10; Fri, 14 Apr 2023 12:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681498804; x=1684090804; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=yWR09PnwXA83YCTdrYoULV0/Df8/NB3IaqlxX19sB5E=; b=sS9TNcxHWLjDdEZTybGm8OXLbHVx4dLpkhAHGEU00ZQQv4wuc8sm7L9HUctfE3wcIw LjkFzJmhjiqwr2tqQpSbDZpDkVK1kGk7LRKUhmU1deWP6w0z1UEN80Ssj0v9B4E2l7n1 MMz4S0zQoXw+Z4rQan8za66ztL7n/GI8bfDPFominYq9g70Nru3tO7F76iJKef3BYzAl K7pVDgr0XyGKQ+dEhv9ZtXYOLOHdQvdW//SQmMOCH3J7Q+gLQM9JkWBzvn5aGsmrC8ze jjDPNguPhnKDRDNmfzf2xQPjyp6b5bTg8XWl4ZRxD5QeCKfJ0+lEPfktogDg1Y6y1J3Q 3bVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681498804; x=1684090804; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yWR09PnwXA83YCTdrYoULV0/Df8/NB3IaqlxX19sB5E=; b=TrC+/7nS4lYXluPxi4l/nqQr59MUOXAhuILMqvm/HGPrq+BuJzAeanpj8ETIvLd52x +TGAfEJhayz0Jc/grtSXZFxfXeHCzY3php9K8F+IfRApRCWJgIWNjQUruT9zw1owtYr9 j2UlDPtdDJyY96der9tDkYQcrK3swCE2SbQ2MW+R5eFe6zFU9DXs9L5bgbyc4IahLB2t v0L8GdEaEMJot5HxEFIUMUem2rfsFsI+q41NPcQ10rLFsXf7KPZIPcUb7F4i5bzMswLl LirYfGgZ0QEaBF/oaRpAx88qNJqjlTAbKNDZjlz8XRw0uMPJm5CzvV1y6nnyp7OMetJX vW7w== X-Gm-Message-State: AAQBX9f48aYMmqPgSjSmtjrtfl8V1XhDc7D5kfVP3/0onDeySA4PYx8s AMFbCQK/lvm4EAkPeyb+2ntMlHVkifBuGubSD1k= X-Received: by 2002:a02:628f:0:b0:3a7:e46e:ab64 with SMTP id d137-20020a02628f000000b003a7e46eab64mr2919644jac.1.1681498803871; Fri, 14 Apr 2023 12:00:03 -0700 (PDT) MIME-Version: 1.0 References: <20230412110900.69738-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20230412110900.69738-6-prabhakar.mahadev-lad.rj@bp.renesas.com> <20230412-cheddar-prune-5ce03ccf5581@spud> <20230413-aorta-unheated-c9bb35411fb2@wendy> <20230413-staunch-superman-e71fd3303176@spud> In-Reply-To: From: "Lad, Prabhakar" Date: Fri, 14 Apr 2023 19:59:37 +0100 Message-ID: Subject: Re: [PATCH v8 5/7] cache: Add L2 cache management for Andes AX45MP RISC-V core To: Conor Dooley , Heiko Stuebner Cc: Conor Dooley , Arnd Bergmann , Geert Uytterhoeven , Guo Ren , Andrew Jones , Paul Walmsley , Palmer Dabbelt , Albert Ou , Samuel Holland , linux-riscv@lists.infradead.org, Rob Herring , Krzysztof Kozlowski , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Biju Das , Lad Prabhakar Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Thu, Apr 13, 2023 at 10:06=E2=80=AFPM Lad, Prabhakar wrote: > > On Thu, Apr 13, 2023 at 7:46=E2=80=AFPM Conor Dooley w= rote: > > > > > Is > > > dma-noncoherent.c also valid for RISCV-32? If not then we can make > > > pmem.c compile conditionally if DMA non-coherenet is enabled and we > > > make DMA non-coherent depend on 64bit. > > > > Could you drop the {s,l}d in exchange for {s,l}w instead, or am I > > progressing even further into braino territory? > Just the direct exchange wont work in addition shifting + oring to > take care of 64-bit will require. (Correct me if I'm wrong here) > > I was wondering now if we need to store/restore the s0 and ra > registers. I stumbled on an X86 implementation which has call [0] in > the ALTERNATIVE_X() macro but here we dont store/restore the > registers. Is the RISC-V implementation of ALT macro different > compared to x86? > I did try a call without stroe/restore of s0 and ra registers and that didn't work!. So I have re-written the assembly code which makes 32-bit RISC-V compilers happy. Once done with the testing I'll send a new version of this series. Hopefully the last ;) Cheers, Prabhakar