Lines Matching refs:hp_elog
332 static int handle_dlpar_errorlog(struct pseries_hp_errorlog *hp_elog) in handle_dlpar_errorlog() argument
337 switch (hp_elog->id_type) { in handle_dlpar_errorlog()
339 hp_elog->_drc_u.drc_count = in handle_dlpar_errorlog()
340 be32_to_cpu(hp_elog->_drc_u.drc_count); in handle_dlpar_errorlog()
343 hp_elog->_drc_u.drc_index = in handle_dlpar_errorlog()
344 be32_to_cpu(hp_elog->_drc_u.drc_index); in handle_dlpar_errorlog()
347 hp_elog->_drc_u.ic.count = in handle_dlpar_errorlog()
348 be32_to_cpu(hp_elog->_drc_u.ic.count); in handle_dlpar_errorlog()
349 hp_elog->_drc_u.ic.index = in handle_dlpar_errorlog()
350 be32_to_cpu(hp_elog->_drc_u.ic.index); in handle_dlpar_errorlog()
353 switch (hp_elog->resource) { in handle_dlpar_errorlog()
355 rc = dlpar_memory(hp_elog); in handle_dlpar_errorlog()
358 rc = dlpar_cpu(hp_elog); in handle_dlpar_errorlog()
362 hp_elog->resource); in handle_dlpar_errorlog()
410 static int dlpar_parse_resource(char **cmd, struct pseries_hp_errorlog *hp_elog) in dlpar_parse_resource() argument
419 hp_elog->resource = PSERIES_HP_ELOG_RESOURCE_MEM; in dlpar_parse_resource()
421 hp_elog->resource = PSERIES_HP_ELOG_RESOURCE_CPU; in dlpar_parse_resource()
430 static int dlpar_parse_action(char **cmd, struct pseries_hp_errorlog *hp_elog) in dlpar_parse_action() argument
439 hp_elog->action = PSERIES_HP_ELOG_ACTION_ADD; in dlpar_parse_action()
441 hp_elog->action = PSERIES_HP_ELOG_ACTION_REMOVE; in dlpar_parse_action()
450 static int dlpar_parse_id_type(char **cmd, struct pseries_hp_errorlog *hp_elog) in dlpar_parse_id_type() argument
460 hp_elog->id_type = PSERIES_HP_ELOG_ID_DRC_IC; in dlpar_parse_id_type()
483 hp_elog->_drc_u.ic.count = cpu_to_be32(count); in dlpar_parse_id_type()
484 hp_elog->_drc_u.ic.index = cpu_to_be32(index); in dlpar_parse_id_type()
486 hp_elog->id_type = PSERIES_HP_ELOG_ID_DRC_INDEX; in dlpar_parse_id_type()
498 hp_elog->_drc_u.drc_index = cpu_to_be32(index); in dlpar_parse_id_type()
500 hp_elog->id_type = PSERIES_HP_ELOG_ID_DRC_COUNT; in dlpar_parse_id_type()
512 hp_elog->_drc_u.drc_count = cpu_to_be32(count); in dlpar_parse_id_type()
524 struct pseries_hp_errorlog *hp_elog; in dlpar_store() local
531 hp_elog = kzalloc(sizeof(*hp_elog), GFP_KERNEL); in dlpar_store()
532 if (!hp_elog || !argbuf) { in dlpar_store()
535 kfree(hp_elog); in dlpar_store()
543 rc = dlpar_parse_resource(&args, hp_elog); in dlpar_store()
547 rc = dlpar_parse_action(&args, hp_elog); in dlpar_store()
551 rc = dlpar_parse_id_type(&args, hp_elog); in dlpar_store()
556 queue_hotplug_event(hp_elog, &hotplug_done, &rc); in dlpar_store()
561 kfree(hp_elog); in dlpar_store()