From patchwork Mon Oct 20 17:22:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 39067 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 236C4202DB for ; Mon, 20 Oct 2014 17:24:17 +0000 (UTC) Received: by mail-wi0-f200.google.com with SMTP id h11sf2936871wiw.7 for ; Mon, 20 Oct 2014 10:24:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:subject:message-id :references:mime-version:in-reply-to:user-agent:cc:precedence :list-id:list-unsubscribe:list-archive:list-post:list-help :list-subscribe:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list:content-disposition :content-type:content-transfer-encoding; bh=F9KwUZuIqXvHW3M+ZUvFPZpa7xKqxX/9nSKkg+H13o8=; b=lhX3aSONTj0pVie4G/jBOswBC70dx/zFkhobAJjfDuLkFzeKp1ReJhRpBFnIVpMGaS J2cvXav7pkfo+YLLUNjBCO30RZnXwh336n2Jn5YEaajXyNAahDGQxmboUBN8JjBMZ9Vp z9UNi7oHpp1NRPcBJm8pNaBruela/7/54D8fUH5CMotVPPk/V6p0NO7O+Ev/FwsU0/mk Itiii427yJSAW1cKBne008/9LnQ2BtCBJVECD6i6wQbHgvRFEDnChiA0Uv1Vnr3/3W0s Mh0Sa7vmKHyq/0/wcZUub3zaVP6psm3E21/6xdIKalWkbpt4OS4qn8HS+E0uEdjLT44L KKpw== X-Gm-Message-State: ALoCoQnfZza9tqLoOmb02k9oQJOEu/gidBX8JyfclWBuOCfodmpylLF4pbLCzJzbWEG2ixKK//0S X-Received: by 10.112.254.226 with SMTP id al2mr4283521lbd.1.1413825856273; Mon, 20 Oct 2014 10:24:16 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.234.233 with SMTP id uh9ls465181lac.70.gmail; Mon, 20 Oct 2014 10:24:16 -0700 (PDT) X-Received: by 10.152.161.195 with SMTP id xu3mr28665613lab.15.1413825856026; Mon, 20 Oct 2014 10:24:16 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id ku5si15343578lac.30.2014.10.20.10.24.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Oct 2014 10:24:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by mail-la0-f43.google.com with SMTP id mc6so4431552lab.16 for ; Mon, 20 Oct 2014 10:24:15 -0700 (PDT) X-Received: by 10.152.6.228 with SMTP id e4mr28962530laa.71.1413825855908; Mon, 20 Oct 2014 10:24:15 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp350414lbz; Mon, 20 Oct 2014 10:24:15 -0700 (PDT) X-Received: by 10.68.175.196 with SMTP id cc4mr4251928pbc.147.1413825854107; Mon, 20 Oct 2014 10:24:14 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id bd7si8440011pbd.173.2014.10.20.10.24.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Oct 2014 10:24:14 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XgGfS-0003n9-JE; Mon, 20 Oct 2014 17:22:50 +0000 Received: from foss-mx-na.foss.arm.com ([217.140.108.86]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XgGfN-0003kA-DT for linux-arm-kernel@lists.infradead.org; Mon, 20 Oct 2014 17:22:46 +0000 Received: from foss-smtp-na-1.foss.arm.com (unknown [10.80.61.8]) by foss-mx-na.foss.arm.com (Postfix) with ESMTP id BF9EEF5; Mon, 20 Oct 2014 12:22:14 -0500 (CDT) Received: from collaborate-mta1.arm.com (highbank-bc01-b06.austin.arm.com [10.112.81.134]) by foss-smtp-na-1.foss.arm.com (Postfix) with ESMTP id 72A765FAD7; Mon, 20 Oct 2014 12:22:12 -0500 (CDT) Received: from e104818-lin.cambridge.arm.com (e104818-lin.cambridge.arm.com [10.1.203.148]) by collaborate-mta1.arm.com (Postfix) with ESMTPS id 5AB5913F8F5; Mon, 20 Oct 2014 12:22:11 -0500 (CDT) Date: Mon, 20 Oct 2014 18:22:09 +0100 From: Catalin Marinas To: Guenter Roeck Subject: Re: [PATCH] arm64: Fix compile error seen in non-SMP builds Message-ID: <20141020172208.GL23751@e104818-lin.cambridge.arm.com> References: <1412990134-31186-1-git-send-email-linux@roeck-us.net> MIME-Version: 1.0 In-Reply-To: <1412990134-31186-1-git-send-email-linux@roeck-us.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141020_102245_461613_F48D8860 X-CRM114-Status: GOOD ( 11.05 ) X-Spam-Score: -1.4 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.4 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.4 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record Cc: Frederic Weisbecker , Will Deacon , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: catalin.marinas@arm.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Content-Disposition: inline On Sat, Oct 11, 2014 at 02:15:34AM +0100, Guenter Roeck wrote: > Fix: > > In file included from ./arch/arm64/include/asm/irq_work.h:4:0, > from include/linux/irq_work.h:46, > from include/linux/perf_event.h:49, > from include/linux/ftrace_event.h:9, > from include/trace/syscall.h:6, > from include/linux/syscalls.h:81, > from init/main.c:18: > ./arch/arm64/include/asm/smp.h:24:3: > error: #error " included in non-SMP build" > # error " included in non-SMP build" > ^ > ./arch/arm64/include/asm/smp.h:27:0: warning: "raw_smp_processor_id" redefined > #define raw_smp_processor_id() (current_thread_info()->cpu) > ^ > > and: > > In file included from ./arch/arm64/include/asm/irq_work.h:4:0, > from include/linux/irq_work.h:46, > from kernel/irq_work.c:11: > ./arch/arm64/include/asm/smp_plat.h:56:30: > error: ‘NR_CPUS’ undeclared here (not in a function) > extern u64 __cpu_logical_map[NR_CPUS]; > > by providing a helper function in smp_plat.h, similar to the arm implementation, > and by removing NR_CPUS from smp_plat.h. > > Fixes: 3631073659d0 ("arm64: Tell irq work about self IPI support") > Cc: Frederic Weisbecker > Signed-off-by: Guenter Roeck Isn't something like this simpler: diff --git a/arch/arm64/include/asm/irq_work.h b/arch/arm64/include/asm/irq_work.h index 8e24ef3f7c82..b4f6b19a8a68 100644 --- a/arch/arm64/include/asm/irq_work.h +++ b/arch/arm64/include/asm/irq_work.h @@ -1,6 +1,8 @@ #ifndef __ASM_IRQ_WORK_H #define __ASM_IRQ_WORK_H +#ifdef CONFIG_SMP + #include static inline bool arch_irq_work_has_interrupt(void) @@ -8,4 +10,13 @@ static inline bool arch_irq_work_has_interrupt(void) return !!__smp_cross_call; } +#else + +static inline bool arch_irq_work_has_interrupt(void) +{ + return false; +} + +#endif + #endif /* __ASM_IRQ_WORK_H */