Re: [PATCH] iio: trigger: sysfs: Disable irqs before calling iio_trigger_poll()

2020-08-13 Thread Lars-Peter Clausen
On 8/12/20 1:01 PM, Christian Eggers wrote: Hi Lars On Monday, 3 August 2020, 08:52:54 CEST, Lars-Peter Clausen wrote: On 8/3/20 8:44 AM, Christian Eggers wrote: ... is my patch sufficient, or would you prefer a different solution? The code in normal upstream is correct, there is no need to p

Re: [PATCH] iio: trigger: sysfs: Disable irqs before calling iio_trigger_poll()

2020-08-12 Thread Christian Eggers
Hi Lars On Monday, 3 August 2020, 08:52:54 CEST, Lars-Peter Clausen wrote: > On 8/3/20 8:44 AM, Christian Eggers wrote: > > ... > > is my patch sufficient, or would you prefer a different solution? > > The code in normal upstream is correct, there is no need to patch it > since iio_sysfs_trigger_

Re: [PATCH] iio: trigger: sysfs: Disable irqs before calling iio_trigger_poll()

2020-08-02 Thread Lars-Peter Clausen
On 8/3/20 8:44 AM, Christian Eggers wrote: Hi Lars, On Monday, 3 August 2020, 08:37:43 CEST, Lars-Peter Clausen wrote: The sysfs IIO trigger uses irq_work to schedule the iio_trigger_poll() and the promise of irq_work is that the callback will run in hard IRQ context. That's the whole point of

Re: [PATCH] iio: trigger: sysfs: Disable irqs before calling iio_trigger_poll()

2020-08-02 Thread Christian Eggers
Hi Lars, On Monday, 3 August 2020, 08:37:43 CEST, Lars-Peter Clausen wrote: > The sysfs IIO trigger uses irq_work to schedule the iio_trigger_poll() > and the promise of irq_work is that the callback will run in hard IRQ > context. That's the whole point of it. > > irq_work_run_list(), which show

Re: [PATCH] iio: trigger: sysfs: Disable irqs before calling iio_trigger_poll()

2020-08-02 Thread Lars-Peter Clausen
On 8/3/20 7:16 AM, Christian Eggers wrote: On Saturday, 1 August 2020, 18:02:34 CEST, Jonathan Cameron wrote: On Mon, 27 Jul 2020 16:57:13 +0200 Christian Eggers wrote: iio_trigger_poll() calls generic_handle_irq(). This function expects to be run with local IRQs disabled. Was there an error

Re: [PATCH] iio: trigger: sysfs: Disable irqs before calling iio_trigger_poll()

2020-08-02 Thread Christian Eggers
On Saturday, 1 August 2020, 18:02:34 CEST, Jonathan Cameron wrote: > On Mon, 27 Jul 2020 16:57:13 +0200 > > Christian Eggers wrote: > > iio_trigger_poll() calls generic_handle_irq(). This function expects to > > be run with local IRQs disabled. > > Was there an error or warning that lead to this

Re: [PATCH] iio: trigger: sysfs: Disable irqs before calling iio_trigger_poll()

2020-08-02 Thread Lars-Peter Clausen
On 8/1/20 6:02 PM, Jonathan Cameron wrote: On Mon, 27 Jul 2020 16:57:13 +0200 Christian Eggers wrote: iio_trigger_poll() calls generic_handle_irq(). This function expects to be run with local IRQs disabled. Was there an error or warning that lead to this patch? Or can you point to what call i

Re: [PATCH] iio: trigger: sysfs: Disable irqs before calling iio_trigger_poll()

2020-08-01 Thread Jonathan Cameron
On Mon, 27 Jul 2020 16:57:13 +0200 Christian Eggers wrote: > iio_trigger_poll() calls generic_handle_irq(). This function expects to > be run with local IRQs disabled. Was there an error or warning that lead to this patch? Or can you point to what call in generic_handle_irq is making the assumpt

[PATCH] iio: trigger: sysfs: Disable irqs before calling iio_trigger_poll()

2020-07-27 Thread Christian Eggers
iio_trigger_poll() calls generic_handle_irq(). This function expects to be run with local IRQs disabled. Signed-off-by: Christian Eggers Cc: sta...@vger.kernel.org --- drivers/iio/trigger/iio-trig-sysfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iio/trigger/iio-trig-sysfs.c