<commit_before>/*
 *    Copyright IBM Corp. 2004, 2011
 *    Author(s): <NAME> <<EMAIL>>,
 *		 <NAME> <<EMAIL>>,
 *		 <NAME> <<EMAIL>>,
 *
 * This file contains interrupt related functions.
 */

#include <linux/kernel_stat.h>
#include <linux/interrupt.h>
#include <linux/seq_file.h>
#include <linux/proc_fs.h>
#include <linux/profile.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ftrace.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/cpu.h>
#include <asm/irq_regs.h>
#include <asm/cputime.h>
#include <asm/lowcore.h>
#include <asm/irq.h>
#include "entry.h"

struct irq_class {
	char *name;
	char *desc;
};

static const struct irq_class intrclass_names[] = {
	{.name = "EXT" },
	{.name = "I/O" },
	{.name = "CLK", .desc = "[EXT] Clock Comparator" },
	{.name = "EXC", .desc = "[EXT] External Call" },
	{.name = "EMS", .desc = "[EXT] Emergency Signal" },
	{.name = "TMR", .desc = "[EXT] CPU Timer" },
	{.name = "TAL", .desc = "[EXT] Timing Alert" },
	{.name = "PFL", .desc = "[EXT] Pseudo Page Fault" },
	{.name = "DSD", .desc = "[EXT] DASD Diag" },
	{.name = "VRT", .desc = "[EXT] Virtio" },
	{.name = "SCP", .desc = "[EXT] Service Call" },
	{.name = "IUC", .desc = "[EXT] IUCV" },
	{.name = "CMS", .desc = "[EXT] CPU-Measurement: Sampling" },
	{.name = "CMC", .desc = "[EXT] CPU-Measurement: Counter" },
	{.name = "CMR", .desc = "[EXT] CPU-Measurement: RI" },
	{.name = "CIO", .desc = "[I/O] Common I/O Layer Interrupt" },
	{.name = "QAI", .desc = "[I/O] QDIO Adapter Interrupt" },
	{.name = "DAS", .desc = "[I/O] DASD" },
	{.name = "C15", .desc = "[I/O] 3215" },
	{.name = "C70", .desc = "[I/O] 3270" },
	{.name = "TAP", .desc = "[I/O] Tape" },
	{.name = "VMR", .desc = "[I/O] Unit Record Devices" },
	{.name = "LCS", .desc = "[I/O] LCS" },
	{.name = "CLW", .desc = "[I/O] CLAW" },
	{.name = "CTC", .desc = "[I/O] CTC" },
	{.name = "APB", .desc = "[I/O] AP Bus" },
	{.name = "ADM", .desc = "[I/O] EADM Subchannel" },
	{.name = "CSC", .desc = "[I/O] CHSC Subchannel" },
	{.name = "NMI", .desc = "[NMI] Machine Check" },
};

/*
 * show_interrupts is needed by /proc/interrupts.
 */
int show_interrupts(struct seq_file *p, void *v)
{
	int i = *(loff_t *) v, j;

	get_online_cpus();
	if (i == 0) {
		seq_puts(p, "           ");
		for_each_online_cpu(j)
			seq_printf(p, "CPU%d       ",j);
		seq_putc(p, '\n');
	}<commit_msg>s390/irq: use designated initializers for irq class array<commit_after>/*
 *    Copyright IBM Corp. 2004, 2011
 *    Author(s): <NAME> <<EMAIL>>,
 *		 <NAME> <<EMAIL>>,
 *		 <NAME> <<EMAIL>>,
 *
 * This file contains interrupt related functions.
 */

#include <linux/kernel_stat.h>
#include <linux/interrupt.h>
#include <linux/seq_file.h>
#include <linux/proc_fs.h>
#include <linux/profile.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/ftrace.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/cpu.h>
#include <asm/irq_regs.h>
#include <asm/cputime.h>
#include <asm/lowcore.h>
#include <asm/irq.h>
#include "entry.h"

struct irq_class {
	char *name;
	char *desc;
};

static const struct irq_class intrclass_names[] = {
	[EXTERNAL_INTERRUPT] = {.name = "EXT"},
	[IO_INTERRUPT]	     = {.name = "I/O"},
	[EXTINT_CLK] = {.name = "CLK", .desc = "[EXT] Clock Comparator"},
	[EXTINT_EXC] = {.name = "EXC", .desc = "[EXT] External Call"},
	[EXTINT_EMS] = {.name = "EMS", .desc = "[EXT] Emergency Signal"},
	[EXTINT_TMR] = {.name = "TMR", .desc = "[EXT] CPU Timer"},
	[EXTINT_TLA] = {.name = "TAL", .desc = "[EXT] Timing Alert"},
	[EXTINT_PFL] = {.name = "PFL", .desc = "[EXT] Pseudo Page Fault"},
	[EXTINT_DSD] = {.name = "DSD", .desc = "[EXT] DASD Diag"},
	[EXTINT_VRT] = {.name = "VRT", .desc = "[EXT] Virtio"},
	[EXTINT_SCP] = {.name = "SCP", .desc = "[EXT] Service Call"},
	[EXTINT_IUC] = {.name = "IUC", .desc = "[EXT] IUCV"},
	[EXTINT_CMS] = {.name = "CMS", .desc = "[EXT] CPU-Measurement: Sampling"},
	[EXTINT_CMC] = {.name = "CMC", .desc = "[EXT] CPU-Measurement: Counter"},
	[EXTINT_CMR] = {.name = "CMR", .desc = "[EXT] CPU-Measurement: RI"},
	[IOINT_CIO]  = {.name = "CIO", .desc = "[I/O] Common I/O Layer Interrupt"},
	[IOINT_QAI]  = {.name = "QAI", .desc = "[I/O] QDIO Adapter Interrupt"},
	[IOINT_DAS]  = {.name = "DAS", .desc = "[I/O] DASD"},
	[IOINT_C15]  = {.name = "C15", .desc = "[I/O] 3215"},
	[IOINT_C70]  = {.name = "C70", .desc = "[I/O] 3270"},
	[IOINT_TAP]  = {.name = "TAP", .desc = "[I/O] Tape"},
	[IOINT_VMR]  = {.name = "VMR", .desc = "[I/O] Unit Record Devices"},
	[IOINT_LCS]  = {.name = "LCS", .desc = "[I/O] LCS"},
	[IOINT_CLW]  = {.name = "CLW", .desc = "[I/O] CLAW"},
	[IOINT_CTC]  = {.name = "CTC", .desc = "[I/O] CTC"},
	[IOINT_APB]  = {.name = "APB", .desc = "[I/O] AP Bus"},
	[IOINT_ADM]  = {.name = "ADM", .desc = "[I/O] EADM Subchannel"},
	[IOINT_CSC]  = {.name = "CSC", .desc = "[I/O] CHSC Subchannel"},
	[NMI_NMI]    = {.name = "NMI", .desc = "[NMI] Machine Check"},
};

/*
 * show_interrupts is needed by /proc/interrupts.
 */
int show_interrupts(struct seq_file *p, void *v)
{
	int i = *(loff_t *) v, j;

	get_online_cpus();
	if (i == 0) {
		seq_puts(p, "           ");
		for_each_online_cpu(j)
			seq_printf(p, "CPU%d       ",j);
		seq_putc(p, '\n');
	}
{'fraction_non_alphanumeric': 0.24716291594537412, 'fraction_numerical': 0.00942488940180804, 'mean_word_length': 3.43307757885763, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1512232', 'n_tokens_mistral': 2382, 'n_tokens_neox': 2256, 'n_words': 538}