From patchwork Wed Jul 26 11:41:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 9864605 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 318616038C for ; Wed, 26 Jul 2017 11:42:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3837328634 for ; Wed, 26 Jul 2017 11:42:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2CCB928745; Wed, 26 Jul 2017 11:42:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3E15128634 for ; Wed, 26 Jul 2017 11:42:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=xYQAZAguWXioxC7Ht8eAOcZin6BBS2t7rTDCVOhK+Tw=; b=ArLOY4En3PPLGU ZXVTfNc9oGZxrhyCJKAMhp4ruXduEKQMMfqLyoAI1BKyt4C8E8NYla1HrPm5Tupbytb7rnYjPuqWn CenP3m/qJ8m5xeQHLc2SApYKV7f6QZluFADtwi/qsMeMVOHH9XccWJF04wXeQS21OCWdXdhiL81G0 qUExnVNo0pGsiycx6e+di+EVKjdpHCvlkLCYY0LfudjUB3r3PztbWWaX3nIbryK9jpkUSc6gRObPj 72DV2s7v9OBDKkWILtSpLcne8plm3s8nuwaeYp5j2+rszg1HeaZzjOKLIXRPs5dPQDMqe5Rb0I1yM LUx0OMxWJpyogWZ1+JCg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1daKhk-0004hK-FF; Wed, 26 Jul 2017 11:42:16 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1daKhg-0004fp-8g for linux-arm-kernel@lists.infradead.org; Wed, 26 Jul 2017 11:42:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=ETTmv4meZcbWrTgmxxMcXV+eKfbJFK35Y/MitmlOErw=; b=PvB6N5mx9S3eWu8cQCUzh04n0KVslWbCUcUtlhEk1+EkPo/9k2qs9G/EsuUvd8InQrJQkb2JaIDujqTLq7gix37ZdBeDIiPy2AuwSn+3g3NZM2CUqJZGkPRRqLGqTWjD2IWe5TYB+j8c6r2JBteC+aGM2KbeeHLj0L41ojvd8cQ=; Received: from n2100.armlinux.org.uk ([2002:4e20:1eda:1:214:fdff:fe10:4f86]:44084) by pandora.armlinux.org.uk with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1daKhE-0005c1-26; Wed, 26 Jul 2017 12:41:44 +0100 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.76) (envelope-from ) id 1daKhA-0005UL-AZ; Wed, 26 Jul 2017 12:41:40 +0100 Date: Wed, 26 Jul 2017 12:41:39 +0100 From: Russell King - ARM Linux To: Robert Jarzmik , Nicholas Piggin , Michal Marek Subject: Re: [BUG] v4.12 breaks pxa25x Message-ID: <20170726114139.GN31807@n2100.armlinux.org.uk> References: <87inirsgzk.fsf@belgarion.home> <20170717081518.GI31807@n2100.armlinux.org.uk> <87eftfrs0e.fsf@belgarion.home> <87o9s7qw64.fsf@belgarion.home> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87o9s7qw64.fsf@belgarion.home> 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-20170726_044212_640597_94C7EA7F X-CRM114-Status: GOOD ( 21.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Jul 26, 2017 at 01:23:15PM +0200, Robert Jarzmik wrote: > Robert Jarzmik writes: > > Sure, it like this : > > c06f22c8 D user_pmd_table > > c06f22cc d __warned.19178 > > c06f22cd d clean_addr > > > > And I have no idea how to link that __warned.19178 with the WARN_xxx() statement ... > > > > This bisection I made points me to : > > # first bad commit: [799c43415442414b1032580c47684cb709dfed6d] kbuild: thin archives make default for all archs > > > > Reverting this commit makes my kernel boot again. > > Hi Russell, > > I think I know where this is comming from. > - in file: ~/mio_linux/kernel/include/asm-generic/vmlinux.lds.h:206 > - the definition of DATA_DATA looks like : > (*.data .data.[0-9a-zA-Z_]*) > ... > *(.data.unlikely) > ... > > This doesn't look good to me, as .data.unlikely fullfills the first wildcard, > and the linker is allowed to mix .data and .data.unlikely symbols to its > pleasure, while .data.unlikely symbols (at least in my case) are not 4 bytes > multiples. Obviously, the mixing of .data.unlikely with the normal .data sections is undesirable - that looks like it's come from commit b67067f1176d ("kbuild: allow archs to select link dead code/data elimination") dated 2016, which according to git describe --contains was merged in v4.9-rc1. So it's unlikely to be directly caused by this, although this commit is implicated. I wonder if Nick realised this side effect (that .data.unlikely is no longer grouped together) - maybe we need to rename .data.unlikely? (Adding Nick and Michal). Anyway, I think this patch may resolve the problem you're seeing as well - this should mark the .data sections in the ELF objects as requiring a 32-bit alignment - if you check with objdump -h, you should see the "Algn" column for the .data section change from "2**0" to "2**2", which should cause the linker to apply the appropriate alignment to the files .data section. We will have to ensure that all new .data statements have an appropriate .align directive after them if the data requires alignment. arch/arm/kernel/entry-armv.S | 2 ++ arch/arm/kernel/head.S | 2 ++ arch/arm/kernel/hyp-stub.S | 1 + arch/arm/kernel/iwmmxt.S | 1 + arch/arm/kernel/sleep.S | 1 + arch/arm/mm/cache-v4wb.S | 1 + arch/arm/mm/proc-xscale.S | 1 + 7 files changed, 9 insertions(+) Reported-by: Robert Jarzmik Tested-by: Robert Jarzmik Tested-by: Robert Jarzmik diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index f2d2f9398adb..10ad44f3886a 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S @@ -721,6 +721,7 @@ ENDPROC(__und_usr) */ .pushsection .data + .align 2 ENTRY(fp_enter) .word no_fp .popsection @@ -1026,6 +1027,7 @@ ENDPROC(vector_\name) W(b) vector_fiq .data + .align 2 .globl cr_alignment cr_alignment: diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 04286fd9e09c..6b1148cafffd 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -556,6 +556,7 @@ ENDPROC(__fixup_smp) .word __smpalt_end .pushsection .data + .align 2 .globl smp_on_up smp_on_up: ALT_SMP(.long 1) @@ -716,6 +717,7 @@ ENTRY(fixup_pv_table) ENDPROC(fixup_pv_table) .data + .align 2 .globl __pv_phys_pfn_offset .type __pv_phys_pfn_offset, %object __pv_phys_pfn_offset: diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S index ec7e7377d423..60146e32619a 100644 --- a/arch/arm/kernel/hyp-stub.S +++ b/arch/arm/kernel/hyp-stub.S @@ -31,6 +31,7 @@ * zeroing of .bss would clobber it. */ .data + .align 2 ENTRY(__boot_cpu_mode) .long 0 .text diff --git a/arch/arm/kernel/iwmmxt.S b/arch/arm/kernel/iwmmxt.S index 49fadbda8c63..81cd4d43b3ec 100644 --- a/arch/arm/kernel/iwmmxt.S +++ b/arch/arm/kernel/iwmmxt.S @@ -367,6 +367,7 @@ ENTRY(iwmmxt_task_release) ENDPROC(iwmmxt_task_release) .data + .align 2 concan_owner: .word 0 diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S index 0f6c1000582c..9f08d214d05a 100644 --- a/arch/arm/kernel/sleep.S +++ b/arch/arm/kernel/sleep.S @@ -171,6 +171,7 @@ ENDPROC(cpu_resume_arm) .long mpidr_hash - . @ mpidr_hash struct offset .data + .align 2 .type sleep_save_sp, #object ENTRY(sleep_save_sp) .space SLEEP_SAVE_SP_SZ @ struct sleep_save_sp diff --git a/arch/arm/mm/cache-v4wb.S b/arch/arm/mm/cache-v4wb.S index 2522f8c8fbb1..a5084ec70c6e 100644 --- a/arch/arm/mm/cache-v4wb.S +++ b/arch/arm/mm/cache-v4wb.S @@ -47,6 +47,7 @@ #define CACHE_DLIMIT (CACHE_DSIZE * 4) .data + .align 2 flush_base: .long FLUSH_BASE .text diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S index b6bbfdb6dfdc..3d75b7972fd1 100644 --- a/arch/arm/mm/proc-xscale.S +++ b/arch/arm/mm/proc-xscale.S @@ -104,6 +104,7 @@ .endm .data + .align 2 clean_addr: .word CLEAN_ADDR .text