2 * System Trace Module (STM) infrastructure
3 * Copyright (c) 2014, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * STM class implements generic infrastructure for System Trace Module devices
15 * as defined in MIPI STPv2 specification.
18 #include <linux/uaccess.h>
19 #include <linux/kernel.h>
20 #include <linux/module.h>
21 #include <linux/device.h>
22 #include <linux/compat.h>
23 #include <linux/kdev_t.h>
24 #include <linux/srcu.h>
25 #include <linux/slab.h>
26 #include <linux/stm.h>
29 #include <linux/vmalloc.h>
32 #include <uapi/linux/stm.h>
34 static unsigned int stm_core_up;
37 * The SRCU here makes sure that STM device doesn't disappear from under a
38 * stm_source_write() caller, which may want to have as little overhead as
41 static struct srcu_struct stm_source_srcu;
43 static ssize_t masters_show(struct device *dev,
44 struct device_attribute *attr,
47 struct stm_device *stm = to_stm_device(dev);
50 ret = sprintf(buf, "%u %u\n", stm->data->sw_start, stm->data->sw_end);
55 static DEVICE_ATTR_RO(masters);
57 static ssize_t channels_show(struct device *dev,
58 struct device_attribute *attr,
61 struct stm_device *stm = to_stm_device(dev);
64 ret = sprintf(buf, "%u\n", stm->data->sw_nchannels);
69 static DEVICE_ATTR_RO(channels);
71 static struct attribute *stm_attrs[] = {
72 &dev_attr_masters.attr,
73 &dev_attr_channels.attr,
77 ATTRIBUTE_GROUPS(stm);
79 static struct class stm_class = {
81 .dev_groups = stm_groups,
84 static int stm_dev_match(struct device *dev, const void *data)
86 const char *name = data;
88 return sysfs_streq(name, dev_name(dev));
92 * stm_find_device() - find stm device by name
93 * @buf: character buffer containing the name
95 * This is called when either policy gets assigned to an stm device or an
96 * stm_source device gets linked to an stm device.
98 * This grabs device's reference (get_device()) and module reference, both
99 * of which the calling path needs to make sure to drop with stm_put_device().
101 * Return: stm device pointer or null if lookup failed.
103 struct stm_device *stm_find_device(const char *buf)
105 struct stm_device *stm;
111 dev = class_find_device(&stm_class, NULL, buf, stm_dev_match);
115 stm = to_stm_device(dev);
116 if (!try_module_get(stm->owner)) {
117 /* matches class_find_device() above */
126 * stm_put_device() - drop references on the stm device
127 * @stm: stm device, previously acquired by stm_find_device()
129 * This drops the module reference and device reference taken by
130 * stm_find_device() or stm_char_open().
132 void stm_put_device(struct stm_device *stm)
134 module_put(stm->owner);
135 put_device(&stm->dev);
139 * Internally we only care about software-writable masters here, that is the
140 * ones in the range [stm_data->sw_start..stm_data..sw_end], however we need
141 * original master numbers to be visible externally, since they are the ones
142 * that will appear in the STP stream. Thus, the internal bookkeeping uses
143 * $master - stm_data->sw_start to reference master descriptors and such.
146 #define __stm_master(_s, _m) \
147 ((_s)->masters[(_m) - (_s)->data->sw_start])
149 static inline struct stp_master *
150 stm_master(struct stm_device *stm, unsigned int idx)
152 if (idx < stm->data->sw_start || idx > stm->data->sw_end)
155 return __stm_master(stm, idx);
158 static int stp_master_alloc(struct stm_device *stm, unsigned int idx)
160 struct stp_master *master;
163 size = ALIGN(stm->data->sw_nchannels, 8) / 8;
164 size += sizeof(struct stp_master);
165 master = kzalloc(size, GFP_ATOMIC);
169 master->nr_free = stm->data->sw_nchannels;
170 __stm_master(stm, idx) = master;
175 static void stp_master_free(struct stm_device *stm, unsigned int idx)
177 struct stp_master *master = stm_master(stm, idx);
182 __stm_master(stm, idx) = NULL;
186 static void stm_output_claim(struct stm_device *stm, struct stm_output *output)
188 struct stp_master *master = stm_master(stm, output->master);
190 lockdep_assert_held(&stm->mc_lock);
191 lockdep_assert_held(&output->lock);
193 if (WARN_ON_ONCE(master->nr_free < output->nr_chans))
196 bitmap_allocate_region(&master->chan_map[0], output->channel,
197 ilog2(output->nr_chans));
199 master->nr_free -= output->nr_chans;
203 stm_output_disclaim(struct stm_device *stm, struct stm_output *output)
205 struct stp_master *master = stm_master(stm, output->master);
207 lockdep_assert_held(&stm->mc_lock);
208 lockdep_assert_held(&output->lock);
210 bitmap_release_region(&master->chan_map[0], output->channel,
211 ilog2(output->nr_chans));
213 master->nr_free += output->nr_chans;
214 output->nr_chans = 0;
218 * This is like bitmap_find_free_region(), except it can ignore @start bits
221 static int find_free_channels(unsigned long *bitmap, unsigned int start,
222 unsigned int end, unsigned int width)
227 for (pos = start; pos < end + 1; pos = ALIGN(pos, width)) {
228 pos = find_next_zero_bit(bitmap, end + 1, pos);
229 if (pos + width > end + 1)
232 if (pos & (width - 1))
235 for (i = 1; i < width && !test_bit(pos + i, bitmap); i++)
240 /* step over [pos..pos+i) to continue search */
248 stm_find_master_chan(struct stm_device *stm, unsigned int width,
249 unsigned int *mstart, unsigned int mend,
250 unsigned int *cstart, unsigned int cend)
252 struct stp_master *master;
256 for (midx = *mstart; midx <= mend; midx++) {
257 if (!stm_master(stm, midx)) {
258 err = stp_master_alloc(stm, midx);
263 master = stm_master(stm, midx);
265 if (!master->nr_free)
268 pos = find_free_channels(master->chan_map, *cstart, cend,
281 static int stm_output_assign(struct stm_device *stm, unsigned int width,
282 struct stp_policy_node *policy_node,
283 struct stm_output *output)
285 unsigned int midx, cidx, mend, cend;
288 if (width > stm->data->sw_nchannels)
292 stp_policy_node_get_ranges(policy_node,
293 &midx, &mend, &cidx, &cend);
295 midx = stm->data->sw_start;
297 mend = stm->data->sw_end;
298 cend = stm->data->sw_nchannels - 1;
301 spin_lock(&stm->mc_lock);
302 spin_lock(&output->lock);
303 /* output is already assigned -- shouldn't happen */
304 if (WARN_ON_ONCE(output->nr_chans))
307 ret = stm_find_master_chan(stm, width, &midx, mend, &cidx, cend);
311 output->master = midx;
312 output->channel = cidx;
313 output->nr_chans = width;
314 stm_output_claim(stm, output);
315 dev_dbg(&stm->dev, "assigned %u:%u (+%u)\n", midx, cidx, width);
319 spin_unlock(&output->lock);
320 spin_unlock(&stm->mc_lock);
325 static void stm_output_free(struct stm_device *stm, struct stm_output *output)
327 spin_lock(&stm->mc_lock);
328 spin_lock(&output->lock);
329 if (output->nr_chans)
330 stm_output_disclaim(stm, output);
331 spin_unlock(&output->lock);
332 spin_unlock(&stm->mc_lock);
335 static void stm_output_init(struct stm_output *output)
337 spin_lock_init(&output->lock);
340 static int major_match(struct device *dev, const void *data)
342 unsigned int major = *(unsigned int *)data;
344 return MAJOR(dev->devt) == major;
347 static int stm_char_open(struct inode *inode, struct file *file)
349 struct stm_file *stmf;
351 unsigned int major = imajor(inode);
354 dev = class_find_device(&stm_class, NULL, &major, major_match);
358 stmf = kzalloc(sizeof(*stmf), GFP_KERNEL);
362 stm_output_init(&stmf->output);
363 stmf->stm = to_stm_device(dev);
365 if (!try_module_get(stmf->stm->owner))
368 file->private_data = stmf;
370 return nonseekable_open(inode, file);
373 /* matches class_find_device() above */
380 static int stm_char_release(struct inode *inode, struct file *file)
382 struct stm_file *stmf = file->private_data;
384 stm_output_free(stmf->stm, &stmf->output);
387 * matches the stm_char_open()'s
388 * class_find_device() + try_module_get()
390 stm_put_device(stmf->stm);
396 static int stm_file_assign(struct stm_file *stmf, char *id, unsigned int width)
398 struct stm_device *stm = stmf->stm;
401 stmf->policy_node = stp_policy_node_lookup(stm, id);
403 ret = stm_output_assign(stm, width, stmf->policy_node, &stmf->output);
405 if (stmf->policy_node)
406 stp_policy_node_put(stmf->policy_node);
411 static void stm_write(struct stm_data *data, unsigned int master,
412 unsigned int channel, const char *buf, size_t count)
414 unsigned int flags = STP_PACKET_TIMESTAMPED;
415 const unsigned char *p = buf, nil = 0;
419 for (pos = 0, p = buf; count > pos; pos += sz, p += sz) {
420 sz = min_t(unsigned int, count - pos, 8);
421 sz = data->packet(data, master, channel, STP_PACKET_DATA, flags,
426 data->packet(data, master, channel, STP_PACKET_FLAG, 0, 0, &nil);
429 static ssize_t stm_char_write(struct file *file, const char __user *buf,
430 size_t count, loff_t *ppos)
432 struct stm_file *stmf = file->private_data;
433 struct stm_device *stm = stmf->stm;
437 if (count + 1 > PAGE_SIZE)
438 count = PAGE_SIZE - 1;
441 * if no m/c have been assigned to this writer up to this
442 * point, use "default" policy entry
444 if (!stmf->output.nr_chans) {
445 err = stm_file_assign(stmf, "default", 1);
447 * EBUSY means that somebody else just assigned this
448 * output, which is just fine for write()
450 if (err && err != -EBUSY)
454 kbuf = kmalloc(count + 1, GFP_KERNEL);
458 err = copy_from_user(kbuf, buf, count);
464 stm_write(stm->data, stmf->output.master, stmf->output.channel, kbuf,
472 static int stm_char_mmap(struct file *file, struct vm_area_struct *vma)
474 struct stm_file *stmf = file->private_data;
475 struct stm_device *stm = stmf->stm;
476 unsigned long size, phys;
478 if (!stm->data->mmio_addr)
484 size = vma->vm_end - vma->vm_start;
486 if (stmf->output.nr_chans * stm->data->sw_mmiosz != size)
489 phys = stm->data->mmio_addr(stm->data, stmf->output.master,
490 stmf->output.channel,
491 stmf->output.nr_chans);
496 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
497 vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP;
498 vm_iomap_memory(vma, phys, size);
503 static int stm_char_policy_set_ioctl(struct stm_file *stmf, void __user *arg)
505 struct stm_device *stm = stmf->stm;
506 struct stp_policy_id *id;
507 int ret = -EINVAL, wlimit = 1;
510 if (stmf->output.nr_chans)
513 if (copy_from_user(&size, arg, sizeof(size)))
516 if (size >= PATH_MAX + sizeof(*id))
520 * size + 1 to make sure the .id string at the bottom is terminated,
521 * which is also why memdup_user() is not useful here
523 id = kzalloc(size + 1, GFP_KERNEL);
527 if (copy_from_user(id, arg, size)) {
532 if (id->__reserved_0 || id->__reserved_1)
535 if (stm->data->sw_mmiosz)
536 wlimit = PAGE_SIZE / stm->data->sw_mmiosz;
538 if (id->width < 1 || id->width > wlimit)
541 ret = stm_file_assign(stmf, id->id, id->width);
548 ret = stm->data->link(stm->data, stmf->output.master,
549 stmf->output.channel);
552 stm_output_free(stmf->stm, &stmf->output);
560 static int stm_char_policy_get_ioctl(struct stm_file *stmf, void __user *arg)
562 struct stp_policy_id id = {
564 .master = stmf->output.master,
565 .channel = stmf->output.channel,
566 .width = stmf->output.nr_chans,
571 return copy_to_user(arg, &id, id.size) ? -EFAULT : 0;
575 stm_char_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
577 struct stm_file *stmf = file->private_data;
578 struct stm_data *stm_data = stmf->stm->data;
583 case STP_POLICY_ID_SET:
584 err = stm_char_policy_set_ioctl(stmf, (void __user *)arg);
588 return stm_char_policy_get_ioctl(stmf, (void __user *)arg);
590 case STP_POLICY_ID_GET:
591 return stm_char_policy_get_ioctl(stmf, (void __user *)arg);
593 case STP_SET_OPTIONS:
594 if (copy_from_user(&options, (u64 __user *)arg, sizeof(u64)))
597 if (stm_data->set_options)
598 err = stm_data->set_options(stm_data,
600 stmf->output.channel,
601 stmf->output.nr_chans,
614 stm_char_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
616 return stm_char_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
619 #define stm_char_compat_ioctl NULL
622 static const struct file_operations stm_fops = {
623 .open = stm_char_open,
624 .release = stm_char_release,
625 .write = stm_char_write,
626 .mmap = stm_char_mmap,
627 .unlocked_ioctl = stm_char_ioctl,
628 .compat_ioctl = stm_char_compat_ioctl,
632 static void stm_device_release(struct device *dev)
634 struct stm_device *stm = to_stm_device(dev);
639 int stm_register_device(struct device *parent, struct stm_data *stm_data,
640 struct module *owner)
642 struct stm_device *stm;
643 unsigned int nmasters;
647 return -EPROBE_DEFER;
649 if (!stm_data->packet || !stm_data->sw_nchannels)
652 nmasters = stm_data->sw_end - stm_data->sw_start;
653 stm = vzalloc(sizeof(*stm) + nmasters * sizeof(void *));
657 stm->major = register_chrdev(0, stm_data->name, &stm_fops);
661 device_initialize(&stm->dev);
662 stm->dev.devt = MKDEV(stm->major, 0);
663 stm->dev.class = &stm_class;
664 stm->dev.parent = parent;
665 stm->dev.release = stm_device_release;
667 mutex_init(&stm->link_mutex);
668 spin_lock_init(&stm->link_lock);
669 INIT_LIST_HEAD(&stm->link_list);
671 /* initialize the object before it is accessible via sysfs */
672 spin_lock_init(&stm->mc_lock);
673 mutex_init(&stm->policy_mutex);
674 stm->sw_nmasters = nmasters;
676 stm->data = stm_data;
679 err = kobject_set_name(&stm->dev.kobj, "%s", stm_data->name);
683 err = device_add(&stm->dev);
690 unregister_chrdev(stm->major, stm_data->name);
692 /* matches device_initialize() above */
693 put_device(&stm->dev);
699 EXPORT_SYMBOL_GPL(stm_register_device);
701 static int __stm_source_link_drop(struct stm_source_device *src,
702 struct stm_device *stm);
704 void stm_unregister_device(struct stm_data *stm_data)
706 struct stm_device *stm = stm_data->stm;
707 struct stm_source_device *src, *iter;
710 mutex_lock(&stm->link_mutex);
711 list_for_each_entry_safe(src, iter, &stm->link_list, link_entry) {
712 ret = __stm_source_link_drop(src, stm);
714 * src <-> stm link must not change under the same
715 * stm::link_mutex, so complain loudly if it has;
716 * also in this situation ret!=0 means this src is
717 * not connected to this stm and it should be otherwise
718 * safe to proceed with the tear-down of stm.
722 mutex_unlock(&stm->link_mutex);
724 synchronize_srcu(&stm_source_srcu);
726 unregister_chrdev(stm->major, stm_data->name);
728 mutex_lock(&stm->policy_mutex);
730 stp_policy_unbind(stm->policy);
731 mutex_unlock(&stm->policy_mutex);
733 for (i = 0; i < stm->sw_nmasters; i++)
734 stp_master_free(stm, i);
736 device_unregister(&stm->dev);
737 stm_data->stm = NULL;
739 EXPORT_SYMBOL_GPL(stm_unregister_device);
742 * stm::link_list access serialization uses a spinlock and a mutex; holding
743 * either of them guarantees that the list is stable; modification requires
744 * holding both of them.
746 * Lock ordering is as follows:
753 * stm_source_link_add() - connect an stm_source device to an stm device
754 * @src: stm_source device
757 * This function establishes a link from stm_source to an stm device so that
758 * the former can send out trace data to the latter.
760 * Return: 0 on success, -errno otherwise.
762 static int stm_source_link_add(struct stm_source_device *src,
763 struct stm_device *stm)
768 mutex_lock(&stm->link_mutex);
769 spin_lock(&stm->link_lock);
770 spin_lock(&src->link_lock);
772 /* src->link is dereferenced under stm_source_srcu but not the list */
773 rcu_assign_pointer(src->link, stm);
774 list_add_tail(&src->link_entry, &stm->link_list);
776 spin_unlock(&src->link_lock);
777 spin_unlock(&stm->link_lock);
778 mutex_unlock(&stm->link_mutex);
780 id = kstrdup(src->data->name, GFP_KERNEL);
783 stp_policy_node_lookup(stm, id);
788 err = stm_output_assign(stm, src->data->nr_chans,
789 src->policy_node, &src->output);
791 if (src->policy_node)
792 stp_policy_node_put(src->policy_node);
797 /* this is to notify the STM device that a new link has been made */
799 err = stm->data->link(stm->data, src->output.master,
800 src->output.channel);
803 goto fail_free_output;
805 /* this is to let the source carry out all necessary preparations */
807 src->data->link(src->data);
812 stm_output_free(stm, &src->output);
815 mutex_lock(&stm->link_mutex);
816 spin_lock(&stm->link_lock);
817 spin_lock(&src->link_lock);
819 rcu_assign_pointer(src->link, NULL);
820 list_del_init(&src->link_entry);
822 spin_unlock(&src->link_lock);
823 spin_unlock(&stm->link_lock);
824 mutex_unlock(&stm->link_mutex);
830 * __stm_source_link_drop() - detach stm_source from an stm device
831 * @src: stm_source device
834 * If @stm is @src::link, disconnect them from one another and put the
835 * reference on the @stm device.
837 * Caller must hold stm::link_mutex.
839 static int __stm_source_link_drop(struct stm_source_device *src,
840 struct stm_device *stm)
842 struct stm_device *link;
845 lockdep_assert_held(&stm->link_mutex);
847 /* for stm::link_list modification, we hold both mutex and spinlock */
848 spin_lock(&stm->link_lock);
849 spin_lock(&src->link_lock);
850 link = srcu_dereference_check(src->link, &stm_source_srcu, 1);
853 * The linked device may have changed since we last looked, because
854 * we weren't holding the src::link_lock back then; if this is the
855 * case, tell the caller to retry.
862 stm_output_free(link, &src->output);
863 list_del_init(&src->link_entry);
864 /* matches stm_find_device() from stm_source_link_store() */
865 stm_put_device(link);
866 rcu_assign_pointer(src->link, NULL);
869 spin_unlock(&src->link_lock);
870 spin_unlock(&stm->link_lock);
872 if (!ret && src->data->unlink)
873 src->data->unlink(src->data);
879 * stm_source_link_drop() - detach stm_source from its stm device
880 * @src: stm_source device
882 * Unlinking means disconnecting from source's STM device; after this
883 * writes will be unsuccessful until it is linked to a new STM device.
885 * This will happen on "stm_source_link" sysfs attribute write to undo
886 * the existing link (if any), or on linked STM device's de-registration.
888 static void stm_source_link_drop(struct stm_source_device *src)
890 struct stm_device *stm;
894 idx = srcu_read_lock(&stm_source_srcu);
896 * The stm device will be valid for the duration of this
897 * read section, but the link may change before we grab
898 * the src::link_lock in __stm_source_link_drop().
900 stm = srcu_dereference(src->link, &stm_source_srcu);
904 mutex_lock(&stm->link_mutex);
905 ret = __stm_source_link_drop(src, stm);
906 mutex_unlock(&stm->link_mutex);
909 srcu_read_unlock(&stm_source_srcu, idx);
911 /* if it did change, retry */
916 static ssize_t stm_source_link_show(struct device *dev,
917 struct device_attribute *attr,
920 struct stm_source_device *src = to_stm_source_device(dev);
921 struct stm_device *stm;
924 idx = srcu_read_lock(&stm_source_srcu);
925 stm = srcu_dereference(src->link, &stm_source_srcu);
926 ret = sprintf(buf, "%s\n",
927 stm ? dev_name(&stm->dev) : "<none>");
928 srcu_read_unlock(&stm_source_srcu, idx);
933 static ssize_t stm_source_link_store(struct device *dev,
934 struct device_attribute *attr,
935 const char *buf, size_t count)
937 struct stm_source_device *src = to_stm_source_device(dev);
938 struct stm_device *link;
941 stm_source_link_drop(src);
943 link = stm_find_device(buf);
947 err = stm_source_link_add(src, link);
949 /* matches the stm_find_device() above */
950 stm_put_device(link);
953 return err ? : count;
956 static DEVICE_ATTR_RW(stm_source_link);
958 static struct attribute *stm_source_attrs[] = {
959 &dev_attr_stm_source_link.attr,
963 ATTRIBUTE_GROUPS(stm_source);
965 static struct class stm_source_class = {
966 .name = "stm_source",
967 .dev_groups = stm_source_groups,
970 static void stm_source_device_release(struct device *dev)
972 struct stm_source_device *src = to_stm_source_device(dev);
978 * stm_source_register_device() - register an stm_source device
979 * @parent: parent device
980 * @data: device description structure
982 * This will create a device of stm_source class that can write
983 * data to an stm device once linked.
985 * Return: 0 on success, -errno otherwise.
987 int stm_source_register_device(struct device *parent,
988 struct stm_source_data *data)
990 struct stm_source_device *src;
994 return -EPROBE_DEFER;
996 src = kzalloc(sizeof(*src), GFP_KERNEL);
1000 device_initialize(&src->dev);
1001 src->dev.class = &stm_source_class;
1002 src->dev.parent = parent;
1003 src->dev.release = stm_source_device_release;
1005 err = kobject_set_name(&src->dev.kobj, "%s", data->name);
1009 err = device_add(&src->dev);
1013 stm_output_init(&src->output);
1014 spin_lock_init(&src->link_lock);
1015 INIT_LIST_HEAD(&src->link_entry);
1022 put_device(&src->dev);
1026 EXPORT_SYMBOL_GPL(stm_source_register_device);
1029 * stm_source_unregister_device() - unregister an stm_source device
1030 * @data: device description that was used to register the device
1032 * This will remove a previously created stm_source device from the system.
1034 void stm_source_unregister_device(struct stm_source_data *data)
1036 struct stm_source_device *src = data->src;
1038 stm_source_link_drop(src);
1040 device_unregister(&src->dev);
1042 EXPORT_SYMBOL_GPL(stm_source_unregister_device);
1044 int stm_source_write(struct stm_source_data *data, unsigned int chan,
1045 const char *buf, size_t count)
1047 struct stm_source_device *src = data->src;
1048 struct stm_device *stm;
1051 if (!src->output.nr_chans)
1054 if (chan >= src->output.nr_chans)
1057 idx = srcu_read_lock(&stm_source_srcu);
1059 stm = srcu_dereference(src->link, &stm_source_srcu);
1061 stm_write(stm->data, src->output.master,
1062 src->output.channel + chan,
1067 srcu_read_unlock(&stm_source_srcu, idx);
1071 EXPORT_SYMBOL_GPL(stm_source_write);
1073 static int __init stm_core_init(void)
1077 err = class_register(&stm_class);
1081 err = class_register(&stm_source_class);
1085 err = stp_configfs_init();
1089 init_srcu_struct(&stm_source_srcu);
1096 class_unregister(&stm_source_class);
1098 class_unregister(&stm_class);
1103 module_init(stm_core_init);
1105 static void __exit stm_core_exit(void)
1107 cleanup_srcu_struct(&stm_source_srcu);
1108 class_unregister(&stm_source_class);
1109 class_unregister(&stm_class);
1110 stp_configfs_exit();
1113 module_exit(stm_core_exit);
1115 MODULE_LICENSE("GPL v2");
1116 MODULE_DESCRIPTION("System Trace Module device class");
1117 MODULE_AUTHOR("Alexander Shishkin <alexander.shishkin@linux.intel.com>");