From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751482AbdKHIpG (ORCPT ); Wed, 8 Nov 2017 03:45:06 -0500 Received: from mail-oi0-f52.google.com ([209.85.218.52]:56547 "EHLO mail-oi0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832AbdKHIpE (ORCPT ); Wed, 8 Nov 2017 03:45:04 -0500 X-Google-Smtp-Source: ABhQp+TCipibChHP78NNzVTbotETf07kzpeHnQiKQSFqAjeGdIWbLpc1A7KgP0k8/CgrNeYsynMZk2JLFFLPnweG00k= MIME-Version: 1.0 In-Reply-To: <220aabe68365f970ed6de79ef88f9598f272dcb9.1510118606.git.green.hu@gmail.com> References: <220aabe68365f970ed6de79ef88f9598f272dcb9.1510118606.git.green.hu@gmail.com> From: Arnd Bergmann Date: Wed, 8 Nov 2017 09:45:03 +0100 X-Google-Sender-Auth: VDHhAPNVEpNRK3tY_li-XPDV_VA Message-ID: Subject: Re: [PATCH 08/31] nds32: Cache and TLB routines To: Greentime Hu Cc: greentime@andestech.com, 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Arnd