Date: Mon, 26 Oct 2015 13:28:34 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290003 - head/sys/ofed/include/linux Message-ID: <201510261328.t9QDSYRT076892@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Mon Oct 26 13:28:34 2015 New Revision: 290003 URL: https://svnweb.freebsd.org/changeset/base/290003 Log: Add support for binding IRQs to CPUs in the LinuxKPI. The new function added is for BSD only and does not exist in Linux. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/interrupt.h Modified: head/sys/ofed/include/linux/interrupt.h ============================================================================== --- head/sys/ofed/include/linux/interrupt.h Mon Oct 26 12:16:50 2015 (r290002) +++ head/sys/ofed/include/linux/interrupt.h Mon Oct 26 13:28:34 2015 (r290003) @@ -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_handle 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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510261328.t9QDSYRT076892>