From patchwork Mon Jul 18 11:27:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Russell King - ARM Linux X-Patchwork-Id: 985952 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6IBSL3x021944 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 18 Jul 2011 11:28:43 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qilzl-0003oo-80; Mon, 18 Jul 2011 11:28:17 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qilzk-0005O8-SK; Mon, 18 Jul 2011 11:28:16 +0000 Received: from [2002:4e20:1eda::1] (helo=caramon.arm.linux.org.uk) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qilzc-0005Np-Vu for linux-arm-kernel@lists.infradead.org; Mon, 18 Jul 2011 11:28:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=arm.linux.org.uk; s=caramon; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=XsGBDaF4TosZ6Km/6fgPwWepXWNBLv8sBddlx81ASX0=; b=X5BmJpxMC60MhtXeWJA7lebBQPcdqUa4cX9TnqgspAGFgGpYpyBfcQD6ofGnvZpJ5/ggFyBCL139XrGTknujvzhYe6B83ZTaPRFw2zAUYUFH3sIZqCvCUyVnEiGUVTKAJzzd2XiEx/OPLGhv9+Vli9oB2jdvBiaMIO53dtxnvJw=; Received: from n2100.arm.linux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]) by caramon.arm.linux.org.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1QilzT-0007yt-M8; Mon, 18 Jul 2011 12:28:00 +0100 Received: from linux by n2100.arm.linux.org.uk with local (Exim 4.72) (envelope-from ) id 1QilzS-0002pB-Aq; Mon, 18 Jul 2011 12:27:58 +0100 Date: Mon, 18 Jul 2011 12:27:57 +0100 From: Russell King - ARM Linux To: Linus Walleij Subject: Re: linux-next regression on ARM926 Message-ID: <20110718112757.GV23270@n2100.arm.linux.org.uk> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110718_072809_619266_7D5EC90C X-CRM114-Status: GOOD ( 18.95 ) X-Spam-Score: 1.2 (+) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS Cc: Dave Martin , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 18 Jul 2011 11:28:43 +0000 (UTC) On Mon, Jul 18, 2011 at 01:02:01PM +0200, Linus Walleij wrote: > Hi Dave, > > do you have any hints on how to resolve this build error in the -next > tree: > > LD .tmp_vmlinux1 > arch/arm/mm/built-in.o:(.init.data+0xe0): undefined reference to > `cpu_arm926_do_suspend' > arch/arm/mm/built-in.o:(.init.data+0xe4): undefined reference to > `cpu_arm926_do_resume' > make[2]: *** [.tmp_vmlinux1] Error 1 > make[1]: *** [sub-make] Error 2 > make[1]: Leaving directory `/home/linus/linux-next' > make: *** [build] Error 2 > > This is while building the U300, I can't really tell if the error is on my > (U300) side or in the recent patches to the proc_arm926 stuff? > It seems all ARM926 SoCs were affected. Hmm. That happens because without CONFIG_PM_SLEEP, we do this: #define cpu_arm926_do_suspend 0 #define cpu_arm926_do_resume 0 whereas the macro assembler does this: .word cpu_\name\()_do_suspend .word cpu_\name\()_do_resume and this means that neither the preprocessor nor the assembler can tie these two together. One solution would be to put an #ifdef CONFIG_PM_SLEEP around that in mm/proc-macros.S to select .word 0 instead, and get rid of the #else in the individual proc-*.S files - something like this (untested): Tested-by: Linus Walleij Acked-by: Dave Martin diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S index b2f9bde..2bbcf05 100644 --- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S @@ -421,9 +421,6 @@ ENTRY(cpu_arm926_do_resume) PMD_SECT_CACHEABLE | PMD_BIT4 | PMD_SECT_AP_WRITE b cpu_resume_mmu ENDPROC(cpu_arm926_do_resume) -#else -#define cpu_arm926_do_suspend 0 -#define cpu_arm926_do_resume 0 #endif __CPUINIT diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S index 4ae9b44..307a4de 100644 --- a/arch/arm/mm/proc-macros.S +++ b/arch/arm/mm/proc-macros.S @@ -276,8 +276,13 @@ ENTRY(\name\()_processor_functions) .if \suspend .word cpu_\name\()_suspend_size +#ifdef CONFIG_PM_SLEEP .word cpu_\name\()_do_suspend .word cpu_\name\()_do_resume +#else + .word 0 + .word 0 +#endif .else .word 0 .word 0