Message ID | 20171027105045.939-1-hegdevasant@linux.vnet.ibm.com |
---|---|
State | Accepted |
Headers | show |
Series | FSP/CONSOLE: Disable notification on unresponsive consoles | expand |
Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes: > Commit fd6b71fc fixed the situation where ipmi console was open (hvc0) but got > data on different console (hvc1). > > During FSP R/R OPAL closes all consoles. After R/R complete FSP requests to > open hvc1 and sends data on this. If hvc1 registration failed or not opened in > host kernel then it will not read data and results in RCU stalls. > > Note that this is workaround for older kernel where we don't have separate irq > for each console. Latest kernel works fine without this patch. > > CC: stable > CC: Sam Mendoza-Jonas <sam@mendozajonas.com> > Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> > --- > hw/fsp/fsp-console.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) Merged to master as of c9cc5ef5772ebfbfff978f1c25763d733e45752c and 5.4.x as of d4172005b25f4247d07c2d81deeddd3a323d8b41 Hopefully the last in the reset/reload cases around console fun.
On 10/31/2017 09:13 AM, Stewart Smith wrote: > Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes: >> Commit fd6b71fc fixed the situation where ipmi console was open (hvc0) but got >> data on different console (hvc1). >> >> During FSP R/R OPAL closes all consoles. After R/R complete FSP requests to >> open hvc1 and sends data on this. If hvc1 registration failed or not opened in >> host kernel then it will not read data and results in RCU stalls. >> >> Note that this is workaround for older kernel where we don't have separate irq >> for each console. Latest kernel works fine without this patch. >> >> CC: stable >> CC: Sam Mendoza-Jonas <sam@mendozajonas.com> >> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> >> --- >> hw/fsp/fsp-console.c | 8 +++++--- >> 1 file changed, 5 insertions(+), 3 deletions(-) > > Merged to master as of c9cc5ef5772ebfbfff978f1c25763d733e45752c > and 5.4.x as of d4172005b25f4247d07c2d81deeddd3a323d8b41 > > Hopefully the last in the reset/reload cases around console fun. > Hope so :-) -Vasant
diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c index e3628d7..8d845d8 100644 --- a/hw/fsp/fsp-console.c +++ b/hw/fsp/fsp-console.c @@ -704,6 +704,7 @@ static int64_t fsp_console_read(int64_t term_number, int64_t *length, struct fsp_serbuf_hdr *sb; bool pending = false; uint32_t old_nin, n, i, chunk, req = *length; + int rc = OPAL_SUCCESS; if (term_number < 0 || term_number >= MAX_SERIAL) return OPAL_PARAMETER; @@ -712,8 +713,8 @@ static int64_t fsp_console_read(int64_t term_number, int64_t *length, return OPAL_PARAMETER; lock(&fsp_con_lock); if (!fs->open) { - unlock(&fsp_con_lock); - return OPAL_CLOSED; + rc = OPAL_CLOSED; + goto clr_flag; } if (fs->waiting) fs->waiting = 0; @@ -744,6 +745,7 @@ static int64_t fsp_console_read(int64_t term_number, int64_t *length, buffer[4], buffer[5], buffer[6], buffer[7]); #endif /* OPAL_DEBUG_CONSOLE_IO */ +clr_flag: /* Might clear the input pending flag */ for (i = 0; i < MAX_SERIAL && !pending; i++) { struct fsp_serial *fs = &fsp_serials[i]; @@ -772,7 +774,7 @@ static int64_t fsp_console_read(int64_t term_number, int64_t *length, unlock(&fsp_con_lock); - return OPAL_SUCCESS; + return rc; } void fsp_console_poll(void *data __unused)
Commit fd6b71fc fixed the situation where ipmi console was open (hvc0) but got data on different console (hvc1). During FSP R/R OPAL closes all consoles. After R/R complete FSP requests to open hvc1 and sends data on this. If hvc1 registration failed or not opened in host kernel then it will not read data and results in RCU stalls. Note that this is workaround for older kernel where we don't have separate irq for each console. Latest kernel works fine without this patch. CC: stable CC: Sam Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> --- hw/fsp/fsp-console.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)