Lines Matching refs:entry

53 	struct intel_pmt_entry		entry;  member
59 struct crashlog_entry entry[]; member
65 static bool pmt_crashlog_complete(struct intel_pmt_entry *entry) in pmt_crashlog_complete() argument
67 u32 control = readl(entry->disc_table + CONTROL_OFFSET); in pmt_crashlog_complete()
73 static bool pmt_crashlog_disabled(struct intel_pmt_entry *entry) in pmt_crashlog_disabled() argument
75 u32 control = readl(entry->disc_table + CONTROL_OFFSET); in pmt_crashlog_disabled()
81 static bool pmt_crashlog_supported(struct intel_pmt_entry *entry) in pmt_crashlog_supported() argument
83 u32 discovery_header = readl(entry->disc_table + CONTROL_OFFSET); in pmt_crashlog_supported()
96 static void pmt_crashlog_set_disable(struct intel_pmt_entry *entry, in pmt_crashlog_set_disable() argument
99 u32 control = readl(entry->disc_table + CONTROL_OFFSET); in pmt_crashlog_set_disable()
109 writel(control, entry->disc_table + CONTROL_OFFSET); in pmt_crashlog_set_disable()
112 static void pmt_crashlog_set_clear(struct intel_pmt_entry *entry) in pmt_crashlog_set_clear() argument
114 u32 control = readl(entry->disc_table + CONTROL_OFFSET); in pmt_crashlog_set_clear()
119 writel(control, entry->disc_table + CONTROL_OFFSET); in pmt_crashlog_set_clear()
122 static void pmt_crashlog_set_execute(struct intel_pmt_entry *entry) in pmt_crashlog_set_execute() argument
124 u32 control = readl(entry->disc_table + CONTROL_OFFSET); in pmt_crashlog_set_execute()
129 writel(control, entry->disc_table + CONTROL_OFFSET); in pmt_crashlog_set_execute()
138 struct intel_pmt_entry *entry = dev_get_drvdata(dev); in enable_show() local
139 int enabled = !pmt_crashlog_disabled(entry); in enable_show()
148 struct crashlog_entry *entry; in enable_store() local
152 entry = dev_get_drvdata(dev); in enable_store()
158 mutex_lock(&entry->control_mutex); in enable_store()
159 pmt_crashlog_set_disable(&entry->entry, !enabled); in enable_store()
160 mutex_unlock(&entry->control_mutex); in enable_store()
169 struct intel_pmt_entry *entry; in trigger_show() local
172 entry = dev_get_drvdata(dev); in trigger_show()
173 trigger = pmt_crashlog_complete(entry); in trigger_show()
182 struct crashlog_entry *entry; in trigger_store() local
186 entry = dev_get_drvdata(dev); in trigger_store()
192 mutex_lock(&entry->control_mutex); in trigger_store()
195 pmt_crashlog_set_clear(&entry->entry); in trigger_store()
196 } else if (pmt_crashlog_complete(&entry->entry)) { in trigger_store()
200 } else if (pmt_crashlog_disabled(&entry->entry)) { in trigger_store()
205 pmt_crashlog_set_execute(&entry->entry); in trigger_store()
210 mutex_unlock(&entry->control_mutex); in trigger_store()
225 static int pmt_crashlog_header_decode(struct intel_pmt_entry *entry, in pmt_crashlog_header_decode() argument
229 void __iomem *disc_table = entry->disc_table; in pmt_crashlog_header_decode()
232 if (!pmt_crashlog_supported(entry)) in pmt_crashlog_header_decode()
236 crashlog = container_of(entry, struct crashlog_entry, entry); in pmt_crashlog_header_decode()
266 intel_pmt_dev_destroy(&priv->entry[i].entry, &pmt_crashlog_ns); in pmt_crashlog_remove()
277 size = struct_size(priv, entry, pdev->num_resources); in pmt_crashlog_probe()
285 struct intel_pmt_entry *entry = &priv->entry[i].entry; in pmt_crashlog_probe() local
287 ret = intel_pmt_dev_create(entry, &pmt_crashlog_ns, pdev, i); in pmt_crashlog_probe()