[PATCH 3/3] ARM Coresight: Add PID control support for ETM tracing

Greg Kroah-Hartman gregkh at linuxfoundation.org
Wed Dec 4 10:27:43 EST 2013


On Tue, Dec 03, 2013 at 11:40:59PM -0500, Adrien Vergé wrote:
> @@ -616,7 +670,7 @@ static int etm_probe(struct amba_device *dev,
> const struct amba_id *id)
>   if (ret)
>   goto out_unmap;
> 
> - /* failing to create any of these three is not fatal */
> + /* failing to create any of these four is not fatal */
>   ret = sysfs_create_file(&dev->dev.kobj, &trace_info_attr.attr);
>   if (ret)
>   dev_dbg(&dev->dev, "Failed to create trace_info in sysfs\n");
> @@ -629,6 +683,10 @@ static int etm_probe(struct amba_device *dev,
> const struct amba_id *id)
>   if (ret)
>   dev_dbg(&dev->dev, "Failed to create trace_addrrange in sysfs\n");
> 
> + ret = sysfs_create_file(&dev->dev.kobj, &trace_pid_attr.attr);
> + if (ret)
> + dev_dbg(&dev->dev, "Failed to create trace_pid in sysfs\n");
> +
>   dev_dbg(t->dev, "ETM AMBA driver initialized.\n");
> 
>  out:

Again, not your fault, but you just raced with userspace, so now
userspace can't see your device files at all.  Please use the correct
api for this (groups), and actually, it should all be using debugfs if
anything, not sysfs at all.

thanks,

greg k-h



More information about the linux-arm-kernel mailing list