From patchwork Thu Oct 20 14:20:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Piggin X-Patchwork-Id: 9386949 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 72074607D0 for ; Thu, 20 Oct 2016 14:21:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62C9929BC6 for ; Thu, 20 Oct 2016 14:21:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 571EC29C94; Thu, 20 Oct 2016 14:21:15 +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=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80AA129BC6 for ; Thu, 20 Oct 2016 14:21:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030191AbcJTOVO (ORCPT ); Thu, 20 Oct 2016 10:21:14 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:36136 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964795AbcJTOVM (ORCPT ); Thu, 20 Oct 2016 10:21:12 -0400 Received: by mail-pf0-f196.google.com with SMTP id r16so5733567pfg.3; Thu, 20 Oct 2016 07:21:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=FMLiHODjSdOAxBh9GlS6c4s/qKZS6iEQC9lyMuKHAuo=; b=nn+nLW1/r0fQqWxoXTNjV1pA8h3JCkbR2hSIDzkiXc5pner+MmQdkH3sCXWKcFkbI6 CJq7Eps1+pG5UvjrPjpHEXqCB2W13PJmUH/oraIg2r5T975C3+zGb15KYm+PSstPqgIr HjQoZSVb50he/mJKk2JDnpVhF6hXoeTBJV0bj3MuHba2HaiMmcjZ6QUf7HbA9GmRYgZ5 C0LYlBt6n1c9Fqso+wgT8qnMZSQI7TXR6g0donWhqamYDMvakoGBJlmJPxE95ZG+wIry H/a8oS4LkXH6dZKNIufgddV0/v6wn00ky88a6ZAAcBOF3qfr6Ysn5xiYfOk/UEii5qOc p4bQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=FMLiHODjSdOAxBh9GlS6c4s/qKZS6iEQC9lyMuKHAuo=; b=M0q38Q0QSb4gpsUdYHqrA/o0zWb+tzj8ogRxRNUXRdtkioPTOlD53ZlZ20PahxOcYw Wv9kA73tkRM6ARkNKWRvXG2g81qSLLBtNlrm4QEPOy7wyghw0Z7oqGXoNXO50nRltl9E Q6QAeByaix243XKDEzV2/qsTL0k2DzKvF6deWUQvDl9xbdf/MpOwcNu1/cu7t2CVDciX Z+sFHLI+eQfCZhwz/aIf3K7I6m4YaDp1GF5LelCaw6l56QLVdk3exHUqZvVexJt+MN8W Li+6yCW+iaqJcJoPSvXcrF47LNA0GMEUH5w7UC/PZ5tFFGb8s2i/ioQ/A4x4mhnwmuD+ e6BQ== X-Gm-Message-State: AA6/9RnW2Rru7bt2bedthvsmCe9gUjIppDBN7UJlXKfkK2Kh0lRtykTvQQwW2pMmP5wEUg== X-Received: by 10.98.204.145 with SMTP id j17mr1655084pfk.83.1476973266500; Thu, 20 Oct 2016 07:21:06 -0700 (PDT) Received: from roar.ozlabs.ibm.com (57.48.218.139.dynamic.dsl.dv.iprimus.net.au. [139.218.48.57]) by smtp.gmail.com with ESMTPSA id b88sm72248700pfe.72.2016.10.20.07.21.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Oct 2016 07:21:05 -0700 (PDT) Date: Fri, 21 Oct 2016 01:20:17 +1100 From: Nicholas Piggin To: Russell King - ARM Linux Cc: Arnd Bergmann , Michal Marek , Adam Borowski , Omar Sandoval , Linus Torvalds , adobriyan@gmail.com, sfr@canb.auug.org.au, viro@zeniv.linux.org.uk, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH] kbuild: provide include/asm/asm-prototypes.h for ARM Message-ID: <20161021012017.67b75a90@roar.ozlabs.ibm.com> In-Reply-To: <20161020131702.GX1041@n2100.armlinux.org.uk> References: <20161017065131.GA27863@angband.pl> <6556201.qTG4Pa4aHk@wuerfel> <3114442.xCAy34UQCk@wuerfel> <20161019153159.GQ1041@n2100.armlinux.org.uk> <20161020150814.42951f61@roar.ozlabs.ibm.com> <20161020131702.GX1041@n2100.armlinux.org.uk> Organization: IBM X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Thu, 20 Oct 2016 14:17:02 +0100 Russell King - ARM Linux wrote: > On Thu, Oct 20, 2016 at 03:08:14PM +1100, Nicholas Piggin wrote: > > Fair point, what about leaving those as they are, and also adding > > them to asm-prototypes.h protected with GENKSYMS ifdef? It's not > > beautiful, but still better than armksyms.c before Al's patches (or > > at least no worse). > > I disagree (also see below). The armksyms way was understandable. > The new way... I've no idea yet, because I wasn't even copied on New way is you put the EXPORT_SYMBOL in the .S file, and give it a C style prototype in asm-prototypes.h, and that's it. The build system will do the rest. Either way you require some file of C prototypes, but after Al's patches, at least the EXPORT goes with its definition. As far as rebuilding too often, that sounds like a bug, more below. > any of the patches. I've no idea how the exports are now handled. > I'm in a black hole with respect to that, and that's now a problem. > > > > Now, it would have _ALSO_ been nice to have been at least COPIED on the > > > original set of changes that caused the need for this change. I wasn't. > > > So I want to see the original set of changes reverted, because they're > > > clearly causing breakage. Let's revert them and then go through the > > > proper process of maintainer review, rather than bypassing maintainers > > > and screwing up architectures in the process. There really is no > > > excuse for this crap. > > > > You may have a point about improvement of the process. I wasn't > > involved in the original patches, but we did cc linux-arch when the > > .S CRC issue became known. > > Yes, but I'm not on linux-kernel-v2, and I've no desire to end up with > another list I've no hope of keeping up with to my mailbox - I'll just > ignore it. 99% of the messages on it at the time when vger kicked me > off the list was x86 related discussion, and not really cross-arch > issues. As I say, it just became another linux-kernel list. For the patches that touched arm code, I'd agree you should have been cc'ed. Not to dismiss that concern at all, but for issues of interest to arch code but not specific to any (such as discovery that the asm exports change would require this change to restore CRC generation), I was just saying linux-arch is most appropriate for better or worse. Ccing 30 arch lists is not workable. And again not to dismiss your concern, I'm just here trying to come up with a workable fix for the non-revert scenario. Revert is no less valid an option, it's just not one I'm in favour of myself. > > However let's work on the assumption that they won't be reverted at this > > stage, and try to come up with something to fix it that you're happy with. > > Well, there's more problems with this new KSYMS approach than just the > CRCs. It forces a rebuild of the ksyms files every single time, which > then causes a relink of the kernel: Good catch, I'm surprised you're the first one who reported it. This patch seems to do the trick for me: From: Nicholas Piggin Date: Fri, 21 Oct 2016 01:13:33 +1100 Subject: [PATCH] kbuild: prevent lib-ksyms.o rebuilds Signed-off-by: Nicholas Piggin Reported-by: Russell King Tested-by: Russell King --- scripts/Makefile.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/Makefile.build b/scripts/Makefile.build index de46ab0..e1f25d6 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -430,6 +430,9 @@ cmd_export_list = $(OBJDUMP) -h $< | \ $(obj)/lib-ksyms.o: $(lib-target) FORCE $(call if_changed,export_list) + +targets += $(obj)/lib-ksyms.o + endif #