All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc/rtas_flash: New return code to indicate FW entitlement expiry
@ 2013-04-19 11:44 Vasant Hegde
  2013-04-23  0:40 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Vasant Hegde @ 2013-04-19 11:44 UTC (permalink / raw)
  To: benh, linuxppc-dev, paulus

Add new return code to rtas_flash to indicate firmware entitlement
expiry. This will be used by the update_flash script to return
appropriate message to the user.

Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/rtas_flash.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
index a7020d2..0a12c16 100644
--- a/arch/powerpc/kernel/rtas_flash.c
+++ b/arch/powerpc/kernel/rtas_flash.c
@@ -64,6 +64,7 @@
 #define VALIDATE_TMP_COMMIT_DL 4     /* Validate Return Status */
 #define VALIDATE_TMP_COMMIT    5     /* Validate Return Status */
 #define VALIDATE_TMP_UPDATE_DL 6     /* Validate Return Status */
+#define VALIDATE_OUT_OF_WRNTY  7     /* Validate Return Status */
 
 /* ibm,manage-flash-image operation tokens */
 #define RTAS_REJECT_TMP_IMG   0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc/rtas_flash: New return code to indicate FW entitlement expiry
  2013-04-19 11:44 [PATCH] powerpc/rtas_flash: New return code to indicate FW entitlement expiry Vasant Hegde
@ 2013-04-23  0:40 ` Benjamin Herrenschmidt
  2013-04-23  5:05   ` Ananth N Mavinakayanahalli
  2013-04-23  5:29   ` Vasant Hegde
  0 siblings, 2 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2013-04-23  0:40 UTC (permalink / raw)
  To: Vasant Hegde; +Cc: paulus, linuxppc-dev

On Fri, 2013-04-19 at 17:14 +0530, Vasant Hegde wrote:
> Add new return code to rtas_flash to indicate firmware entitlement
> expiry. This will be used by the update_flash script to return
> appropriate message to the user.

What's the point of that patch ? It adds a definition to a private .c
file not exposed to user space and doesn't do anything with it ...

Ben.

> Signed-off-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
> ---
>  arch/powerpc/kernel/rtas_flash.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
> index a7020d2..0a12c16 100644
> --- a/arch/powerpc/kernel/rtas_flash.c
> +++ b/arch/powerpc/kernel/rtas_flash.c
> @@ -64,6 +64,7 @@
>  #define VALIDATE_TMP_COMMIT_DL 4     /* Validate Return Status */
>  #define VALIDATE_TMP_COMMIT    5     /* Validate Return Status */
>  #define VALIDATE_TMP_UPDATE_DL 6     /* Validate Return Status */
> +#define VALIDATE_OUT_OF_WRNTY  7     /* Validate Return Status */
>  
>  /* ibm,manage-flash-image operation tokens */
>  #define RTAS_REJECT_TMP_IMG   0

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc/rtas_flash: New return code to indicate FW entitlement expiry
  2013-04-23  0:40 ` Benjamin Herrenschmidt
@ 2013-04-23  5:05   ` Ananth N Mavinakayanahalli
  2013-04-23  5:32     ` Benjamin Herrenschmidt
  2013-04-23  5:29   ` Vasant Hegde
  1 sibling, 1 reply; 6+ messages in thread
From: Ananth N Mavinakayanahalli @ 2013-04-23  5:05 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Vasant Hegde, paulus, linuxppc-dev

On Tue, Apr 23, 2013 at 10:40:10AM +1000, Benjamin Herrenschmidt wrote:
> On Fri, 2013-04-19 at 17:14 +0530, Vasant Hegde wrote:
> > Add new return code to rtas_flash to indicate firmware entitlement
> > expiry. This will be used by the update_flash script to return
> > appropriate message to the user.
> 
> What's the point of that patch ? It adds a definition to a private .c
> file not exposed to user space and doesn't do anything with it ...

Ben,

The userspace update_flash script invokes the rtas_flash module. With
upcoming System p servers, the firmware will have the entitlement dates
encoded in it and RTAS will return an error if the entitlement has
expired. All we need from this module is for it to return that new error
which will then be communicated to the user by the update_flash.

Ananth

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc/rtas_flash: New return code to indicate FW entitlement expiry
  2013-04-23  0:40 ` Benjamin Herrenschmidt
  2013-04-23  5:05   ` Ananth N Mavinakayanahalli
@ 2013-04-23  5:29   ` Vasant Hegde
  1 sibling, 0 replies; 6+ messages in thread
From: Vasant Hegde @ 2013-04-23  5:29 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: paulus, linuxppc-dev

On 04/23/2013 06:10 AM, Benjamin Herrenschmidt wrote:
> On Fri, 2013-04-19 at 17:14 +0530, Vasant Hegde wrote:
>> Add new return code to rtas_flash to indicate firmware entitlement
>> expiry. This will be used by the update_flash script to return
>> appropriate message to the user.
>
> What's the point of that patch ? It adds a definition to a private .c
> file not exposed to user space and doesn't do anything with it ...
>

This is to keep our code in sync with PAPR. And when we get this return
code from "ibm,validate-flash-image" RTAS call, user space tools (update_flash) 
reads output buffer via /proc interface to display appropriate message to user.

