Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1319631imm; Tue, 3 Jul 2018 09:05:44 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJYDObxKtZXOEMmUvabPhtyxLGtUUQc+hAWGlIA8OWhYcuAtcq3X9NB7orwU/OYoPhheH/j X-Received: by 2002:a17:902:28c8:: with SMTP id f66-v6mr31031888plb.60.1530633944055; Tue, 03 Jul 2018 09:05:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530633944; cv=none; d=google.com; s=arc-20160816; b=CEITzAoM35lpORT32zVBBRYgapedGBtYUomXsKUKQDvBpmAvEvGF3P7brx875BgWG8 RxSPAlmvx2/Gr4rFJejjBSpAwVU1Cf+XcP6Ozs3nxBJar+SbWFHdl5VPMAVLDvAs3Q7I kUsNdzFZIaqqzVn9vJ43MQvKoIsRlB7EWeWRIV27ujaZzJ6i1SO8yCvjdcZV8UGfsei6 ouTot6zc5LbMgpFqE03zhzj3l8zSFT4VcJwdoL6K06UgxQjJj0+DZWWv937F3vEzQra9 XAD8Pi9r9LRRn3yhvGjinikVI62ZoFRMAbPt2ye8ZIVvXphDIR0e5jF0w+SjGENcdxKP se0Q== 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=vEumC2BQuG0lqBduoy1lhlFfOkbvAiGGy0QEKqZY2TU=; b=rEc6gCrrwjMsyejz4YsWzvoGh3rgC9jo+WZkYh+tBzCZOy4di8JFLchtPzS4AlYIiz ivlpMJk5kHq833ktdr4V1dRSJTKqSY4oRY9gZFqC0UksRF73tLKhnygf5PAQSN3FG6hg MQXAAb4NUZUDRurqonBZWKX0e9bQPYtXqBfQpXquTEw45KSNqUyv7Ujw7Da4adaVI9S9 cVqhEEbX5XEGHUARaV/sUbs7oMDck9sg54/nwVOjmtoPloJYvtsacBRHhPH6FxC8Tdv5 lOCZELatduuAzAQZALodH6s030j0mubXYErulapBheTnqZumVXHiXj/kutL6ee8IM09E aUIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=MU9g+gZw; 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 z3-v6si1384780plk.48.2018.07.03.09.05.29; Tue, 03 Jul 2018 09:05:44 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=MU9g+gZw; 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 S933909AbeGCQDN (ORCPT + 99 others); Tue, 3 Jul 2018 12:03:13 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:41603 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933748AbeGCQDH (ORCPT ); Tue, 3 Jul 2018 12:03:07 -0400 Received: by mail-lf0-f68.google.com with SMTP id y127-v6so2037618lfc.8; Tue, 03 Jul 2018 09:03:06 -0700 (PDT) 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=vEumC2BQuG0lqBduoy1lhlFfOkbvAiGGy0QEKqZY2TU=; b=MU9g+gZwMEK3T7t7J1GvNFKGWAl3nkQfY6qC/bEgLdbaCtaebqKrRCAQbf9fTQsJGz F8W5sBfBZnej/l9N/j+LvQ/8h4W9+7ax9XE+eMgD2AiJ3V0Q1Xwu0p7oGLkb0BfUqjis qO3NCeNVLJ0HWg+JywDs/9XdVgRPpjnX62NMZ+Y9scUDcnMUltwIYpkVJadYp/WzVez0 QwghOmZPiKORKKNwtwL99CTiSg8Z8x4XyVvLaJH0BgCnnaWgiDMuojRRWDYlRtkm62Ci lNDC1YlN6YlbhQmp+rXVCsxZU3vajCvGBFG/jiNBZRTqaDLXV5iKt6Jle+K51vAAcW1P RoKw== 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=vEumC2BQuG0lqBduoy1lhlFfOkbvAiGGy0QEKqZY2TU=; b=lqwDwWXb9WQTltShJeUN+j0814GxV8TdWCNWvMHE3I/FtzI/E+QEgGEcdPA6KboePB EbtJHeu2TRBgb33FXWC9KoEpQEaXS2SwOuAlo9gw1QyB9mW6tC+IvOY6ajVQLQab0bes iTiFCeLtEyQM0l90KtvYMA84K2NN7S0VhXexLMEQkDV4ZyQfqfmmz7diAAXhMDU3zFcU Qeh6O3QfAq4ATPZUWy17zLHrNT4pz5BexXiqNDH+LqMLDvb0NTCwt5DcHRABqMBDlhzp 94FAU+/BRQCRenwssZH41AYvRGWbRlPaPEPNdZ4umyf9j5P6x1c8n/T29v4c7F7vu3yN ky6A== X-Gm-Message-State: APt69E2HgK6GXzvXuQflI0Fmynwqh9FD9nW2f5SUTh6VmaDet5ydXVsV wXWuXhoWZOhk3MdhNKY49m0ozFXuzXpmv8XKlxw= X-Received: by 2002:a19:cb44:: with SMTP id b65-v6mr6593446lfg.12.1530633785410; Tue, 03 Jul 2018 09:03:05 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a2e:41c1:0:0:0:0:0 with HTTP; Tue, 3 Jul 2018 09:03:04 -0700 (PDT) In-Reply-To: References: From: Arnd Bergmann Date: Tue, 3 Jul 2018 18:03:04 +0200 X-Google-Sender-Auth: TYPDr86i-HMHRypduEdciG77o8w Message-ID: Subject: Re: [PATCH V2 01/19] csky: Build infrastructure To: Guo Ren 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 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 Sun, Jul 1, 2018 at 7:30 PM, Guo Ren wrote: > Signed-off-by: Guo Ren > +choice > + prompt "CPU MODEL" > + default CPU_CK610 > + > +config CPU_CK610 > + bool "CSKY CPU ck610" > + select CPU_NEED_TLBSYNC > + select CPU_NEED_SOFTALIGN > + select CPU_NO_USER_BKPT > + > +config CPU_CK810 > + bool "CSKY CPU ck810" > + select CPU_HAS_HILO > + select CPU_NEED_TLBSYNC > + > +config CPU_CK807 > + bool "CSKY CPU ck807" > + select CPU_HAS_HILO > + > +config CPU_CK860 > + bool "CSKY CPU ck860" > + select CPU_HAS_TLBI > + select CPU_HAS_CACHEV2 > + select CPU_HAS_LDSTEX > +endchoice 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. > +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. > diff --git a/arch/csky/include/asm/Kbuild b/arch/csky/include/asm/Kbuild > new file mode 100644 > index 0000000..5de6519 > --- /dev/null > +++ b/arch/csky/include/asm/Kbuild > @@ -0,0 +1,72 @@ > +generic-y += asm-offsets.h > +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. > +generic-y += auxvec.h You should not need asm/auxvec.h or uapi/asm/auxvec.h > +generic-y += bitsperlong.h > +generic-y += bug.h providing your own bug.h might be helpful too. Have a look > +generic-y += bugs.h > +generic-y += clkdev.h > +generic-y += cputime.h asm-generic/cputime.h no loinger exists > +generic-y += kvm_para.h Do you support KVM? > +generic-y += sizes.h Deprecated and should not be needed Arnd