Commit b41a3eec authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] sn: One less panic

From: Pat Gefre <pfg@sgi.com>

One less panic
parent 5aa27b7b
...@@ -587,11 +587,14 @@ io_init_node(cnodeid_t cnodeid) ...@@ -587,11 +587,14 @@ io_init_node(cnodeid_t cnodeid)
npdap->basew_id = 0; npdap->basew_id = 0;
} else { } else {
npdap->basew_id = (((*(volatile int32_t *)(NODE_SWIN_BASE(COMPACT_TO_NASID_NODEID(cnodeid), 0) + BRIDGE_WID_CONTROL))) & WIDGET_WIDGET_ID); void *bridge;
extern uint64_t pcireg_control_get(void *);
panic(" ****io_init_node: Unknown Widget Part Number 0x%x Widget ID 0x%x attached to Hubv 0x%p ****\n", widget_partnum, npdap->basew_id, (void *)hubv); bridge = (void *)NODE_SWIN_BASE(COMPACT_TO_NASID_NODEID(cnodeid), 0);
npdap->basew_id = pcireg_control_get(bridge) & WIDGET_WIDGET_ID;
/*NOTREACHED*/ printk(" ****io_init_node: Unknown Widget Part Number 0x%x Widget ID 0x%x attached to Hubv 0x%p ****\n", widget_partnum, npdap->basew_id, (void *)hubv);
return;
} }
{ {
char widname[10]; char widname[10];
......
...@@ -17,6 +17,25 @@ ...@@ -17,6 +17,25 @@
#define IS_IOADDR(ptr) (!(((uint64_t)(ptr) & CAC_BASE) == CAC_BASE)) #define IS_IOADDR(ptr) (!(((uint64_t)(ptr) & CAC_BASE) == CAC_BASE))
/*
* Control Register Access -- Read/Write 0000_0020
*/
uint64_t
pcireg_control_get(void *ptr)
{
uint64_t ret = 0;
pic_t *bridge;
if ( IS_IOADDR(ptr) )
bridge = (pic_t *)ptr;
else
bridge = (pic_t *)((pcibr_soft_t)(ptr))->bs_base;
ret = ((pic_t *)bridge)->p_wid_control;
return ret;
}
void void
pcireg_intr_enable_bit_clr(void *ptr, uint64_t bits) pcireg_intr_enable_bit_clr(void *ptr, uint64_t bits)
{ {
......
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