Received: by 10.223.164.202 with SMTP id h10csp659914wrb; Thu, 9 Nov 2017 01:04:31 -0800 (PST) X-Google-Smtp-Source: ABhQp+TVADNo8pR3q3fck66+pr47yh44Bz2DjJlNbuKqpLQV8SbC2fvXOpMBxMfWnUvihQ1GVu5O X-Received: by 10.101.81.139 with SMTP id h11mr3191668pgq.233.1510218271666; Thu, 09 Nov 2017 01:04:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510218271; cv=none; d=google.com; s=arc-20160816; b=nogYFNkkXXOdBUjpwmbuT4M1gpdjEnQr8diQb74dZML/xUr4Y03Bx6uu6b85gzXYUo N6SZwxU1aubPxrmev8iy5/yD2mOd6e+Zz9FpusJX/d/cQhzj4P68giszBtlNhrg8PbGD yVegJvOzjDPMCsFwQSljcTQlfrmgtbeEiEvWBA7T3uJpyiXzf9qtATawSfyk8GXPS7Le YrX6IC+i7pTEIXj++Fu8GFuP63y2wVzCztQbaSHpsmGaf92NOYvTDbYjcB8tykjp4bm7 A5caR7V09CN5sUhE7NzyQY7JFF+UiYOrTk2P/6Z+ezTVpkoGDuym/Mno0SOwMLE7n2hA 7/Mg== 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=G9wGniVy59oFFGpT2k1fnVctHjYZzjmHIxEZ17jIcS0=; b=EEQESsnmp0kHvQPDH1WqAzn9YPIYcHoMAl7oyvN9EK6Jm1y2L91v0YQPFUzzGsrf+c w7WQyoPVt3PPGir0pD9qgnopXWTpDO1nK+olVUa4KAs4td9ROioA0aYy4H1XecsqmRVk JsJFa+XoFvlW9qVMBp8baBDQlAfMHyDhZVWE5+8HZ84joL9Dw7EqaEQ6XHyCXvHIFUi9 y14Qu8XzbMyr2IK3mfSA/23lnqr1L/V/hmf40gQk9O1AUCAF8YqfPwqzhDrGa4Qv25qJ 2rCd7vLww/JBH/0ZK6hwed16cW09SrM6XzAFD3MNRfM7rpVm3FIE+VvP9FfrGDzl6YSt N3KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Cv/FU7DS; 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 b2si5881144pgr.511.2017.11.09.01.04.19; Thu, 09 Nov 2017 01:04:31 -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=Cv/FU7DS; 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 S1753769AbdKIJDk (ORCPT + 82 others); Thu, 9 Nov 2017 04:03:40 -0500 Received: from mail-ua0-f174.google.com ([209.85.217.174]:43506 "EHLO mail-ua0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751203AbdKIJDg (ORCPT ); Thu, 9 Nov 2017 04:03:36 -0500 Received: by mail-ua0-f174.google.com with SMTP id q18so2849476uaa.0; Thu, 09 Nov 2017 01:03:35 -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=G9wGniVy59oFFGpT2k1fnVctHjYZzjmHIxEZ17jIcS0=; b=Cv/FU7DSDYtB8xWqa8SCcXM5DCQQFhH95+UVdc5Eq/zoHm3IgtsePfyQ4Hc6kNXBAa +t8g0/qy54G8FMJnaw2gRav5Sb1w08LS6Serw7pYhd5X/V1gKxbrqliQl1ihc27XzvXF Lk8Rr3efmEul1levR5BqcIUKibYvJKomheMcvZxmRl/ZPARpsjAQhoiglWr+4RZiCG3X Mha/Rf/fBMQx4TagTSgTjyr78ywduq715gsicD8yvCVlkgrHQ98q01ornyyawstFp3NB 9wDcuJdg7fD4o0EV9kZFGoH+PG+E3YQzpsqw+Ms401kyoFC4yakoEwerwvwv7cjwRDJh J0Bw== 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=G9wGniVy59oFFGpT2k1fnVctHjYZzjmHIxEZ17jIcS0=; b=kcMsOvUUNLLhJJaD/lqlY4RMaW0yyLRDVXypg6fpu+wXOoL2PwXmmbmRzzA451UkpB 3Pk5MT/FGQa5nZ/okFI8QCAqhGfU6EpLz0k5tPcS3DpC6/glAKOaYZokJaiYwKPq30T8 1dzQA+ZR3JN9n9FKnc8//KtjnWhoWiDHuy2O6eunzQLu4yxjkRYtnaNQmOpSYfLxeb1Z GQKo/tUl6flVxYbgJesdPhlNw1HZgr2T5B7NWMgL64iZqTQxBKuQLk4KGmxLO8Dl+Cuh aLdnIdRAYsHJ+QEyZI0AcuALBHRiueFIT0jcDLpNJNeQ7BuGkUrFVagWnZjceGUPWycl OMpQ== X-Gm-Message-State: AJaThX5KbY6bISbWQAg8GCK01qSKIrsmRY9kJ3aYAwn/dfmRtaQO4n7P +pCMC8RCwyhiXLZvj8WSmt/uGhCp/XyfU+mYR5o= X-Received: by 10.176.69.248 with SMTP id u111mr2523408uau.91.1510218214967; Thu, 09 Nov 2017 01:03:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.62.8 with HTTP; Thu, 9 Nov 2017 01:02:54 -0800 (PST) In-Reply-To: References: <7278eca76456b412e02d9baa5dc164e83199cbab.1510118606.git.green.hu@gmail.com> From: Greentime Hu Date: Thu, 9 Nov 2017 17:02:54 +0800 Message-ID: Subject: Re: [PATCH 26/31] nds32: Build infrastructure 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 18:16 GMT+08:00 Arnd Bergmann : > On Wed, Nov 8, 2017 at 6:55 AM, Greentime Hu wrote: > >> diff --git a/arch/nds32/Kconfig b/arch/nds32/Kconfig >> new file mode 100644 >> index 0000000..112f470 >> --- /dev/null >> +++ b/arch/nds32/Kconfig >> @@ -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 >> + select ARCH_WANT_FRAME_POINTERS if FTRACE >> + select ARCH_WANT_IPC_PARSE_VERSION >> + select CLKSRC_MMIO >> + select CLONE_BACKWARDS >> + select TIMER_OF >> + select FRAME_POINTER >> + select GENERIC_ATOMIC64 >> + select GENERIC_CPU_DEVICES >> + select GENERIC_CLOCKEVENTS >> + select GENERIC_IOMAP >> + select GENERIC_IRQ_CHIP >> + select GENERIC_IRQ_PROBE >> + select GENERIC_IRQ_SHOW >> + select GENERIC_STRNCPY_FROM_USER >> + select GENERIC_STRNLEN_USER >> + select GENERIC_TIME_VSYSCALL >> + select HAVE_ARCH_TRACEHOOK >> + select HAVE_GENERIC_IOMAP > > You normally don't want HAVE_GENERIC_IOMAP, at least unless the CPU > has special instructions to trigger PCI I/O port access. Thanks. I will remove it in the next version patch. >> + select HAVE_DEBUG_KMEMLEAK >> + select HAVE_IDE > > You certainly don't want HAVE_IDE Thanks. I will remove it in the next version patch. >> + select HAVE_MEMBLOCK >> + select HAVE_MEMBLOCK_NODE_MAP >> + select HAVE_UID16 > > HAVE_UID16 shouldn't be used on new architectures, as mentioned in the > comment about asm/posix_types.h Thanks. I will remove it in the next version patch. >> + select HAVE_REGS_AND_STACK_ACCESS_API >> + select IRQ_DOMAIN >> + select LOCKDEP_SUPPORT >> + select MODULES_USE_ELF_REL >> + select MODULES_USE_ELF_RELA > > I would think that you use either MODULES_USE_ELF_REL or > MODULES_USE_ELF_RELA, but not both. Thanks. I will check which one we used and remove the other one if posible. >> + select OF >> + select OF_EARLY_FLATTREE >> + select OLD_SIGACTION >> + select OLD_SIGSUSPEND3 > > What are the OLD_SIG* ones for? It sounds like something you shouldn't > need, although I'm not familiar wiht them. Thanks I will check if we need it or not. >> + select NO_IOPORT_MAP >> + select RTC_LIB >> + select THREAD_INFO_IN_TASK >> + select SYS_SUPPORTS_APM_EMULATION > > I don't see what SYS_SUPPORTS_APM_EMULATION gains you. Thanks. I will remove it in the next version patch. >> +config GENERIC_CALIBRATE_DELAY >> + def_bool y > > It's better to avoid the delay loop completely and skip the calibration, > if your hardware allows. Thanks. Do you mean that this config should be def_bool n? why? Almost all arch enable it. >> + >> +config NDS32_BUILTIN_DTB >> + string "Builtin DTB" >> + default "" >> + help >> + User can use it to specify the dts of the SoC > > Better leave this up to the boot loader. Thanks. uboot will pass it too. >> +config ALIGNMENT_TRAP >> + tristate "Kernel support unaligned access handling" >> + default y >> + help >> + Andes processors cannot fetch/store information which is not >> + naturally aligned on the bus, i.e., a 4 byte fetch must start at an >> + address divisible by 4. On 32-bit Andes processors, these non-aligned >> + fetch/store instructions will be emulated in software if you say >> + here, which has a severe performance impact. This is necessary for >> + correct operation of some network protocols. With an IP-only >> + configuration it is safe to say N, otherwise say Y. > > Which network protocols are you referring to? I will modify these descriptions. It was written by someone I don't know. :p This case only happened when I found is compiler code gen issue or wrong pointer usage. >> +config HIGHMEM >> + bool "High Memory Support" >> + depends on MMU && CPU_CACHE_NONALIASING >> + help >> + The address space of Andes processors is only 4 Gigabytes large >> + and it has to accommodate user address space, kernel address >> + space as well as some memory mapped IO. That means that, if you >> + have a large amount of physical memory and/or IO, not all of the >> + memory can be "permanently mapped" by the kernel. The physical >> + memory that is not permanently mapped is called "high memory". >> + >> + Depending on the selected kernel/user memory split, minimum >> + vmalloc space and actual amount of RAM, you may not need this >> + option which should result in a slightly faster kernel. >> + >> + If unsure, say N. > > Generally speaking, highmem support is a mess, and it's better to avoid it. > > I see that the two device tree files you have list 1GB of memory. Do you think > that is a common configuration for actual products? Do you expect any to > have more than 1GB (or more than 4GB) in the future, or is that the upper > end of the scale? > > If 1GB is a reasonable upper bound, then you could change the vmsplit > to give slightly less address space to user space and have 1GB of direct-mapped > kernel memory plus 256MB of vmalloc space reserved for the kernel, > and completely avoid highmem. Thanks. We do realy use 1GB ram in some products. We also verify CONFIG_HIGHMEM with LTP too. It seems fine but I will study vmsplit to see if we should use it. >> +config MEMORY_START >> + hex "Physical memory start address" >> + default "0x00000000" >> + help >> + Physical memory start address, you may modify it if it is porting to >> + a new SoC with different start address. >> +endmenu > > On ARM, we found options like this to be rather problematic since it prevents > you from running the same kernel on boards that are otherwise compatible. > > If the architecture easily allows the memory to start at address 0, could > you require this address for all SoCs that want to run Linux, and get > rid of the compile-time option? Thanks. The reason we need this config is because we need to define PHYS_OFFSET. #define PHYS_OFFSET (CONFIG_MEMORY_START) It needs to be set in compile-time. I don't know how to get rid of it. From 1583492631960091032@xxx Wed Nov 08 10:17:33 +0000 2017 X-GM-THRID: 1583483358934427114 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread