Skip to contentSkip to conversation

: SGI Altix Hotplug Driver

PATCH/RFC Prarit Bhargava 2 participants 3 messages Mar 15, 2005 – Mar 16, 2005 PCI

lore
Share & tools
lore
#0 lore raw

Colleages,

Attached are the code and changes to the existing codeset for a functional SGI Altix Hotplug Driver.

The code has been tested on several different Altix machines and is (obviously) ready for review.

Thanks,

P.

# This is a BitKeeper generated diff -Nru style patch. #
# ChangeSet
# 2005/03/15 20:04:09-05:00 [email protected]
# Many files:
# SGI PCI Hotplug Driver changes
# sn_pci_hotplug_glue.c, sn_pci_hotplug_core.c, sn_pci_hotplug.h:
# new file
#

# drivers/pci/hotplug/sn_pci_hotplug_glue.c
#   2005/03/15 20:01:59-05:00 [email protected] +418 -0
#   SGI PCI Hotplug Driver changes
# 
# drivers/pci/hotplug/sn_pci_hotplug_glue.c
#   2005/03/15 20:01:59-05:00 [email protected] +0 -0
#   BitKeeper file /home/linux-2.5-hotplug/drivers/pci/hotplug/sn_pci_hotplug_glue.c
# 
# drivers/pci/hotplug/sn_pci_hotplug_core.c
#   2005/03/15 20:01:54-05:00 [email protected] +335 -0
#   SGI PCI Hotplug Driver changes
# 
# drivers/pci/hotplug/sn_pci_hotplug_core.c
#   2005/03/15 20:01:54-05:00 [email protected] +0 -0
#   BitKeeper file /home/linux-2.5-hotplug/drivers/pci/hotplug/sn_pci_hotplug_core.c
# 
# drivers/pci/hotplug/sn_pci_hotplug.h
#   2005/03/15 20:01:02-05:00 [email protected] +46 -0
# 
# drivers/pci/hotplug/sn_pci_hotplug.h
#   2005/03/15 20:01:02-05:00 [email protected] +0 -0
#   BitKeeper file /home/linux-2.5-hotplug/drivers/pci/hotplug/sn_pci_hotplug.h
# 
# drivers/pci/hotplug/Makefile
#   2005/03/15 20:00:30-05:00 [email protected] +9 -0
#   SGI PCI Hotplug Driver changes
# 
# drivers/pci/hotplug/Kconfig
#   2005/03/15 20:00:11-05:00 [email protected] +1 -1
#   SGI PCI Hotplug Driver changes
# 
# arch/ia64/sn/pci/pcibr/pcibr_provider.c
#   2005/03/15 19:59:29-05:00 [email protected] +37 -0
#   SGI PCI Hotplug Driver changes
# 
# arch/ia64/sn/include/pci/pcibr_provider.h
#   2005/03/15 19:58:07-05:00 [email protected] +2 -0
#   SGI PCI Hotplug Driver changes
# 
# arch/ia64/kernel/iosapic.c
#   2005/03/15 19:56:44-05:00 [email protected] +1 -1
#   SGI PCI Hotplug Driver changes
# 
diff -Nru a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
--- a/arch/ia64/kernel/iosapic.c	2005-03-15 20:09:33 -05:00
+++ b/arch/ia64/kernel/iosapic.c	2005-03-15 20:09:33 -05:00
@@ -83,8 +83,8 @@
 #include <asm/delay.h>
 #include <asm/hw_irq.h>
 #include <asm/io.h>
-#include <asm/iosapic.h>
 #include <asm/machvec.h>
+#include <asm/iosapic.h>
 #include <asm/processor.h>
 #include <asm/ptrace.h>
 #include <asm/system.h>
diff -Nru a/arch/ia64/sn/include/pci/pcibr_provider.h b/arch/ia64/sn/include/pci/pcibr_provider.h
--- a/arch/ia64/sn/include/pci/pcibr_provider.h	2005-03-15 20:09:33 -05:00
+++ b/arch/ia64/sn/include/pci/pcibr_provider.h	2005-03-15 20:09:33 -05:00
@@ -146,4 +146,6 @@
 extern int 		pcibr_ate_alloc(struct pcibus_info *, int);
 extern void 		pcibr_ate_free(struct pcibus_info *, int);
 extern void 		ate_write(struct pcibus_info *, int, int, uint64_t);
+extern int		sal_pcibr_slot_enable(struct pcibus_info *, int, void *);
+extern int		sal_pcibr_slot_disable(struct pcibus_info *, int, int, void *);
 #endif
diff -Nru a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c	2005-03-15 20:09:33 -05:00
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c	2005-03-15 20:09:33 -05:00
@@ -19,6 +19,40 @@
 #include <asm/sn/addrs.h>

