Received: by 10.223.148.5 with SMTP id 5csp7258340wrq; Thu, 18 Jan 2018 03:09:02 -0800 (PST) X-Google-Smtp-Source: ACJfBosn+ygFU6nZfX4uvAG7T7+by+T/+N/ErDSPbKkx9weUE8uLHoD8RPvb19gYnavcHmLQrOJp X-Received: by 10.99.4.216 with SMTP id 207mr19385402pge.45.1516273742268; Thu, 18 Jan 2018 03:09:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516273742; cv=none; d=google.com; s=arc-20160816; b=J6O013CaauQvqC6vfeuwhDIBI+yJDy0CPX5fWZ38jnkH8Y7wq/2vnrjNXMk7htvsiV RiAYSFUtNAQGGSPtwGs2Dj7w9fDysoBPtV1/NcyjgRBn12ATWDPYwTteVuzEVIn26FCO eyR9O8MoGxDqzRIdAaYgXBWOHEQRZ1UZnEkJP8OCUYZLz07Ft1jq+qVeI3PLrX0+MK8o SgKLlp+UsZReFAEWnbd1q/k8cEm3WrdZMDeD9SyljfAJ8toVpNHQ8Ds1YSh00NwRckzN NlY568jD8KYc/FrsLnENv+uLZ7d0tEnlgdwGT2H90oQl4sZqdZI8uwjTJQC2buAAO3vX mBuA== 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=Ds5pPOOTayLwoXeBlJNGndXLgjhhxq4sq8UF2mAXbQk=; b=0tavRM4n/UcrfGu6VpUxgmBl86hiwe1cyfjUJz5u56xkiox4J2mrJd0ocBuL2RVdw/ O3L9o/DNJ4EYFP4j4ltuXyB8ThEv7bm2BFu0fmY4q2KaVXsG8nuqMo+d9Kgp2m4vI2jk d5nOiAccCTMVGU78PfXYvJuBrDv/zDF8FRoBspOTTM27v+3u7TUY1/cvPvWSka15oTM9 M1/uZbBLTptTxRPtw8DlyZHoYtjyfCmIZj+kekXCqU2fVBcNfd4mhphGGg+hKes3MChc syVfAaM37qLtdnrhHypLwlKcBr9p+IlkRgs//qG/YvBQFbFk+nqiwRd+X23q8mJhHA2J +Daw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=obGRjmYY; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10si7066617plo.820.2018.01.18.03.08.47; Thu, 18 Jan 2018 03:09:02 -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=fail header.i=@gmail.com header.s=20161025 header.b=obGRjmYY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755111AbeARLAe (ORCPT + 99 others); Thu, 18 Jan 2018 06:00:34 -0500 Received: from mail-oi0-f68.google.com ([209.85.218.68]:46678 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753017AbeARLAa (ORCPT ); Thu, 18 Jan 2018 06:00:30 -0500 Received: by mail-oi0-f68.google.com with SMTP id d124so15377605oib.13; Thu, 18 Jan 2018 03:00:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Ds5pPOOTayLwoXeBlJNGndXLgjhhxq4sq8UF2mAXbQk=; b=obGRjmYYO2wfXxSEQNpsiyY8R7M0EiBBNGrvFG0gdXaXzwRQ9GFP42GQW+tPGxLlV6 rA1G+89If3MVQWD8vAzFRUdimeFTtxeTuSc40Rsz36dOQgFlrdZUGjXDO2p6y/ACH5WG kPMiued9sQYk2jTFjN33jiGqzX2a3BWUU7FSFih2V6hR5nSQcKWrSRbxjJCV5G6zcVfR dJzpp8KNr9Wkdh1j3vQMNQ8ekesL9OOnKlGqK9+R7hfsBZhc9tRy5QBlGKacNuF/h+Lt Gu3mmxbYxvSIpHzlKy7MVTxQk++GEqEQwqvFdMJH6gKWGlKmPMyefI7udYuxGeRKh1XB xMUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Ds5pPOOTayLwoXeBlJNGndXLgjhhxq4sq8UF2mAXbQk=; b=qRZMDHBXtp5g6UzJ46TyJ0BZq9rRlLbebq6kT5+kw32Fw9WQRWJdyYaLQnyTki8MUx T/NISZMTaEB90lXb9JR6lMMfPfFL2IhbVVbcaBBi1SNd8HOfja4aZNHwMEMYaAhXYzmC 6mVA/uGvhyxWa8FrHweAo0W2AbRqJqwbmHywGmPm1jiv55gkKwYDazFeXuVuY9alLIyG 7/1pLVJRSEkOu68WrQNjX/6H/GkF0rgtzZFm23SH1ttT7m5JkvBmINCh7rCa2jDZt0el UZwNwjOqZQDnUVyusbvDBQp4IubPsyMpO+fWO+i8yyKCppKHjbgGgxfGwqvf4xZdKwEM 3axQ== X-Gm-Message-State: AKwxyten1q0bf8ha96rI+VMTK5MHPAN5XJlb1CcanlwI5sgyhLsC+lJf KpNcPFmFYOUT6ugiOSXdzOImgStBM5hIIhYpbFk= X-Received: by 10.202.175.76 with SMTP id y73mr2506183oie.53.1516273229369; Thu, 18 Jan 2018 03:00:29 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.17.89 with HTTP; Thu, 18 Jan 2018 03:00:28 -0800 (PST) In-Reply-To: References: From: Arnd Bergmann Date: Thu, 18 Jan 2018 12:00:28 +0100 X-Google-Sender-Auth: 1vlty9q4ZFHJoOG9I4eGhQv51_8 Message-ID: Subject: Re: [PATCH v6 29/36] nds32: Build infrastructure To: Greentime Hu 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, Geert Uytterhoeven , Linus Walleij , Mark Rutland , Greg KH , Guo Ren , Randy Dunlap , David Miller , Jonas Bonn , Stefan Kristiansson , Stafford Horne , 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 On Mon, Jan 15, 2018 at 6:53 AM, Greentime Hu wrote: > From: Greentime Hu > > This patch adds Makefile, Kconfig and vmlinux.lds.S files required for building > an nds32 kernel. > > Signed-off-by: Vincent Chen > Signed-off-by: Greentime Hu I find some new details every time I look here ;-) > @@ -0,0 +1,107 @@ > +# > +# For a description of the syntax of this configuration file, > +# see Documentation/kbuild/kconfig-language.txt. > +# > + > +config NDS32 > + def_bool y > + select ARCH_HAS_RAW_COPY_USER I don't think this symbol was ever merged. Do you remember why you added it? > + select ARCH_WANT_FRAME_POINTERS if FTRACE > + select ARCH_WANT_IPC_PARSE_VERSION You most certainly don't want IPC_PARSE_VERSION, please drop this and adapt your glibc. > + select CLKSRC_MMIO > + select CLONE_BACKWARDS > + select COMMON_CLK > + select FRAME_POINTER Do you need both ARCH_WANT_FRAME_POINTERS and FRAME_POINTER here? > + select GENERIC_ATOMIC64 > + select GENERIC_CPU_DEVICES > + select GENERIC_CLOCKEVENTS > + select GENERIC_IRQ_CHIP > + select GENERIC_IRQ_PROBE I think it's better to drop GENERIC_IRQ_PROBE here, no modern driver should rely on that. > +choice > + prompt "CPU type" > + default CPU_V3 > +config CPU_N15 > + bool "AndesCore N15" > +config CPU_N13 > + bool "AndesCore N13" > + select CPU_CACHE_ALIASING if ANDES_PAGE_SIZE_4KB > +config CPU_N10 > + bool "AndesCore N10" > + select CPU_CACHE_ALIASING > +config CPU_D15 > + bool "AndesCore D15" > +config CPU_D10 > + bool "AndesCore D10" > + select CPU_CACHE_ALIASING > +config CPU_V3 > + bool "AndesCore v3 compatible" > + select ANDES_PAGE_SIZE_8KB > +endchoice I forget what we discussed here earlier, but at the very least, there should be some help text here to explain what the implications are. I assume that you generally want to be able to build one kernel to run on all of the above, right? Will selecting 'CPU_V3' result in a kernel binary that can run on all of them? If so, please explain it here as that is not obvious. For the other CPU types, can you list the what backwards-compatiblity you get? E.g. will a kernel built for N13 run on any of N15, D15 or N10? I think the 'select ANDES_PAGE_SIZE_8KB' cannot work as expected, since ANDES_PAGE_SIZE_8KB is inside of a 'choice' statement. Since there are only two options (4K and 8K), you can address that by making it a simple bool option and fall back to 4K when ANDES_PAGE_SIZE_8KB is disabled. > +config CACHE_L2 > + bool "Support L2 cache" > + default y > + help > + Say Y here to enable L2 cache if your SoC are integrated with L2CC. > + If unsure, say N. > + > +menu "Memory configuration" > + > +choice > + prompt "Memory split" > + depends on MMU > + default VMSPLIT_3G Why not default to VMSPLIT_3G_OPT? Arnd