diff mbox series

drivers: crypto: caam: jr: add .shutdown hook

Message ID 20230221054047.2140558-1-meenakshi.aggarwal@nxp.com (mailing list archive)
State Changes Requested
Delegated to: Herbert Xu
Headers show
Series drivers: crypto: caam: jr: add .shutdown hook | expand

Commit Message

Meenakshi Aggarwal Feb. 21, 2023, 5:40 a.m. UTC
From: Gaurav Jain <gaurav.jain@nxp.com>

add .shutdown hook in caam_jr driver to support kexec boot

Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
---
 drivers/crypto/caam/jr.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Vijay Balakrishna Feb. 21, 2023, 5:32 p.m. UTC | #1
On 2/20/2023 9:40 PM, meenakshi.aggarwal@nxp.com wrote:
> From: Gaurav Jain <gaurav.jain@nxp.com>
> 
> add .shutdown hook in caam_jr driver to support kexec boot
> 
> Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>

Tested-by: Vijay Balakrishna <vijayb@linux.microsoft.com>

Thanks,
Vijay

> ---
>   drivers/crypto/caam/jr.c | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
> index 8745fe3cb575..a2a99d09b4ad 100644
> --- a/drivers/crypto/caam/jr.c
> +++ b/drivers/crypto/caam/jr.c
> @@ -198,6 +198,11 @@ static int caam_jr_remove(struct platform_device *pdev)
>   	return ret;
>   }
>   
> +static void caam_jr_platform_shutdown(struct platform_device *pdev)
> +{
> +	caam_jr_remove(pdev);
> +}
> +
>   /* Main per-ring interrupt handler */
>   static irqreturn_t caam_jr_interrupt(int irq, void *st_dev)
>   {
> @@ -653,6 +658,7 @@ static struct platform_driver caam_jr_driver = {
>   	},
>   	.probe       = caam_jr_probe,
>   	.remove      = caam_jr_remove,
> +	.shutdown = caam_jr_platform_shutdown,
>   };
>   
>   static int __init jr_driver_init(void)
Pankaj Gupta Feb. 27, 2023, 7:32 a.m. UTC | #2
Change the year in the License header.

After changing, you can add the reviewed by me.
Reviewed-By: Pankaj Gupta <pankaj.gupta@nxp.com>

> -----Original Message-----
> From: Vijay Balakrishna <vijayb@linux.microsoft.com>
> Sent: Tuesday, February 21, 2023 11:02 PM
> To: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>; Horia Geanta
> <horia.geanta@nxp.com>; Varun Sethi <V.Sethi@nxp.com>; Pankaj Gupta
> <pankaj.gupta@nxp.com>; Gaurav Jain <gaurav.jain@nxp.com>;
> herbert@gondor.apana.org.au; davem@davemloft.net; linux-
> crypto@vger.kernel.org; linux-kernel@vger.kernel.org; Franck Lenormand
> <franck.lenormand@nxp.com>
> Cc: code@tyhicks.com
> Subject: [EXT] Re: [PATCH] drivers: crypto: caam: jr: add .shutdown hook
> 
> Caution: EXT Email
> 
> On 2/20/2023 9:40 PM, meenakshi.aggarwal@nxp.com wrote:
> > From: Gaurav Jain <gaurav.jain@nxp.com>
> >
> > add .shutdown hook in caam_jr driver to support kexec boot
> >
> > Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
> 
> Tested-by: Vijay Balakrishna <vijayb@linux.microsoft.com>
> 
> Thanks,
> Vijay
> 
> > ---
> >   drivers/crypto/caam/jr.c | 6 ++++++
> >   1 file changed, 6 insertions(+)
> >
> > diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c index
> > 8745fe3cb575..a2a99d09b4ad 100644
> > --- a/drivers/crypto/caam/jr.c
> > +++ b/drivers/crypto/caam/jr.c
> > @@ -198,6 +198,11 @@ static int caam_jr_remove(struct platform_device
> *pdev)
> >       return ret;
> >   }
> >
> > +static void caam_jr_platform_shutdown(struct platform_device *pdev) {
> > +     caam_jr_remove(pdev);
> > +}
> > +
> >   /* Main per-ring interrupt handler */
> >   static irqreturn_t caam_jr_interrupt(int irq, void *st_dev)
> >   {
> > @@ -653,6 +658,7 @@ static struct platform_driver caam_jr_driver = {
> >       },
> >       .probe       = caam_jr_probe,
> >       .remove      = caam_jr_remove,
> > +     .shutdown = caam_jr_platform_shutdown,
> >   };
> >
> >   static int __init jr_driver_init(void)
Meenakshi Aggarwal March 1, 2023, 5:39 a.m. UTC | #3
Copyright updated in another patch and sent v2, both patches are modifying same file so no need to make any changes in this patch.

