From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754570AbdK2Lrn (ORCPT ); Wed, 29 Nov 2017 06:47:43 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:37242 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751496AbdK2Lrm (ORCPT ); Wed, 29 Nov 2017 06:47:42 -0500 Date: Wed, 29 Nov 2017 11:47:44 +0000 From: Will Deacon To: Yury Norov Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alex Matveev , Alexander Potapenko , Andi Kleen , Ard Biesheuvel , Catalin Marinas , Kees Cook , Mark Rutland , Maxim Kuvyrkov , Nick Desaulniers , Peter Zijlstra , Sami Tolvanen , Stephen Boyd Subject: Re: [PATCH] arm64: fix missing 'const' qualifiers Message-ID: <20171129114744.GB10650@arm.com> References: <20171125094127.7536-1-ynorov@caviumnetworks.com> <20171128183355.GO9266@arm.com> <20171129093225.tq2cbg6l6yupkeit@yury-thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171129093225.tq2cbg6l6yupkeit@yury-thinkpad> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 29, 2017 at 12:32:25PM +0300, Yury Norov wrote: > On Tue, Nov 28, 2017 at 06:33:55PM +0000, Will Deacon wrote: > > On Sat, Nov 25, 2017 at 12:41:27PM +0300, Yury Norov wrote: > > > It was discovered during LTO-enabled compilation with gcc/ld.bfd. > > > > What was discovered? Could you provide a bit more information in the > > changelog, please? I'm happy to take this as a fix if it's actually fixing > > something. > > Yes it does. There's inconsistency in variable declaration and > section type. GCC doesn't throw error for usual build, but if LTO > enabled, build becomes broken, like this: > > mm/percpu.c:2168:20: error: pcpu_fc_names causes a section type conflict > with dt_supported_cpu_ops > const char * const pcpu_fc_names[PCPU_FC_NR] __initconst = { > ^ > arch/arm64/kernel/cpu_ops.c:34:37: note: ‘dt_supported_cpu_ops’ was declared here > static const struct cpu_operations *dt_supported_cpu_ops[] __initconst = { > > And so on. Let me know if you need full error log, then I'll resend the > patch with it. I think it would be helpful to include one of the errors in the commit message. Please send a v2 with that. Will