Path: blob/master/drivers/infiniband/hw/ehca/ehca_irq.h
15112 views
/*1* IBM eServer eHCA Infiniband device driver for Linux on POWER2*3* Function definitions and structs for EQs, NEQs and interrupts4*5* Authors: Heiko J Schick <[email protected]>6* Khadija Souissi <[email protected]>7*8* Copyright (c) 2005 IBM Corporation9*10* All rights reserved.11*12* This source code is distributed under a dual license of GPL v2.0 and OpenIB13* BSD.14*15* OpenIB BSD License16*17* Redistribution and use in source and binary forms, with or without18* modification, are permitted provided that the following conditions are met:19*20* Redistributions of source code must retain the above copyright notice, this21* list of conditions and the following disclaimer.22*23* Redistributions in binary form must reproduce the above copyright notice,24* this list of conditions and the following disclaimer in the documentation25* and/or other materials26* provided with the distribution.27*28* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"29* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE30* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE31* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE32* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR33* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF34* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR35* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER36* IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)37* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE38* POSSIBILITY OF SUCH DAMAGE.39*/4041#ifndef __EHCA_IRQ_H42#define __EHCA_IRQ_H434445struct ehca_shca;4647#include <linux/interrupt.h>48#include <linux/types.h>4950int ehca_error_data(struct ehca_shca *shca, void *data, u64 resource);5152irqreturn_t ehca_interrupt_neq(int irq, void *dev_id);53void ehca_tasklet_neq(unsigned long data);5455irqreturn_t ehca_interrupt_eq(int irq, void *dev_id);56void ehca_tasklet_eq(unsigned long data);57void ehca_process_eq(struct ehca_shca *shca, int is_irq);5859struct ehca_cpu_comp_task {60wait_queue_head_t wait_queue;61struct list_head cq_list;62struct task_struct *task;63spinlock_t task_lock;64int cq_jobs;65};6667struct ehca_comp_pool {68struct ehca_cpu_comp_task *cpu_comp_tasks;69int last_cpu;70spinlock_t last_cpu_lock;71};7273int ehca_create_comp_pool(void);74void ehca_destroy_comp_pool(void);7576#endif777879