/* * musb_trace.h - MUSB Controller Trace Support * * Copyright (C) 2015 Texas Instruments Incorporated - http://www.ti.com * * Author: Bin Liu * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 of * the License as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ #undef TRACE_SYSTEM #define TRACE_SYSTEM musb #if !defined(__MUSB_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) #define __MUSB_TRACE_H #include #include #include #include "musb_core.h" #ifdef CONFIG_USB_TI_CPPI41_DMA #include "cppi_dma.h" #endif #define MUSB_MSG_MAX 500 TRACE_EVENT(musb_log, TP_PROTO(struct musb *musb, struct va_format *vaf), TP_ARGS(musb, vaf), TP_STRUCT__entry( __string(name, dev_name(musb->controller)) __dynamic_array(char, msg, MUSB_MSG_MAX) ), TP_fast_assign( __assign_str(name, dev_name(musb->controller)); vsnprintf(__get_str(msg), MUSB_MSG_MAX, vaf->fmt, *vaf->va); ), TP_printk("%s: %s", __get_str(name), __get_str(msg)) ); DECLARE_EVENT_CLASS(musb_regb, TP_PROTO(void *caller, const void *addr, unsigned int offset, u8 data), TP_ARGS(caller, addr, offset, data), TP_STRUCT__entry( __field(void *, caller) __field(const void *, addr) __field(unsigned int, offset) __field(u8, data) ), TP_fast_assign( __entry->caller = caller; __entry->addr = addr; __entry->offset = offset; __entry->data = data; ), TP_printk("%pS: %p + %04x: %02x", __entry->caller, __entry->addr, __entry->offset, __entry->data) ); DEFINE_EVENT(musb_regb, musb_readb, TP_PROTO(void *caller, const void *addr, unsigned int offset, u8 data), TP_ARGS(caller, addr, offset, data) ); DEFINE_EVENT(musb_regb, musb_writeb, TP_PROTO(void *caller, const void *addr, unsigned int offset, u8 data), TP_ARGS(caller, addr, offset, data) ); DECLARE_EVENT_CLASS(musb_regw, TP_PROTO(void *caller, const void *addr, unsigned int offset, u16 data), TP_ARGS(caller, addr, offset, data), TP_STRUCT__entry( __field(void *, caller) __field(const void *, addr) __field(unsigned int, offset) __field(u16, data) ), TP_fast_assign( __entry->caller = caller; __entry->addr = addr; __entry->offset = offset; __entry->data = data; ), TP_printk("%pS: %p + %04x: %04x", __entry->caller, __entry->addr, __entry->offset, __entry->data) ); DEFINE_EVENT(musb_regw, musb_readw, TP_PROTO(void *caller, const void *addr, unsigned int offset, u16 data), TP_ARGS(caller, addr, offset, data) ); DEFINE_EVENT(musb_regw, musb_writew, TP_PROTO(void *caller, const void *addr, unsigned int offset, u16 data), TP_ARGS(caller, addr, offset, data) ); DECLARE_EVENT_CLASS(musb_regl, TP_PROTO(void *caller, const void *addr, unsigned int offset, u32 data), TP_ARGS(caller, addr, offset, data), TP_STRUCT__entry( __field(void *, caller) __field(const void *, addr) __field(unsigned int, offset) __field(u32, data) ), TP_fast_assign( __entry->caller = caller; __entry->addr = addr; __entry->offset = offset; __entry->data = data; ), TP_printk("%pS: %p + %04x: %08x", __entry->caller, __entry->addr, __entry->offset, __entry->data) ); DEFINE_EVENT(musb_regl, musb_readl, TP_PROTO(void *caller, const void *addr, unsigned int offset, u32 data), TP_ARGS(caller, addr, offset, data) ); DEFINE_EVENT(musb_regl, musb_writel, TP_PROTO(void *caller, const void *addr, unsigned int offset, u32 data), TP_ARGS(caller, addr, offset, data) ); TRACE_EVENT(musb_isr, TP_PROTO(struct musb *musb), TP_ARGS(musb), TP_STRUCT__entry( __string(name, dev_name(musb->controller)) __field(u8, int_usb) __field(u16, int_tx) __field(u16, int_rx) ), TP_fast_assign( __assign_str(name, dev_name(musb->controller)); __entry->int_usb = musb->int_usb; __entry->int_tx = musb->int_tx; __entry->int_rx = musb->int_rx; ), TP_printk("%s: usb %02x, tx %04x, rx %04x", __get_str(name), __entry->int_usb, __entry->int_tx, __entry->int_rx ) ); DECLARE_EVENT_CLASS(musb_urb, TP_PROTO(struct musb *musb, struct urb *urb), TP_ARGS(musb, urb), TP_STRUCT__entry( __string(name, dev_name(musb->controller)) __field(struct urb *, urb) __field(unsigned int, pipe) __field(int, status) __field(unsigned int, flag) __field(u32, buf_len) __field(u32, actual_len) ), TP_fast_assign( __assign_str(name, dev_name(musb->controller)); __entry->urb = urb; __entry->pipe = urb->pipe; __entry->status = urb->status; __entry->flag = urb->transfer_flags; __entry->buf_len = urb->transfer_buffer_length; __entry->actual_len = urb->actual_length; ), TP_printk("%s: %p, dev%d ep%d%s, flag 0x%x, len %d/%d, status %d", __get_str(name), __entry->urb, usb_pipedevice(__entry->pipe), usb_pipeendpoint(__entry->pipe), usb_pipein(__entry->pipe) ? "in" : "out", __entry->flag, __entry->actual_len, __entry->buf_len, __entry->status ) ); DEFINE_EVENT(musb_urb, musb_urb_start, TP_PROTO(struct musb *musb, struct urb *urb), TP_ARGS(musb, urb) ); DEFINE_EVENT(musb_urb, musb_urb_gb, TP_PROTO(struct musb *musb, struct urb *urb), TP_ARGS(musb, urb) ); DEFINE_EVENT(musb_urb, musb_urb_rx, TP_PROTO(struct musb *musb, struct urb *urb), TP_ARGS(musb, urb) ); DEFINE_EVENT(musb_urb, musb_urb_tx, TP_PROTO(struct musb *musb, struct urb *urb), TP_ARGS(musb, urb) ); DEFINE_EVENT(musb_urb, musb_urb_enq, TP_PROTO(struct musb *musb, struct urb *urb), TP_ARGS(musb, urb) ); DEFINE_EVENT(musb_urb, musb_urb_deq, TP_PROTO(struct musb *musb, struct urb *urb), TP_ARGS(musb, urb) ); DECLARE_EVENT_CLASS(musb_req, TP_PROTO(struct musb_request *req), TP_ARGS(req), TP_STRUCT__entry( __field(struct usb_request *, req) __field(u8, is_tx) __field(u8, epnum) __field(int, status) __field(unsigned int, buf_len) __field(unsigned int, actual_len) __field(unsigned int, zero) __field(unsigned int, short_not_ok) __field(unsigned int, no_interrupt) ), TP_fast_assign( __entry->req = &req->request; __entry->is_tx = req->tx; __entry->epnum = req->epnum; __entry->status = req->request.status; __entry->buf_len = req->request.length; __entry->actual_len = req->request.actual; __entry->zero = req->request.zero; __entry->short_not_ok = req->request.short_not_ok; __entry->no_interrupt = req->request.no_interrupt; ), TP_printk("%p, ep%d %s, %s%s%s, len %d/%d, status %d", __entry->req, __entry->epnum, __entry->is_tx ? "tx/IN" : "rx/OUT", __entry->zero ? "Z" : "z", __entry->short_not_ok ? "S" : "s", __entry->no_interrupt ? "I" : "i", __entry->actual_len, __entry->buf_len, __entry->status ) ); DEFINE_EVENT(musb_req, musb_req_gb, TP_PROTO(struct musb_request *req), TP_ARGS(req) ); DEFINE_EVENT(musb_req, musb_req_tx, TP_PROTO(struct musb_request *req), TP_ARGS(req) ); DEFINE_EVENT(musb_req, musb_req_rx, TP_PROTO(struct musb_request *req), TP_ARGS(req) ); DEFINE_EVENT(musb_req, musb_req_alloc, TP_PROTO(struct musb_request *req), TP_ARGS(req) ); DEFINE_EVENT(musb_req, musb_req_free, TP_PROTO(struct musb_request *req), TP_ARGS(req) ); DEFINE_EVENT(musb_req, musb_req_start, TP_PROTO(struct musb_request *req), TP_ARGS(req) ); DEFINE_EVENT(musb_req, musb_req_enq, TP_PROTO(struct musb_request *req), TP_ARGS(req) ); DEFINE_EVENT(musb_req, musb_req_deq, TP_PROTO(struct musb_request *req), TP_ARGS(req) ); #ifdef CONFIG_USB_TI_CPPI41_DMA DECLARE_EVENT_CLASS(musb_cppi41, TP_PROTO(struct cppi41_dma_channel *ch), TP_ARGS(ch), TP_STRUCT__entry( __field(struct cppi41_dma_channel *, ch) __string(name, dev_name(ch->hw_ep->musb->controller)) __field(u8, hwep) __field(u8, port) __field(u8, is_tx) __field(u32, len) __field(u32, prog_len) __field(u32, xferred) ), TP_fast_assign( __entry->ch = ch; __assign_str(name, dev_name(ch->hw_ep->musb->controller)); __entry->hwep = ch->hw_ep->epnum; __entry->port = ch->port_num; __entry->is_tx = ch->is_tx; __entry->len = ch->total_len; __entry->prog_len = ch->prog_len; __entry->xferred = ch->transferred; ), TP_printk("%s: %p, hwep%d ch%d%s, prog_len %d, len %d/%d", __get_str(name), __entry->ch, __entry->hwep, __entry->port, __entry->is_tx ? "tx" : "rx", __entry->prog_len, __entry->xferred, __entry->len ) ); DEFINE_EVENT(musb_cppi41, musb_cppi41_done, TP_PROTO(struct cppi41_dma_channel *ch), TP_ARGS(ch) ); DEFINE_EVENT(musb_cppi41, musb_cppi41_gb, TP_PROTO(struct cppi41_dma_channel *ch), TP_ARGS(ch) ); DEFINE_EVENT(musb_cppi41, musb_cppi41_config, TP_PROTO(struct cppi41_dma_channel *ch), TP_ARGS(ch) ); DEFINE_EVENT(musb_cppi41, musb_cppi41_cont, TP_PROTO(struct cppi41_dma_channel *ch), TP_ARGS(ch) ); DEFINE_EVENT(musb_cppi41, musb_cppi41_alloc, TP_PROTO(struct cppi41_dma_channel *ch), TP_ARGS(ch) ); DEFINE_EVENT(musb_cppi41, musb_cppi41_abort, TP_PROTO(struct cppi41_dma_channel *ch), TP_ARGS(ch) ); DEFINE_EVENT(musb_cppi41, musb_cppi41_free, TP_PROTO(struct cppi41_dma_channel *ch), TP_ARGS(ch) ); #endif /* CONFIG_USB_TI_CPPI41_DMA */ #endif /* __MUSB_TRACE_H */ /* this part has to be here */ #undef TRACE_INCLUDE_PATH #define TRACE_INCLUDE_PATH . #undef TRACE_INCLUDE_FILE #define TRACE_INCLUDE_FILE musb_trace #include 0 ? drm_atomic_state_default_clear+0xf7/0x1c0 [drm] __slab_free+0x48/0x2e0 ? drm_atomic_state_default_clear+0xf7/0x1c0 [drm] kfree+0x159/0x1a0 drm_atomic_state_default_clear+0xf7/0x1c0 [drm] ? drm_atomic_state_clear+0x30/0x30 [drm] intel_atomic_state_clear+0xd/0x20 [i915] drm_atomic_state_clear+0x1a/0x30 [drm] __drm_atomic_state_free+0x13/0x60 [drm] intel_atomic_helper_free_state+0x5d/0x70 [i915] process_one_work+0x260/0x4a0 worker_thread+0x2d1/0x4f0 kthread+0x127/0x130 ? process_one_work+0x4a0/0x4a0 ? kthread_stop+0x120/0x120 ret_from_fork+0x29/0x40 FIX kmalloc-128: Object at 0xffff92fb65ec2578 not freed Fixes: 3b24f7d67581 ("drm/atomic: Add struct drm_crtc_commit to track async updates") Fixes: 9626014258a5 ("drm/fence: add in-fences support") Cc: <stable@vger.kernel.org> # v4.8+ Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1485854725-27640-1-git-send-email-maarten.lankhorst@linux.intel.com
Diffstat (limited to 'include/net/tc_act/tc_defact.h')