Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2446842imm; Thu, 2 Aug 2018 11:44:02 -0700 (PDT) X-Google-Smtp-Source: AAOMgpddJuG1T46LUgbyBPt7pybPe7atoshJ39uvp4KCLQ6IAiqPvJ0coagpCCwfTs6iwxTwszje X-Received: by 2002:a63:e116:: with SMTP id z22-v6mr568602pgh.89.1533235441936; Thu, 02 Aug 2018 11:44:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533235441; cv=none; d=google.com; s=arc-20160816; b=PaXDZpHxGgBi8C+GTWnGi5Jy52sYHvMurhRybdvXW9qp6JJ/OUchNRnvb2rDxLKET0 ZmIg+pKrGl9AaJZPxfCxco1DsdcFvOb6fqigEpALxfKlILpAR1oSkVENEgTM6opO0OdU XMHsqlqzHCTvTjtl0oTCI2nUDrOnMOtaxgL6V+sobaMwfXbjDGLMDPG0mIJ1FaNWnMQh nlpSlqL2UMlDXsOA6mrNTXC9UgLMBAQjoTpioRUDMMCyG7bpF90wkghJqcmPEyUtpVAD tTzvZSHc25BwTLrXcoKidtOvJMrX1smopm7e02ASLCn+1TqlH14ILD8R72Brkva61KIl V+6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:to:subject:from:dkim-signature :arc-authentication-results; bh=Eyf57/bhGdz2/Dr+e7vnVOyEBWSUkZY6k9Iqlyj9dLg=; b=hs5MdX4rPZCAMGGH9OJxC6ND6quYMWlsBvnreAY9LCUzx2ig0cK0ubDR04Ot2DZPBo xMWTYNpUDL4WW2ZhHYpgw4dx5Apt5qph5zNCfMc9uOWYhQRw1b8qnxaOz37cS4vS+5WI cP44JVuyZYdtDkrNLem0hXaIH6BrGqKHOtAno7xd7GV5Ic/Rkj1X66TUx4mGgN3CM+4s CPNCFrrWhe0/Ey1qxnSZFj3Xqfg5wrcm7PgpEHse2mVgiw7qR5U+qg0YTyh9vKKzXXb+ zhw97/47hHOu2aX10NHyfbQ9kieD7feF/wc8aM5ary85JrLgRf5Y6muTeYVZVq9xn8Nl ktdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=rWva7jnR; 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 l5-v6si2397932pff.304.2018.08.02.11.43.46; Thu, 02 Aug 2018 11:44:01 -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=@wdc.com header.s=dkim.wdc.com header.b=rWva7jnR; 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 S1732441AbeHBUGD (ORCPT + 99 others); Thu, 2 Aug 2018 16:06:03 -0400 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:3014 "EHLO esa3.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731362AbeHBUGD (ORCPT ); Thu, 2 Aug 2018 16:06:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1533233629; x=1564769629; h=from:subject:to:references:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=nepBBRHcXV01Fl1uFKwqysIvhZZ9nSH4cStDubI5Q5Y=; b=rWva7jnRS1/4RLy/p+WOIPTgpypJ0/zkbiQhA+lp1oGFv0bCA4qtEPLx 5OUJdXS9sscNl/MAXgHP1dqfkOGaWCcssg9q+rQpS7Al4PLyDxiIuaveN amzdVnUyIEdPwwhV5l4UAKgvFSxkqcf418VoJ7iviS0W6hlYxzfy0bFXF g+Mauxne2HDUY7p9LQO0j8XuWgHrDDWfgLsLjIKw60K8G4xh7xLk6iMPS 4CLp9ENJOaZphOPoZxS4auCDLX9Sio04l9EwrAwZFSX/DksDsO+tcx7q3 plu+CjQM81KZU8Sd2aUMJvkB3Uz5ZWWD4QbAnp2UBcHXe76BsJcu5xMme g==; X-IronPort-AV: E=Sophos;i="5.51,436,1526313600"; d="scan'208";a="89727596" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 03 Aug 2018 02:13:49 +0800 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP; 02 Aug 2018 11:02:12 -0700 Received: from c02v91rdhtd5.sdcorp.global.sandisk.com (HELO [10.196.159.148]) ([10.196.159.148]) by uls-op-cesaip01.wdc.com with ESMTP; 02 Aug 2018 11:13:49 -0700 From: Atish Patra Subject: Re: [PATCH] RISC-V: Add preprocessor directives for boot_sec_cpu To: Zong Li , "palmer@sifive.com" , "aou@eecs.berkeley.edu" , "hch@infradead.org" , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "greentime@andestech.com" References: <1533223376-10130-1-git-send-email-zong@andestech.com> Message-ID: <27367ec8-fc26-c678-1883-299a084a5328@wdc.com> Date: Thu, 2 Aug 2018 11:13:25 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1533223376-10130-1-git-send-email-zong@andestech.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/2/18 8:23 AM, Zong Li wrote: > The boot_sec_cpu is for hutplug CPU on SMP system. It should > be conditional compiling. Otherwise, it causes undefined reference > to `smp_callin' when compiling uniprocessor kernel. > > Signed-off-by: Zong Li > --- > arch/riscv/kernel/head.S | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S > index 11066d5..9b6f601 100644 > --- a/arch/riscv/kernel/head.S > +++ b/arch/riscv/kernel/head.S > @@ -154,6 +154,7 @@ END(_start) > .section .text > .global boot_sec_cpu > > +#ifdef CONFIG_HOTPLUG_CPU > boot_sec_cpu: > /* clear all pending flags */ > csrw sip, zero > @@ -162,6 +163,7 @@ boot_sec_cpu: > fence > > tail smp_callin > +#endif > > __PAGE_ALIGNED_BSS > /* Empty zero page */ > Thanks for the fix. If you don't mind, I would like to merge it on top of my cpu hotplug patch and resubmit together to avoid confusion. Regards, Atish