From: Russell King Date: Sat, 17 Feb 2007 20:09:53 +0000 (+0000) Subject: Merge AT91, EP93xx, General devel, PXA, S3C, V6+ and Xscale trees X-Git-Tag: v2.6.21-rc1~75^2~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f69eda00d4e9808f0ddc88826278f93512cd2c98;p=linux-2.6-omap-h63xx.git Merge AT91, EP93xx, General devel, PXA, S3C, V6+ and Xscale trees --- f69eda00d4e9808f0ddc88826278f93512cd2c98 diff --cc arch/arm/common/dmabounce.c index 4d5b031ac74,2e635b814c1,2e635b814c1,2e635b814c1,2e635b814c1,2362c498f52,2e635b814c1..6fbe7722aa4 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c @@@@@@@@ -79,23 -81,33 -81,33 -81,33 -81,33 -81,33 -81,33 +79,23 @@@@@@@@ struct dmabounce_device_info rwlock_t lock; }; ------static LIST_HEAD(dmabounce_devs); ------ #ifdef STATS ------static void print_alloc_stats(struct dmabounce_device_info *device_info) ++++++static ssize_t dmabounce_show(struct device *dev, struct device_attribute *attr, ++++++ char *buf) { ------ printk(KERN_INFO ------ "%s: dmabounce: sbp: %lu, lbp: %lu, other: %lu, total: %lu\n", ------ device_info->dev->bus_id, ------ device_info->small.allocs, device_info->large.allocs, ++++++ struct dmabounce_device_info *device_info = dev->archdata.dmabounce; ++++++ return sprintf(buf, "%lu %lu %lu %lu %lu %lu\n", ++++++ device_info->small.allocs, ++++++ device_info->large.allocs, device_info->total_allocs - device_info->small.allocs - device_info->large.allocs, ------ device_info->total_allocs); ++++++ device_info->total_allocs, ++++++ device_info->map_op_count, ++++++ device_info->bounce_count); } ------#endif ---- - ---- -/* find the given device in the dmabounce device list */ ---- -static inline struct dmabounce_device_info * ---- -find_dmabounce_dev(struct device *dev) ---- -{ ---- - struct dmabounce_device_info *d; - /* find the given device in the dmabounce device list */ - static inline struct dmabounce_device_info * - find_dmabounce_dev(struct device *dev) - { - struct dmabounce_device_info *d; - ------ list_for_each_entry(d, &dmabounce_devs, node) ------ if (d->dev == dev) ------ return d; ------ ------ return NULL; ------} ++++++static DEVICE_ATTR(dmabounce_stats, 0400, dmabounce_show, NULL); ++++++#endif /* allocate a 'safe' buffer and keep track of it */