> -----Original Message-----
> From: Pankaj Gupta <pankaj.gupta@nxp.com>
> Sent: Monday, February 27, 2023 1:03 PM
> To: Vijay Balakrishna <vijayb@linux.microsoft.com>; Meenakshi Aggarwal
> <meenakshi.aggarwal@nxp.com>; Horia Geanta <horia.geanta@nxp.com>;
> Varun Sethi <V.Sethi@nxp.com>; Gaurav Jain <gaurav.jain@nxp.com>;
> herbert@gondor.apana.org.au; davem@davemloft.net; linux-
> crypto@vger.kernel.org; linux-kernel@vger.kernel.org; Franck Lenormand
> <franck.lenormand@nxp.com>
> Cc: code@tyhicks.com
> Subject: RE: [EXT] Re: [PATCH] drivers: crypto: caam: jr: add .shutdown hook
> 
> Change the year in the License header.
> 
> After changing, you can add the reviewed by me.
> Reviewed-By: Pankaj Gupta <pankaj.gupta@nxp.com>
> 
> > -----Original Message-----
> > From: Vijay Balakrishna <vijayb@linux.microsoft.com>
> > Sent: Tuesday, February 21, 2023 11:02 PM
> > To: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>; Horia Geanta
> > <horia.geanta@nxp.com>; Varun Sethi <V.Sethi@nxp.com>; Pankaj Gupta
> > <pankaj.gupta@nxp.com>; Gaurav Jain <gaurav.jain@nxp.com>;
> > herbert@gondor.apana.org.au; davem@davemloft.net; linux-
> > crypto@vger.kernel.org; linux-kernel@vger.kernel.org; Franck Lenormand
> > <franck.lenormand@nxp.com>
> > Cc: code@tyhicks.com
> > Subject: [EXT] Re: [PATCH] drivers: crypto: caam: jr: add .shutdown
> > hook
> >
> > Caution: EXT Email
> >
> > On 2/20/2023 9:40 PM, meenakshi.aggarwal@nxp.com wrote:
> > > From: Gaurav Jain <gaurav.jain@nxp.com>
> > >
> > > add .shutdown hook in caam_jr driver to support kexec boot
> > >
> > > Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
> >
> > Tested-by: Vijay Balakrishna <vijayb@linux.microsoft.com>
> >
> > Thanks,
> > Vijay
> >
> > > ---
> > >   drivers/crypto/caam/jr.c | 6 ++++++
> > >   1 file changed, 6 insertions(+)
> > >
> > > diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
> > > index 8745fe3cb575..a2a99d09b4ad 100644
> > > --- a/drivers/crypto/caam/jr.c
> > > +++ b/drivers/crypto/caam/jr.c
> > > @@ -198,6 +198,11 @@ static int caam_jr_remove(struct
> > > platform_device
> > *pdev)
> > >       return ret;
> > >   }
> > >
> > > +static void caam_jr_platform_shutdown(struct platform_device *pdev) {
> > > +     caam_jr_remove(pdev);
> > > +}
> > > +
> > >   /* Main per-ring interrupt handler */
> > >   static irqreturn_t caam_jr_interrupt(int irq, void *st_dev)
> > >   {
> > > @@ -653,6 +658,7 @@ static struct platform_driver caam_jr_driver = {
> > >       },
> > >       .probe       = caam_jr_probe,
> > >       .remove      = caam_jr_remove,
> > > +     .shutdown = caam_jr_platform_shutdown,
> > >   };
> > >
> > >   static int __init jr_driver_init(void)
Meenakshi Aggarwal March 10, 2023, 10:33 a.m. UTC | #4
Hi Herbert,

If you have no comments then please apply the patch

