mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zong Li <zong@andestech.com>
To: <palmer@sifive.com>, <aou@eecs.berkeley.edu>, <hch@infradead.org>,
	<linux-riscv@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<greentime@andestech.com>
Cc: Zong Li <zong@andestech.com>
Subject: [PATCH] RISC-V: Add preprocessor directives for boot_sec_cpu
Date: Thu, 2 Aug 2018 23:22:56 +0800	[thread overview]
Message-ID: <1533223376-10130-1-git-send-email-zong@andestech.com> (raw)

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 <zong@andestech.com>
---
 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 */
-- 
2.7.4


             reply	other threads:[~2018-08-02 15:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-02 15:22 Zong Li [this message]
2018-08-02 18:13 ` Atish Patra
2018-08-03  0:27   ` Zong Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1533223376-10130-1-git-send-email-zong@andestech.com \
    --to=zong@andestech.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=greentime@andestech.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®