+int
+sal_pcibr_slot_enable(struct pcibus_info *soft, int device, void *resp)
+ {
+ struct ia64_sal_retval ret_stuff;
+ uint64_t busnum;
+ ret_stuff.status = 0;
+ ret_stuff.v0 = 0;
+
+ busnum = ((struct pcibus_info *)soft)->pbi_buscommon.bs_persist_busnum;
+ SAL_CALL_NOLOCK(ret_stuff,
+ (u64) SN_SAL_IOIF_SLOT_ENABLE,
+ (u64) busnum, (u64) device, (u64) resp, 0, 0, 0, 0);
+
+ return (int)ret_stuff.v0;
+}
+
+
+int
+sal_pcibr_slot_disable(struct pcibus_info *soft, int device, int action, void *resp)
+ {
+ struct ia64_sal_retval ret_stuff;
+ uint64_t busnum;
+ ret_stuff.status = 0;
+ ret_stuff.v0 = 0;
+
+ busnum = ((struct pcibus_info *)soft)->pbi_buscommon.bs_persist_busnum;
+ SAL_CALL_NOLOCK(ret_stuff,
+ (u64) SN_SAL_IOIF_SLOT_DISABLE,
+ (u64) busnum, (u64) device, (u64) action, (u64) resp, 0, 0, 0);
+
+ return (int)ret_stuff.v0;
+}
+
+
static int sal_pcibr_error_interrupt(struct pcibus_info *soft)
{
struct ia64_sal_retval ret_stuff;
@@ -168,3 +202,6 @@
pcibr_force_interrupt(sn_irq_info);
}
}
+
+EXPORT_SYMBOL(sal_pcibr_slot_enable); +EXPORT_SYMBOL(sal_pcibr_slot_disable);

drivers/pci/hotplug/Kconfig +1 -1
diff -Nru a/drivers/pci/hotplug/Kconfig b/drivers/pci/hotplug/Kconfig
@@ -187,7 +187,7 @@
 
 config HOTPLUG_PCI_SGI
 	tristate "SGI PCI Hotplug Support"
-	depends on HOTPLUG_PCI && IA64_SGI_SN2
+	depends on HOTPLUG_PCI && IA64_GENERIC
 	help
 	  Say Y here if you have an SGI IA64 Altix system.
 
drivers/pci/hotplug/Makefile +9 -0
diff -Nru a/drivers/pci/hotplug/Makefile b/drivers/pci/hotplug/Makefile
@@ -2,6 +2,8 @@
 # Makefile for the Linux kernel pci hotplug controller drivers.
 #
 
+CPPFLAGS		+=-Iarch/ia64/sn/include/
+
 obj-$(CONFIG_HOTPLUG_PCI)		+= pci_hotplug.o
 obj-$(CONFIG_HOTPLUG_PCI_FAKE)		+= fakephp.o 
 obj-$(CONFIG_HOTPLUG_PCI_COMPAQ)	+= cpqphp.o
@@ -14,6 +16,7 @@
 obj-$(CONFIG_HOTPLUG_PCI_SHPC)		+= shpchp.o
 obj-$(CONFIG_HOTPLUG_PCI_RPA)		+= rpaphp.o
 obj-$(CONFIG_HOTPLUG_PCI_RPA_DLPAR)	+= rpadlpar_io.o
+obj-$(CONFIG_HOTPLUG_PCI_SGI)		+= sgi_hotplug.o
 
 pci_hotplug-objs	:=	pci_hotplug_core.o
 
@@ -72,3 +75,9 @@
 		shpchp-objs += shpchprm_nonacpi.o
 	endif
 endif
+
+ifdef CONFIG_HOTPLUG_PCI_SGI
+sgi_hotplug-objs	:=	sn_pci_hotplug_core.o \
+				sn_pci_hotplug_glue.o
+endif
+
drivers/pci/hotplug/sn_pci_hotplug.h new file +46 -0

46 lines not on this page · raw message

drivers/pci/hotplug/sn_pci_hotplug_core.c new file +335 -0

335 lines not on this page · raw message

drivers/pci/hotplug/sn_pci_hotplug_glue.c new file +418 -0

418 lines not on this page · raw message

#1 lore raw
Quoted 11 lines · Prarit Bhargava

Colleages,

Attached are the code and changes to the existing codeset for a functional SGI Altix Hotplug Driver.

The code has been tested on several different Altix machines and is (obviously) ready for review.

Thanks,

P.

Should send to [email protected] (for PCI hotplug drivers).

Signature · 12 lines
~Randy


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#2 lore raw
In reply to Prarit Bhargava

Will do. I keep getting the lists mixed up :)

P.

Quoted 10 lines · Randy.Dunlap
Quoted 8 lines · Prarit Bhargava

Colleages,

Attached are the code and changes to the existing codeset for a functional SGI Altix Hotplug Driver.

The code has been tested on several different Altix machines and is (obviously) ready for review.

Quoted 8 lines
Quoted 3 lines

Thanks,

P.

Should send to [email protected] (for PCI hotplug drivers).

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel