diff options
author | hselasky <hselasky@FreeBSD.org> | 2015-12-14 10:03:04 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2015-12-14 10:03:04 +0000 |
commit | 8ce1142102976470fa3fd5afdbb1d0ce063d67bf (patch) | |
tree | 0da87c3b58ac9d0e9455e4502d34b04ba6eb1ddd /sys/ofed | |
parent | aeff8c3c42fb91445bd92a7144f7e749999e8d58 (diff) | |
download | FreeBSD-src-8ce1142102976470fa3fd5afdbb1d0ce063d67bf.zip FreeBSD-src-8ce1142102976470fa3fd5afdbb1d0ce063d67bf.tar.gz |
MFC r290003:
Add support for binding IRQs to CPUs in the LinuxKPI. The new function
added is for BSD only and does not exist in Linux.
Sponsored by: Mellanox Technologies
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 d97d6a9..4c4b008 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 @@ -117,6 +117,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) { |