Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Dec 2015 10:04:58 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r292193 - stable/9/sys/ofed/include/linux
Message-ID:  <201512141004.tBEA4wd2027099@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Mon Dec 14 10:04:57 2015
New Revision: 292193
URL: https://svnweb.freebsd.org/changeset/base/292193

Log:
  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

Modified:
  stable/9/sys/ofed/include/linux/interrupt.h
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/ofed/include/linux/interrupt.h
==============================================================================
--- stable/9/sys/ofed/include/linux/interrupt.h	Mon Dec 14 10:03:04 2015	(r292192)
+++ stable/9/sys/ofed/include/linux/interrupt.h	Mon Dec 14 10:04:57 2015	(r292193)
@@ -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_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?201512141004.tBEA4wd2027099>