linux/kernel/irq/proc.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 1992, 1998-2004 Linus Torvalds, Ingo Molnar
 *
 * This file contains the /proc/irq/ handling code.
 */

#include <linux/irq.h>
#include <linux/gfp.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/interrupt.h>
#include <linux/kernel_stat.h>
#include <linux/mutex.h>

#include "internals.h"

/*
 * Access rules:
 *
 * procfs protects read/write of /proc/irq/N/ files against a
 * concurrent free of the interrupt descriptor. remove_proc_entry()
 * immediately prevents new read/writes to happen and waits for
 * already running read/write functions to complete.
 *
 * We remove the proc entries first and then delete the interrupt
 * descriptor from the radix tree and free it. So it is guaranteed
 * that irq_to_desc(N) is valid as long as the read/writes are
 * permitted by procfs.
 *
 * The read from /proc/interrupts is a different problem because there
 * is no protection. So the lookup and the access to irqdesc
 * information must be protected by sparse_irq_lock.
 */
static struct proc_dir_entry *root_irq_dir;

#ifdef CONFIG_SMP

enum {};

static int show_irq_affinity(int type, struct seq_file *m)
{}

static int irq_affinity_hint_proc_show(struct seq_file *m, void *v)
{}

int no_irq_affinity;
static int irq_affinity_proc_show(struct seq_file *m, void *v)
{}

static int irq_affinity_list_proc_show(struct seq_file *m, void *v)
{}

#ifndef CONFIG_AUTO_IRQ_AFFINITY
static inline int irq_select_affinity_usr(unsigned int irq)
{}
#else
/* ALPHA magic affinity auto selector. Keep it for historical reasons. */
static inline int irq_select_affinity_usr(unsigned int irq)
{
	return irq_select_affinity(irq);
}
#endif

static ssize_t write_irq_affinity(int type, struct file *file,
		const char __user *buffer, size_t count, loff_t *pos)
{}

static ssize_t irq_affinity_proc_write(struct file *file,
		const char __user *buffer, size_t count, loff_t *pos)
{}

static ssize_t irq_affinity_list_proc_write(struct file *file,
		const char __user *buffer, size_t count, loff_t *pos)
{}

static int irq_affinity_proc_open(struct inode *inode, struct file *file)
{}

static int irq_affinity_list_proc_open(struct inode *inode, struct file *file)
{}

static const struct proc_ops irq_affinity_proc_ops =;

static const struct proc_ops irq_affinity_list_proc_ops =;

#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK
static int irq_effective_aff_proc_show(struct seq_file *m, void *v)
{}

static int irq_effective_aff_list_proc_show(struct seq_file *m, void *v)
{}
#endif

static int default_affinity_show(struct seq_file *m, void *v)
{}

static ssize_t default_affinity_write(struct file *file,
		const char __user *buffer, size_t count, loff_t *ppos)
{}

static int default_affinity_open(struct inode *inode, struct file *file)
{}

static const struct proc_ops default_affinity_proc_ops =;

static int irq_node_proc_show(struct seq_file *m, void *v)
{}
#endif

static int irq_spurious_proc_show(struct seq_file *m, void *v)
{}

#define MAX_NAMELEN

static int name_unique(unsigned int irq, struct irqaction *new_action)
{}

void register_handler_proc(unsigned int irq, struct irqaction *action)
{}

#undef MAX_NAMELEN

#define MAX_NAMELEN

void register_irq_proc(unsigned int irq, struct irq_desc *desc)
{}

void unregister_irq_proc(unsigned int irq, struct irq_desc *desc)
{}

#undef MAX_NAMELEN

void unregister_handler_proc(unsigned int irq, struct irqaction *action)
{}

static void register_default_affinity_proc(void)
{}

void init_irq_proc(void)
{}

#ifdef CONFIG_GENERIC_IRQ_SHOW

int __weak arch_show_interrupts(struct seq_file *p, int prec)
{}

#ifndef ACTUAL_NR_IRQS
#define ACTUAL_NR_IRQS
#endif

int show_interrupts(struct seq_file *p, void *v)
{}
#endif