Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp705587ybx; Wed, 30 Oct 2019 03:49:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxQVfb8bSDU3DIHTRxXq2kgKknhSCci7Uo0W/0/QTMfLFTiYi0U4s3EZP4TaOr3TFev2RSv X-Received: by 2002:a17:906:c28c:: with SMTP id r12mr8182737ejz.163.1572432581730; Wed, 30 Oct 2019 03:49:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572432581; cv=none; d=google.com; s=arc-20160816; b=us2Wt8oq46E2WjRV+SL91TQAARdnzfGZ1qIgfyilcgmn2osqzPQbMAsl9jeLHLWON2 0x3ueKKNHu2cIBuMbgNMproHD/CREkvD+07icpGVAKwOQjHgdpq7Gj0VRpc28U58d9HZ rA7h5uci11/i5+iCdZE0d2cVJJN0Z3dnUjV9IFF6K9TT0OFrdE+JafriTAL1EWE3j1Mk +BEYwQgiL7UkJGkmwnn3gs2X24bCJQKytP1jZctCPeA1oPf1RMWgNUbLQ/bgZe+bvQMb JKNgqEczqfxJFz2pd1MiLfi9Q6/NTvAI4sk8Gk+44WhtK3RqD8KOyZxpRGwrt7mXjLzh 2vVA== 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:from:references:cc:to:subject:dkim-signature; bh=ldw9WUgmvPJSr0yqobCGkdD8WgYCJ83JuIM2Zc0dqTc=; b=JqY622Jo02zmG79Y2rawiSkDGT8F6TRgnlk3CB81tvR9z3HrpzxBis+YO1s/t/50vR MhcNyXC8rOZeEX/Ydo6tlViNJK5BivKoOSN+i2pihSdPh03gH9QURTwcVj6/ywjqLGt7 6Ks719fgNO5ljE5NRyKPDdDsimJr4czUbMyaCoXX1M/baC4v8F6n65fBGa7l9QFRw5VB Zs3qrJm9A2YMymNTXFZk46liYagzU1TiPVVsbgTXPmmYRUfehtF0u01A5BSTDseiugti G46Cov2qxOMROh7FhJ1vv2mxirckDA/69AvqixXF8R9YU2fpGVyOH8H7Z9FLYjoX7zPT 7ewA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b="IF1kk/S9"; 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 nt21si878661ejb.119.2019.10.30.03.49.18; Wed, 30 Oct 2019 03:49:41 -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; dkim=pass header.i=@c-s.fr header.s=mail header.b="IF1kk/S9"; 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 S1726922AbfJ3Kph (ORCPT + 99 others); Wed, 30 Oct 2019 06:45:37 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:12277 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726150AbfJ3Kph (ORCPT ); Wed, 30 Oct 2019 06:45:37 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4734qL1h7cz9vC0r; Wed, 30 Oct 2019 11:45:34 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=IF1kk/S9; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id RKPDgr6MaFYQ; Wed, 30 Oct 2019 11:45:34 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4734qL0cgqz9vC0q; Wed, 30 Oct 2019 11:45:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1572432334; bh=ldw9WUgmvPJSr0yqobCGkdD8WgYCJ83JuIM2Zc0dqTc=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=IF1kk/S9aewyTgTqFIvoD/cCPMgynwOcooIsZlNEKD4i5AsCVo2kQzfnPEuMaYd58 skGXIRVEm0Diy5eW0JoSWYE1FYReNLhQWiSxAiiz/qKkW6ThLRH/EqczlF22hawOck L3ea7nQRw5B+cWk5/dFW6Onwwn7dQRC4k+cJrBAU= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C5BDD8B7AF; Wed, 30 Oct 2019 11:45:34 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id 6ZJvPf1P5Mu6; Wed, 30 Oct 2019 11:45:34 +0100 (CET) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 34E9E8B7C8; Wed, 30 Oct 2019 11:45:32 +0100 (CET) Subject: Re: [PATCH v2 09/23] soc: fsl: qe: move qe_ic_cascade_* functions to qe_ic.c To: Rasmus Villemoes , Qiang Zhao , Li Yang Cc: linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Scott Wood , Valentin Longchamp References: <20191018125234.21825-1-linux@rasmusvillemoes.dk> <20191025124058.22580-1-linux@rasmusvillemoes.dk> <20191025124058.22580-10-linux@rasmusvillemoes.dk> From: Christophe Leroy Message-ID: Date: Wed, 30 Oct 2019 11:45:31 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191025124058.22580-10-linux@rasmusvillemoes.dk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 25/10/2019 à 14:40, Rasmus Villemoes a écrit : > These functions are only ever called through a function pointer, and > therefore it makes no sense for them to be "static inline" - gcc has > no choice but to emit a copy in each translation unit that takes the > address of one of these (currently various platform code under > arch/powerpc/). So move them into qe_ic.c and leave ordinary extern > declarations in the header file. What is the point in moving fonctions that you will drop in the next patch (qe_ic_cascade_low_ipic() and qe_ic_cascade_high_ipic()) Only move the ones that will remain. Christophe > > Signed-off-by: Rasmus Villemoes > --- > drivers/soc/fsl/qe/qe_ic.c | 58 +++++++++++++++++++++++++++++++++++ > include/soc/fsl/qe/qe_ic.h | 62 +++----------------------------------- > 2 files changed, 63 insertions(+), 57 deletions(-) > > diff --git a/drivers/soc/fsl/qe/qe_ic.c b/drivers/soc/fsl/qe/qe_ic.c > index 7b1870d2866a..a847b2672e90 100644 > --- a/drivers/soc/fsl/qe/qe_ic.c > +++ b/drivers/soc/fsl/qe/qe_ic.c > @@ -402,6 +402,64 @@ unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic) > return irq_linear_revmap(qe_ic->irqhost, irq); > } > > +void qe_ic_cascade_low_ipic(struct irq_desc *desc) > +{ > + struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); > + unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); > + > + if (cascade_irq != NO_IRQ) > + generic_handle_irq(cascade_irq); > +} > + > +void qe_ic_cascade_high_ipic(struct irq_desc *desc) > +{ > + struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); > + unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); > + > + if (cascade_irq != NO_IRQ) > + generic_handle_irq(cascade_irq); > +} > + > +void qe_ic_cascade_low_mpic(struct irq_desc *desc) > +{ > + struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); > + unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); > + struct irq_chip *chip = irq_desc_get_chip(desc); > + > + if (cascade_irq != NO_IRQ) > + generic_handle_irq(cascade_irq); > + > + chip->irq_eoi(&desc->irq_data); > +} > + > +void qe_ic_cascade_high_mpic(struct irq_desc *desc) > +{ > + struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); > + unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); > + struct irq_chip *chip = irq_desc_get_chip(desc); > + > + if (cascade_irq != NO_IRQ) > + generic_handle_irq(cascade_irq); > + > + chip->irq_eoi(&desc->irq_data); > +} > + > +void qe_ic_cascade_muxed_mpic(struct irq_desc *desc) > +{ > + struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); > + unsigned int cascade_irq; > + struct irq_chip *chip = irq_desc_get_chip(desc); > + > + cascade_irq = qe_ic_get_high_irq(qe_ic); > + if (cascade_irq == NO_IRQ) > + cascade_irq = qe_ic_get_low_irq(qe_ic); > + > + if (cascade_irq != NO_IRQ) > + generic_handle_irq(cascade_irq); > + > + chip->irq_eoi(&desc->irq_data); > +} > + > void __init qe_ic_init(struct device_node *node, unsigned int flags, > void (*low_handler)(struct irq_desc *desc), > void (*high_handler)(struct irq_desc *desc)) > diff --git a/include/soc/fsl/qe/qe_ic.h b/include/soc/fsl/qe/qe_ic.h > index 714a9b890d8d..f3492eb13052 100644 > --- a/include/soc/fsl/qe/qe_ic.h > +++ b/include/soc/fsl/qe/qe_ic.h > @@ -74,62 +74,10 @@ void qe_ic_set_highest_priority(unsigned int virq, int high); > int qe_ic_set_priority(unsigned int virq, unsigned int priority); > int qe_ic_set_high_priority(unsigned int virq, unsigned int priority, int high); > > -static inline void qe_ic_cascade_low_ipic(struct irq_desc *desc) > -{ > - struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); > - unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); > - > - if (cascade_irq != NO_IRQ) > - generic_handle_irq(cascade_irq); > -} > - > -static inline void qe_ic_cascade_high_ipic(struct irq_desc *desc) > -{ > - struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); > - unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); > - > - if (cascade_irq != NO_IRQ) > - generic_handle_irq(cascade_irq); > -} > - > -static inline void qe_ic_cascade_low_mpic(struct irq_desc *desc) > -{ > - struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); > - unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic); > - struct irq_chip *chip = irq_desc_get_chip(desc); > - > - if (cascade_irq != NO_IRQ) > - generic_handle_irq(cascade_irq); > - > - chip->irq_eoi(&desc->irq_data); > -} > - > -static inline void qe_ic_cascade_high_mpic(struct irq_desc *desc) > -{ > - struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); > - unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic); > - struct irq_chip *chip = irq_desc_get_chip(desc); > - > - if (cascade_irq != NO_IRQ) > - generic_handle_irq(cascade_irq); > - > - chip->irq_eoi(&desc->irq_data); > -} > - > -static inline void qe_ic_cascade_muxed_mpic(struct irq_desc *desc) > -{ > - struct qe_ic *qe_ic = irq_desc_get_handler_data(desc); > - unsigned int cascade_irq; > - struct irq_chip *chip = irq_desc_get_chip(desc); > - > - cascade_irq = qe_ic_get_high_irq(qe_ic); > - if (cascade_irq == NO_IRQ) > - cascade_irq = qe_ic_get_low_irq(qe_ic); > - > - if (cascade_irq != NO_IRQ) > - generic_handle_irq(cascade_irq); > - > - chip->irq_eoi(&desc->irq_data); > -} > +void qe_ic_cascade_low_ipic(struct irq_desc *desc); > +void qe_ic_cascade_high_ipic(struct irq_desc *desc); > +void qe_ic_cascade_low_mpic(struct irq_desc *desc); > +void qe_ic_cascade_high_mpic(struct irq_desc *desc); > +void qe_ic_cascade_muxed_mpic(struct irq_desc *desc); > > #endif /* _ASM_POWERPC_QE_IC_H */ >