diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-24 19:42:54 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-24 19:42:54 -0400 |
| commit | 7c90de34b23ba69050b3a8fa7e524e871bcf3921 (patch) | |
| tree | 43a23c92587fd5e4a7f3abac4395b0e5b8ca89fd | |
| parent | 90a5a895cc8b284ac522757a01de15e36710c2b9 (diff) | |
| parent | c6b570d97c0e77f570bb6b2ed30d372b2b1e9aae (diff) | |
Merge tag 'regmap-fix-v4.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Pull regmap fix from Mark Brown:
"This patch fixes a bad interaction between the support that was added
for having regmaps without devices for early system controller
initialization and the trace support.
There's a very good analysis of the actual issue in the commit message
for the change"
* tag 'regmap-fix-v4.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
regmap: introduce regmap_name to fix syscon regmap trace events
| -rw-r--r-- | drivers/base/regmap/internal.h | 8 | ||||
| -rw-r--r-- | drivers/base/regmap/regcache.c | 16 | ||||
| -rw-r--r-- | drivers/base/regmap/regmap.c | 32 | ||||
| -rw-r--r-- | include/trace/events/regmap.h | 123 |
4 files changed, 91 insertions, 88 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index beb8b27d4621..a13587b5c2be 100644 --- a/drivers/base/regmap/internal.h +++ b/drivers/base/regmap/internal.h | |||
| @@ -243,4 +243,12 @@ extern struct regcache_ops regcache_rbtree_ops; | |||
| 243 | extern struct regcache_ops regcache_lzo_ops; | 243 | extern struct regcache_ops regcache_lzo_ops; |
| 244 | extern struct regcache_ops regcache_flat_ops; | 244 | extern struct regcache_ops regcache_flat_ops; |
| 245 | 245 | ||
| 246 | static inline const char *regmap_name(const struct regmap *map) | ||
| 247 | { | ||
| 248 | if (map->dev) | ||
| 249 | return dev_name(map->dev); | ||
| 250 | |||
| 251 | return map->name; | ||
| 252 | } | ||
| 253 | |||
| 246 | #endif | 254 | #endif |
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index da84f544c544..87db9893b463 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c | |||
| @@ -218,7 +218,7 @@ int regcache_read(struct regmap *map, | |||
| 218 | ret = map->cache_ops->read(map, reg, value); | 218 | ret = map->cache_ops->read(map, reg, value); |
| 219 | 219 | ||
| 220 | if (ret == 0) | 220 | if (ret == 0) |
| 221 | trace_regmap_reg_read_cache(map->dev, reg, *value); | 221 | trace_regmap_reg_read_cache(map, reg, *value); |
| 222 | 222 | ||
| 223 | return ret; | 223 | return ret; |
| 224 | } | 224 | } |
| @@ -311,7 +311,7 @@ int regcache_sync(struct regmap *map) | |||
| 311 | dev_dbg(map->dev, "Syncing %s cache\n", | 311 | dev_dbg(map->dev, "Syncing %s cache\n", |
| 312 | map->cache_ops->name); | 312 | map->cache_ops->name); |
| 313 | name = map->cache_ops->name; | 313 | name = map->cache_ops->name; |
| 314 | trace_regcache_sync(map->dev, name, "start"); | 314 | trace_regcache_sync(map, name, "start"); |
| 315 | 315 | ||
| 316 | if (!map->cache_dirty) | 316 | if (!map->cache_dirty) |
| 317 | goto out; | 317 | goto out; |
| @@ -346,7 +346,7 @@ out: | |||
| 346 | 346 | ||
| 347 | regmap_async_complete(map); | 347 | regmap_async_complete(map); |
| 348 | 348 | ||
| 349 | trace_regcache_sync(map->dev, name, "stop"); | 349 | trace_regcache_sync(map, name, "stop"); |
| 350 | 350 | ||
| 351 | return ret; | 351 | return ret; |
| 352 | } | 352 | } |
| @@ -381,7 +381,7 @@ int regcache_sync_region(struct regmap *map, unsigned int min, | |||
| 381 | name = map->cache_ops->name; | 381 | name = map->cache_ops->name; |
| 382 | dev_dbg(map->dev, "Syncing %s cache from %d-%d\n", name, min, max); | 382 | dev_dbg(map->dev, "Syncing %s cache from %d-%d\n", name, min, max); |
| 383 | 383 | ||
| 384 | trace_regcache_sync(map->dev, name, "start region"); | 384 | trace_regcache_sync(map, name, "start region"); |
| 385 | 385 | ||
| 386 | if (!map->cache_dirty) | 386 | if (!map->cache_dirty) |
| 387 | goto out; | 387 | goto out; |
| @@ -401,7 +401,7 @@ out: | |||
| 401 | 401 | ||
| 402 | regmap_async_complete(map); | 402 | regmap_async_complete(map); |
| 403 | 403 | ||
| 404 | trace_regcache_sync(map->dev, name, "stop region"); | 404 | trace_regcache_sync(map, name, "stop region"); |
| 405 | 405 | ||
| 406 | return ret; | 406 | return ret; |
| 407 | } | 407 | } |
| @@ -428,7 +428,7 @@ int regcache_drop_region(struct regmap *map, unsigned int min, | |||
| 428 | 428 | ||
| 429 | map->lock(map->lock_arg); | 429 | map->lock(map->lock_arg); |
| 430 | 430 | ||
| 431 | trace_regcache_drop_region(map->dev, min, max); | 431 | trace_regcache_drop_region(map, min, max); |
| 432 | 432 | ||
| 433 | ret = map->cache_ops->drop(map, min, max); | 433 | ret = map->cache_ops->drop(map, min, max); |
| 434 | 434 | ||
| @@ -455,7 +455,7 @@ void regcache_cache_only(struct regmap *map, bool enable) | |||
| 455 | map->lock(map->lock_arg); | 455 | map->lock(map->lock_arg); |
| 456 | WARN_ON(map->cache_bypass && enable); | 456 | WARN_ON(map->cache_bypass && enable); |
| 457 | map->cache_only = enable; | 457 | map->cache_only = enable; |
| 458 | trace_regmap_cache_only(map->dev, enable); | 458 | trace_regmap_cache_only(map, enable); |
| 459 | map->unlock(map->lock_arg); | 459 | map->unlock(map->lock_arg); |
| 460 | } | 460 | } |
| 461 | EXPORT_SYMBOL_GPL(regcache_cache_only); | 461 | EXPORT_SYMBOL_GPL(regcache_cache_only); |
| @@ -493,7 +493,7 @@ void regcache_cache_bypass(struct regmap *map, bool enable) | |||
| 493 | map->lock(map->lock_arg); | 493 | map->lock(map->lock_arg); |
| 494 | WARN_ON(map->cache_only && enable); | 494 | WARN_ON(map->cache_only && enable); |
| 495 | map->cache_bypass = enable; | 495 | map->cache_bypass = enable; |
| 496 | trace_regmap_cache_bypass(map->dev, enable); | 496 | trace_regmap_cache_bypass(map, enable); |
| 497 | map->unlock(map->lock_arg); | 497 | map->unlock(map->lock_arg); |
| 498 | } | 498 | } |
| 499 | EXPORT_SYMBOL_GPL(regcache_cache_bypass); | 499 | EXPORT_SYMBOL_GPL(regcache_cache_bypass); |
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index f99b098ddabf..dbfe6a69c3da 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c | |||
| @@ -1281,7 +1281,7 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg, | |||
| 1281 | if (map->async && map->bus->async_write) { | 1281 | if (map->async && map->bus->async_write) { |
| 1282 | struct regmap_async *async; | 1282 | struct regmap_async *async; |
| 1283 | 1283 | ||
| 1284 | trace_regmap_async_write_start(map->dev, reg, val_len); | 1284 | trace_regmap_async_write_start(map, reg, val_len); |
| 1285 | 1285 | ||
| 1286 | spin_lock_irqsave(&map->async_lock, flags); | 1286 | spin_lock_irqsave(&map->async_lock, flags); |
| 1287 | async = list_first_entry_or_null(&map->async_free, | 1287 | async = list_first_entry_or_null(&map->async_free, |
| @@ -1339,8 +1339,7 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg, | |||
| 1339 | return ret; | 1339 | return ret; |
| 1340 | } | 1340 | } |
| 1341 | 1341 | ||
| 1342 | trace_regmap_hw_write_start(map->dev, reg, | 1342 | trace_regmap_hw_write_start(map, reg, val_len / map->format.val_bytes); |
| 1343 | val_len / map->format.val_bytes); | ||
| 1344 | 1343 | ||
| 1345 | /* If we're doing a single register write we can probably just | 1344 | /* If we're doing a single register write we can probably just |
| 1346 | * send the work_buf directly, otherwise try to do a gather | 1345 | * send the work_buf directly, otherwise try to do a gather |
| @@ -1372,8 +1371,7 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg, | |||
| 1372 | kfree(buf); | 1371 | kfree(buf); |
| 1373 | } | 1372 | } |
| 1374 | 1373 | ||
| 1375 | trace_regmap_hw_write_done(map->dev, reg, | 1374 | trace_regmap_hw_write_done(map, reg, val_len / map->format.val_bytes); |
| 1376 | val_len / map->format.val_bytes); | ||
| 1377 | 1375 | ||
| 1378 | return ret; | 1376 | return ret; |
| 1379 | } | 1377 | } |
| @@ -1407,12 +1405,12 @@ static int _regmap_bus_formatted_write(void *context, unsigned int reg, | |||
| 1407 | 1405 | ||
| 1408 | map->format.format_write(map, reg, val); | 1406 | map->format.format_write(map, reg, val); |
| 1409 | 1407 | ||
| 1410 | trace_regmap_hw_write_start(map->dev, reg, 1); | 1408 | trace_regmap_hw_write_start(map, reg, 1); |
| 1411 | 1409 | ||
| 1412 | ret = map->bus->write(map->bus_context, map->work_buf, | 1410 | ret = map->bus->write(map->bus_context, map->work_buf, |
| 1413 | map->format.buf_size); | 1411 | map->format.buf_size); |
| 1414 | 1412 | ||
| 1415 | trace_regmap_hw_write_done(map->dev, reg, 1); | 1413 | trace_regmap_hw_write_done(map, reg, 1); |
| 1416 | 1414 | ||
| 1417 | return ret; | 1415 | return ret; |
| 1418 | } | 1416 | } |
| @@ -1470,7 +1468,7 @@ int _regmap_write(struct regmap *map, unsigned int reg, | |||
| 1470 | dev_info(map->dev, "%x <= %x\n", reg, val); | 1468 | dev_info(map->dev, "%x <= %x\n", reg, val); |
| 1471 | #endif | 1469 | #endif |
| 1472 | 1470 | ||
| 1473 | trace_regmap_reg_write(map->dev, reg, val); | 1471 | trace_regmap_reg_write(map, reg, val); |
| 1474 | 1472 | ||
| 1475 | return map->reg_write(context, reg, val); | 1473 | return map->reg_write(context, reg, val); |
| 1476 | } | 1474 | } |
| @@ -1773,7 +1771,7 @@ static int _regmap_raw_multi_reg_write(struct regmap *map, | |||
| 1773 | for (i = 0; i < num_regs; i++) { | 1771 | for (i = 0; i < num_regs; i++) { |
| 1774 | int reg = regs[i].reg; | 1772 | int reg = regs[i].reg; |
| 1775 | int val = regs[i].def; | 1773 | int val = regs[i].def; |
| 1776 | trace_regmap_hw_write_start(map->dev, reg, 1); | 1774 | trace_regmap_hw_write_start(map, reg, 1); |
| 1777 | map->format.format_reg(u8, reg, map->reg_shift); | 1775 | map->format.format_reg(u8, reg, map->reg_shift); |
| 1778 | u8 += reg_bytes + pad_bytes; | 1776 | u8 += reg_bytes + pad_bytes; |
| 1779 | map->format.format_val(u8, val, 0); | 1777 | map->format.format_val(u8, val, 0); |
| @@ -1788,7 +1786,7 @@ static int _regmap_raw_multi_reg_write(struct regmap *map, | |||
| 1788 | 1786 | ||
| 1789 | for (i = 0; i < num_regs; i++) { | 1787 | for (i = 0; i < num_regs; i++) { |
| 1790 | int reg = regs[i].reg; | 1788 | int reg = regs[i].reg; |
| 1791 | trace_regmap_hw_write_done(map->dev, reg, 1); | 1789 | trace_regmap_hw_write_done(map, reg, 1); |
| 1792 | } | 1790 | } |
| 1793 | return ret; | 1791 | return ret; |
| 1794 | } | 1792 | } |
| @@ -2059,15 +2057,13 @@ static int _regmap_raw_read(struct regmap *map, unsigned int reg, void *val, | |||
| 2059 | */ | 2057 | */ |
| 2060 | u8[0] |= map->read_flag_mask; | 2058 | u8[0] |= map->read_flag_mask; |
| 2061 | 2059 | ||
| 2062 | trace_regmap_hw_read_start(map->dev, reg, | 2060 | trace_regmap_hw_read_start(map, reg, val_len / map->format.val_bytes); |
| 2063 | val_len / map->format.val_bytes); | ||
| 2064 | 2061 | ||
| 2065 | ret = map->bus->read(map->bus_context, map->work_buf, | 2062 | ret = map->bus->read(map->bus_context, map->work_buf, |
| 2066 | map->format.reg_bytes + map->format.pad_bytes, | 2063 | map->format.reg_bytes + map->format.pad_bytes, |
| 2067 | val, val_len); | 2064 | val, val_len); |
| 2068 | 2065 | ||
| 2069 | trace_regmap_hw_read_done(map->dev, reg, | 2066 | trace_regmap_hw_read_done(map, reg, val_len / map->format.val_bytes); |
| 2070 | val_len / map->format.val_bytes); | ||
| 2071 | 2067 | ||
| 2072 | return ret; | 2068 | return ret; |
| 2073 | } | 2069 | } |
| @@ -2123,7 +2119,7 @@ static int _regmap_read(struct regmap *map, unsigned int reg, | |||
| 2123 | dev_info(map->dev, "%x => %x\n", reg, *val); | 2119 | dev_info(map->dev, "%x => %x\n", reg, *val); |
| 2124 | #endif | 2120 | #endif |
| 2125 | 2121 | ||
| 2126 | trace_regmap_reg_read(map->dev, reg, *val); | 2122 | trace_regmap_reg_read(map, reg, *val); |
| 2127 | 2123 | ||
| 2128 | if (!map->cache_bypass) | 2124 | if (!map->cache_bypass) |
| 2129 | regcache_write(map, reg, *val); | 2125 | regcache_write(map, reg, *val); |
| @@ -2480,7 +2476,7 @@ void regmap_async_complete_cb(struct regmap_async *async, int ret) | |||
| 2480 | struct regmap *map = async->map; | 2476 | struct regmap *map = async->map; |
| 2481 | bool wake; | 2477 | bool wake; |
| 2482 | 2478 | ||
| 2483 | trace_regmap_async_io_complete(map->dev); | 2479 | trace_regmap_async_io_complete(map); |
| 2484 | 2480 | ||
| 2485 | spin_lock(&map->async_lock); | 2481 | spin_lock(&map->async_lock); |
| 2486 | list_move(&async->list, &map->async_free); | 2482 | list_move(&async->list, &map->async_free); |
| @@ -2525,7 +2521,7 @@ int regmap_async_complete(struct regmap *map) | |||
| 2525 | if (!map->bus || !map->bus->async_write) | 2521 | if (!map->bus || !map->bus->async_write) |
| 2526 | return 0; | 2522 | return 0; |
| 2527 | 2523 | ||
| 2528 | trace_regmap_async_complete_start(map->dev); | 2524 | trace_regmap_async_complete_start(map); |
| 2529 | 2525 | ||
| 2530 | wait_event(map->async_waitq, regmap_async_is_done(map)); | 2526 | wait_event(map->async_waitq, regmap_async_is_done(map)); |
| 2531 | 2527 | ||
| @@ -2534,7 +2530,7 @@ int regmap_async_complete(struct regmap *map) | |||
| 2534 | map->async_ret = 0; | 2530 | map->async_ret = 0; |
| 2535 | spin_unlock_irqrestore(&map->async_lock, flags); | 2531 | spin_unlock_irqrestore(&map->async_lock, flags); |
| 2536 | 2532 | ||
| 2537 | trace_regmap_async_complete_done(map->dev); | 2533 | trace_regmap_async_complete_done(map); |
| 2538 | 2534 | ||
| 2539 | return ret; | 2535 | return ret; |
| 2540 | } | 2536 | } |
diff --git a/include/trace/events/regmap.h b/include/trace/events/regmap.h index 23d561512f64..22317d2b52ab 100644 --- a/include/trace/events/regmap.h +++ b/include/trace/events/regmap.h | |||
| @@ -7,27 +7,26 @@ | |||
| 7 | #include <linux/ktime.h> | 7 | #include <linux/ktime.h> |
| 8 | #include <linux/tracepoint.h> | 8 | #include <linux/tracepoint.h> |
| 9 | 9 | ||
| 10 | struct device; | 10 | #include "../../../drivers/base/regmap/internal.h" |
| 11 | struct regmap; | ||
| 12 | 11 | ||
| 13 | /* | 12 | /* |
| 14 | * Log register events | 13 | * Log register events |
| 15 | */ | 14 | */ |
| 16 | DECLARE_EVENT_CLASS(regmap_reg, | 15 | DECLARE_EVENT_CLASS(regmap_reg, |
| 17 | 16 | ||
| 18 | TP_PROTO(struct device *dev, unsigned int reg, | 17 | TP_PROTO(struct regmap *map, unsigned int reg, |
| 19 | unsigned int val), | 18 | unsigned int val), |
| 20 | 19 | ||
| 21 | TP_ARGS(dev, reg, val), | 20 | TP_ARGS(map, reg, val), |
| 22 | 21 | ||
| 23 | TP_STRUCT__entry( | 22 | TP_STRUCT__entry( |
| 24 | __string( name, dev_name(dev) ) | 23 | __string( name, regmap_name(map) ) |
| 25 | __field( unsigned int, reg ) | 24 | __field( unsigned int, reg ) |
| 26 | __field( unsigned int, val ) | 25 | __field( unsigned int, val ) |
| 27 | ), | 26 | ), |
| 28 | 27 | ||
| 29 | TP_fast_assign( | 28 | TP_fast_assign( |
| 30 | __assign_str(name, dev_name(dev)); | 29 | __assign_str(name, regmap_name(map)); |
| 31 | __entry->reg = reg; | 30 | __entry->reg = reg; |
| 32 | __entry->val = val; | 31 | __entry->val = val; |
| 33 | ), | 32 | ), |
| @@ -39,45 +38,45 @@ DECLARE_EVENT_CLASS(regmap_reg, | |||
| 39 | 38 | ||
| 40 | DEFINE_EVENT(regmap_reg, regmap_reg_write, | 39 | DEFINE_EVENT(regmap_reg, regmap_reg_write, |
| 41 | 40 | ||
| 42 | TP_PROTO(struct device *dev, unsigned int reg, | 41 | TP_PROTO(struct regmap *map, unsigned int reg, |
| 43 | unsigned int val), | 42 | unsigned int val), |
| 44 | 43 | ||
| 45 | TP_ARGS(dev, reg, val) | 44 | TP_ARGS(map, reg, val) |
| 46 | 45 | ||
| 47 | ); | 46 | ); |
| 48 | 47 | ||
| 49 | DEFINE_EVENT(regmap_reg, regmap_reg_read, | 48 | DEFINE_EVENT(regmap_reg, regmap_reg_read, |
| 50 | 49 | ||
| 51 | TP_PROTO(struct device *dev, unsigned int reg, | 50 | TP_PROTO(struct regmap *map, unsigned int reg, |
| 52 | unsigned int val), | 51 | unsigned int val), |
| 53 | 52 | ||
| 54 | TP_ARGS(dev, reg, val) | 53 | TP_ARGS(map, reg, val) |
| 55 | 54 | ||
| 56 | ); | 55 | ); |
| 57 | 56 | ||
| 58 | DEFINE_EVENT(regmap_reg, regmap_reg_read_cache, | 57 | DEFINE_EVENT(regmap_reg, regmap_reg_read_cache, |
| 59 | 58 | ||
| 60 | TP_PROTO(struct device *dev, unsigned int reg, | 59 | TP_PROTO(struct regmap *map, unsigned int reg, |
| 61 | unsigned int val), | 60 | unsigned int val), |
| 62 | 61 | ||
| 63 | TP_ARGS(dev, reg, val) | 62 | TP_ARGS(map, reg, val) |
| 64 | 63 | ||
| 65 | ); | 64 | ); |
| 66 | 65 | ||
| 67 | DECLARE_EVENT_CLASS(regmap_block, | 66 | DECLARE_EVENT_CLASS(regmap_block, |
| 68 | 67 | ||
| 69 | TP_PROTO(struct device *dev, unsigned int reg, int count), | 68 | TP_PROTO(struct regmap *map, unsigned int reg, int count), |
| 70 | 69 | ||
| 71 | TP_ARGS(dev, reg, count), | 70 | TP_ARGS(map, reg, count), |
| 72 | 71 | ||
| 73 | TP_STRUCT__entry( | 72 | TP_STRUCT__entry( |
| 74 | __string( name, dev_name(dev) ) | 73 | __string( name, regmap_name(map) ) |
| 75 | __field( unsigned int, reg ) | 74 | __field( unsigned int, reg ) |
| 76 | __field( int, count ) | 75 | __field( int, count ) |
| 77 | ), | 76 | ), |
| 78 | 77 | ||
| 79 | TP_fast_assign( | 78 | TP_fast_assign( |
| 80 | __assign_str(name, dev_name(dev)); | 79 | __assign_str(name, regmap_name(map)); |
| 81 | __entry->reg = reg; | 80 | __entry->reg = reg; |
| 82 | __entry->count = count; | 81 | __entry->count = count; |
| 83 | ), | 82 | ), |
| @@ -89,48 +88,48 @@ DECLARE_EVENT_CLASS(regmap_block, | |||
| 89 | 88 | ||
| 90 | DEFINE_EVENT(regmap_block, regmap_hw_read_start, | 89 | DEFINE_EVENT(regmap_block, regmap_hw_read_start, |
| 91 | 90 | ||
| 92 | TP_PROTO(struct device *dev, unsigned int reg, int count), | 91 | TP_PROTO(struct regmap *map, unsigned int reg, int count), |
| 93 | 92 | ||
| 94 | TP_ARGS(dev, reg, count) | 93 | TP_ARGS(map, reg, count) |
| 95 | ); | 94 | ); |
| 96 | 95 | ||
| 97 | DEFINE_EVENT(regmap_block, regmap_hw_read_done, | 96 | DEFINE_EVENT(regmap_block, regmap_hw_read_done, |
| 98 | 97 | ||
| 99 | TP_PROTO(struct device *dev, unsigned int reg, int count), | 98 | TP_PROTO(struct regmap *map, unsigned int reg, int count), |
| 100 | 99 | ||
| 101 | TP_ARGS(dev, reg, count) | 100 | TP_ARGS(map, reg, count) |
| 102 | ); | 101 | ); |
| 103 | 102 | ||
| 104 | DEFINE_EVENT(regmap_block, regmap_hw_write_start, | 103 | DEFINE_EVENT(regmap_block, regmap_hw_write_start, |
| 105 | 104 | ||
| 106 | TP_PROTO(struct device *dev, unsigned int reg, int count), | 105 | TP_PROTO(struct regmap *map, unsigned int reg, int count), |
| 107 | 106 | ||
| 108 | TP_ARGS(dev, reg, count) | 107 | TP_ARGS(map, reg, count) |
| 109 | ); | 108 | ); |
| 110 | 109 | ||
| 111 | DEFINE_EVENT(regmap_block, regmap_hw_write_done, | 110 | DEFINE_EVENT(regmap_block, regmap_hw_write_done, |
| 112 | 111 | ||
| 113 | TP_PROTO(struct device *dev, unsigned int reg, int count), | 112 | TP_PROTO(struct regmap *map, unsigned int reg, int count), |
| 114 | 113 | ||
| 115 | TP_ARGS(dev, reg, count) | 114 | TP_ARGS(map, reg, count) |
| 116 | ); | 115 | ); |
| 117 | 116 | ||
| 118 | TRACE_EVENT(regcache_sync, | 117 | TRACE_EVENT(regcache_sync, |
| 119 | 118 | ||
| 120 | TP_PROTO(struct device *dev, const char *type, | 119 | TP_PROTO(struct regmap *map, const char *type, |
| 121 | const char *status), | 120 | const char *status), |
| 122 | 121 | ||
| 123 | TP_ARGS(dev, type, status), | 122 | TP_ARGS(map, type, status), |
| 124 | 123 | ||
| 125 | TP_STRUCT__entry( | 124 | TP_STRUCT__entry( |
| 126 | __string( name, dev_name(dev) ) | 125 | __string( name, regmap_name(map) ) |
| 127 | __string( status, status ) | 126 | __string( status, status ) |
| 128 | __string( type, type ) | 127 | __string( type, type ) |
| 129 | __field( int, type ) | 128 | __field( int, type ) |
| 130 | ), | 129 | ), |
| 131 | 130 | ||
| 132 | TP_fast_assign( | 131 | TP_fast_assign( |
| 133 | __assign_str(name, dev_name(dev)); | 132 | __assign_str(name, regmap_name(map)); |
| 134 | __assign_str(status, status); | 133 | __assign_str(status, status); |
| 135 | __assign_str(type, type); | 134 | __assign_str(type, type); |
| 136 | ), | 135 | ), |
| @@ -141,17 +140,17 @@ TRACE_EVENT(regcache_sync, | |||
| 141 | 140 | ||
| 142 | DECLARE_EVENT_CLASS(regmap_bool, | 141 | DECLARE_EVENT_CLASS(regmap_bool, |
| 143 | 142 | ||
| 144 | TP_PROTO(struct device *dev, bool flag), | 143 | TP_PROTO(struct regmap *map, bool flag), |
| 145 | 144 | ||
| 146 | TP_ARGS(dev, flag), | 145 | TP_ARGS(map, flag), |
| 147 | 146 | ||
| 148 | TP_STRUCT__entry( | 147 | TP_STRUCT__entry( |
| 149 | __string( name, dev_name(dev) ) | 148 | __string( name, regmap_name(map) ) |
| 150 | __field( int, flag ) | 149 | __field( int, flag ) |
| 151 | ), | 150 | ), |
| 152 | 151 | ||
| 153 | TP_fast_assign( | 152 | TP_fast_assign( |
| 154 | __assign_str(name, dev_name(dev)); | 153 | __assign_str(name, regmap_name(map)); |
| 155 | __entry->flag = flag; | 154 | __entry->flag = flag; |
| 156 | ), | 155 | ), |
| 157 | 156 | ||
| @@ -161,32 +160,32 @@ DECLARE_EVENT_CLASS(regmap_bool, | |||
| 161 | 160 | ||
| 162 | DEFINE_EVENT(regmap_bool, regmap_cache_only, | 161 | DEFINE_EVENT(regmap_bool, regmap_cache_only, |
| 163 | 162 | ||
| 164 | TP_PROTO(struct device *dev, bool flag), | 163 | TP_PROTO(struct regmap *map, bool flag), |
| 165 | 164 | ||
| 166 | TP_ARGS(dev, flag) | 165 | TP_ARGS(map, flag) |
| 167 | 166 | ||
| 168 | ); | 167 | ); |
| 169 | 168 | ||
| 170 | DEFINE_EVENT(regmap_bool, regmap_cache_bypass, | 169 | DEFINE_EVENT(regmap_bool, regmap_cache_bypass, |
| 171 | 170 | ||
| 172 | TP_PROTO(struct device *dev, bool flag), | 171 | TP_PROTO(struct regmap *map, bool flag), |
| 173 | 172 | ||
| 174 | TP_ARGS(dev, flag) | 173 | TP_ARGS(map, flag) |
| 175 | 174 | ||
| 176 | ); | 175 | ); |
| 177 | 176 | ||
| 178 | DECLARE_EVENT_CLASS(regmap_async, | 177 | DECLARE_EVENT_CLASS(regmap_async, |
| 179 | 178 | ||
| 180 | TP_PROTO(struct device *dev), | 179 | TP_PROTO(struct regmap *map), |
| 181 | 180 | ||
| 182 | TP_ARGS(dev), | 181 | TP_ARGS(map), |
| 183 | 182 | ||
| 184 | TP_STRUCT__entry( | 183 | TP_STRUCT__entry( |
| 185 | __string( name, dev_name(dev) ) | 184 | __string( name, regmap_name(map) ) |
| 186 | ), | 185 | ), |
| 187 | 186 | ||
| 188 | TP_fast_assign( | 187 | TP_fast_assign( |
| 189 | __assign_str(name, dev_name(dev)); | 188 | __assign_str(name, regmap_name(map)); |
| 190 | ), | 189 | ), |
| 191 | 190 | ||
| 192 | TP_printk("%s", __get_str(name)) | 191 | TP_printk("%s", __get_str(name)) |
| @@ -194,50 +193,50 @@ DECLARE_EVENT_CLASS(regmap_async, | |||
| 194 | 193 | ||
| 195 | DEFINE_EVENT(regmap_block, regmap_async_write_start, | 194 | DEFINE_EVENT(regmap_block, regmap_async_write_start, |
| 196 | 195 | ||
| 197 | TP_PROTO(struct device *dev, unsigned int reg, int count), | 196 | TP_PROTO(struct regmap *map, unsigned int reg, int count), |
| 198 | 197 | ||
| 199 | TP_ARGS(dev, reg, count) | 198 | TP_ARGS(map, reg, count) |
| 200 | ); | 199 | ); |
| 201 | 200 | ||
| 202 | DEFINE_EVENT(regmap_async, regmap_async_io_complete, | 201 | DEFINE_EVENT(regmap_async, regmap_async_io_complete, |
| 203 | 202 | ||
| 204 | TP_PROTO(struct device *dev), | 203 | TP_PROTO(struct regmap *map), |
| 205 | 204 | ||
| 206 | TP_ARGS(dev) | 205 | TP_ARGS(map) |
| 207 | 206 | ||
| 208 | ); | 207 | ); |
| 209 | 208 | ||
| 210 | DEFINE_EVENT(regmap_async, regmap_async_complete_start, | 209 | DEFINE_EVENT(regmap_async, regmap_async_complete_start, |
| 211 | 210 | ||
| 212 | TP_PROTO(struct device *dev), | 211 | TP_PROTO(struct regmap *map), |
| 213 | 212 | ||
| 214 | TP_ARGS(dev) | 213 | TP_ARGS(map) |
| 215 | 214 | ||
| 216 | ); | 215 | ); |
| 217 | 216 | ||
| 218 | DEFINE_EVENT(regmap_async, regmap_async_complete_done, | 217 | DEFINE_EVENT(regmap_async, regmap_async_complete_done, |
| 219 | 218 | ||
| 220 | TP_PROTO(struct device *dev), | 219 | TP_PROTO(struct regmap *map), |
| 221 | 220 | ||
| 222 | TP_ARGS(dev) | 221 | TP_ARGS(map) |
| 223 | 222 | ||
| 224 | ); | 223 | ); |
| 225 | 224 | ||
| 226 | TRACE_EVENT(regcache_drop_region, | 225 | TRACE_EVENT(regcache_drop_region, |
| 227 | 226 | ||
| 228 | TP_PROTO(struct device *dev, unsigned int from, | 227 | TP_PROTO(struct regmap *map, unsigned int from, |
| 229 | unsigned int to), | 228 | unsigned int to), |
| 230 | 229 | ||
| 231 | TP_ARGS(dev, from, to), | 230 | TP_ARGS(map, from, to), |
| 232 | 231 | ||
| 233 | TP_STRUCT__entry( | 232 | TP_STRUCT__entry( |
| 234 | __string( name, dev_name(dev) ) | 233 | __string( name, regmap_name(map) ) |
| 235 | __field( unsigned int, from ) | 234 | __field( unsigned int, from ) |
| 236 | __field( unsigned int, to ) | 235 | __field( unsigned int, to ) |
| 237 | ), | 236 | ), |
| 238 | 237 | ||
| 239 | TP_fast_assign( | 238 | TP_fast_assign( |
| 240 | __assign_str(name, dev_name(dev)); | 239 | __assign_str(name, regmap_name(map)); |
| 241 | __entry->from = from; | 240 | __entry->from = from; |
| 242 | __entry->to = to; | 241 | __entry->to = to; |
| 243 | ), | 242 | ), |
