~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/sh/intc/virq-debugfs.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Support for virtual IRQ subgroups debugfs mapping.
 
3
 *
 
4
 * Copyright (C) 2010  Paul Mundt
 
5
 *
 
6
 * Modelled after arch/powerpc/kernel/irq.c.
 
7
 *
 
8
 * This file is subject to the terms and conditions of the GNU General Public
 
9
 * License.  See the file "COPYING" in the main directory of this archive
 
10
 * for more details.
 
11
 */
 
12
#include <linux/seq_file.h>
 
13
#include <linux/fs.h>
 
14
#include <linux/init.h>
 
15
#include <linux/irq.h>
 
16
#include <linux/debugfs.h>
 
17
#include "internals.h"
 
18
 
 
19
static int intc_irq_xlate_debug(struct seq_file *m, void *priv)
 
20
{
 
21
        int i;
 
22
 
 
23
        seq_printf(m, "%-5s  %-7s  %-15s\n", "irq", "enum", "chip name");
 
24
 
 
25
        for (i = 1; i < nr_irqs; i++) {
 
26
                struct intc_map_entry *entry = intc_irq_xlate_get(i);
 
27
                struct intc_desc_int *desc = entry->desc;
 
28
 
 
29
                if (!desc)
 
30
                        continue;
 
31
 
 
32
                seq_printf(m, "%5d  ", i);
 
33
                seq_printf(m, "0x%05x  ", entry->enum_id);
 
34
                seq_printf(m, "%-15s\n", desc->chip.name);
 
35
        }
 
36
 
 
37
        return 0;
 
38
}
 
39
 
 
40
static int intc_irq_xlate_open(struct inode *inode, struct file *file)
 
41
{
 
42
        return single_open(file, intc_irq_xlate_debug, inode->i_private);
 
43
}
 
44
 
 
45
static const struct file_operations intc_irq_xlate_fops = {
 
46
        .open = intc_irq_xlate_open,
 
47
        .read = seq_read,
 
48
        .llseek = seq_lseek,
 
49
        .release = single_release,
 
50
};
 
51
 
 
52
static int __init intc_irq_xlate_init(void)
 
53
{
 
54
        /*
 
55
         * XXX.. use arch_debugfs_dir here when all of the intc users are
 
56
         * converted.
 
57
         */
 
58
        if (debugfs_create_file("intc_irq_xlate", S_IRUGO, NULL, NULL,
 
59
                                &intc_irq_xlate_fops) == NULL)
 
60
                return -ENOMEM;
 
61
 
 
62
        return 0;
 
63
}
 
64
fs_initcall(intc_irq_xlate_init);