cregit-Linux how code gets into the kernel

Release 4.14 arch/x86/include/asm/irq_remapping.h

/*
 * Copyright (C) 2012 Advanced Micro Devices, Inc.
 * Author: Joerg Roedel <joerg.roedel@amd.com>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published
 * by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 *
 * This header file contains the interface of the interrupt remapping code to
 * the x86 interrupt management code.
 */

#ifndef __X86_IRQ_REMAPPING_H

#define __X86_IRQ_REMAPPING_H

#include <asm/irqdomain.h>
#include <asm/hw_irq.h>
#include <asm/io_apic.h>

struct msi_msg;
struct irq_alloc_info;


enum irq_remap_cap {
	
IRQ_POSTING_CAP = 0,
};


struct vcpu_data {
	
u64 pi_desc_addr;	/* Physical address of PI Descriptor */
	
u32 vector;		/* Guest vector of the interrupt */
};

#ifdef CONFIG_IRQ_REMAP

extern bool irq_remapping_cap(enum irq_remap_cap cap);
extern void set_irq_remapping_broken(void);
extern int irq_remapping_prepare(void);
extern int irq_remapping_enable(void);
extern void irq_remapping_disable(void);
extern int irq_remapping_reenable(int);
extern int irq_remap_enable_fault_handling(void);
extern void panic_if_irq_remap(const char *msg);

extern struct irq_domain *
irq_remapping_get_ir_irq_domain(struct irq_alloc_info *info);
extern struct irq_domain *
irq_remapping_get_irq_domain(struct irq_alloc_info *info);

/* Create PCI MSI/MSIx irqdomain, use @parent as the parent irqdomain. */
extern struct irq_domain *
arch_create_remap_msi_irq_domain(struct irq_domain *par, const char *n, int id);

/* Get parent irqdomain for interrupt remapping irqdomain */

static inline struct irq_domain *arch_get_ir_parent_domain(void) { return x86_vector_domain; }

Contributors

PersonTokensPropCommitsCommitProp
Jiang Liu14100.00%1100.00%
Total14100.00%1100.00%

#else /* CONFIG_IRQ_REMAP */
static inline bool irq_remapping_cap(enum irq_remap_cap cap) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
Feng Wu14100.00%1100.00%
Total14100.00%1100.00%


static inline void set_irq_remapping_broken(void) { }

Contributors

PersonTokensPropCommitsCommitProp
Neil Horman8100.00%1100.00%
Total8100.00%1100.00%


static inline int irq_remapping_prepare(void) { return -ENODEV; }

Contributors

PersonTokensPropCommitsCommitProp
Joerg Roedel1292.31%150.00%
Suresh B. Siddha17.69%150.00%
Total13100.00%2100.00%


static inline int irq_remapping_enable(void) { return -ENODEV; }

Contributors

PersonTokensPropCommitsCommitProp
Joerg Roedel1292.31%150.00%
Suresh B. Siddha17.69%150.00%
Total13100.00%2100.00%


static inline void irq_remapping_disable(void) { }

Contributors

PersonTokensPropCommitsCommitProp
Joerg Roedel787.50%150.00%
Suresh B. Siddha112.50%150.00%
Total8100.00%2100.00%


static inline int irq_remapping_reenable(int eim) { return -ENODEV; }

Contributors

PersonTokensPropCommitsCommitProp
Joerg Roedel1392.86%150.00%
Suresh B. Siddha17.14%150.00%
Total14100.00%2100.00%


static inline int irq_remap_enable_fault_handling(void) { return -ENODEV; }

Contributors

PersonTokensPropCommitsCommitProp
Joerg Roedel1292.31%150.00%
Suresh B. Siddha17.69%150.00%
Total13100.00%2100.00%


static inline void panic_if_irq_remap(const char *msg) { }

Contributors

PersonTokensPropCommitsCommitProp
Joerg Roedel11100.00%1100.00%
Total11100.00%1100.00%


static inline struct irq_domain * irq_remapping_get_ir_irq_domain(struct irq_alloc_info *info) { return NULL; }

Contributors

PersonTokensPropCommitsCommitProp
Jiang Liu17100.00%1100.00%
Total17100.00%1100.00%


static inline struct irq_domain * irq_remapping_get_irq_domain(struct irq_alloc_info *info) { return NULL; }

Contributors

PersonTokensPropCommitsCommitProp
Jiang Liu17100.00%1100.00%
Total17100.00%1100.00%

#endif /* CONFIG_IRQ_REMAP */ #endif /* __X86_IRQ_REMAPPING_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
Joerg Roedel12842.11%738.89%
Jiang Liu8527.96%316.67%
Feng Wu3110.20%211.11%
Thomas Gleixner165.26%15.56%
Suresh B. Siddha165.26%316.67%
Neil Horman154.93%15.56%
Paolo Bonzini134.28%15.56%
Total304100.00%18100.00%
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
Created with cregit.