From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH V3 1/3] mmc: Add size for caller in init+register Date: Wed, 29 May 2013 16:19:28 +0200 Message-ID: <201305291619.28396.arnd@arndb.de> References: <1369790016-13270-1-git-send-email-csd@broadcom.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: "devicetree-discuss" To: Ulf Hansson Cc: linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Christian Daudt , Jerry Huang , Wei WANG , matt.porter-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, Kevin Liu , Lars-Peter Clausen , Russell King , Viresh Kumar , Chris Ball , devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Sascha Hauer , Rob Herring , Bill Pemberton , Stephen Warren , Anton Vorontsov , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Greg Kroah-Hartman , linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Guennadi Liakhovetski List-Id: devicetree@vger.kernel.org On Wednesday 29 May 2013, Ulf Hansson wrote: > > diff --git a/drivers/mmc/host/sdhci-pltfm.h b/drivers/mmc/host/sdhci-pltfm.h > > index 1210ed1..ed4a85d 100644 > > --- a/drivers/mmc/host/sdhci-pltfm.h > > +++ b/drivers/mmc/host/sdhci-pltfm.h > > @@ -27,6 +27,8 @@ struct sdhci_pltfm_host { > > /* migrate from sdhci_of_host */ > > unsigned int clock; > > u16 xfer_mode_shadow; > > + > > + unsigned long private[0] ____cacheline_aligned; > > Why do you need this to be "____cacheline_aligned"? This is common practice for additional members in data structures like this. The reason is that we append a structure which may have larger alignment requirements than 'unsigned long'. The kmalloc function generally returns a cache line aligned object, so this provides the same alignment that we get with a separate allocation. Arnd