From: Martin Kaiser <martin@kaiser.cx> To: Lucas Stach <l.stach@pengutronix.de> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <kernel@pengutronix.de>, Juergen Borleis <jbe@pengutronix.de>, Fabio Estevam <fabio.estevam@nxp.com>, linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com Subject: Re: [PATCH v2] rtc: imxdi: use the security violation interrupt Date: Thu, 22 Dec 2016 00:06:38 +0100 [thread overview] Message-ID: <20161221230638.GA12514@reykholt.kaiser.cx> (raw) In-Reply-To: <1482225821.2293.43.camel@pengutronix.de> Hello Lucas, thanks for taking the time to review my patch. Thus wrote Lucas Stach (l.stach@pengutronix.de): > > diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c > > index 67b56b8..ec6077a0 100644 > > --- a/drivers/rtc/rtc-imxdi.c > > +++ b/drivers/rtc/rtc-imxdi.c > > @@ -109,6 +109,7 @@ > > * @rtc: pointer to rtc struct > > * @ioaddr: IO registers pointer > > * @irq: dryice normal interrupt > > + * @sec_irq: dryice security violation interrupt > This isn't used outside the probe routine, so doesn't need to be saved > in the driver data. The same goes for imxdi->irq, I made this a local variable as well. > > + rc = devm_request_irq(&pdev->dev, imxdi->sec_irq, dryice_sec_irq, > > + IRQF_SHARED, pdev->name, imxdi); > > + if (rc) { > > + dev_warn(&pdev->dev, "security violation interrupt not available.\n"); > > + /* this is not an error, see above */ > > + } > > + > Please just fold this into the "if (rc > 0)" path above. Are you sure that this would be correct? My understanding is that we should mask the interrupts by writing 0 into DIER and set the DryIce to a sane state in di_handle_state() before we install interrupt handlers. Best regards, Martin
WARNING: multiple messages have this Message-ID (diff)
From: Martin Kaiser <martin@kaiser.cx> To: Lucas Stach <l.stach@pengutronix.de> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <kernel@pengutronix.de>, Juergen Borleis <jbe@pengutronix.de>, Fabio Estevam <fabio.estevam@nxp.com>, linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com Subject: [rtc-linux] Re: [PATCH v2] rtc: imxdi: use the security violation interrupt Date: Thu, 22 Dec 2016 00:06:38 +0100 [thread overview] Message-ID: <20161221230638.GA12514@reykholt.kaiser.cx> (raw) In-Reply-To: <1482225821.2293.43.camel@pengutronix.de> Hello Lucas, thanks for taking the time to review my patch. Thus wrote Lucas Stach (l.stach@pengutronix.de): > > diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c > > index 67b56b8..ec6077a0 100644 > > --- a/drivers/rtc/rtc-imxdi.c > > +++ b/drivers/rtc/rtc-imxdi.c > > @@ -109,6 +109,7 @@ > > * @rtc: pointer to rtc struct > > * @ioaddr: IO registers pointer > > * @irq: dryice normal interrupt > > + * @sec_irq: dryice security violation interrupt > This isn't used outside the probe routine, so doesn't need to be saved > in the driver data. The same goes for imxdi->irq, I made this a local variable as well. > > + rc = devm_request_irq(&pdev->dev, imxdi->sec_irq, dryice_sec_irq, > > + IRQF_SHARED, pdev->name, imxdi); > > + if (rc) { > > + dev_warn(&pdev->dev, "security violation interrupt not available.\n"); > > + /* this is not an error, see above */ > > + } > > + > Please just fold this into the "if (rc > 0)" path above. Are you sure that this would be correct? My understanding is that we should mask the interrupts by writing 0 into DIER and set the DryIce to a sane state in di_handle_state() before we install interrupt handlers. Best regards, Martin -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
next prev parent reply other threads:[~2016-12-21 23:06 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-11-19 13:03 [PATCH 1/2] rtc: imxdi: (trivial) fix a typo Martin Kaiser 2016-11-19 13:03 ` [rtc-linux] " Martin Kaiser 2016-11-19 13:03 ` [PATCH 2/2] rtc: imxdi: use the security violation interrupt Martin Kaiser 2016-11-19 13:03 ` [rtc-linux] " Martin Kaiser 2016-12-07 15:47 ` Alexandre Belloni 2016-12-07 15:47 ` [rtc-linux] " Alexandre Belloni 2016-12-07 15:48 ` [PATCH 1/2] rtc: imxdi: (trivial) fix a typo Alexandre Belloni 2016-12-07 15:48 ` [rtc-linux] " Alexandre Belloni 2016-12-19 22:41 ` [PATCH v2] rtc: imxdi: use the security violation interrupt Martin Kaiser 2016-12-19 22:41 ` [rtc-linux] " Martin Kaiser 2016-12-20 9:23 ` Lucas Stach 2016-12-20 9:23 ` [rtc-linux] " Lucas Stach 2016-12-21 23:06 ` Martin Kaiser [this message] 2016-12-21 23:06 ` Martin Kaiser 2016-12-21 22:56 ` [PATCH 1/2 v3] " Martin Kaiser 2016-12-21 22:56 ` [rtc-linux] " Martin Kaiser 2016-12-21 23:01 ` [PATCH 2/2 v2] ARM: i.MX25: add the optional security violation irq Martin Kaiser 2016-12-21 23:01 ` [rtc-linux] " Martin Kaiser 2016-12-30 2:44 ` Shawn Guo 2016-12-30 2:44 ` [rtc-linux] " Shawn Guo 2017-01-03 18:49 ` [PATCH 1/3 v4] rtc: imxdi: use the security violation interrupt Martin Kaiser 2017-01-03 18:49 ` [rtc-linux] " Martin Kaiser 2017-01-10 23:46 ` Alexandre Belloni 2017-01-10 23:46 ` [rtc-linux] " Alexandre Belloni 2017-01-03 18:50 ` [PATCH 2/3] ARM: dts: imx25.dtsi: DryIce " Martin Kaiser 2017-01-03 18:50 ` [rtc-linux] " Martin Kaiser 2017-01-10 1:53 ` Shawn Guo 2017-01-10 1:53 ` [rtc-linux] " Shawn Guo 2017-01-03 18:51 ` [PATCH 3/3] Documentation: dt: rtc-imxdi: " Martin Kaiser 2017-01-03 18:51 ` [rtc-linux] " Martin Kaiser 2017-01-10 23:47 ` Alexandre Belloni 2017-01-10 23:47 ` [rtc-linux] " Alexandre Belloni
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20161221230638.GA12514@reykholt.kaiser.cx \ --to=martin@kaiser.cx \ --cc=alexandre.belloni@free-electrons.com \ --cc=fabio.estevam@nxp.com \ --cc=jbe@pengutronix.de \ --cc=kernel@pengutronix.de \ --cc=l.stach@pengutronix.de \ --cc=linux-kernel@vger.kernel.org \ --cc=rtc-linux@googlegroups.com \ --cc=shawnguo@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.