From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033006AbdEYRFX (ORCPT ); Thu, 25 May 2017 13:05:23 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:42159 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936662AbdEYRFH (ORCPT ); Thu, 25 May 2017 13:05:07 -0400 Date: Thu, 25 May 2017 19:05:05 +0200 From: Pavel Machek To: Palmer Dabbelt Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , olof@lixom.net, albert@sifive.com Subject: Re: [PATCH 6/7] RISC-V: arch/riscv/kernel Message-ID: <20170525170505.GB3085@amd> References: <20170523004107.536-1-palmer@dabbelt.com> <20170523004107.536-7-palmer@dabbelt.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="i9LlY+UWpKt15+FH" Content-Disposition: inline In-Reply-To: <20170523004107.536-7-palmer@dabbelt.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --i9LlY+UWpKt15+FH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > +static void ci_leaf_init(struct cacheinfo *this_leaf, > + struct device_node *node, > + enum cache_type type, unsigned int level) > +{ > + this_leaf->of_node =3D node; > + this_leaf->level =3D level; > + this_leaf->type =3D type; > + this_leaf->physical_line_partition =3D 1; // not a sector cache > + this_leaf->attributes =3D CACHE_WRITE_BACK | CACHE_READ_ALLOCATE= | CACHE_WRITE_ALLOCATE; // TODO: add to DTS > +} You may want to run the patches through checkpatch. (Comment style, long lines). > +static int __populate_cache_leaves(unsigned int cpu) > +{ > + struct cpu_cacheinfo *this_cpu_ci =3D get_cpu_cacheinfo(cpu); > + struct cacheinfo *this_leaf =3D this_cpu_ci->info_list; > + struct device_node *np =3D of_cpu_device_node_get(cpu); > + int levels =3D 1, level =3D 1; > + > + if (of_property_read_bool(np, "cache-size")) ci_leaf_init(this_leaf++= , np, CACHE_TYPE_UNIFIED, level); > + if (of_property_read_bool(np, "i-cache-size")) ci_leaf_init(this_leaf++= , np, CACHE_TYPE_INST, level); > + if (of_property_read_bool(np, "d-cache-size")) ci_leaf_init(this_leaf++= , np, CACHE_TYPE_DATA, level); --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --i9LlY+UWpKt15+FH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlknDsEACgkQMOfwapXb+vJ01ACgq7qQ9SikOexfy/Buh7U5N/J5 NjAAniuSV8dl5YG6O3RHJjlC7dYheJ8J =SCp1 -----END PGP SIGNATURE----- --i9LlY+UWpKt15+FH--