Release 4.12 drivers/misc/cxl/debugfs.c
/*
* Copyright 2014 IBM Corp.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <linux/debugfs.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include "cxl.h"
static struct dentry *cxl_debugfs;
void cxl_stop_trace_psl9(struct cxl *adapter)
{
/* Stop the trace */
cxl_p1_write(adapter, CXL_PSL9_TRACECFG, 0x4480000000000000ULL);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Christophe Lombard | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.00% |
void cxl_stop_trace_psl8(struct cxl *adapter)
{
int slice;
/* Stop the trace */
cxl_p1_write(adapter, CXL_PSL_TRACE, 0x8000000000000017LL);
/* Stop the slice traces */
spin_lock(&adapter->afu_list_lock);
for (slice = 0; slice < adapter->slices; slice++) {
if (adapter->afu[slice])
cxl_p1n_write(adapter->afu[slice], CXL_PSL_SLICE_TRACE, 0x8000000000000000LL);
}
spin_unlock(&adapter->afu_list_lock);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ian Munsie | 79 | 98.75% | 1 | 50.00% |
Christophe Lombard | 1 | 1.25% | 1 | 50.00% |
Total | 80 | 100.00% | 2 | 100.00% |
/* Helpers to export CXL mmaped IO registers via debugfs */
static int debugfs_io_u64_get(void *data, u64 *val)
{
*val = in_be64((u64 __iomem *)data);
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ian Munsie | 30 | 100.00% | 1 | 100.00% |
Total | 30 | 100.00% | 1 | 100.00% |
static int debugfs_io_u64_set(void *data, u64 val)
{
out_be64((u64 __iomem *)data, val);
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ian Munsie | 28 | 100.00% | 1 | 100.00% |
Total | 28 | 100.00% | 1 | 100.00% |
DEFINE_DEBUGFS_ATTRIBUTE(fops_io_x64, debugfs_io_u64_get, debugfs_io_u64_set,
"0x%016llx\n");
static struct dentry *debugfs_create_io_x64(const char *name, umode_t mode,
struct dentry *parent, u64 __iomem *value)
{
return debugfs_create_file_unsafe(name, mode, parent,
(void __force *)value, &fops_io_x64);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ian Munsie | 44 | 95.65% | 1 | 33.33% |
Andrew Donnellan | 1 | 2.17% | 1 | 33.33% |
Daniel Axtens | 1 | 2.17% | 1 | 33.33% |
Total | 46 | 100.00% | 3 | 100.00% |
void cxl_debugfs_add_adapter_regs_psl9(struct cxl *adapter, struct dentry *dir)
{
debugfs_create_io_x64("fir1", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_FIR1));
debugfs_create_io_x64("fir2", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_FIR2));
debugfs_create_io_x64("fir_cntl", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_FIR_CNTL));
debugfs_create_io_x64("trace", S_IRUSR | S_IWUSR, dir, _cxl_p1_addr(adapter, CXL_PSL9_TRACECFG));
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Christophe Lombard | 81 | 100.00% | 1 | 100.00% |
Total | 81 | 100.00% | 1 | 100.00% |
void cxl_debugfs_add_adapter_regs_psl8(struct cxl *adapter, struct dentry *dir)
{
debugfs_create_io_x64("fir1", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL_FIR1));
debugfs_create_io_x64("fir2", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL_FIR2));
debugfs_create_io_x64("fir_cntl", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL_FIR_CNTL));
debugfs_create_io_x64("trace", S_IRUSR | S_IWUSR, dir, _cxl_p1_addr(adapter, CXL_PSL_TRACE));
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Frederic Barrat | 80 | 98.77% | 1 | 50.00% |
Christophe Lombard | 1 | 1.23% | 1 | 50.00% |
Total | 81 | 100.00% | 2 | 100.00% |
void cxl_debugfs_add_adapter_regs_xsl(struct cxl *adapter, struct dentry *dir)
{
debugfs_create_io_x64("fec", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_XSL_FEC));
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Frederic Barrat | 30 | 96.77% | 1 | 50.00% |
Christophe Lombard | 1 | 3.23% | 1 | 50.00% |
Total | 31 | 100.00% | 2 | 100.00% |
int cxl_debugfs_adapter_add(struct cxl *adapter)
{
struct dentry *dir;
char buf[32];
if (!cxl_debugfs)
return -ENODEV;
snprintf(buf, 32, "card%i", adapter->adapter_num);
dir = debugfs_create_dir(buf, cxl_debugfs);
if (IS_ERR(dir))
return PTR_ERR(dir);
adapter->debugfs = dir;
debugfs_create_io_x64("err_ivte", S_IRUSR, dir, _cxl_p1_addr(adapter, CXL_PSL_ErrIVTE));
if (adapter->native->sl_ops->debugfs_add_adapter_regs)
adapter->native->sl_ops->debugfs_add_adapter_regs(adapter, dir);
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ian Munsie | 84 | 74.34% | 1 | 33.33% |
Frederic Barrat | 27 | 23.89% | 1 | 33.33% |
Christophe Lombard | 2 | 1.77% | 1 | 33.33% |
Total | 113 | 100.00% | 3 | 100.00% |
void cxl_debugfs_adapter_remove(struct cxl *adapter)
{
debugfs_remove_recursive(adapter->debugfs);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Frederic Barrat | 17 | 100.00% | 1 | 100.00% |
Total | 17 | 100.00% | 1 | 100.00% |
void cxl_debugfs_add_afu_regs_psl9(struct cxl_afu *afu, struct dentry *dir)
{
debugfs_create_io_x64("serr", S_IRUSR, dir, _cxl_p1n_addr(afu, CXL_PSL_SERR_An));
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Christophe Lombard | 31 | 100.00% | 1 | 100.00% |
Total | 31 | 100.00% | 1 | 100.00% |
void cxl_debugfs_add_afu_regs_psl8(struct cxl_afu *afu, struct dentry *dir)
{
debugfs_create_io_x64("sstp0", S_IRUSR, dir, _cxl_p2n_addr(afu, CXL_SSTP0_An));
debugfs_create_io_x64("sstp1", S_IRUSR, dir, _cxl_p2n_addr(afu, CXL_SSTP1_An));
debugfs_create_io_x64("fir", S_IRUSR, dir, _cxl_p1n_addr(afu, CXL_PSL_FIR_SLICE_An));
debugfs_create_io_x64("serr", S_IRUSR, dir, _cxl_p1n_addr(afu, CXL_PSL_SERR_An));
debugfs_create_io_x64("afu_debug", S_IRUSR, dir, _cxl_p1n_addr(afu, CXL_AFU_DEBUG_An));
debugfs_create_io_x64("trace", S_IRUSR | S_IWUSR, dir, _cxl_p1n_addr(afu, CXL_PSL_SLICE_TRACE));
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ian Munsie | 52 | 46.02% | 1 | 25.00% |
Christophe Lombard | 33 | 29.20% | 2 | 50.00% |
Frederic Barrat | 28 | 24.78% | 1 | 25.00% |
Total | 113 | 100.00% | 4 | 100.00% |
int cxl_debugfs_afu_add(struct cxl_afu *afu)
{
struct dentry *dir;
char buf[32];
if (!afu->adapter->debugfs)
return -ENODEV;
snprintf(buf, 32, "psl%i.%i", afu->adapter->adapter_num, afu->slice);
dir = debugfs_create_dir(buf, afu->adapter->debugfs);
if (IS_ERR(dir))
return PTR_ERR(dir);
afu->debugfs = dir;
debugfs_create_io_x64("sr", S_IRUSR, dir, _cxl_p1n_addr(afu, CXL_PSL_SR_An));
debugfs_create_io_x64("dsisr", S_IRUSR, dir, _cxl_p2n_addr(afu, CXL_PSL_DSISR_An));
debugfs_create_io_x64("dar", S_IRUSR, dir, _cxl_p2n_addr(afu, CXL_PSL_DAR_An));
debugfs_create_io_x64("err_status", S_IRUSR, dir, _cxl_p2n_addr(afu, CXL_PSL_ErrStat_An));
if (afu->adapter->native->sl_ops->debugfs_add_afu_regs)
afu->adapter->native->sl_ops->debugfs_add_afu_regs(afu, dir);
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ian Munsie | 157 | 87.71% | 1 | 33.33% |
Frederic Barrat | 20 | 11.17% | 1 | 33.33% |
Christophe Lombard | 2 | 1.12% | 1 | 33.33% |
Total | 179 | 100.00% | 3 | 100.00% |
void cxl_debugfs_afu_remove(struct cxl_afu *afu)
{
debugfs_remove_recursive(afu->debugfs);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ian Munsie | 17 | 100.00% | 1 | 100.00% |
Total | 17 | 100.00% | 1 | 100.00% |
int __init cxl_debugfs_init(void)
{
struct dentry *ent;
if (!cpu_has_feature(CPU_FTR_HVMODE))
return 0;
ent = debugfs_create_dir("cxl", NULL);
if (IS_ERR(ent))
return PTR_ERR(ent);
cxl_debugfs = ent;
return 0;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ian Munsie | 42 | 79.25% | 1 | 50.00% |
Frederic Barrat | 11 | 20.75% | 1 | 50.00% |
Total | 53 | 100.00% | 2 | 100.00% |
void cxl_debugfs_exit(void)
{
debugfs_remove_recursive(cxl_debugfs);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ian Munsie | 12 | 100.00% | 1 | 100.00% |
Total | 12 | 100.00% | 1 | 100.00% |
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Ian Munsie | 575 | 59.71% | 1 | 11.11% |
Frederic Barrat | 213 | 22.12% | 2 | 22.22% |
Christophe Lombard | 172 | 17.86% | 4 | 44.44% |
Andrew Donnellan | 2 | 0.21% | 1 | 11.11% |
Daniel Axtens | 1 | 0.10% | 1 | 11.11% |
Total | 963 | 100.00% | 9 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.