Skip to content
Snippets Groups Projects
Select Git revision
  • fcd83a35dd93b89d3f48cfcd33c31b112cc96180
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

stat-display.c

Blame
  • chip.c 36.17 KiB
    // SPDX-License-Identifier: GPL-2.0
    /*
     * Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar
     * Copyright (C) 2005-2006, Thomas Gleixner, Russell King
     *
     * This file contains the core interrupt handling code, for irq-chip based
     * architectures. Detailed information is available in
     * Documentation/core-api/genericirq.rst
     */
    
    #include <linux/irq.h>
    #include <linux/msi.h>
    #include <linux/module.h>
    #include <linux/interrupt.h>
    #include <linux/kernel_stat.h>
    #include <linux/irqdomain.h>
    
    #include <trace/events/irq.h>
    
    #include "internals.h"
    
    static irqreturn_t bad_chained_irq(int irq, void *dev_id)
    {
    	WARN_ONCE(1, "Chained irq %d should not call an action\n", irq);
    	return IRQ_NONE;
    }
    
    /*
     * Chained handlers should never call action on their IRQ. This default
     * action will emit warning if such thing happens.
     */
    struct irqaction chained_action = {
    	.handler = bad_chained_irq,
    };
    
    /**
     *	irq_set_chip - set the irq chip for an irq
     *	@irq:	irq number
     *	@chip:	pointer to irq chip description structure
     */
    int irq_set_chip(unsigned int irq, struct irq_chip *chip)
    {
    	unsigned long flags;
    	struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0);
    
    	if (!desc)
    		return -EINVAL;
    
    	if (!chip)
    		chip = &no_irq_chip;
    
    	desc->irq_data.chip = chip;
    	irq_put_desc_unlock(desc, flags);
    	/*
    	 * For !CONFIG_SPARSE_IRQ make the irq show up in
    	 * allocated_irqs.
    	 */
    	irq_mark_irq(irq);
    	return 0;
    }
    EXPORT_SYMBOL(irq_set_chip);
    
    /**
     *	irq_set_type - set the irq trigger type for an irq
     *	@irq:	irq number
     *	@type:	IRQ_TYPE_{LEVEL,EDGE}_* value - see include/linux/irq.h
     */
    int irq_set_irq_type(unsigned int irq, unsigned int type)
    {
    	unsigned long flags;