> -----Original Message-----
> From: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
> Sent: Wednesday, March 1, 2023 11:09 AM
> To: Pankaj Gupta <pankaj.gupta@nxp.com>; Vijay Balakrishna
> <vijayb@linux.microsoft.com>; Horia Geanta <horia.geanta@nxp.com>; Varun
> Sethi <V.Sethi@nxp.com>; Gaurav Jain <gaurav.jain@nxp.com>;
> herbert@gondor.apana.org.au; davem@davemloft.net; linux-
> crypto@vger.kernel.org; linux-kernel@vger.kernel.org; Franck Lenormand
> <franck.lenormand@nxp.com>
> Cc: code@tyhicks.com
> Subject: RE: [EXT] Re: [PATCH] drivers: crypto: caam: jr: add .shutdown hook
> 
> Copyright updated in another patch and sent v2, both patches are modifying
> same file so no need to make any changes in this patch.
> 
> > -----Original Message-----
> > From: Pankaj Gupta <pankaj.gupta@nxp.com>
> > Sent: Monday, February 27, 2023 1:03 PM
> > To: Vijay Balakrishna <vijayb@linux.microsoft.com>; Meenakshi Aggarwal
> > <meenakshi.aggarwal@nxp.com>; Horia Geanta <horia.geanta@nxp.com>;
> > Varun Sethi <V.Sethi@nxp.com>; Gaurav Jain <gaurav.jain@nxp.com>;
> > herbert@gondor.apana.org.au; davem@davemloft.net; linux-
> > crypto@vger.kernel.org; linux-kernel@vger.kernel.org; Franck Lenormand
> > <franck.lenormand@nxp.com>
> > Cc: code@tyhicks.com
> > Subject: RE: [EXT] Re: [PATCH] drivers: crypto: caam: jr: add
> > .shutdown hook
> >
> > Change the year in the License header.
> >
> > After changing, you can add the reviewed by me.
> > Reviewed-By: Pankaj Gupta <pankaj.gupta@nxp.com>
> >
> > > -----Original Message-----
> > > From: Vijay Balakrishna <vijayb@linux.microsoft.com>
> > > Sent: Tuesday, February 21, 2023 11:02 PM
> > > To: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>; Horia Geanta
> > > <horia.geanta@nxp.com>; Varun Sethi <V.Sethi@nxp.com>; Pankaj Gupta
> > > <pankaj.gupta@nxp.com>; Gaurav Jain <gaurav.jain@nxp.com>;
> > > herbert@gondor.apana.org.au; davem@davemloft.net; linux-
> > > crypto@vger.kernel.org; linux-kernel@vger.kernel.org; Franck
> > > Lenormand <franck.lenormand@nxp.com>
> > > Cc: code@tyhicks.com
> > > Subject: [EXT] Re: [PATCH] drivers: crypto: caam: jr: add .shutdown
> > > hook
> > >
> > > Caution: EXT Email
> > >
> > > On 2/20/2023 9:40 PM, meenakshi.aggarwal@nxp.com wrote:
> > > > From: Gaurav Jain <gaurav.jain@nxp.com>
> > > >
> > > > add .shutdown hook in caam_jr driver to support kexec boot
> > > >
> > > > Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
> > >
> > > Tested-by: Vijay Balakrishna <vijayb@linux.microsoft.com>
> > >
> > > Thanks,
> > > Vijay
> > >
> > > > ---
> > > >   drivers/crypto/caam/jr.c | 6 ++++++
> > > >   1 file changed, 6 insertions(+)
> > > >
> > > > diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
> > > > index 8745fe3cb575..a2a99d09b4ad 100644
> > > > --- a/drivers/crypto/caam/jr.c
> > > > +++ b/drivers/crypto/caam/jr.c
> > > > @@ -198,6 +198,11 @@ static int caam_jr_remove(struct
> > > > platform_device
> > > *pdev)
> > > >       return ret;
> > > >   }
> > > >
> > > > +static void caam_jr_platform_shutdown(struct platform_device *pdev) {
> > > > +     caam_jr_remove(pdev);
> > > > +}
> > > > +
> > > >   /* Main per-ring interrupt handler */
> > > >   static irqreturn_t caam_jr_interrupt(int irq, void *st_dev)
> > > >   {
> > > > @@ -653,6 +658,7 @@ static struct platform_driver caam_jr_driver = {
> > > >       },
> > > >       .probe       = caam_jr_probe,
> > > >       .remove      = caam_jr_remove,
> > > > +     .shutdown = caam_jr_platform_shutdown,
> > > >   };
> > > >
> > > >   static int __init jr_driver_init(void)
Herbert Xu March 10, 2023, 10:53 a.m. UTC | #5
On Tue, Feb 21, 2023 at 11:10:47AM +0530, meenakshi.aggarwal@nxp.com wrote:
>
> @@ -653,6 +658,7 @@ static struct platform_driver caam_jr_driver = {
>  	},
>  	.probe       = caam_jr_probe,
>  	.remove      = caam_jr_remove,
> +	.shutdown = caam_jr_platform_shutdown,

Please make your new addition line up with the rest of the code.

Thanks,
diff mbox series

Patch

diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
index 8745fe3cb575..a2a99d09b4ad 100644
--- a/drivers/crypto/caam/jr.c
+++ b/drivers/crypto/caam/jr.c
@@ -198,6 +198,11 @@  static int caam_jr_remove(struct platform_device *pdev)
 	return ret;
 }
 
+static void caam_jr_platform_shutdown(struct platform_device *pdev)
+{
+	caam_jr_remove(pdev);
+}
+
 /* Main per-ring interrupt handler */
 static irqreturn_t caam_jr_interrupt(int irq, void *st_dev)
 {
@@ -653,6 +658,7 @@  static struct platform_driver caam_jr_driver = {
 	},
 	.probe       = caam_jr_probe,
 	.remove      = caam_jr_remove,
+	.shutdown = caam_jr_platform_shutdown,
 };
 
 static int __init jr_driver_init(void)