Thanks to Andrey Panin <pazke@orbita1.ru> for pointing these out to me.
return rc;
}
-static int get_max_slots (void)
+static int __init get_max_slots (void)
{
struct list_head * tmp;
int slot_count = 0;
* 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;
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/list.h>
+#include <linux/init.h>
#include "ibmphp.h"
/*
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;
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;
return resource;
}
-static void print_bus_info (void)
+static void __init print_bus_info (void)
{
struct bus_info *ptr;
struct list_head *ptr1;
}
}
-static void print_ebda_hpc (void)
+static void __init print_ebda_hpc (void)
{
struct controller *hpc_ptr;
struct list_head *ptr1;
}
}
-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;
* 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;
* 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;
/*
* 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;
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/smp_lock.h>
+#include <linux/init.h>
#include "ibmphp.h"
static int to_debug = FALSE;
*
* Action: initialize semaphores and variables
*---------------------------------------------------------------------*/
-void ibmphp_hpc_initvars (void)
+void __init ibmphp_hpc_initvars (void)
{
debug ("%s - Entry\n", __FUNCTION__);
*
* 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;
}
*
* 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 ();
ibmphp_unlock_operations ();
up (&sem_exit);
- debug ("ibmphp_hpc_stop_poll_thread - Exit\n");
+ debug ("%s - Exit\n", __FUNCTION__);
}
/*----------------------------------------------------------------------
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/list.h>
+#include <linux/init.h>
#include "ibmphp.h"
static int flags = 0; /* for testing */
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;
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) {
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;
* 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;
* 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;
* 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;
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++) {