static int sn_platform_plat_specific_err_print(const u8 * sect_header, u8 ** oemdata, u64 * oemdata_size) { mutex_lock(&sn_oemdata_mutex); sn_oemdata = oemdata; sn_oemdata_size = oemdata_size; sn_oemdata_bufsize = 0; *sn_oemdata_size = PAGE_SIZE; /* first guess at how much data will be generated */ while (*sn_oemdata_size > sn_oemdata_bufsize) { u8 *newbuf = vmalloc(*sn_oemdata_size); if (!newbuf) { printk(KERN_ERR "%s: unable to extend sn_oemdata\n", __FUNCTION__); return 1; } vfree(*sn_oemdata); *sn_oemdata = newbuf; sn_oemdata_bufsize = *sn_oemdata_size; *sn_oemdata_size = 0; ia64_sn_plat_specific_err_print(print_hook, (char *)sect_header); } mutex_unlock(&sn_oemdata_mutex); return 0; }
/* * ia64_sn2_platform_plat_specific_err_print * * Called by the MCA handler to log platform-specific errors. */ void ia64_sn2_platform_plat_specific_err_print(int header_len, int sect_len, u8 *p_data, prfunc_t prfunc) { ia64_sn_plat_specific_err_print(print_hook, p_data - sect_len); }