Received: by 10.213.65.68 with SMTP id h4csp1142988imn; Mon, 26 Mar 2018 01:20:04 -0700 (PDT) X-Google-Smtp-Source: AG47ELtPbQlTRg6Drp4u7NCEgl+O50Wz2jNBJEayW4SvuHovmqgVubQZNgdgqcE79OVLd4N/0pdv X-Received: by 10.98.105.2 with SMTP id e2mr28333842pfc.1.1522052404152; Mon, 26 Mar 2018 01:20:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522052404; cv=none; d=google.com; s=arc-20160816; b=yqloPit8GyoVB7OT5q3EWSUJ0RQ1hdGGa6GHxvi4nbe3mZbGncK0cBkONzxJaNlCM/ CjGRo+zdDh1bPNaN0fjFodtc7/YypVdagI2pBY4hNsknOGvBfJbm/ReKHw6TwmQMZLXK 4LSDVTuor8A6ufUeYFv4oS2YrDqWIRbh7rpX0RcUUSmeCUBLLD/4esut4ytvyplpDRQo 81ZeDaPn0yTJP/cdACeVZO7mz/l8TPylNOdAfwymPaVeB6VJRIDeUQJjpKfnYDU5mHKd gSLkVBSBXo94Q5bZQumQ7NCFsrocUW9ETZAgtQPBSECweuoa9yDp4PhpGAigtlZHdvNj qh9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :arc-authentication-results; bh=FlDmtdrgwoO5FcgxRUwRLatOC5LCDYTO7l3Hy+hQg+o=; b=l2rfy7mNEKyS9pPvvv4MOTsHxxSZeG0kt5+tokiLMydX8ycESaqMehBtxCpXyiwDqk iZOIfgcUiyMgg7AvrL+7YaVoRSneOIZOOk1/Z/gZD6cBPbgodadwf1d6rtiINFwQQewC OZydhVQ3PJB+mVRe4wX0KsAfwSjWgibrliKab2v6xwRiSHhkppLlAGIUplQ1wAyUS0NB 4wg2BamLr449R68+/JPnOtdTlTxGAKeuEcj4DdGlm8iJkbvEDiuIDaeCftJJvu1SJoJc mzBFawvD3Lk5OPl2e7McMtqTRNhH4zm1CegovKnhGYeTvz2G7WfZuHu1jQtVtNshIDOI kWuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j192si9829416pge.291.2018.03.26.01.19.49; Mon, 26 Mar 2018 01:20:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751937AbeCZIRk (ORCPT + 99 others); Mon, 26 Mar 2018 04:17:40 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:37760 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750923AbeCZIRj (ORCPT ); Mon, 26 Mar 2018 04:17:39 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6C5B11435; Mon, 26 Mar 2018 01:17:39 -0700 (PDT) Received: from [10.1.206.75] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 370BC3F557; Mon, 26 Mar 2018 01:17:38 -0700 (PDT) Subject: Re: [PATCH 2/3] drivers/irqchip: update supports_deactivate static key to modern api To: Davidlohr Bueso , peterz@infradead.org, akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, Thomas Gleixner , Jason Cooper , Davidlohr Bueso References: <20180325191056.24598-1-dave@stgolabs.net> <20180325191056.24598-3-dave@stgolabs.net> From: Marc Zyngier Organization: ARM Ltd Message-ID: <671202a1-4080-0104-abd8-4718c53dd61e@arm.com> Date: Mon, 26 Mar 2018 09:17:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180325191056.24598-3-dave@stgolabs.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Davidlohr, On 25/03/18 20:10, Davidlohr Bueso wrote: > Minor changes in semantics -- key init is true; replace > > static_key_slow_dec with static_branch_disable > static_key_true with static_branch_likely > > The first is because we never actually do any couterpart incs, > thus there is really no reference counting semantics going on. > Use the more proper static_branch_disable() construct. > > Also added a '_key' suffix to supports_deactivate, for better > self documentation. > > Cc: Thomas Gleixner > Cc: Jason Cooper > Cc: Marc Zyngier > Signed-off-by: Davidlohr Bueso > --- > drivers/irqchip/irq-gic-v3.c | 20 ++++++++++---------- > drivers/irqchip/irq-gic.c | 22 +++++++++++----------- > 2 files changed, 21 insertions(+), 21 deletions(-) > > diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c > index 56c8de84a72b..f32b1814278b 100644 > --- a/drivers/irqchip/irq-gic-v3.c > +++ b/drivers/irqchip/irq-gic-v3.c > @@ -61,7 +61,7 @@ struct gic_chip_data { > }; > > static struct gic_chip_data gic_data __read_mostly; > -static struct static_key supports_deactivate = STATIC_KEY_INIT_TRUE; > +DEFINE_STATIC_KEY_TRUE(supports_deactivate_key); When you combine this... [...] > diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c > index ac2e62d613d1..9b7630cee56c 100644 > --- a/drivers/irqchip/irq-gic.c > +++ b/drivers/irqchip/irq-gic.c > @@ -121,7 +121,7 @@ static DEFINE_RAW_SPINLOCK(cpu_map_lock); > #define NR_GIC_CPU_IF 8 > static u8 gic_cpu_map[NR_GIC_CPU_IF] __read_mostly; > > -static struct static_key supports_deactivate = STATIC_KEY_INIT_TRUE; > +DEFINE_STATIC_KEY_TRUE(supports_deactivate_key); ...with that, bad things happen: drivers/irqchip/irq-gic-v3.o:(.data+0x278): multiple definition of `supports_deactivate_key' drivers/irqchip/irq-gic.o:(.data+0x18): first defined here Makefile:1032: recipe for target 'vmlinux' failed make: *** [vmlinux] Error 1 Thanks, M. -- Jazz is not dead. It just smells funny...