-Vasant


> Ben.
>
>> Signed-off-by: Ananth N Mavinakayanahalli<ananth@in.ibm.com>
>> Signed-off-by: Vasant Hegde<hegdevasant@linux.vnet.ibm.com>
>> ---
>>   arch/powerpc/kernel/rtas_flash.c |    1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/powerpc/kernel/rtas_flash.c b/arch/powerpc/kernel/rtas_flash.c
>> index a7020d2..0a12c16 100644
>> --- a/arch/powerpc/kernel/rtas_flash.c
>> +++ b/arch/powerpc/kernel/rtas_flash.c
>> @@ -64,6 +64,7 @@
>>   #define VALIDATE_TMP_COMMIT_DL 4     /* Validate Return Status */
>>   #define VALIDATE_TMP_COMMIT    5     /* Validate Return Status */
>>   #define VALIDATE_TMP_UPDATE_DL 6     /* Validate Return Status */
>> +#define VALIDATE_OUT_OF_WRNTY  7     /* Validate Return Status */
>>
>>   /* ibm,manage-flash-image operation tokens */
>>   #define RTAS_REJECT_TMP_IMG   0
>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc/rtas_flash: New return code to indicate FW entitlement expiry
  2013-04-23  5:05   ` Ananth N Mavinakayanahalli
@ 2013-04-23  5:32     ` Benjamin Herrenschmidt
  2013-04-23  5:47       ` Ananth N Mavinakayanahalli
  0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2013-04-23  5:32 UTC (permalink / raw)
  To: ananth; +Cc: Vasant Hegde, paulus, linuxppc-dev

On Tue, 2013-04-23 at 10:35 +0530, Ananth N Mavinakayanahalli wrote:
> On Tue, Apr 23, 2013 at 10:40:10AM +1000, Benjamin Herrenschmidt wrote:
> > On Fri, 2013-04-19 at 17:14 +0530, Vasant Hegde wrote:
> > > Add new return code to rtas_flash to indicate firmware entitlement
> > > expiry. This will be used by the update_flash script to return
> > > appropriate message to the user.
> > 
> > What's the point of that patch ? It adds a definition to a private .c
> > file not exposed to user space and doesn't do anything with it ...
> 
> Ben,
> 
> The userspace update_flash script invokes the rtas_flash module. With
> upcoming System p servers, the firmware will have the entitlement dates
> encoded in it and RTAS will return an error if the entitlement has
> expired. All we need from this module is for it to return that new error
> which will then be communicated to the user by the update_flash.

That doesn't answer my question :-)

What is the point of adding a #define to a piece of code without any user
of that definition and in a file that isn't exposed to user space ?

IE. What is the point of the patch ?

Cheers,
Ben.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] powerpc/rtas_flash: New return code to indicate FW entitlement expiry
  2013-04-23  5:32     ` Benjamin Herrenschmidt
@ 2013-04-23  5:47       ` Ananth N Mavinakayanahalli
  0 siblings, 0 replies; 6+ messages in thread
From: Ananth N Mavinakayanahalli @ 2013-04-23  5:47 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: Vasant Hegde, paulus, linuxppc-dev

On Tue, Apr 23, 2013 at 03:32:30PM +1000, Benjamin Herrenschmidt wrote:
> On Tue, 2013-04-23 at 10:35 +0530, Ananth N Mavinakayanahalli wrote:
> > On Tue, Apr 23, 2013 at 10:40:10AM +1000, Benjamin Herrenschmidt wrote:
> > > On Fri, 2013-04-19 at 17:14 +0530, Vasant Hegde wrote:
> > > > Add new return code to rtas_flash to indicate firmware entitlement
> > > > expiry. This will be used by the update_flash script to return
> > > > appropriate message to the user.
> > > 
> > > What's the point of that patch ? It adds a definition to a private .c
> > > file not exposed to user space and doesn't do anything with it ...
> > 
> > Ben,
> > 
> > The userspace update_flash script invokes the rtas_flash module. With
> > upcoming System p servers, the firmware will have the entitlement dates
> > encoded in it and RTAS will return an error if the entitlement has
> > expired. All we need from this module is for it to return that new error
> > which will then be communicated to the user by the update_flash.
> 
> That doesn't answer my question :-)
> 
> What is the point of adding a #define to a piece of code without any user
> of that definition and in a file that isn't exposed to user space ?
> 
> IE. What is the point of the patch ?

Strictly, we don't need this (kernel) update...

But to keep the code in sync with PAPR, this was added. Agree that the
other return codes also don't say much about what they are for. Will
redo the patch with that info for better code readability.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-04-23  5:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-19 11:44 [PATCH] powerpc/rtas_flash: New return code to indicate FW entitlement expiry Vasant Hegde
2013-04-23  0:40 ` Benjamin Herrenschmidt
2013-04-23  5:05   ` Ananth N Mavinakayanahalli
2013-04-23  5:32     ` Benjamin Herrenschmidt
2013-04-23  5:47       ` Ananth N Mavinakayanahalli
2013-04-23  5:29   ` 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.