Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp708110imm; Wed, 4 Jul 2018 04:42:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeOPOvmI1XyhY0IqV1FjGgJ2KPgusMJdPZ09H2XNPmWHmNFlIjLH4xmaUjyEAYqX6G7E9mE X-Received: by 2002:a62:4255:: with SMTP id p82-v6mr1826193pfa.227.1530704537003; Wed, 04 Jul 2018 04:42:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530704536; cv=none; d=google.com; s=arc-20160816; b=F79OMRjP7mQ9HtBU40FHwVAA1MKh+wfiAV4o9mc/vWF4pe2GPYFiRP6XiZeT5zEp9d ytFcmklNik4TPgZmqz4Mu00k/pINVmVj2gUd8tXTy/OfFJzDyCc+KvSMLPmG3Hqm1ofP 5Qj58ePpsWG/NeeSJDFm/BmMyXq/DkEBWgNkkN5Yk7gij4K/pddRrP+ig+TWzfTRBpwU JDteuH81AFc7J+ybumCFXjKmf0zDu+NPfEtljDeVC+Bcaz4Ya1Kx6nzQsEHKvl5ERcXT O9rB6NA+qr6b61n6nmdZDDtXTHywLLKdyAptQuBqKbnm3QLIsZ1UbViYsErQwPhQXd1J hMZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=hktVdI2LWMSbUkizRuDPa+5VRbGy/HQ8FT4TQXJHC+I=; b=Dosj7rhCdYnRsdD5yBm9dTrH59uaiwX59Bw6uzM91NWXNOvCWIToqDDry9+qX2zOao nCGysblDlgTzNfM8EHUiODCMmrFUEFDuAa6VafR8fC/GM0cuE07f6EB3HUoKpLSNocgx Sdhf3liNrBlJsc2oIWDlLI+upeVlPg6CXj5SqyMabLcJifprF8w2Kqw3+S2NYDZGq+xa 7g0jHKHI1GioBgAWwKwidbDLXOhV2zG29rhRZlI3LtR49WRa7zDDSs0JZ6s/qaIeUyuT 31aQjapl5CM4d7hNna8CHHJ8lXyFQy7TmZ7QQV+Pd4iWJT9JpsNYIxJJ4d/Zhdq91whm yTGw== ARC-Authentication-Results: i=1; mx.google.com; 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 u76-v6si3882238pfj.58.2018.07.04.04.42.02; Wed, 04 Jul 2018 04:42:16 -0700 (PDT) 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; 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 S933882AbeGDLlW (ORCPT + 99 others); Wed, 4 Jul 2018 07:41:22 -0400 Received: from smtp2200-217.mail.aliyun.com ([121.197.200.217]:43695 "EHLO smtp2200-217.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933071AbeGDLlS (ORCPT ); Wed, 4 Jul 2018 07:41:18 -0400 X-Alimail-AntiSpam: AC=CONTINUE;BC=0.07475876|-1;CH=green;FP=0|0|0|0|0|-1|-1|-1;HT=e02c03303;MF=ren_guo@c-sky.com;NM=1;PH=DS;RN=11;RT=11;SR=0;TI=SMTPD_---.CMCFPOd_1530704445; Received: from localhost(mailfrom:ren_guo@c-sky.com fp:SMTPD_---.CMCFPOd_1530704445) by smtp.aliyun-inc.com(10.147.42.198); Wed, 04 Jul 2018 19:40:45 +0800 Date: Wed, 4 Jul 2018 19:40:45 +0800 From: Guo Ren To: Arnd Bergmann Cc: linux-arch , Linux Kernel Mailing List , Thomas Gleixner , Daniel Lezcano , Jason Cooper , c-sky_gcc_upstream@c-sky.com, gnu-csky@mentor.com, thomas.petazzoni@bootlin.com, wbx@uclibc-ng.org, Greentime Hu Subject: Re: [PATCH V2 01/19] csky: Build infrastructure Message-ID: <20180704114045.GA22857@guoren> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 03, 2018 at 06:03:04PM +0200, Arnd Bergmann wrote: > It looks like the CK8xx CPUs are basically compatible, so it would > be nice to have a way to configure a kernel that can run on all > of them, picking a safe default for options that depend on a > particular CPU. E.g. when only CK860 supports SMP, you might > start out by making SMP "depend on !(CPU_CK807 || CPU_CK810)", > as an alternative to implementing a way for an SMP-enabled kernel > to run on non-SMP CPUs (arm has that, but it's probably too complex > for your needs). > > Similarly, you can set L1_CACHE_BYTES to the largest possible > size, and make things like CPU_TLB_SIZE dynamically detected. We talked about this topic in the last patchsets. Ck807/810/860 are mutually incompatible in kernel level but both can run user space programs in ck807/810. On Wed, Mar 28, 2018 at 09:40:49AM +0200, Arnd Bergmann wrote: > Ok, thanks for the clarification. Obviously if they are mutually incompatible, > there is no point in using a common kernel, so your current version is > absolutely fine, and this is similar to how we cannot have a common kernel > between ARMv5, ARMv7-A and ARMv7-M, which are all incompatible > at the kernel level. Yes. > One more question for my understanding: Are the three types of ck8xx > CPUs mutually incompatible in user space as well, or are the differences > only for the kernel? For the ARM example, ARMv5 and ARMv7 > fundamentally require separate kernels, but both can run user space > programs built for ARMv5. -mcpu=ck807 app could run on ck807, ck810, ck860. -mcpu=ck810 app could run on ck807, ck810, ck860. -mcpu=ck860 app only run on ck860. They are all incompatible at the kernel level. > > +menu "C-SKY Debug Options" > > +config CSKY_DEBUG_INFO > > + bool "Compile the kernel with debug info, just add -g" > > + depends on !DEBUG_INFO > > + help > > + DEBUG_INFO and COMPILE_TEST is conflict, so we provide > > + another way to support -g. > > + Some drivers eg: DW_MMC need COMPILE_TEST for new cpu > > + arch :( > > Just send a patch to change those dependencies, there is no reason > not to apply those. Generally speaking, the kernel should not contain > workarounds for particular (mis-)features of the kernel, when you can > just change those. Ok. > > +generic-y += atomic.h > > The asm-generic version of atomic.h is a bit inefficient, > you might want to provide an optimized version for your > architecture. Ok. > > +generic-y += auxvec.h > > You should not need asm/auxvec.h or uapi/asm/auxvec.h Ok. > > +generic-y += bug.h > > providing your own bug.h might be helpful too. > Have a look Ok. > > +generic-y += cputime.h > > asm-generic/cputime.h no loinger exists Ok, remove it. > > +generic-y += kvm_para.h > > Do you support KVM? No, remove it, thx. > > +generic-y += sizes.h > > Deprecated and should not be needed Ok, remove it. Guo Ren