Commit 3938e9ef authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] sn: More code clean up = mostly pcibr_slot.c

From: Pat Gefre <pfg@sgi.com>

More code clean up = mostly pcibr_slot.c
parent cb141c23
This diff is collapsed.
......@@ -689,7 +689,6 @@ extern int config_find_nic_hub(nasid_t, nic_t, lboard_t **, klhub_t**);
extern int config_find_xbow(nasid_t, lboard_t **, klxbow_t**);
extern int update_klcfg_cpuinfo(nasid_t, int);
extern void board_to_path(lboard_t *brd, char *path);
extern moduleid_t get_module_id(nasid_t nasid);
extern void nic_name_convert(char *old_name, char *new_name);
extern int module_brds(nasid_t nasid, lboard_t **module_brds, int n);
extern lboard_t *brd_from_key(uint64_t key);
......
......@@ -24,7 +24,8 @@ extern __psunsigned_t get_master_bridge_base(void);
extern int check_nasid_equiv(nasid_t, nasid_t);
extern char get_console_pcislot(void);
extern int is_master_baseio_nasid_widget(nasid_t test_nasid, xwidgetnum_t test_wid);
extern int is_master_baseio_nasid_widget(nasid_t test_nasid,
xwidgetnum_t test_wid);
/* memsupport.c */
extern void poison_state_alter_range(__psunsigned_t start, int len, int poison);
......@@ -42,7 +43,7 @@ extern int is_POISONED_dir_state(paddr_t);
extern int is_UNOWNED_dir_state(paddr_t);
#ifdef LATER
extern void get_dir_ent(paddr_t paddr, int *state,
uint64_t *vec_ptr, hubreg_t *elo);
uint64_t * vec_ptr, hubreg_t * elo);
#endif
/* intr.c */
......@@ -56,10 +57,11 @@ extern void setrtvector(intr_func_t);
extern void install_cpuintr(cpuid_t cpu);
extern void install_dbgintr(cpuid_t cpu);
extern void install_tlbintr(cpuid_t cpu);
extern void hub_migrintr_init(cnodeid_t /*cnode*/);
extern int cause_intr_connect(int level, intr_func_t handler, uint intr_spl_mask);
extern void hub_migrintr_init(cnodeid_t /*cnode */ );
extern int cause_intr_connect(int level, intr_func_t handler,
unsigned int intr_spl_mask);
extern int cause_intr_disconnect(int level);
extern void intr_dumpvec(cnodeid_t cnode, void (*pf)(char *, ...));
extern void intr_dumpvec(cnodeid_t cnode, void (*pf) (char *, ...));
/* error_dump.c */
extern char *hub_rrb_err_type[];
......@@ -89,10 +91,10 @@ extern void setup_replication_mask(int maxnodes);
/* init.c */
extern cnodeid_t get_compact_nodeid(void); /* get compact node id */
extern void init_platform_nodepda(nodepda_t *npda, cnodeid_t node);
extern void init_platform_nodepda(nodepda_t * npda, cnodeid_t node);
extern int is_fine_dirmode(void);
extern void update_node_information(cnodeid_t);
/* shubio.c */
extern void hubio_init(void);
extern void hub_merge_clean(nasid_t nasid);
......@@ -100,14 +102,14 @@ extern void hub_set_piomode(nasid_t nasid, int conveyor);
/* shuberror.c */
extern void hub_error_init(cnodeid_t);
extern void dump_error_spool(cpuid_t cpu, void (*pf)(char *, ...));
extern void dump_error_spool(cpuid_t cpu, void (*pf) (char *, ...));
extern void hubni_error_handler(char *, int);
extern int check_ni_errors(void);
/* Used for debugger to signal upper software a breakpoint has taken place */
extern void *debugger_update;
extern __psunsigned_t debugger_stopped;
extern void *debugger_update;
extern __psunsigned_t debugger_stopped;
/*
* piomap, created by shub_pio_alloc.
......@@ -115,11 +117,11 @@ extern __psunsigned_t debugger_stopped;
* xtalk_piomap_s by generic xtalk routines.
*/
struct hub_piomap_s {
struct xtalk_piomap_s hpio_xtalk_info;/* standard crosstalk pio info */
vertex_hdl_t hpio_hub; /* which shub's mapping registers are set up */
short hpio_holdcnt; /* count of current users of bigwin mapping */
char hpio_bigwin_num;/* if big window map, which one */
int hpio_flags; /* defined below */
struct xtalk_piomap_s hpio_xtalk_info; /* standard crosstalk pio info */
vertex_hdl_t hpio_hub; /* which shub's mapping registers are set up */
short hpio_holdcnt; /* count of current users of bigwin mapping */
char hpio_bigwin_num; /* if big window map, which one */
int hpio_flags; /* defined below */
};
/* hub_piomap flags */
#define HUB_PIOMAP_IS_VALID 0x1
......@@ -136,9 +138,9 @@ struct hub_piomap_s {
* xtalk_dmamap_s by generic xtalk routines.
*/
struct hub_dmamap_s {
struct xtalk_dmamap_s hdma_xtalk_info;/* standard crosstalk dma info */
vertex_hdl_t hdma_hub; /* which shub we go through */
int hdma_flags; /* defined below */
struct xtalk_dmamap_s hdma_xtalk_info; /* standard crosstalk dma info */
vertex_hdl_t hdma_hub; /* which shub we go through */
int hdma_flags; /* defined below */
};
/* shub_dmamap flags */
#define HUB_DMAMAP_IS_VALID 0x1
......@@ -151,29 +153,29 @@ struct hub_dmamap_s {
* xtalk_intr_s by generic xtalk routines.
*/
struct hub_intr_s {
struct xtalk_intr_s i_xtalk_info; /* standard crosstalk intr info */
cpuid_t i_cpuid; /* which cpu */
int i_bit; /* which bit */
int i_flags;
struct xtalk_intr_s i_xtalk_info; /* standard crosstalk intr info */
cpuid_t i_cpuid; /* which cpu */
int i_bit; /* which bit */
int i_flags;
};
/* flag values */
#define HUB_INTR_IS_ALLOCED 0x1 /* for debug: allocated */
#define HUB_INTR_IS_CONNECTED 0x4 /* for debug: connected to a software driver */
typedef struct hubinfo_s {
nodepda_t *h_nodepda; /* pointer to node's private data area */
cnodeid_t h_cnodeid; /* compact nodeid */
nasid_t h_nasid; /* nasid */
nodepda_t *h_nodepda; /* pointer to node's private data area */
cnodeid_t h_cnodeid; /* compact nodeid */
nasid_t h_nasid; /* nasid */
/* structures for PIO management */
xwidgetnum_t h_widgetid; /* my widget # (as viewed from xbow) */
struct hub_piomap_s h_small_window_piomap[HUB_WIDGET_ID_MAX+1];
wait_queue_head_t h_bwwait; /* wait for big window to free */
spinlock_t h_bwlock; /* guard big window piomap's */
spinlock_t h_crblock; /* gaurd CRB error handling */
int h_num_big_window_fixed; /* count number of FIXED maps */
struct hub_piomap_s h_big_window_piomap[HUB_NUM_BIG_WINDOW];
hub_intr_t hub_ii_errintr;
xwidgetnum_t h_widgetid; /* my widget # (as viewed from xbow) */
struct hub_piomap_s h_small_window_piomap[HUB_WIDGET_ID_MAX + 1];
wait_queue_head_t h_bwwait; /* wait for big window to free */
spinlock_t h_bwlock; /* guard big window piomap's */
spinlock_t h_crblock; /* gaurd CRB error handling */
int h_num_big_window_fixed; /* count number of FIXED maps */
struct hub_piomap_s h_big_window_piomap[HUB_NUM_BIG_WINDOW];
hub_intr_t hub_ii_errintr;
} *hubinfo_t;
#define hubinfo_get(vhdl, infoptr) ((void)hwgraph_info_get_LBL \
......@@ -191,10 +193,10 @@ typedef struct hubinfo_s {
(&hinfo->h_big_window_piomap[win])
#define hubinfo_swin_piomap_get(hinfo, win) \
(&hinfo->h_small_window_piomap[win])
/* cpu-specific information stored under INFO_LBL_CPU_INFO */
typedef struct cpuinfo_s {
cpuid_t ci_cpuid; /* CPU ID */
cpuid_t ci_cpuid; /* CPU ID */
} *cpuinfo_t;
#define cpuinfo_get(vhdl, infoptr) ((void)hwgraph_info_get_LBL \
......@@ -230,15 +232,15 @@ extern void sysctlr_keepalive(void);
*/
#define paddr_dimm(_pa) ((_pa & MD_BANK_MASK) >> MD_BANK_SHFT)
#define paddr_cnode(_pa) (NASID_TO_COMPACT_NODEID(NASID_GET(_pa)))
extern void membank_pathname_get(paddr_t,char *);
extern void membank_pathname_get(paddr_t, char *);
/* To redirect the output into the error buffer */
#define errbuf_print(_s) printf("#%s",_s)
extern void crbx(nasid_t nasid, void (*pf)(char *, ...));
extern void crbx(nasid_t nasid, void (*pf) (char *, ...));
void bootstrap(void);
/* sndrv.c */
extern int sndrv_attach(vertex_hdl_t vertex);
#endif /* _ASM_IA64_SN_SN2_SN_PRIVATE_H */
#endif /* _ASM_IA64_SN_SN2_SN_PRIVATE_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment