* [PATCH] regmap: rbtree: improve 64bits memory alignment
@ 2014-04-01 20:26 David Cohen
2014-04-02 13:10 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: David Cohen @ 2014-04-01 20:26 UTC (permalink / raw)
To: broonie, gregkh; +Cc: linux-kernel, Jean-Christophe PINCE, David Cohen
From: Jean-Christophe PINCE <jean-christophe.pince@intel.com>
Change regcache_rbtree_node strcuture fields order to align the pointers on
64bits architectures.
Signed-off-by: Jean-Christophe PINCE <jean-christophe.pince@intel.com>
Signed-off-by: David Cohen <david.a.cohen@linux.intel.com>
---
drivers/base/regmap/regcache-rbtree.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c
index 930cad4e5df8..6a7e4fa12854 100644
--- a/drivers/base/regmap/regcache-rbtree.c
+++ b/drivers/base/regmap/regcache-rbtree.c
@@ -23,16 +23,16 @@ static int regcache_rbtree_write(struct regmap *map, unsigned int reg,
static int regcache_rbtree_exit(struct regmap *map);
struct regcache_rbtree_node {
- /* the actual rbtree node holding this block */
- struct rb_node node;
- /* base register handled by this block */
- unsigned int base_reg;
/* block of adjacent registers */
void *block;
/* Which registers are present */
long *cache_present;
+ /* base register handled by this block */
+ unsigned int base_reg;
/* number of registers available in the block */
unsigned int blklen;
+ /* the actual rbtree node holding this block */
+ struct rb_node node;
} __attribute__ ((packed));
struct regcache_rbtree_ctx {
--
1.9.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] regmap: rbtree: improve 64bits memory alignment
2014-04-01 20:26 [PATCH] regmap: rbtree: improve 64bits memory alignment David Cohen
@ 2014-04-02 13:10 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-04-02 13:10 UTC (permalink / raw)
To: David Cohen; +Cc: gregkh, linux-kernel, Jean-Christophe PINCE, linux-janitors
[-- Attachment #1: Type: text/plain, Size: 393 bytes --]
On Tue, Apr 01, 2014 at 01:26:48PM -0700, David Cohen wrote:
> From: Jean-Christophe PINCE <jean-christophe.pince@intel.com>
>
> Change regcache_rbtree_node strcuture fields order to align the pointers on
> 64bits architectures.
Applied, thanks. It seems like this is something there should be some
sort of tool for - it doesn't obviously fit into any of the existing
ones though.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-02 13:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-01 20:26 [PATCH] regmap: rbtree: improve 64bits memory alignment David Cohen
2014-04-02 13:10 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®