Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1300593 > unrolled thread
| Started by | Xiubo Li <lixiubo@cmss.chinamobile.com> |
|---|---|
| First post | 2016-01-04 11:10 +0100 |
| Last post | 2016-01-04 11:10 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCHv2 2/3] regcache: Introduce the index parsing API by stride order Xiubo Li <lixiubo@cmss.chinamobile.com> - 2016-01-04 11:10 +0100
| From | Xiubo Li <lixiubo@cmss.chinamobile.com> |
|---|---|
| Date | 2016-01-04 11:10 +0100 |
| Subject | [PATCHv2 2/3] regcache: Introduce the index parsing API by stride order |
| Message-ID | <qNafo-23H-3@gated-at.bofh.it> |
Here introduces regcache_get_index_by_order() for regmap cache,
which uses the register stride order and bit rotation, to improve
the performance.
Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com>
---
drivers/base/regmap/internal.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h
index c22b04b..5c79526 100644
--- a/drivers/base/regmap/internal.h
+++ b/drivers/base/regmap/internal.h
@@ -273,4 +273,10 @@ static inline unsigned int regmap_get_offset(const struct regmap *map,
return index * map->reg_stride;
}
+static inline unsigned int regcache_get_index_by_order(const struct regmap *map,
+ unsigned int reg)
+{
+ return reg >> map->reg_stride_order;
+}
+
#endif
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web