diff options
| author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2015-10-26 13:28:34 +0000 |
|---|---|---|
| committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2015-10-26 13:28:34 +0000 |
| commit | aac7caaf471f53e50a93e0547fe46acef0779a16 (patch) | |
| tree | 146e88b948c0b3b421a96cbc05c053eec7fed79c /sys/ofed | |
| parent | 70d7ec6737e8d84408a61b7e696461fc9df9b0d4 (diff) | |
Notes
Diffstat (limited to 'sys/ofed')
| -rw-r--r-- | sys/ofed/include/linux/interrupt.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/ofed/include/linux/interrupt.h b/sys/ofed/include/linux/interrupt.h index 26ad59205b82..4c0ad8087582 100644 --- a/sys/ofed/include/linux/interrupt.h +++ b/sys/ofed/include/linux/interrupt.h @@ -2,7 +2,7 @@ * Copyright (c) 2010 Isilon Systems, Inc. * Copyright (c) 2010 iX Systems, Inc. * Copyright (c) 2010 Panasas, Inc. - * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd. + * Copyright (c) 2013-2015 Mellanox Technologies, Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -118,6 +118,23 @@ request_irq(unsigned int irq, irq_handler_t handler, unsigned long flags, return 0; } +static inline int +bind_irq_to_cpu(unsigned int irq, int cpu_id) +{ + struct irq_ent *irqe; + struct device *dev; + + dev = _pci_find_irq_dev(irq); + if (dev == NULL) + return (-ENOENT); + + irqe = _irq_ent(dev, irq); + if (irqe == NULL) + return (-ENOENT); + + return (-bus_bind_intr(dev->bsddev, irqe->res, cpu_id)); +} + static inline void free_irq(unsigned int irq, void *device) { |
