Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754059AbdCBB7k (ORCPT ); Wed, 1 Mar 2017 20:59:40 -0500 Received: from gw.crowfest.net ([52.42.241.221]:54970 "EHLO gw.crowfest.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753490AbdCBB7j (ORCPT ); Wed, 1 Mar 2017 20:59:39 -0500 Message-ID: <1488419978.20502.1.camel@crowfest.net> Subject: Re: [PATCH 1/2] staging/vc04_services: initialize cache line size properly From: Michael Zoran To: Arnd Bergmann , Greg Kroah-Hartman Cc: Stephen Warren , Lee Jones , Eric Anholt , Stefan Wahren , Daniel Stone , popcornmix , linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Date: Wed, 01 Mar 2017 17:59:38 -0800 In-Reply-To: <20170301225050.1298349-1-arnd@arndb.de> References: <20170301225050.1298349-1-arnd@arndb.de> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.5-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1628 Lines: 45 Hi Arnd, I submitted a change which is in Linux-next now that makes the whole CACHE_LINE_SIZE macro meaningless. It now always reads the size from the DT and errors out with -ENODEV if the property is missing. I was going to submit a change to delete the macro completely, just never got to it. https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit /drivers/staging/vc04_services/interface?id=6cf1bf636a067eb308cb3a8322b 9d6b1844a075d On Wed, 2017-03-01 at 23:50 +0100, Arnd Bergmann wrote: > While debugging another problem I noticed that g_cache_line_size gets > set > to sizeof(CACHE_LINE_SIZE), which is sizeof(int) or 4, while > presumably > CACHE_LINE_SIZE (e.g. 32) was meant. > > This initializes it the way it was meant. > > Signed-off-by: Arnd Bergmann > --- >  drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c | > 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git > a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c > b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c > index 3aeffcb9c87e..b0e9eb6ff73f 100644 > --- > a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c > +++ > b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c > @@ -78,7 +78,7 @@ struct vchiq_pagelist_info { >  }; >   >  static void __iomem *g_regs; > -static unsigned int g_cache_line_size = sizeof(CACHE_LINE_SIZE); > +static unsigned int g_cache_line_size = CACHE_LINE_SIZE; >  static unsigned int g_fragments_size; >  static char *g_fragments_base; >  static char *g_free_fragments;