From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greentime Hu Subject: Re: [PATCH v2 19/35] nds32: L2 cache support Date: Wed, 29 Nov 2017 19:53:37 +0800 Message-ID: References: <380808fe9139e2c3800ae76dfa6aa5cbbbc4894f.1511785528.git.green.hu@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Arnd Bergmann Cc: Greentime , Linux Kernel Mailing List , linux-arch , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Networking , Vincent Chen , DTML , Al Viro , David Howells , Will Deacon , Daniel Lezcano , linux-serial@vger.kernel.org, Vincent Chen List-Id: devicetree@vger.kernel.org Hi, Arnd: 2017-11-27 22:33 GMT+08:00 Arnd Bergmann : > On Mon, Nov 27, 2017 at 1:28 PM, Greentime Hu wrote: >> + >> +#define L2C_R_REG(offset) __raw_readl(atl2c_base + offset) >> +#define L2C_W_REG(offset, value) __raw_writel(value, atl2c_base + offset) > > __raw_readl() is generally not endian-safe, and might not have the barriers you > require here. Could you use readl/writel here, and only fall back to > readl_relaxed()/writel_relaxed() when you absolutely must avoid the barriers? Thanks for your suggestions. We will changed it to readl/writel >> diff --git a/arch/nds32/kernel/atl2c.c b/arch/nds32/kernel/atl2c.c >> new file mode 100644 >> index 0000000..dd87fc9 >> --- /dev/null >> +++ b/arch/nds32/kernel/atl2c.c >> +#include >> +#include >> +#include >> +#include >> +#include > > If this is the only file that includes asm/l2_cache.h, then I'd simply > move the entire > contents in here, rather than having a separate file in the global namespace. > arch/nds32/mm/proc.c also includes this file so I will keep it.