From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16BFDC3279B for ; Wed, 4 Jul 2018 11:41:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6781D21570 for ; Wed, 4 Jul 2018 11:41:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6781D21570 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=c-sky.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933918AbeGDLlX (ORCPT ); Wed, 4 Jul 2018 07:41:23 -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