Received: by 10.192.165.156 with SMTP id m28csp1549212imm; Tue, 17 Apr 2018 00:53:57 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/NQFa4qwxjNKEkSrJT3YHKbcb6rjzJ2UcKAeTWv+0AOpPThJZ/URol58YmoPi8kslJcCro X-Received: by 10.98.139.143 with SMTP id e15mr1078728pfl.134.1523951637632; Tue, 17 Apr 2018 00:53:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523951637; cv=none; d=google.com; s=arc-20160816; b=KwS9mVr1pCCHb+w2R15EV7y2MPq/GIoluC87ky78W+NaY1SHoAwupcLAkqbQCEZaN2 pXJZyAYdpAKH90METfDjrqQ4P5W9F3R57Dwh+/Gmq+URCDS3PL+svHL13urJB/QAmJ81 UkDiM+jNRJkZ2G8YdowkbQMkrHy4jYa6kqFboLBmOYLfMjbBxV+MUpPzN4KbZwxw9Fu3 Bhg6bM/Yt2eHua4WOkryprb9+AVmP86ATE7SoHQ+N8c+ZZ5h5JqGT4JKGlysxpQ0eCqR UKeWVvJep5qCI4GfjlkHP/UNa3nxbPTXVCpgpcPrugiZUc5G6chzte/ftaonPWw3UoH2 Hppw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=YUQUDZdoqUdeMkrMa0MPpFd2L5guOeHyxI/ovMFzwkI=; b=zaPY7NTORdhORIqsEzy62v57mId2r6A1H2YOf0bW3QUTKHuhEHCq2IodyIqISFDbMG uJSCEu2DW6CbBhOmRP7uQoZHHyoxRRy3UzXQ93Uh3RRpZjRrSUoSNibcic/2UUvosv3U VIC+r8t8fCjyvzcFXlKI/sQlOItt70e9v+Zo94gGUw9G5Nssj7ISvOTCL7NlxPL7ragN DqxCDTaBO19ghCaYt+tDWT/ABgWlkFtrcBp/pqgf604jreaDvw1N67iEhLJNJXZnE6I1 Zf0ewKntadfAeOAGczMJeZZ9uiH2Axo0MdNg1f/Y7b6M50Runyfs5Zgt0kCDwMJQ4/2p nZaQ== 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 g127si2519899pgc.428.2018.04.17.00.53.42; Tue, 17 Apr 2018 00:53:57 -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 S1751270AbeDQHwh (ORCPT + 99 others); Tue, 17 Apr 2018 03:52:37 -0400 Received: from mail.bootlin.com ([62.4.15.54]:49062 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750821AbeDQHwf (ORCPT ); Tue, 17 Apr 2018 03:52:35 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 664102075D; Tue, 17 Apr 2018 09:52:33 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 3AB7B2070D; Tue, 17 Apr 2018 09:52:33 +0200 (CEST) Date: Tue, 17 Apr 2018 09:52:33 +0200 From: Maxime Ripard To: =?utf-8?Q?Myl=C3=A8ne?= Josserand Cc: linux@armlinux.org.uk, wens@csie.org, marc.zyngier@arm.com, mark.rutland@arm.com, robh+dt@kernel.org, horms@verge.net.au, geert@linux-m68k.org, magnus.damm@gmail.com, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, clabbe.montjoie@gmail.com, quentin.schulz@bootlin.com, thomas.petazzoni@bootlin.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 08/11] ARM: sun9i: smp: Add is_sun8i field Message-ID: <20180417075233.f2z6wxcazwqheoib@flea> References: <20180416215032.5023-1-mylene.josserand@bootlin.com> <20180416215032.5023-9-mylene.josserand@bootlin.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pwy6pi3nx75zjbfe" Content-Disposition: inline In-Reply-To: <20180416215032.5023-9-mylene.josserand@bootlin.com> User-Agent: NeoMutt/20180323 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --pwy6pi3nx75zjbfe Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Mon, Apr 16, 2018 at 11:50:29PM +0200, Myl=E8ne Josserand wrote: > To prepare the support of sun8i-a83t, add a field in the smp_data > structure to know if we are on sun9i-a80 or sun8i-a83t. >=20 > Add also a global variable to retrieve which architecture we are > having. >=20 > Signed-off-by: Myl=E8ne Josserand > --- > arch/arm/mach-sunxi/mc_smp.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/arch/arm/mach-sunxi/mc_smp.c b/arch/arm/mach-sunxi/mc_smp.c > index 03f021d0c73e..9d57ea27dacc 100644 > --- a/arch/arm/mach-sunxi/mc_smp.c > +++ b/arch/arm/mach-sunxi/mc_smp.c > @@ -74,6 +74,7 @@ static void __iomem *sram_b_smp_base; > =20 > extern void sunxi_mc_smp_secondary_startup(void); > extern void sunxi_mc_smp_resume(void); > +static int is_sun8i; > =20 > static bool sunxi_core_is_cortex_a15(unsigned int core, unsigned int clu= ster) > { > @@ -624,6 +625,7 @@ struct sunxi_mc_smp_nodes { > struct sunxi_mc_smp_data { > const char *enable_method; > int (*get_smp_nodes)(struct sunxi_mc_smp_nodes *nodes); > + int is_sun8i; > }; > =20 > static void __init sunxi_mc_smp_put_nodes(struct sunxi_mc_smp_nodes *nod= es) > @@ -664,6 +666,7 @@ static const struct sunxi_mc_smp_data sunxi_mc_smp_da= ta[] __initconst =3D { > { > .enable_method =3D "allwinner,sun9i-a80-smp", > .get_smp_nodes =3D sun9i_a80_get_smp_nodes, > + .is_sun8i =3D false, I'm still not convinced about the name of that flag. sun8i doesn't mean anything, really. What you want to discriminate against it what you're writing in your commit log: if it is an A80 or an A83t. The A33, H3, A23, you name it are also part of the sun8i family, yet they are completely irrelevant to this file. Also, false is the default value, you can leave it out. > }, > }; > =20 > @@ -697,6 +700,8 @@ static int __init sunxi_mc_smp_init(void) > break; > } > =20 > + is_sun8i =3D sunxi_mc_smp_data[i].is_sun8i; > + Do we really need to cache it? Can't we just have a pointer to the SMP data structure and use that instead? Maxime --=20 Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com --pwy6pi3nx75zjbfe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlrVp8AACgkQ0rTAlCFN r3Rifw/9Gl4bEy8NdYh8PZltDYtIne5lOveP6B50wOPrqnnhzqHmGT4daHqI4Hkd G/MHWDA4CY1al4AJ/tgdSAmO9G+akVAqb2PQzZf5WuTbt94QuFh2FXYeArfETlmC H+wom1lAe1Ub1OxMJWttTphLiwKMeeP1bmskhClWsmQl2/FK/xf6JD9SgyUgoUtE ad2fd+6lwEg4XGg5HjWoj0+T/fNI7CuyFFogaHF6CrKE5hzDdDZ2ap4TJPtQoBbJ m85VlCALsy7wMUZDFiLcd+qF9Ro7pyGgk4D615sWyJ3G54z5O8as1SimFnYE+bCM A1o2h7hOzsn/7I2L0ZcNg93R34GqyZVtty5FhRrPptMOlFZ6YKyNhN/8UJjN9xWy WJ4qVofdhZKyD2NtLYxAR883guagxQeO817sTr7EDbBDEa0BdSeUeCxYUwg6v7Ve eNITpT0miJk+xmp+9zd+/LyJvl3+nDE8OejlWPf7z6horVXDVypcU8+CF4cmPxPJ bFjOx1IPsPSoolwnruIgbxk4dbytQVHHTrgqss0mBdYcrwVs8iaQ126d8mmArqGv 76PaNfSFaT4LYnnMm5c0gr3sjfI/RivAaLmWPmaJM+X3MIlvunBuMmunZKJK5Y9G kYtYQYQGI+eoltx2LCWBb1ZCup8S3STC1Sskp+gqCdovrp9+sVM= =PVeK -----END PGP SIGNATURE----- --pwy6pi3nx75zjbfe--