+ rapidio-add-modular-build-option-for-the-subsystem-core.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: + rapidio-add-modular-build-option-for-the-subsystem-core.patch added to -mm tree
To: alexandre.bounine@xxxxxxx,andre.van.herk@xxxxxxxxxxx,galak@xxxxxxxxxxxxxxxxxxx,jdelvare@xxxxxxx,leoli@xxxxxxxxxxxxx,micha.nelissen@xxxxxxxxxxx,mporter@xxxxxxxxxxxxxxxxxxx,stef.van.os@xxxxxxxxxxx
From: akpm@xxxxxxxxxxxxxxxxxxxx
Date: Fri, 28 Jun 2013 14:19:40 -0700


The patch titled
     Subject: rapidio: add modular build option for the subsystem core
has been added to the -mm tree.  Its filename is
     rapidio-add-modular-build-option-for-the-subsystem-core.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Alexandre Bounine <alexandre.bounine@xxxxxxx>
Subject: rapidio: add modular build option for the subsystem core

Add a configuration option to build RapidIO subsystem core code as a
loadable kernel module.  Currently this option is available only for
x86-based platforms, with the additional patch for PowerPC planned to be
provided later.

This patch replaces kernel command line parameter "riohdid=" with its
module-specific analog "rapidio.hdid=".

Signed-off-by: Alexandre Bounine <alexandre.bounine@xxxxxxx>
Cc: Matt Porter <mporter@xxxxxxxxxxxxxxxxxxx>
Cc: Li Yang <leoli@xxxxxxxxxxxxx>
Cc: Kumar Gala <galak@xxxxxxxxxxxxxxxxxxx>
Cc: Andre van Herk <andre.van.herk@xxxxxxxxxxx>
Cc: Micha Nelissen <micha.nelissen@xxxxxxxxxxx>
Cc: Stef van Os <stef.van.os@xxxxxxxxxxx>
Cc: Jean Delvare <jdelvare@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/x86/Kconfig         |    4 ++--
 drivers/rapidio/Makefile |    4 +++-
 drivers/rapidio/rio.c    |   27 ++++++++++++++-------------
 3 files changed, 19 insertions(+), 16 deletions(-)

diff -puN arch/x86/Kconfig~rapidio-add-modular-build-option-for-the-subsystem-core arch/x86/Kconfig
--- a/arch/x86/Kconfig~rapidio-add-modular-build-option-for-the-subsystem-core
+++ a/arch/x86/Kconfig
@@ -2259,11 +2259,11 @@ source "drivers/pcmcia/Kconfig"
 source "drivers/pci/hotplug/Kconfig"
 
 config RAPIDIO
-	bool "RapidIO support"
+	tristate "RapidIO support"
 	depends on PCI
 	default n
 	help
-	  If you say Y here, the kernel will include drivers and
+	  If enabled this option will include drivers and the core
 	  infrastructure code to support RapidIO interconnect devices.
 
 source "drivers/rapidio/Kconfig"
diff -puN drivers/rapidio/Makefile~rapidio-add-modular-build-option-for-the-subsystem-core drivers/rapidio/Makefile
--- a/drivers/rapidio/Makefile~rapidio-add-modular-build-option-for-the-subsystem-core
+++ a/drivers/rapidio/Makefile
@@ -1,7 +1,9 @@
 #
 # Makefile for RapidIO interconnect services
 #
-obj-y += rio.o rio-access.o rio-driver.o rio-sysfs.o
+obj-$(CONFIG_RAPIDIO) += rapidio.o
+rapidio-y := rio.o rio-access.o rio-driver.o rio-sysfs.o
+
 obj-$(CONFIG_RAPIDIO_ENUM_BASIC) += rio-scan.o
 
 obj-$(CONFIG_RAPIDIO)		+= switches/
diff -puN drivers/rapidio/rio.c~rapidio-add-modular-build-option-for-the-subsystem-core drivers/rapidio/rio.c
--- a/drivers/rapidio/rio.c~rapidio-add-modular-build-option-for-the-subsystem-core
+++ a/drivers/rapidio/rio.c
@@ -5,7 +5,7 @@
  * Copyright 2005 MontaVista Software, Inc.
  * Matt Porter <mporter@xxxxxxxxxxxxxxxxxxx>
  *
- * Copyright 2009 Integrated Device Technology, Inc.
+ * Copyright 2009 - 2013 Integrated Device Technology, Inc.
  * Alex Bounine <alexandre.bounine@xxxxxxx>
  *
  * This program is free software; you can redistribute  it and/or modify it
@@ -30,6 +30,17 @@
 
 #include "rio.h"
 
+MODULE_DESCRIPTION("RapidIO Subsystem Core");
+MODULE_AUTHOR("Matt Porter <mporter@xxxxxxxxxxxxxxxxxxx>");
+MODULE_AUTHOR("Alexandre Bounine <alexandre.bounine@xxxxxxx>");
+MODULE_LICENSE("GPL");
+
+static int hdid[RIO_MAX_MPORTS];
+static int ids_num;
+module_param_array(hdid, int, &ids_num, 0);
+MODULE_PARM_DESC(hdid,
+	"Destination ID assignment to local RapidIO controllers");
+
 static LIST_HEAD(rio_devices);
 static DEFINE_SPINLOCK(rio_global_list_lock);
 
@@ -1860,24 +1871,14 @@ no_disc:
 	return 0;
 }
 
-static int hdids[RIO_MAX_MPORTS + 1];
-
 static int rio_get_hdid(int index)
 {
-	if (!hdids[0] || hdids[0] <= index || index >= RIO_MAX_MPORTS)
+	if (ids_num == 0 || ids_num <= index || index >= RIO_MAX_MPORTS)
 		return -1;
 
-	return hdids[index + 1];
-}
-
-static int rio_hdid_setup(char *str)
-{
-	(void)get_options(str, ARRAY_SIZE(hdids), hdids);
-	return 1;
+	return hdid[index];
 }
 
-__setup("riohdid=", rio_hdid_setup);
-
 int rio_register_mport(struct rio_mport *port)
 {
 	struct rio_scan_node *scan = NULL;
_

Patches currently in -mm which might be from alexandre.bounine@xxxxxxx are

linux-next.patch
rapidio-switches-remove-tsi500-driver.patch
rapidio-convert-switch-drivers-to-modules.patch
rapidio-rionet-rework-driver-initialization-and-removal.patch
rapidio-update-enumerator-registration-mechanism.patch
rapidio-tsi721-convert-to-modular-mport-driver.patch
rapidio-add-modular-build-option-for-the-subsystem-core.patch
rapidio-add-udev-notification.patch
rapidio-documentation-update.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux