[IA64] mca_drv cleanup
There were some trailing white spaces, long lines, brackets in weird style etc. This patch cleans them up. Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:
committed by
Tony Luck
parent
8ee9e23d41
commit
20305e5972
@@ -214,28 +214,36 @@ mca_make_slidx(void *buffer, slidx_table_t *slidx)
|
|||||||
sp = (sal_log_section_hdr_t *)((char*)buffer + ercd_pos);
|
sp = (sal_log_section_hdr_t *)((char*)buffer + ercd_pos);
|
||||||
if (!efi_guidcmp(sp->guid, SAL_PROC_DEV_ERR_SECT_GUID)) {
|
if (!efi_guidcmp(sp->guid, SAL_PROC_DEV_ERR_SECT_GUID)) {
|
||||||
LOG_INDEX_ADD_SECT_PTR(slidx->proc_err, sp);
|
LOG_INDEX_ADD_SECT_PTR(slidx->proc_err, sp);
|
||||||
} else if (!efi_guidcmp(sp->guid, SAL_PLAT_MEM_DEV_ERR_SECT_GUID)) {
|
} else if (!efi_guidcmp(sp->guid,
|
||||||
|
SAL_PLAT_MEM_DEV_ERR_SECT_GUID)) {
|
||||||
platform_err = 1;
|
platform_err = 1;
|
||||||
LOG_INDEX_ADD_SECT_PTR(slidx->mem_dev_err, sp);
|
LOG_INDEX_ADD_SECT_PTR(slidx->mem_dev_err, sp);
|
||||||
} else if (!efi_guidcmp(sp->guid, SAL_PLAT_SEL_DEV_ERR_SECT_GUID)) {
|
} else if (!efi_guidcmp(sp->guid,
|
||||||
|
SAL_PLAT_SEL_DEV_ERR_SECT_GUID)) {
|
||||||
platform_err = 1;
|
platform_err = 1;
|
||||||
LOG_INDEX_ADD_SECT_PTR(slidx->sel_dev_err, sp);
|
LOG_INDEX_ADD_SECT_PTR(slidx->sel_dev_err, sp);
|
||||||
} else if (!efi_guidcmp(sp->guid, SAL_PLAT_PCI_BUS_ERR_SECT_GUID)) {
|
} else if (!efi_guidcmp(sp->guid,
|
||||||
|
SAL_PLAT_PCI_BUS_ERR_SECT_GUID)) {
|
||||||
platform_err = 1;
|
platform_err = 1;
|
||||||
LOG_INDEX_ADD_SECT_PTR(slidx->pci_bus_err, sp);
|
LOG_INDEX_ADD_SECT_PTR(slidx->pci_bus_err, sp);
|
||||||
} else if (!efi_guidcmp(sp->guid, SAL_PLAT_SMBIOS_DEV_ERR_SECT_GUID)) {
|
} else if (!efi_guidcmp(sp->guid,
|
||||||
|
SAL_PLAT_SMBIOS_DEV_ERR_SECT_GUID)) {
|
||||||
platform_err = 1;
|
platform_err = 1;
|
||||||
LOG_INDEX_ADD_SECT_PTR(slidx->smbios_dev_err, sp);
|
LOG_INDEX_ADD_SECT_PTR(slidx->smbios_dev_err, sp);
|
||||||
} else if (!efi_guidcmp(sp->guid, SAL_PLAT_PCI_COMP_ERR_SECT_GUID)) {
|
} else if (!efi_guidcmp(sp->guid,
|
||||||
|
SAL_PLAT_PCI_COMP_ERR_SECT_GUID)) {
|
||||||
platform_err = 1;
|
platform_err = 1;
|
||||||
LOG_INDEX_ADD_SECT_PTR(slidx->pci_comp_err, sp);
|
LOG_INDEX_ADD_SECT_PTR(slidx->pci_comp_err, sp);
|
||||||
} else if (!efi_guidcmp(sp->guid, SAL_PLAT_SPECIFIC_ERR_SECT_GUID)) {
|
} else if (!efi_guidcmp(sp->guid,
|
||||||
|
SAL_PLAT_SPECIFIC_ERR_SECT_GUID)) {
|
||||||
platform_err = 1;
|
platform_err = 1;
|
||||||
LOG_INDEX_ADD_SECT_PTR(slidx->plat_specific_err, sp);
|
LOG_INDEX_ADD_SECT_PTR(slidx->plat_specific_err, sp);
|
||||||
} else if (!efi_guidcmp(sp->guid, SAL_PLAT_HOST_CTLR_ERR_SECT_GUID)) {
|
} else if (!efi_guidcmp(sp->guid,
|
||||||
|
SAL_PLAT_HOST_CTLR_ERR_SECT_GUID)) {
|
||||||
platform_err = 1;
|
platform_err = 1;
|
||||||
LOG_INDEX_ADD_SECT_PTR(slidx->host_ctlr_err, sp);
|
LOG_INDEX_ADD_SECT_PTR(slidx->host_ctlr_err, sp);
|
||||||
} else if (!efi_guidcmp(sp->guid, SAL_PLAT_BUS_ERR_SECT_GUID)) {
|
} else if (!efi_guidcmp(sp->guid,
|
||||||
|
SAL_PLAT_BUS_ERR_SECT_GUID)) {
|
||||||
platform_err = 1;
|
platform_err = 1;
|
||||||
LOG_INDEX_ADD_SECT_PTR(slidx->plat_bus_err, sp);
|
LOG_INDEX_ADD_SECT_PTR(slidx->plat_bus_err, sp);
|
||||||
} else {
|
} else {
|
||||||
@@ -261,7 +269,8 @@ init_record_index_pools(void)
|
|||||||
int sect_min_size; /* Minimum size of SAL error sections */
|
int sect_min_size; /* Minimum size of SAL error sections */
|
||||||
/* minimum size table of each section */
|
/* minimum size table of each section */
|
||||||
static int sal_log_sect_min_sizes[] = {
|
static int sal_log_sect_min_sizes[] = {
|
||||||
sizeof(sal_log_processor_info_t) + sizeof(sal_processor_static_info_t),
|
sizeof(sal_log_processor_info_t)
|
||||||
|
+ sizeof(sal_processor_static_info_t),
|
||||||
sizeof(sal_log_mem_dev_err_info_t),
|
sizeof(sal_log_mem_dev_err_info_t),
|
||||||
sizeof(sal_log_sel_dev_err_info_t),
|
sizeof(sal_log_sel_dev_err_info_t),
|
||||||
sizeof(sal_log_pci_bus_err_info_t),
|
sizeof(sal_log_pci_bus_err_info_t),
|
||||||
@@ -294,7 +303,8 @@ init_record_index_pools(void)
|
|||||||
|
|
||||||
/* - 3 - */
|
/* - 3 - */
|
||||||
slidx_pool.max_idx = (rec_max_size/sect_min_size) * 2 + 1;
|
slidx_pool.max_idx = (rec_max_size/sect_min_size) * 2 + 1;
|
||||||
slidx_pool.buffer = (slidx_list_t *) kmalloc(slidx_pool.max_idx * sizeof(slidx_list_t), GFP_KERNEL);
|
slidx_pool.buffer = (slidx_list_t *)
|
||||||
|
kmalloc(slidx_pool.max_idx * sizeof(slidx_list_t), GFP_KERNEL);
|
||||||
|
|
||||||
return slidx_pool.buffer ? 0 : -ENOMEM;
|
return slidx_pool.buffer ? 0 : -ENOMEM;
|
||||||
}
|
}
|
||||||
@@ -308,6 +318,7 @@ init_record_index_pools(void)
|
|||||||
* is_mca_global - Check whether this MCA is global or not
|
* is_mca_global - Check whether this MCA is global or not
|
||||||
* @peidx: pointer of index of processor error section
|
* @peidx: pointer of index of processor error section
|
||||||
* @pbci: pointer to pal_bus_check_info_t
|
* @pbci: pointer to pal_bus_check_info_t
|
||||||
|
* @sos: pointer to hand off struct between SAL and OS
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* MCA_IS_LOCAL / MCA_IS_GLOBAL
|
* MCA_IS_LOCAL / MCA_IS_GLOBAL
|
||||||
@@ -317,7 +328,8 @@ static mca_type_t
|
|||||||
is_mca_global(peidx_table_t *peidx, pal_bus_check_info_t *pbci,
|
is_mca_global(peidx_table_t *peidx, pal_bus_check_info_t *pbci,
|
||||||
struct ia64_sal_os_state *sos)
|
struct ia64_sal_os_state *sos)
|
||||||
{
|
{
|
||||||
pal_processor_state_info_t *psp = (pal_processor_state_info_t*)peidx_psp(peidx);
|
pal_processor_state_info_t *psp =
|
||||||
|
(pal_processor_state_info_t*)peidx_psp(peidx);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* PAL can request a rendezvous, if the MCA has a global scope.
|
* PAL can request a rendezvous, if the MCA has a global scope.
|
||||||
@@ -381,13 +393,15 @@ is_mca_global(peidx_table_t *peidx, pal_bus_check_info_t *pbci,
|
|||||||
* @slidx: pointer of index of SAL error record
|
* @slidx: pointer of index of SAL error record
|
||||||
* @peidx: pointer of index of processor error section
|
* @peidx: pointer of index of processor error section
|
||||||
* @pbci: pointer of pal_bus_check_info
|
* @pbci: pointer of pal_bus_check_info
|
||||||
|
* @sos: pointer to hand off struct between SAL and OS
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* 1 on Success / 0 on Failure
|
* 1 on Success / 0 on Failure
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
recover_from_read_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_check_info_t *pbci,
|
recover_from_read_error(slidx_table_t *slidx,
|
||||||
|
peidx_table_t *peidx, pal_bus_check_info_t *pbci,
|
||||||
struct ia64_sal_os_state *sos)
|
struct ia64_sal_os_state *sos)
|
||||||
{
|
{
|
||||||
sal_log_mod_error_info_t *smei;
|
sal_log_mod_error_info_t *smei;
|
||||||
@@ -453,24 +467,28 @@ recover_from_read_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_chec
|
|||||||
* @slidx: pointer of index of SAL error record
|
* @slidx: pointer of index of SAL error record
|
||||||
* @peidx: pointer of index of processor error section
|
* @peidx: pointer of index of processor error section
|
||||||
* @pbci: pointer of pal_bus_check_info
|
* @pbci: pointer of pal_bus_check_info
|
||||||
|
* @sos: pointer to hand off struct between SAL and OS
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* 1 on Success / 0 on Failure
|
* 1 on Success / 0 on Failure
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_check_info_t *pbci,
|
recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx,
|
||||||
|
pal_bus_check_info_t *pbci,
|
||||||
struct ia64_sal_os_state *sos)
|
struct ia64_sal_os_state *sos)
|
||||||
{
|
{
|
||||||
int status = 0;
|
int status = 0;
|
||||||
pal_processor_state_info_t *psp = (pal_processor_state_info_t*)peidx_psp(peidx);
|
pal_processor_state_info_t *psp =
|
||||||
|
(pal_processor_state_info_t*)peidx_psp(peidx);
|
||||||
|
|
||||||
if (psp->bc && pbci->eb && pbci->bsi == 0) {
|
if (psp->bc && pbci->eb && pbci->bsi == 0) {
|
||||||
switch(pbci->type) {
|
switch(pbci->type) {
|
||||||
case 1: /* partial read */
|
case 1: /* partial read */
|
||||||
case 3: /* full line(cpu) read */
|
case 3: /* full line(cpu) read */
|
||||||
case 9: /* I/O space read */
|
case 9: /* I/O space read */
|
||||||
status = recover_from_read_error(slidx, peidx, pbci, sos);
|
status = recover_from_read_error(slidx, peidx, pbci,
|
||||||
|
sos);
|
||||||
break;
|
break;
|
||||||
case 0: /* unknown */
|
case 0: /* unknown */
|
||||||
case 2: /* partial write */
|
case 2: /* partial write */
|
||||||
@@ -481,7 +499,8 @@ recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_
|
|||||||
case 8: /* write coalescing transactions */
|
case 8: /* write coalescing transactions */
|
||||||
case 10: /* I/O space write */
|
case 10: /* I/O space write */
|
||||||
case 11: /* inter-processor interrupt message(IPI) */
|
case 11: /* inter-processor interrupt message(IPI) */
|
||||||
case 12: /* interrupt acknowledge or external task priority cycle */
|
case 12: /* interrupt acknowledge or
|
||||||
|
external task priority cycle */
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -496,6 +515,7 @@ recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_
|
|||||||
* @slidx: pointer of index of SAL error record
|
* @slidx: pointer of index of SAL error record
|
||||||
* @peidx: pointer of index of processor error section
|
* @peidx: pointer of index of processor error section
|
||||||
* @pbci: pointer of pal_bus_check_info
|
* @pbci: pointer of pal_bus_check_info
|
||||||
|
* @sos: pointer to hand off struct between SAL and OS
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* 1 on Success / 0 on Failure
|
* 1 on Success / 0 on Failure
|
||||||
@@ -509,10 +529,12 @@ recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
recover_from_processor_error(int platform, slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_check_info_t *pbci,
|
recover_from_processor_error(int platform, slidx_table_t *slidx,
|
||||||
|
peidx_table_t *peidx, pal_bus_check_info_t *pbci,
|
||||||
struct ia64_sal_os_state *sos)
|
struct ia64_sal_os_state *sos)
|
||||||
{
|
{
|
||||||
pal_processor_state_info_t *psp = (pal_processor_state_info_t*)peidx_psp(peidx);
|
pal_processor_state_info_t *psp =
|
||||||
|
(pal_processor_state_info_t*)peidx_psp(peidx);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We cannot recover errors with other than bus_check.
|
* We cannot recover errors with other than bus_check.
|
||||||
@@ -557,14 +579,14 @@ recover_from_processor_error(int platform, slidx_table_t *slidx, peidx_table_t *
|
|||||||
/**
|
/**
|
||||||
* mca_try_to_recover - Try to recover from MCA
|
* mca_try_to_recover - Try to recover from MCA
|
||||||
* @rec: pointer to a SAL error record
|
* @rec: pointer to a SAL error record
|
||||||
|
* @sos: pointer to hand off struct between SAL and OS
|
||||||
*
|
*
|
||||||
* Return value:
|
* Return value:
|
||||||
* 1 on Success / 0 on Failure
|
* 1 on Success / 0 on Failure
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mca_try_to_recover(void *rec,
|
mca_try_to_recover(void *rec, struct ia64_sal_os_state *sos)
|
||||||
struct ia64_sal_os_state *sos)
|
|
||||||
{
|
{
|
||||||
int platform_err;
|
int platform_err;
|
||||||
int n_proc_err;
|
int n_proc_err;
|
||||||
@@ -588,7 +610,8 @@ mca_try_to_recover(void *rec,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Make index of processor error section */
|
/* Make index of processor error section */
|
||||||
mca_make_peidx((sal_log_processor_info_t*)slidx_first_entry(&slidx.proc_err)->hdr, &peidx);
|
mca_make_peidx((sal_log_processor_info_t*)
|
||||||
|
slidx_first_entry(&slidx.proc_err)->hdr, &peidx);
|
||||||
|
|
||||||
/* Extract Processor BUS_CHECK[0] */
|
/* Extract Processor BUS_CHECK[0] */
|
||||||
*((u64*)&pbci) = peidx_check_info(&peidx, bus_check, 0);
|
*((u64*)&pbci) = peidx_check_info(&peidx, bus_check, 0);
|
||||||
@@ -598,7 +621,8 @@ mca_try_to_recover(void *rec,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Try to recover a processor error */
|
/* Try to recover a processor error */
|
||||||
return recover_from_processor_error(platform_err, &slidx, &peidx, &pbci, sos);
|
return recover_from_processor_error(platform_err, &slidx, &peidx,
|
||||||
|
&pbci, sos);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -14,10 +14,10 @@
|
|||||||
|
|
||||||
GLOBAL_ENTRY(mca_handler_bhhook)
|
GLOBAL_ENTRY(mca_handler_bhhook)
|
||||||
invala // clear RSE ?
|
invala // clear RSE ?
|
||||||
;; //
|
;;
|
||||||
cover //
|
cover
|
||||||
;; //
|
;;
|
||||||
clrrrb //
|
clrrrb
|
||||||
;;
|
;;
|
||||||
alloc r16=ar.pfs,0,2,1,0 // make a new frame
|
alloc r16=ar.pfs,0,2,1,0 // make a new frame
|
||||||
;;
|
;;
|
||||||
|
Reference in New Issue
Block a user