diff options
author | Deepthi Dharwar <deepthi@linux.vnet.ibm.com> | 2014-07-24 12:02:42 +0530 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-07-25 14:10:52 +1000 |
commit | fa023052dfec598262b41e277850d78780c42639 (patch) | |
tree | 7230a271a0f37d14d7f65a656e02f4dfd96172fd /hw/fsp/fsp-elog-write.c | |
parent | 685fab6439fb46b13d3de383e3c9288607c7d389 (diff) | |
download | talos-skiboot-fa023052dfec598262b41e277850d78780c42639.tar.gz talos-skiboot-fa023052dfec598262b41e277850d78780c42639.zip |
elog: Move error log data structres from opal.h to new file errorlog.h
Currently, all the error log data structures needed to commit an error
in PEL are declared in opal.h and are exposed to kernel.
At present we do not have any infrastrucutre in the kernel to make use
of these ABIs.
Any changes to these strucutes in the future can
potentially cause an ABI breakage. In order to avoid
any breakage this patch moves all the error log data structures
to a new errorlog.h file and deprecating the OPAL tokens for
error-log write functionality calls only.
Once the kernel support is added (anytime in future),
one needs to move all of this back to opal.h and re-enable
the OPAL tokens for the same.
Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'hw/fsp/fsp-elog-write.c')
-rw-r--r-- | hw/fsp/fsp-elog-write.c | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/hw/fsp/fsp-elog-write.c b/hw/fsp/fsp-elog-write.c index 686e24a5..ef2761e9 100644 --- a/hw/fsp/fsp-elog-write.c +++ b/hw/fsp/fsp-elog-write.c @@ -50,7 +50,8 @@ static struct lock elog_write_to_host_lock = LOCK_UNLOCKED; /* Platform Log ID as per the spec */ static uint32_t sapphire_elog_id = 0xB0000000; -static uint32_t powernv_elog_id = 0xB1000000; +/* Reserved for future use */ +/* static uint32_t powernv_elog_id = 0xB1000000; */ /* log buffer to copy FSP log for READ */ #define ELOG_WRITE_TO_FSP_BUFFER_SIZE 0x00040000 @@ -464,36 +465,6 @@ int elog_fsp_commit(struct opal_errorlog *buf) return rc; } -/* This function is called from POWERNV to push logs - * on FSP - */ -static int opal_commit_log_to_fsp(struct opal_errorlog *buf) -{ - struct opal_errorlog *opal_buf; - int rc = OPAL_SUCCESS; - uint32_t plid; - - /* Copy the buffer to Sapphire and queue it to push - * to FSP and return - */ - lock(&elog_write_lock); - if (list_empty(&elog_write_free)) { - unlock(&elog_write_lock); - prerror("ELOG: Error! Write buffer list is full. Retry later\n"); - return -1; - } - opal_buf = list_pop(&elog_write_free, struct opal_errorlog, link); - plid = ++powernv_elog_id; - unlock(&elog_write_lock); - - memcpy(opal_buf, buf, sizeof(struct opal_errorlog)); - opal_buf->elog_origin = ORG_POWERNV; - opal_buf->plid = plid; - - rc = elog_fsp_commit(opal_buf); - return rc; -} - int opal_elog_update_user_dump(struct opal_errorlog *buf, unsigned char *data, uint32_t tag, uint16_t size) { @@ -850,9 +821,6 @@ void fsp_elog_write_init(void) return; } - /* register opal Interface */ - opal_register(OPAL_ELOG_SEND, opal_commit_log_to_fsp, 1); - /* Add a poller */ opal_add_poller(elog_timeout_poll, NULL); } |