Received: by 10.223.164.202 with SMTP id h10csp1251955wrb; Wed, 8 Nov 2017 01:03:25 -0800 (PST) X-Google-Smtp-Source: ABhQp+RbVESmZYLlikGDtEHc5V2dfqvZzfz8ntAy8Rpkuq1uWLvj3qK1jcabV1M2P/JIq/F5hjoh X-Received: by 10.99.98.6 with SMTP id w6mr1654458pgb.189.1510131805494; Wed, 08 Nov 2017 01:03:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510131805; cv=none; d=google.com; s=arc-20160816; b=ridMa6ZRFfboRBCiNGRxhFrZqLG7mMriNrgyujiXlyLWs8O2G9hnVcxrShv7RhIxnN T4cQtwB/ZLonghO8txoJ3o2d2PqREDbI9lyAqB0OLfat/JWwq7S6Hfl6WsbpIZewEKnK wrCTZaB7RTCiS9PaW/pmGG60+6z8zWXwWze/DrJL7C9VOO401hnumIvLnuQjGiaAbz47 ZUBI3H5CNUP/2yb3sg6+GUtA/3Vebl2Fkj9MweUGxU6yLFwdTDozBhB4mYt1fEaEwnUC qp5muzcC+xJ5zvhka12wVR//sVG2zKxWE7EBdjfH0UK4881ih3JYwo+CkF2r7ZCOT7RF qodQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=uNQmj38PaVBfgX9uq4kbIwEYC3upXS9CmcAvc3mvseY=; b=B/16cDfrx5Et8iiGp5Dds888WiG36qDxmenT6EOYr3Qd786U0e4BBUTnKWqUC93SJv qxpdmW5ZFSxovsXVSY0+qa5HIES29HgZ9vQcnNMSTnN+K6ZpXFTd49FKW4BysWx+ALSP 7mYFA9y+2DDpMmKDhbzhsaLfRPwo/cZ7frLzc/l5EZb7CgVXQwOdiZuD37mk4zORfgzf r0QLURLMwx3ZAn02J3X5mMjicqTXMAdNEkw6L5YFBCKDi3N3HhAFd0afcGG7uCO4iUCT Iwp6kCZmrwn6Zs3Xxe6vWT0A5hW8lPysu1W8MnodSSBrHS2iQOmQJg54aGXrF4D6vsfX SmDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=h6ShQ7bv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6si3265284pgf.676.2017.11.08.01.03.12; Wed, 08 Nov 2017 01:03:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=h6ShQ7bv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751602AbdKHJCd (ORCPT + 91 others); Wed, 8 Nov 2017 04:02:33 -0500 Received: from mail-vk0-f41.google.com ([209.85.213.41]:50652 "EHLO mail-vk0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750812AbdKHJC3 (ORCPT ); Wed, 8 Nov 2017 04:02:29 -0500 Received: by mail-vk0-f41.google.com with SMTP id h142so1251149vkf.7; Wed, 08 Nov 2017 01:02:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=uNQmj38PaVBfgX9uq4kbIwEYC3upXS9CmcAvc3mvseY=; b=h6ShQ7bvK8Z8i7PFmPEgHyM1stpFKcRyXY0U/GFDAZjkcTGyT6khB55KW/wF7K4WPK 5O4JLiSJGBx2HmWlgCvGqaR1aAid52xzsr5bw9h87EoUQ7zKwZUX/sIWr1ukbV8KTuOc 4j3gQiY844akSl7U9XUQ5ySUGMKlM3UlsaYqtbCPM9OjJw6U3gCK7aFwvEc3gwPki6oc ijm4fk15K8wlA2PbaBbb/nHS716inVxgzgpERUYkwqvSSHkdZ2me2MML+zJVP4bEh81B u7Eta+X1zK1Ij3XFbzCL/TW29MBLkK1UIbMBA1bHczmz7BEyRG+QPYyry32RqYFv/GUC vbyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=uNQmj38PaVBfgX9uq4kbIwEYC3upXS9CmcAvc3mvseY=; b=mTgtuw3qrWzITmczJuV0q8euiCxfCJ1H3u1BD/ScdofZygAIZSH8a4Bmv0RSBUKETH 9Ok0aTaYS2CrsBf2oiu+j/O14RX0gt2335VnlWHkjZe9nuZ+8/PqVEwT6AobVSf0m8oD D9hIdnEzP9gknSk7L+eRdawlsY+oFelDggIg3vPRfMWgqJK81fBHsyPhk2yG0g2K6rP8 g1/tyVJ+/cAHVlG7SltpwkfqTOi0FQxBzRHswE32NKT426slGnpqzJGca4/NsoNFbKIO gS9s7YqK4d9AFLQN5O4RECgYnDLGtbBQL3S85ncUzkhEeY86I/pJBSWg4lVmlYIkAZRo VRnA== X-Gm-Message-State: AJaThX5jzTG4GQy5lHMlQrS6DX3dnrirFK2kqLg1lEA8Jli+/ATG+D1y t+aw6xWKSjEmz/XQq8te5Ia+NsbPOAvS7QCUQho= X-Received: by 10.31.170.142 with SMTP id t136mr85710vke.198.1510131748804; Wed, 08 Nov 2017 01:02:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.62.8 with HTTP; Wed, 8 Nov 2017 01:01:48 -0800 (PST) In-Reply-To: References: <220aabe68365f970ed6de79ef88f9598f272dcb9.1510118606.git.green.hu@gmail.com> From: Greentime Hu Date: Wed, 8 Nov 2017 17:01:48 +0800 Message-ID: Subject: Re: [PATCH 08/31] nds32: Cache and TLB routines To: Arnd Bergmann Cc: Greentime , Linux Kernel Mailing List , linux-arch , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Networking , Vincent Chen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2017-11-08 16:45 GMT+08:00 Arnd Bergmann : > On Wed, Nov 8, 2017 at 6:54 AM, Greentime Hu wrote: > >> +#ifndef __NDS32_PROCFNS_H__ >> +#define __NDS32_PROCFNS_H__ >> + >> +#define CPU_NAME n13 >> + >> +#ifdef __KERNEL__ >> + >> +#ifdef __STDC__ >> +#define ____cpu_fn(name,fn) name##fn >> +#else >> +#define ____cpu_fn(name,fn) name/**/fn >> +#endif >> +#define __cpu_fn(name,fn) ____cpu_fn(name,fn) >> + >> +#define cpu_proc_init __cpu_fn( CPU_NAME, _proc_init) >> +#define cpu_proc_fin __cpu_fn( CPU_NAME, _proc_fin) >> +#define cpu_do_idle __cpu_fn( CPU_NAME, _do_idle) >> +#define cpu_reset __cpu_fn( CPU_NAME, _reset) >> +#define cpu_switch_mm __cpu_fn( CPU_NAME, _switch_mm) > > I see you have copied this from ARM. Do you actually need the same complexity, > with the ability to build either optimal code for a particular CPU or > a multi-CPU > version? > > Most other architectures seem to have settled for doing just one of the two > models. How many CPU implementations to you expect to support that > differ in all of those functions? > I think we can simplify the implementations because we may not have that many implementations. I will refine it in the next version patch. From 1583486918412252644@xxx Wed Nov 08 08:46:44 +0000 2017 X-GM-THRID: 1583483405039237068 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread