From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id B44121A0287 for ; Wed, 11 Feb 2015 03:56:12 +1100 (AEDT) Received: by pdbfl12 with SMTP id fl12so15502978pdb.2 for ; Tue, 10 Feb 2015 08:56:10 -0800 (PST) Date: Tue, 10 Feb 2015 08:55:42 -0800 From: Dave Olson To: Benjamin Herrenschmidt Subject: Re: [PATCH 1/1] powerpc: fix missing L2 cache size in /sys/devices/system/cpu Message-ID: <20150210165542.GB16682@cumulusnetworks.com> References: <20150209221421.GA22286@cumulusnetworks.com> <1423524827.19657.1.camel@ellerman.id.au> <20150209234351.GC22286@cumulusnetworks.com> <1423527151.4924.64.camel@kernel.crashing.org> <20150210080002.GA23291@cumulusnetworks.com> <1423556040.4924.90.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1423556040.4924.90.camel@kernel.crashing.org> Cc: Paul Mackerras , linuxppc-dev@lists.ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Benjamin Herrenschmidt wrote: > On Tue, 2015-02-10 at 00:00 -0800, Dave Olson wrote: > > > > OK, now that I understand that's the case, I'll have to go back and > > re-do the patch to handle both cache-size and d-cache-size for the > > L2 cache (using whichever is present). > > I notice that you also didn't modify all the other properties, I would > assume you need to also updates in that area ? Maybe you should > duplicate the whole structure and have the code look for both. Since we have line_size_props, I can bump that from 2 to 4 entries, and add "cache_line_size" and "cache_block_size", instead of an explict check. I could change size_prop, and nr_sets_prop to be a structure like line_size_props, if you think that's cleaner than the explict check for "cache-size", and "cache-sets" in the functions. These 3 seem to be the only ones at issue, and I should have checked futher to realize that sets and line size were missing. What's the preference for the other 2 missing items? > > I don't have any power Macs to use for testing, would one of you be > > willing and able to verify the patch on a power Mac? Dave Olson olson@cumulusnetworks.com