debugfs.c (a2e7496b453eaa577425858d6f8b854800ed7343) | debugfs.c (d5638de827cff0fce77007e426ec0ffdedf68a44) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* Copyright(c) 2021 Intel Corporation. All rights rsvd. */ 3#include <linux/init.h> 4#include <linux/kernel.h> 5#include <linux/module.h> 6#include <linux/pci.h> 7#include <linux/debugfs.h> 8#include <linux/io-64-nonatomic-lo-hi.h> --- 52 unchanged lines hidden (view full) --- 61 union evl_status_reg evl_status; 62 u16 h, t, evl_size, i; 63 int count = 0; 64 bool processed = true; 65 66 if (!evl || !evl->log) 67 return 0; 68 | 1// SPDX-License-Identifier: GPL-2.0 2/* Copyright(c) 2021 Intel Corporation. All rights rsvd. */ 3#include <linux/init.h> 4#include <linux/kernel.h> 5#include <linux/module.h> 6#include <linux/pci.h> 7#include <linux/debugfs.h> 8#include <linux/io-64-nonatomic-lo-hi.h> --- 52 unchanged lines hidden (view full) --- 61 union evl_status_reg evl_status; 62 u16 h, t, evl_size, i; 63 int count = 0; 64 bool processed = true; 65 66 if (!evl || !evl->log) 67 return 0; 68 |
69 spin_lock(&evl->lock); | 69 mutex_lock(&evl->lock); |
70 71 evl_status.bits = ioread64(idxd->reg_base + IDXD_EVLSTATUS_OFFSET); 72 t = evl_status.tail; 73 h = evl_status.head; 74 evl_size = evl->size; 75 76 seq_printf(s, "Event Log head %u tail %u interrupt pending %u\n\n", 77 evl_status.head, evl_status.tail, evl_status.int_pending); --- 4 unchanged lines hidden (view full) --- 82 if (i == t) 83 break; 84 85 if (processed && i == h) 86 processed = false; 87 dump_event_entry(idxd, s, i, &count, processed); 88 } 89 | 70 71 evl_status.bits = ioread64(idxd->reg_base + IDXD_EVLSTATUS_OFFSET); 72 t = evl_status.tail; 73 h = evl_status.head; 74 evl_size = evl->size; 75 76 seq_printf(s, "Event Log head %u tail %u interrupt pending %u\n\n", 77 evl_status.head, evl_status.tail, evl_status.int_pending); --- 4 unchanged lines hidden (view full) --- 82 if (i == t) 83 break; 84 85 if (processed && i == h) 86 processed = false; 87 dump_event_entry(idxd, s, i, &count, processed); 88 } 89 |
90 spin_unlock(&evl->lock); | 90 mutex_unlock(&evl->lock); |
91 return 0; 92} 93 94DEFINE_SHOW_ATTRIBUTE(debugfs_evl); 95 96int idxd_device_init_debugfs(struct idxd_device *idxd) 97{ 98 if (IS_ERR_OR_NULL(idxd_debugfs_dir)) --- 40 unchanged lines hidden --- | 91 return 0; 92} 93 94DEFINE_SHOW_ATTRIBUTE(debugfs_evl); 95 96int idxd_device_init_debugfs(struct idxd_device *idxd) 97{ 98 if (IS_ERR_OR_NULL(idxd_debugfs_dir)) --- 40 unchanged lines hidden --- |