From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751489AbbG2IyJ (ORCPT ); Wed, 29 Jul 2015 04:54:09 -0400 Received: from casper.infradead.org ([85.118.1.10]:48376 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750791AbbG2IyF (ORCPT ); Wed, 29 Jul 2015 04:54:05 -0400 Date: Wed, 29 Jul 2015 10:53:55 +0200 From: Peter Zijlstra To: Jason Baron Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, bp@alien8.de, luto@amacapital.net, tglx@linutronix.de, rostedt@goodmis.org, will.deacon@arm.com, liuj97@gmail.com, rabin@rab.in, ralf@linux-mips.org, ddaney@caviumnetworks.com, benh@kernel.crashing.org, michael@ellerman.id.au, heiko.carstens@de.ibm.com, davem@davemloft.net, vbabka@suse.cz Subject: Re: [PATCH -v2 7/8] jump_label: Add selftest Message-ID: <20150729085355.GI19282@twins.programming.kicks-ass.net> References: <20150728132055.203176565@infradead.org> <20150728132313.272942631@infradead.org> <55B7F840.3050805@akamai.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55B7F840.3050805@akamai.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 28, 2015 at 05:46:40PM -0400, Jason Baron wrote: > On 07/28/2015 09:21 AM, Peter Zijlstra wrote: > In order to get the !CONFIG_JUMP_LABEL to work I needed, > the following: > > diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h > index c033595..27b335a 100644 > --- a/include/linux/jump_label.h > +++ b/include/linux/jump_label.h > @@ -183,10 +183,10 @@ static inline int jump_label_apply_nops(struct module *mod) > return 0; > } > > -#define STATIC_KEY_INIT_TRUE ((struct static_key) \ > - { .enabled = ATOMIC_INIT(1) }) > -#define STATIC_KEY_INIT_FALSE ((struct static_key) \ > - { .enabled = ATOMIC_INIT(0) }) > +#define STATIC_KEY_INIT_TRUE \ > + { .enabled = ATOMIC_INIT(1) } > +#define STATIC_KEY_INIT_FALSE \ > + { .enabled = ATOMIC_INIT(0) } > > #endif /* HAVE_JUMP_LABEL */ > Right, I still need to figure out why GCC thinks its not a constant with that typecast present. Thanks. > Other than that, everything seems to be working fine for me > with -v2. > > We probably should also update Documentation/static-keys.txt. > I can take a stab at that, if needed. Ah, yes please. Also the blob at the top of jump_label.h needs some TLC. > Module selftest is below. > You put a _lot_ more effort in it than me, and it does indeed cover more, so sure we can do that.