Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754126AbdLTCgS (ORCPT ); Tue, 19 Dec 2017 21:36:18 -0500 Received: from mail-ua0-f193.google.com ([209.85.217.193]:40218 "EHLO mail-ua0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752867AbdLTCgM (ORCPT ); Tue, 19 Dec 2017 21:36:12 -0500 X-Google-Smtp-Source: ACJfBot8aiKs5eXOItISXIFhNS16LbyNHMrN7zzcfKq1GTvAN10zy7KMlM0GpVkTeM/UPX2Zv10Vt+VUQAMyocVoN60= MIME-Version: 1.0 In-Reply-To: <78afd442-4482-f104-746e-5984214658ee@infradead.org> References: <935ff034982f077b2e6f5eeccd6fe2110614fc9c.1513577007.git.green.hu@gmail.com> <78afd442-4482-f104-746e-5984214658ee@infradead.org> From: Greentime Hu Date: Wed, 20 Dec 2017 10:35:30 +0800 Message-ID: Subject: Re: [PATCH v4 04/36] nds32: Kernel booting and initialization To: Randy Dunlap Cc: Greentime , Linux Kernel Mailing List , Arnd Bergmann , linux-arch , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , netdev , 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 , Philippe Ombredanne , Vincent Chen Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1603 Lines: 49 2017-12-20 6:01 GMT+08:00 Randy Dunlap : > On 12/17/2017 10:46 PM, Greentime Hu wrote: >> From: Greentime Hu >> >> This patch includes the kernel startup code. It can get dtb pointer >> passed from bootloader. It will create a temp mapping by tlb >> instructions at beginning and goto start_kernel. >> >> Signed-off-by: Vincent Chen >> Signed-off-by: Greentime Hu >> --- >> arch/nds32/kernel/head.S | 189 ++++++++++++++++++++++ >> arch/nds32/kernel/setup.c | 383 +++++++++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 572 insertions(+) >> create mode 100644 arch/nds32/kernel/head.S >> create mode 100644 arch/nds32/kernel/setup.c >> > >> diff --git a/arch/nds32/kernel/setup.c b/arch/nds32/kernel/setup.c >> new file mode 100644 >> index 0000000..7718c58 >> --- /dev/null >> +++ b/arch/nds32/kernel/setup.c >> @@ -0,0 +1,383 @@ >> +// SPDX-License-Identifier: GPL-2.0 >> +// Copyright (C) 2005-2017 Andes Technology Corporation >> + > > [snip] > >> +struct cache_info L1_cache_info[2]; >> +static void __init dump_cpu_info(int cpu) >> +{ >> + int i, p = 0; >> + char str[sizeof(hwcap_str) + 16]; >> + >> + for (i = 0; hwcap_str[i]; i++) { >> + if (elf_hwcap & (1 << i)) { >> + sprintf(str + p, "%s ", hwcap_str[i]); >> + p += strlen(hwcap_str[i]) + 1; >> + } >> + } >> + >> + pr_info("CPU%d Featuretures: %s\n", cpu, str); > > Features: > Thanks Randy. I will fix this typo.