From patchwork Sat Apr 26 00:13:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Cooper X-Patchwork-Id: 4067271 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AC6B79F1F4 for ; Sat, 26 Apr 2014 00:16:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BC6BE2037D for ; Sat, 26 Apr 2014 00:16:54 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C539520304 for ; Sat, 26 Apr 2014 00:16:53 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WdqFz-0008G7-2a; Sat, 26 Apr 2014 00:14:15 +0000 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WdqFw-0008D9-UE for linux-arm-kernel@lists.infradead.org; Sat, 26 Apr 2014 00:14:13 +0000 Received: from pool-96-249-243-124.nrflva.fios.verizon.net ([96.249.243.124] helo=titan) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WdqFa-000Fld-HO; Sat, 26 Apr 2014 00:13:50 +0000 Received: from titan.lakedaemon.net (localhost [127.0.0.1]) by titan (Postfix) with ESMTP id D846B563A88; Fri, 25 Apr 2014 20:13:46 -0400 (EDT) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 96.249.243.124 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18bFvGy0mV7VmKwa7sp2xgvel1XD9ryIOQ= X-DKIM: OpenDKIM Filter v2.0.1 titan D846B563A88 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lakedaemon.net; s=mail; t=1398471226; bh=2SPkWneFDN0UL5I2z84AIeti0tggckcYE2nQeRxo5yc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=C/0OuFfpx/9GxI6vx03Yk6MjqELy6bTq9MGUYYwA653TJop7DoyyL75Cgvs12Ni40 LGLNecPFV5mgxO++7M7g3sBc6l3Ev7TvltIIWqVthLA1zSm532pqiBC26bJ+bFQ7hV QeHz5k8u6SliDmW1KqLCNo96b8ecF8PQnB4YJOy4TYISpWf8wTQzFqklrT1hCq8heX ZRVnpSbWeNbTWI2ta69p2lhV967jqV0DqdlXsj/Og4W1nBRgVCBxkF7RyrmEI/ViDY y7j6ewE9WZW86Lj7r0+fyfl6owb3Nnp6snZYDXspAuT7mOnRkLrf1rw8HG6BiGhPwT NefJXAoj4bVMQ== Date: Fri, 25 Apr 2014 20:13:46 -0400 From: Jason Cooper To: Gregory CLEMENT Subject: Re: [PATCH v7 04/11] ARM: mvebu: Remove the unused argument of set_cpu_coherent() Message-ID: <20140426001346.GH28159@titan.lakedaemon.net> References: <1397488214-20685-1-git-send-email-gregory.clement@free-electrons.com> <1397488214-20685-5-git-send-email-gregory.clement@free-electrons.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1397488214-20685-5-git-send-email-gregory.clement@free-electrons.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140425_171413_166441_C1835E8D X-CRM114-Status: GOOD ( 18.77 ) X-Spam-Score: -0.1 (/) Cc: Thomas Petazzoni , Andrew Lunn , Tawfik Bayouk , linux-pm@vger.kernel.org, Daniel Lezcano , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Nadav Haklai , Lior Amsalem , Ezequiel Garcia , linux-arm-kernel@lists.infradead.org, Sebastian Hesselbarth X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Apr 14, 2014 at 05:10:07PM +0200, Gregory CLEMENT wrote: > set_cpu_coherent() took the SMP group ID as parameter. But this > parameter was never used, and the CPU always uses the SMP group 0. So > we can remove this parameter. > > Signed-off-by: Gregory CLEMENT > --- > arch/arm/mach-mvebu/coherency.c | 4 ++-- > arch/arm/mach-mvebu/coherency.h | 2 +- > arch/arm/mach-mvebu/platsmp.c | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) Thomas' work https://lkml.kernel.org/r/1397483228-25625-2-git-send-email-thomas.petazzoni@free-electrons.com introduced an extra call to set_cpu_coherent() that wasn't caught by this patch. I've amended it as attached below. thx, Jason. > diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c > index 51010dbbf7e4..ad61251f7faf 100644 > --- a/arch/arm/mach-mvebu/coherency.c > +++ b/arch/arm/mach-mvebu/coherency.c > @@ -46,7 +46,7 @@ static struct of_device_id of_coherency_table[] = { > /* Function defined in coherency_ll.S */ > int ll_set_cpu_coherent(void); > > -int set_cpu_coherent(int smp_group_id) > +int set_cpu_coherent(void) > { > if (!coherency_base) { > pr_warn("Can't make current CPU cache coherent.\n"); > @@ -140,7 +140,7 @@ int __init coherency_init(void) > sync_cache_w(&coherency_phys_base); > coherency_base = of_iomap(np, 0); > coherency_cpu_base = of_iomap(np, 1); > - set_cpu_coherent(0); > + set_cpu_coherent(); > of_node_put(np); > } > > diff --git a/arch/arm/mach-mvebu/coherency.h b/arch/arm/mach-mvebu/coherency.h > index c7e5df368d98..dff16612dd93 100644 > --- a/arch/arm/mach-mvebu/coherency.h > +++ b/arch/arm/mach-mvebu/coherency.h > @@ -15,8 +15,8 @@ > #define __MACH_370_XP_COHERENCY_H > > extern unsigned long coherency_phys_base; > +int set_cpu_coherent(void); > > -int set_cpu_coherent(int smp_group_id); > int coherency_init(void); > > #endif /* __MACH_370_XP_COHERENCY_H */ > diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c > index a99d71a747f0..f2f1830063c8 100644 > --- a/arch/arm/mach-mvebu/platsmp.c > +++ b/arch/arm/mach-mvebu/platsmp.c > @@ -102,7 +102,7 @@ static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus) > > set_secondary_cpus_clock(); > flush_cache_all(); > - set_cpu_coherent(0); > + set_cpu_coherent(); > > /* > * In order to boot the secondary CPUs we need to ensure > -- > 1.8.1.2 ------------->8----------------------------- commit cfa292006fb7016fad58659d01e84a3aba488db2 Author: Gregory CLEMENT Date: Mon Apr 14 17:10:07 2014 +0200 ARM: mvebu: Remove the unused argument of set_cpu_coherent() set_cpu_coherent() took the SMP group ID as parameter. But this parameter was never used, and the CPU always uses the SMP group 0. So we can remove this parameter. Signed-off-by: Gregory CLEMENT Link: https://lkml.kernel.org/r/1397488214-20685-5-git-send-email-gregory.clement@free-electrons.com Signed-off-by: Jason Cooper diff --git a/arch/arm/mach-mvebu/coherency.c b/arch/arm/mach-mvebu/coherency.c index 2f7eb0e10164..0297cca32635 100644 --- a/arch/arm/mach-mvebu/coherency.c +++ b/arch/arm/mach-mvebu/coherency.c @@ -63,7 +63,7 @@ static struct of_device_id of_coherency_table[] = { /* Function defined in coherency_ll.S */ int ll_set_cpu_coherent(void); -int set_cpu_coherent(int smp_group_id) +int set_cpu_coherent(void) { if (!coherency_base) { pr_warn("Can't make current CPU cache coherent.\n"); @@ -302,7 +302,7 @@ static void __init armada_370_coherency_init(struct device_node *np) sync_cache_w(&coherency_phys_base); coherency_base = of_iomap(np, 0); coherency_cpu_base = of_iomap(np, 1); - set_cpu_coherent(0); + set_cpu_coherent(); } static void __init armada_375_380_coherency_init(struct device_node *np) @@ -330,7 +330,7 @@ static int coherency_type(void) sync_cache_w(&coherency_phys_base); coherency_base = of_iomap(np, 0); coherency_cpu_base = of_iomap(np, 1); - set_cpu_coherent(0); + set_cpu_coherent(); of_node_put(np); } diff --git a/arch/arm/mach-mvebu/coherency.h b/arch/arm/mach-mvebu/coherency.h index ab594a75fef3..54cb7607b526 100644 --- a/arch/arm/mach-mvebu/coherency.h +++ b/arch/arm/mach-mvebu/coherency.h @@ -15,8 +15,8 @@ #define __MACH_370_XP_COHERENCY_H extern unsigned long coherency_phys_base; +int set_cpu_coherent(void); -int set_cpu_coherent(int smp_group_id); int coherency_init(void); int coherency_available(void); diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c index 75436c0023a8..88b976b31719 100644 --- a/arch/arm/mach-mvebu/platsmp.c +++ b/arch/arm/mach-mvebu/platsmp.c @@ -103,7 +103,7 @@ static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus) set_secondary_cpus_clock(); flush_cache_all(); - set_cpu_coherent(0); + set_cpu_coherent(); /* * In order to boot the secondary CPUs we need to ensure