Loading msm/sde_dbg.h +1 −2 Original line number Diff line number Diff line Loading @@ -156,11 +156,10 @@ struct sde_dbg_reglog { u32 first; u32 last; u32 last_dump; u32 curr; atomic64_t curr; u32 next; u32 enable; u32 enable_mask; spinlock_t spin_lock; }; extern struct sde_dbg_reglog *sde_dbg_base_reglog; Loading msm/sde_dbg_evtlog.c +4 −9 Original line number Diff line number Diff line Loading @@ -103,27 +103,22 @@ void sde_evtlog_log(struct sde_dbg_evtlog *evtlog, const char *name, int line, void sde_reglog_log(u8 blk_id, u32 val, u32 addr) { unsigned long flags; struct sde_dbg_reglog_log *log; struct sde_dbg_reglog *reglog = sde_dbg_base_reglog; int index; if (!reglog) return; spin_lock_irqsave(®log->spin_lock, flags); log = ®log->logs[reglog->curr]; index = abs(atomic64_inc_return(®log->curr) % SDE_REGLOG_ENTRY); log = ®log->logs[index]; log->blk_id = blk_id; log->val = val; log->addr = addr; log->time = local_clock(); log->pid = current->pid; reglog->curr = (reglog->curr + 1) % SDE_REGLOG_ENTRY; reglog->last++; spin_unlock_irqrestore(®log->spin_lock, flags); } /* always dump the last entries which are not dumped yet */ Loading Loading @@ -244,7 +239,7 @@ struct sde_dbg_reglog *sde_reglog_init(void) if (!reglog) return ERR_PTR(-ENOMEM); spin_lock_init(®log->spin_lock); atomic64_set(®log->curr, 0); return reglog; } Loading Loading
msm/sde_dbg.h +1 −2 Original line number Diff line number Diff line Loading @@ -156,11 +156,10 @@ struct sde_dbg_reglog { u32 first; u32 last; u32 last_dump; u32 curr; atomic64_t curr; u32 next; u32 enable; u32 enable_mask; spinlock_t spin_lock; }; extern struct sde_dbg_reglog *sde_dbg_base_reglog; Loading
msm/sde_dbg_evtlog.c +4 −9 Original line number Diff line number Diff line Loading @@ -103,27 +103,22 @@ void sde_evtlog_log(struct sde_dbg_evtlog *evtlog, const char *name, int line, void sde_reglog_log(u8 blk_id, u32 val, u32 addr) { unsigned long flags; struct sde_dbg_reglog_log *log; struct sde_dbg_reglog *reglog = sde_dbg_base_reglog; int index; if (!reglog) return; spin_lock_irqsave(®log->spin_lock, flags); log = ®log->logs[reglog->curr]; index = abs(atomic64_inc_return(®log->curr) % SDE_REGLOG_ENTRY); log = ®log->logs[index]; log->blk_id = blk_id; log->val = val; log->addr = addr; log->time = local_clock(); log->pid = current->pid; reglog->curr = (reglog->curr + 1) % SDE_REGLOG_ENTRY; reglog->last++; spin_unlock_irqrestore(®log->spin_lock, flags); } /* always dump the last entries which are not dumped yet */ Loading Loading @@ -244,7 +239,7 @@ struct sde_dbg_reglog *sde_reglog_init(void) if (!reglog) return ERR_PTR(-ENOMEM); spin_lock_init(®log->spin_lock); atomic64_set(®log->curr, 0); return reglog; } Loading