* [PATCH 0/3] powerpc/powernv: Correctly detect optional OPAL calls
@ 2015-02-18 0:03 ` Stewart Smith
0 siblings, 0 replies; 13+ messages in thread
From: Stewart Smith @ 2015-02-18 0:03 UTC (permalink / raw)
To: mpe; +Cc: linuxppc-dev, linux-kernel, Stewart Smith
This series fixes three possible warnings that OPAL firmware would emit
when booting on hardware/simulator that didn't support certain functionality.
The correct thing for Linux to do is to detect firmware capability
by using the OPAL_CHECK_TOKEN call or examining device tree. In the case
of these three warnings, it was OPAL_CHECK_TOKEN.
Stewart Smith (3):
powerpc/powernv: only register log if OPAL supports doing so
powerpc/powernv: only call OPAL_ELOG_RESEND if firmware supports it
powerpc/powernv: only call OPAL_RESEND_DUMP if firmware supports it
arch/powerpc/platforms/powernv/opal-dump.c | 3 ++-
arch/powerpc/platforms/powernv/opal-elog.c | 3 ++-
arch/powerpc/platforms/powernv/opal.c | 6 +++++-
3 files changed, 9 insertions(+), 3 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 0/3] powerpc/powernv: Correctly detect optional OPAL calls
@ 2015-02-18 0:03 ` Stewart Smith
0 siblings, 0 replies; 13+ messages in thread
From: Stewart Smith @ 2015-02-18 0:03 UTC (permalink / raw)
To: mpe; +Cc: Stewart Smith, linuxppc-dev, linux-kernel
This series fixes three possible warnings that OPAL firmware would emit
when booting on hardware/simulator that didn't support certain functionality.
The correct thing for Linux to do is to detect firmware capability
by using the OPAL_CHECK_TOKEN call or examining device tree. In the case
of these three warnings, it was OPAL_CHECK_TOKEN.
Stewart Smith (3):
powerpc/powernv: only register log if OPAL supports doing so
powerpc/powernv: only call OPAL_ELOG_RESEND if firmware supports it
powerpc/powernv: only call OPAL_RESEND_DUMP if firmware supports it
arch/powerpc/platforms/powernv/opal-dump.c | 3 ++-
arch/powerpc/platforms/powernv/opal-elog.c | 3 ++-
arch/powerpc/platforms/powernv/opal.c | 6 +++++-
3 files changed, 9 insertions(+), 3 deletions(-)
--
1.7.10.4
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/3] powerpc/powernv: only register log if OPAL supports doing so
2015-02-18 0:03 ` Stewart Smith
@ 2015-02-18 0:03 ` Stewart Smith
-1 siblings, 0 replies; 13+ messages in thread
From: Stewart Smith @ 2015-02-18 0:03 UTC (permalink / raw)
To: mpe; +Cc: linuxppc-dev, linux-kernel, Stewart Smith
Correct use of REGISTER/UNREGISTER is to check if the token exists
before calling. If we don't we get a "OPAL: Called with bad token 101 !"
error, which is harmless but may be alarming to some.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/opal.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index f10b9ec..84ff20c 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -665,6 +665,9 @@ static void __init opal_dump_region_init(void)
uint64_t size;
int rc;
+ if (!opal_check_token(OPAL_REGISTER_DUMP_REGION))
+ return;
+
/* Register kernel log buffer */
addr = log_buf_addr_get();
size = log_buf_len_get();
@@ -795,7 +798,8 @@ void opal_shutdown(void)
}
/* Unregister memory dump region */
- opal_unregister_dump_region(OPAL_DUMP_REGION_LOG_BUF);
+ if (opal_check_token(OPAL_UNREGISTER_DUMP_REGION))
+ opal_unregister_dump_region(OPAL_DUMP_REGION_LOG_BUF);
}
/* Export this so that test modules can use it */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 1/3] powerpc/powernv: only register log if OPAL supports doing so
@ 2015-02-18 0:03 ` Stewart Smith
0 siblings, 0 replies; 13+ messages in thread
From: Stewart Smith @ 2015-02-18 0:03 UTC (permalink / raw)
To: mpe; +Cc: Stewart Smith, linuxppc-dev, linux-kernel
Correct use of REGISTER/UNREGISTER is to check if the token exists
before calling. If we don't we get a "OPAL: Called with bad token 101 !"
error, which is harmless but may be alarming to some.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/opal.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index f10b9ec..84ff20c 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -665,6 +665,9 @@ static void __init opal_dump_region_init(void)
uint64_t size;
int rc;
+ if (!opal_check_token(OPAL_REGISTER_DUMP_REGION))
+ return;
+
/* Register kernel log buffer */
addr = log_buf_addr_get();
size = log_buf_len_get();
@@ -795,7 +798,8 @@ void opal_shutdown(void)
}
/* Unregister memory dump region */
- opal_unregister_dump_region(OPAL_DUMP_REGION_LOG_BUF);
+ if (opal_check_token(OPAL_UNREGISTER_DUMP_REGION))
+ opal_unregister_dump_region(OPAL_DUMP_REGION_LOG_BUF);
}
/* Export this so that test modules can use it */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/3] powerpc/powernv: only call OPAL_ELOG_RESEND if firmware supports it
2015-02-18 0:03 ` Stewart Smith
@ 2015-02-18 0:03 ` Stewart Smith
-1 siblings, 0 replies; 13+ messages in thread
From: Stewart Smith @ 2015-02-18 0:03 UTC (permalink / raw)
To: mpe; +Cc: linuxppc-dev, linux-kernel, Stewart Smith
Otherwise firmware complains: "OPAL: Called with bad token 74 !"
as not all OPAL systems have the ability to resend error logs.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/opal-elog.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/opal-elog.c b/arch/powerpc/platforms/powernv/opal-elog.c
index 518fe95..38ce757 100644
--- a/arch/powerpc/platforms/powernv/opal-elog.c
+++ b/arch/powerpc/platforms/powernv/opal-elog.c
@@ -313,7 +313,8 @@ int __init opal_elog_init(void)
}
/* We are now ready to pull error logs from opal. */
- opal_resend_pending_logs();
+ if (opal_check_token(OPAL_ELOG_RESEND))
+ opal_resend_pending_logs();
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/3] powerpc/powernv: only call OPAL_ELOG_RESEND if firmware supports it
@ 2015-02-18 0:03 ` Stewart Smith
0 siblings, 0 replies; 13+ messages in thread
From: Stewart Smith @ 2015-02-18 0:03 UTC (permalink / raw)
To: mpe; +Cc: Stewart Smith, linuxppc-dev, linux-kernel
Otherwise firmware complains: "OPAL: Called with bad token 74 !"
as not all OPAL systems have the ability to resend error logs.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/opal-elog.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/opal-elog.c b/arch/powerpc/platforms/powernv/opal-elog.c
index 518fe95..38ce757 100644
--- a/arch/powerpc/platforms/powernv/opal-elog.c
+++ b/arch/powerpc/platforms/powernv/opal-elog.c
@@ -313,7 +313,8 @@ int __init opal_elog_init(void)
}
/* We are now ready to pull error logs from opal. */
- opal_resend_pending_logs();
+ if (opal_check_token(OPAL_ELOG_RESEND))
+ opal_resend_pending_logs();
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/3] powerpc/powernv: only call OPAL_RESEND_DUMP if firmware supports it
2015-02-18 0:03 ` Stewart Smith
@ 2015-02-18 0:03 ` Stewart Smith
-1 siblings, 0 replies; 13+ messages in thread
From: Stewart Smith @ 2015-02-18 0:03 UTC (permalink / raw)
To: mpe; +Cc: linuxppc-dev, linux-kernel, Stewart Smith
Not all OPAL platforms support resending system dumps, so check
that current firmware supports it first. Otherwise we get firmware
complaining:
"OPAL: Called with bad token 91 !"
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/opal-dump.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/opal-dump.c b/arch/powerpc/platforms/powernv/opal-dump.c
index 23260f7..5aa9c1c 100644
--- a/arch/powerpc/platforms/powernv/opal-dump.c
+++ b/arch/powerpc/platforms/powernv/opal-dump.c
@@ -452,5 +452,6 @@ void __init opal_platform_dump_init(void)
return;
}
- opal_dump_resend_notification();
+ if (opal_check_token(OPAL_DUMP_RESEND))
+ opal_dump_resend_notification();
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/3] powerpc/powernv: only call OPAL_RESEND_DUMP if firmware supports it
@ 2015-02-18 0:03 ` Stewart Smith
0 siblings, 0 replies; 13+ messages in thread
From: Stewart Smith @ 2015-02-18 0:03 UTC (permalink / raw)
To: mpe; +Cc: Stewart Smith, linuxppc-dev, linux-kernel
Not all OPAL platforms support resending system dumps, so check
that current firmware supports it first. Otherwise we get firmware
complaining:
"OPAL: Called with bad token 91 !"
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/opal-dump.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/opal-dump.c b/arch/powerpc/platforms/powernv/opal-dump.c
index 23260f7..5aa9c1c 100644
--- a/arch/powerpc/platforms/powernv/opal-dump.c
+++ b/arch/powerpc/platforms/powernv/opal-dump.c
@@ -452,5 +452,6 @@ void __init opal_platform_dump_init(void)
return;
}
- opal_dump_resend_notification();
+ if (opal_check_token(OPAL_DUMP_RESEND))
+ opal_dump_resend_notification();
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 0/3] powerpc/powernv: Correctly detect optional OPAL calls
2015-02-18 0:03 ` Stewart Smith
` (3 preceding siblings ...)
(?)
@ 2015-02-18 7:57 ` Vasant Hegde
2015-02-19 0:43 ` Stewart Smith
-1 siblings, 1 reply; 13+ messages in thread
From: Vasant Hegde @ 2015-02-18 7:57 UTC (permalink / raw)
To: Stewart Smith, mpe; +Cc: linuxppc-dev, linux-kernel
On 02/18/2015 05:33 AM, Stewart Smith wrote:
> This series fixes three possible warnings that OPAL firmware would emit
> when booting on hardware/simulator that didn't support certain functionality.
>
> The correct thing for Linux to do is to detect firmware capability
> by using the OPAL_CHECK_TOKEN call or examining device tree. In the case
> of these three warnings, it was OPAL_CHECK_TOKEN.
Stewart,
Sorry.. I couldn't makeout any difference between this patchset and earlier
patchset which I had Acked except the update in cover page... (sub: Silence
"OPAL called with invalid token" errors ).
Did I miss anything ?
-Vasant
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 0/3] powerpc/powernv: Correctly detect optional OPAL calls
2015-02-18 7:57 ` [PATCH 0/3] powerpc/powernv: Correctly detect optional OPAL calls Vasant Hegde
@ 2015-02-19 0:43 ` Stewart Smith
0 siblings, 0 replies; 13+ messages in thread
From: Stewart Smith @ 2015-02-19 0:43 UTC (permalink / raw)
To: Vasant Hegde, mpe; +Cc: linuxppc-dev, linux-kernel
Vasant Hegde <hegdevasant@linux.vnet.ibm.com> writes:
> On 02/18/2015 05:33 AM, Stewart Smith wrote:
>> This series fixes three possible warnings that OPAL firmware would emit
>> when booting on hardware/simulator that didn't support certain functionality.
>>
>> The correct thing for Linux to do is to detect firmware capability
>> by using the OPAL_CHECK_TOKEN call or examining device tree. In the case
>> of these three warnings, it was OPAL_CHECK_TOKEN.
>
> Stewart,
> Sorry.. I couldn't makeout any difference between this patchset and earlier
> patchset which I had Acked except the update in cover page... (sub: Silence
> "OPAL called with invalid token" errors ).
>
> Did I miss anything ?
You missed that I forgot I'd sent the patchset. :)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/3] powerpc/powernv: only register log if OPAL supports doing so
2015-02-12 5:25 ` Stewart Smith
(?)
@ 2015-02-12 9:45 ` Vasant Hegde
-1 siblings, 0 replies; 13+ messages in thread
From: Vasant Hegde @ 2015-02-12 9:45 UTC (permalink / raw)
To: Stewart Smith, mpe; +Cc: linuxppc-dev, linux-kernel
On 02/12/2015 10:55 AM, Stewart Smith wrote:
> Correct use of REGISTER/UNREGISTER is to check if the token exists
> before calling. If we don't we get a "OPAL: Called with bad token 101 !"
> error, which is harmless but may be alarming to some.
>
> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Acked-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
-Vasant
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH 1/3] powerpc/powernv: only register log if OPAL supports doing so
2015-02-12 5:25 [PATCH 0/3] Silence "OPAL called with invalid token" errors Stewart Smith
@ 2015-02-12 5:25 ` Stewart Smith
0 siblings, 0 replies; 13+ messages in thread
From: Stewart Smith @ 2015-02-12 5:25 UTC (permalink / raw)
To: mpe; +Cc: linuxppc-dev, linux-kernel, Stewart Smith
Correct use of REGISTER/UNREGISTER is to check if the token exists
before calling. If we don't we get a "OPAL: Called with bad token 101 !"
error, which is harmless but may be alarming to some.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/opal.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index f10b9ec..84ff20c 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -665,6 +665,9 @@ static void __init opal_dump_region_init(void)
uint64_t size;
int rc;
+ if (!opal_check_token(OPAL_REGISTER_DUMP_REGION))
+ return;
+
/* Register kernel log buffer */
addr = log_buf_addr_get();
size = log_buf_len_get();
@@ -795,7 +798,8 @@ void opal_shutdown(void)
}
/* Unregister memory dump region */
- opal_unregister_dump_region(OPAL_DUMP_REGION_LOG_BUF);
+ if (opal_check_token(OPAL_UNREGISTER_DUMP_REGION))
+ opal_unregister_dump_region(OPAL_DUMP_REGION_LOG_BUF);
}
/* Export this so that test modules can use it */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 1/3] powerpc/powernv: only register log if OPAL supports doing so
@ 2015-02-12 5:25 ` Stewart Smith
0 siblings, 0 replies; 13+ messages in thread
From: Stewart Smith @ 2015-02-12 5:25 UTC (permalink / raw)
To: mpe; +Cc: Stewart Smith, linuxppc-dev, linux-kernel
Correct use of REGISTER/UNREGISTER is to check if the token exists
before calling. If we don't we get a "OPAL: Called with bad token 101 !"
error, which is harmless but may be alarming to some.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/opal.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/powernv/opal.c b/arch/powerpc/platforms/powernv/opal.c
index f10b9ec..84ff20c 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch/powerpc/platforms/powernv/opal.c
@@ -665,6 +665,9 @@ static void __init opal_dump_region_init(void)
uint64_t size;
int rc;
+ if (!opal_check_token(OPAL_REGISTER_DUMP_REGION))
+ return;
+
/* Register kernel log buffer */
addr = log_buf_addr_get();
size = log_buf_len_get();
@@ -795,7 +798,8 @@ void opal_shutdown(void)
}
/* Unregister memory dump region */
- opal_unregister_dump_region(OPAL_DUMP_REGION_LOG_BUF);
+ if (opal_check_token(OPAL_UNREGISTER_DUMP_REGION))
+ opal_unregister_dump_region(OPAL_DUMP_REGION_LOG_BUF);
}
/* Export this so that test modules can use it */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2015-02-19 0:45 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-18 0:03 [PATCH 0/3] powerpc/powernv: Correctly detect optional OPAL calls Stewart Smith
2015-02-18 0:03 ` Stewart Smith
2015-02-18 0:03 ` [PATCH 1/3] powerpc/powernv: only register log if OPAL supports doing so Stewart Smith
2015-02-18 0:03 ` Stewart Smith
2015-02-18 0:03 ` [PATCH 2/3] powerpc/powernv: only call OPAL_ELOG_RESEND if firmware supports it Stewart Smith
2015-02-18 0:03 ` Stewart Smith
2015-02-18 0:03 ` [PATCH 3/3] powerpc/powernv: only call OPAL_RESEND_DUMP " Stewart Smith
2015-02-18 0:03 ` Stewart Smith
2015-02-18 7:57 ` [PATCH 0/3] powerpc/powernv: Correctly detect optional OPAL calls Vasant Hegde
2015-02-19 0:43 ` Stewart Smith
-- strict thread matches above, loose matches on Subject: below --
2015-02-12 5:25 [PATCH 0/3] Silence "OPAL called with invalid token" errors Stewart Smith
2015-02-12 5:25 ` [PATCH 1/3] powerpc/powernv: only register log if OPAL supports doing so Stewart Smith
2015-02-12 5:25 ` Stewart Smith
2015-02-12 9:45 ` Vasant Hegde
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.