# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.467 -> 1.468 # drivers/hotplug/ibmphp_ebda.c 1.2 -> 1.3 # drivers/hotplug/ibmphp_hpc.c 1.3 -> 1.4 # drivers/hotplug/ibmphp_res.c 1.1 -> 1.2 # drivers/hotplug/ibmphp_core.c 1.6 -> 1.7 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/06/07 greg@kroah.com 1.468 # IBM PCI Hotplug driver: added __init and __exit to functions that needed it. # # Thanks to Andrey Panin for pointing these out to me. # -------------------------------------------- # diff -Nru a/drivers/hotplug/ibmphp_core.c b/drivers/hotplug/ibmphp_core.c --- a/drivers/hotplug/ibmphp_core.c Fri Jun 7 13:35:34 2002 +++ b/drivers/hotplug/ibmphp_core.c Fri Jun 7 13:35:34 2002 @@ -106,7 +106,7 @@ return rc; } -static int get_max_slots (void) +static int __init get_max_slots (void) { struct list_head * tmp; int slot_count = 0; @@ -528,7 +528,7 @@ * function. It will also power off empty slots that are powered on since BIOS * leaves those on, albeit disconnected ******************************************************************************/ -static int init_ops (void) +static int __init init_ops (void) { struct slot *slot_cur; int retval; diff -Nru a/drivers/hotplug/ibmphp_ebda.c b/drivers/hotplug/ibmphp_ebda.c --- a/drivers/hotplug/ibmphp_ebda.c Fri Jun 7 13:35:34 2002 +++ b/drivers/hotplug/ibmphp_ebda.c Fri Jun 7 13:35:34 2002 @@ -34,6 +34,7 @@ #include #include #include +#include #include "ibmphp.h" /* @@ -76,7 +77,7 @@ return slot; } -static struct ebda_hpc_list *alloc_ebda_hpc_list (void) +static struct ebda_hpc_list * __init alloc_ebda_hpc_list (void) { struct ebda_hpc_list *list; @@ -127,7 +128,7 @@ kfree (controller); } -static struct ebda_rsrc_list *alloc_ebda_rsrc_list (void) +static struct ebda_rsrc_list * __init alloc_ebda_rsrc_list (void) { struct ebda_rsrc_list *list; @@ -149,7 +150,7 @@ return resource; } -static void print_bus_info (void) +static void __init print_bus_info (void) { struct bus_info *ptr; struct list_head *ptr1; @@ -184,7 +185,7 @@ } } -static void print_ebda_hpc (void) +static void __init print_ebda_hpc (void) { struct controller *hpc_ptr; struct list_head *ptr1; @@ -228,7 +229,7 @@ } } -int ibmphp_access_ebda (void) +int __init ibmphp_access_ebda (void) { u8 format, num_ctlrs, rio_complete, hs_complete; u16 ebda_seg, num_entries, next_offset, offset, blk_id, sub_addr, rc, re, rc_id, re_id, base; @@ -387,7 +388,7 @@ * each hpc from physical address to a list of hot plug controllers based on * hpc descriptors. */ -static int ebda_rsrc_controller (void) +static int __init ebda_rsrc_controller (void) { u16 addr, addr_slot, addr_bus; u8 ctlr_id, temp, bus_index; @@ -649,7 +650,7 @@ * map info (bus, devfun, start addr, end addr..) of i/o, memory, * pfm from the physical addr to a list of resource. */ -static int ebda_rsrc_rsrc (void) +static int __init ebda_rsrc_rsrc (void) { u16 addr; short rsrc; @@ -717,7 +718,7 @@ /* * map info of scalability details and rio details from physical address */ -static int ebda_rio_table(void) +static int __init ebda_rio_table(void) { u16 offset; u8 i; diff -Nru a/drivers/hotplug/ibmphp_hpc.c b/drivers/hotplug/ibmphp_hpc.c --- a/drivers/hotplug/ibmphp_hpc.c Fri Jun 7 13:35:34 2002 +++ b/drivers/hotplug/ibmphp_hpc.c Fri Jun 7 13:35:34 2002 @@ -32,6 +32,7 @@ #include #include #include +#include #include "ibmphp.h" static int to_debug = FALSE; @@ -126,7 +127,7 @@ * * Action: initialize semaphores and variables *---------------------------------------------------------------------*/ -void ibmphp_hpc_initvars (void) +void __init ibmphp_hpc_initvars (void) { debug ("%s - Entry\n", __FUNCTION__); @@ -1044,19 +1045,19 @@ * * Action: start polling thread *---------------------------------------------------------------------*/ -int ibmphp_hpc_start_poll_thread (void) +int __init ibmphp_hpc_start_poll_thread (void) { int rc = 0; - debug ("ibmphp_hpc_start_poll_thread - Entry\n"); + debug ("%s - Entry\n", __FUNCTION__); tid_poll = kernel_thread (hpc_poll_thread, 0, 0); if (tid_poll < 0) { - err ("ibmphp_hpc_start_poll_thread - Error, thread not started\n"); + err ("%s - Error, thread not started\n", __FUNCTION__); rc = -1; } - debug ("ibmphp_hpc_start_poll_thread - Exit tid_poll[%d] rc[%d]\n", tid_poll, rc); + debug ("%s - Exit tid_poll[%d] rc[%d]\n", __FUNCTION__, tid_poll, rc); return rc; } @@ -1065,9 +1066,9 @@ * * Action: stop polling thread and cleanup *---------------------------------------------------------------------*/ -void ibmphp_hpc_stop_poll_thread (void) +void __exit ibmphp_hpc_stop_poll_thread (void) { - debug ("ibmphp_hpc_stop_poll_thread - Entry\n"); + debug ("%s - Entry\n", __FUNCTION__); ibmphp_shutdown = TRUE; ibmphp_lock_operations (); @@ -1080,7 +1081,7 @@ ibmphp_unlock_operations (); up (&sem_exit); - debug ("ibmphp_hpc_stop_poll_thread - Exit\n"); + debug ("%s - Exit\n", __FUNCTION__); } /*---------------------------------------------------------------------- diff -Nru a/drivers/hotplug/ibmphp_res.c b/drivers/hotplug/ibmphp_res.c --- a/drivers/hotplug/ibmphp_res.c Fri Jun 7 13:35:34 2002 +++ b/drivers/hotplug/ibmphp_res.c Fri Jun 7 13:35:34 2002 @@ -31,6 +31,7 @@ #include #include #include +#include #include "ibmphp.h" static int flags = 0; /* for testing */ @@ -45,7 +46,7 @@ static LIST_HEAD(gbuses); -static struct bus_node * alloc_error_bus (struct ebda_pci_rsrc * curr) +static struct bus_node * __init alloc_error_bus (struct ebda_pci_rsrc * curr) { struct bus_node * newbus; @@ -61,7 +62,7 @@ return newbus; } -static struct resource_node * alloc_resources (struct ebda_pci_rsrc * curr) +static struct resource_node * __init alloc_resources (struct ebda_pci_rsrc * curr) { struct resource_node *rs = kmalloc (sizeof (struct resource_node), GFP_KERNEL); if (!rs) { @@ -77,7 +78,7 @@ return rs; } -static int alloc_bus_range (struct bus_node **new_bus, struct range_node **new_range, struct ebda_pci_rsrc *curr, int flag, u8 first_bus) +static int __init alloc_bus_range (struct bus_node **new_bus, struct range_node **new_range, struct ebda_pci_rsrc *curr, int flag, u8 first_bus) { struct bus_node * newbus; struct range_node *newrange; @@ -184,7 +185,7 @@ * Input: ptr to the head of the resource list from EBDA * Output: 0, -1 or error codes ***************************************************************************/ -int ibmphp_rsrc_init (void) +int __init ibmphp_rsrc_init (void) { struct ebda_pci_rsrc *curr; struct range_node *newrange = NULL; @@ -1650,7 +1651,7 @@ * a new Mem node * This routine is called right after initialization *******************************************************************************/ -static int once_over (void) +static int __init once_over (void) { struct resource_node *pfmem_cur; struct resource_node *pfmem_prev; @@ -1871,7 +1872,7 @@ * behind them All these are TO DO. * Also need to add more error checkings... (from fnc returns etc) */ -static int update_bridge_ranges (struct bus_node **bus) +static int __init update_bridge_ranges (struct bus_node **bus) { u8 sec_busno, device, function, busno, hdr_type, start_io_address, end_io_address; u16 vendor_id, upper_io_start, upper_io_end, start_mem_address, end_mem_address; @@ -1885,7 +1886,7 @@ bus_cur = *bus; busno = bus_cur->busno; - debug ("inside update_bridge_ranges \n"); + debug ("inside %s \n", __FUNCTION__); debug ("bus_cur->busno = %x\n", bus_cur->busno); for (device = 0; device < 32; device++) {