* [PATCH 1/5] cobalt/syscall: dovetail: do not expose clock frequency to user
2021-03-27 10:35 [Dovetail PATCH 0/5] More clock and IRQ abstraction Philippe Gerum
@ 2021-03-27 10:35 ` Philippe Gerum
2021-03-27 10:35 ` [PATCH 2/5] cobalt/sched: dovetail: disable separate per-IRQ statistics Philippe Gerum
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Philippe Gerum @ 2021-03-27 10:35 UTC (permalink / raw)
To: xenomai
From: Philippe Gerum <rpm@xenomai.org>
We don't need this with Dovetail, there is no timestamp arithmetics to
perform in userland whatsoever: we get timestamps from the regular
vDSO-based clock_gettime() call.
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
include/cobalt/kernel/dovetail/pipeline/pipeline.h | 6 ++++++
include/cobalt/kernel/ipipe/pipeline/pipeline.h | 6 ++++++
kernel/cobalt/posix/syscall.c | 2 +-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/include/cobalt/kernel/dovetail/pipeline/pipeline.h b/include/cobalt/kernel/dovetail/pipeline/pipeline.h
index a2e025e35..1d4e3f91d 100644
--- a/include/cobalt/kernel/dovetail/pipeline/pipeline.h
+++ b/include/cobalt/kernel/dovetail/pipeline/pipeline.h
@@ -7,6 +7,7 @@
#include <linux/irq_pipeline.h>
#include <cobalt/kernel/assert.h>
+#include <asm/xenomai/features.h>
typedef unsigned long spl_t;
@@ -102,4 +103,9 @@ static inline void pipeline_prepare_panic(void)
/* N/A */
}
+static inline void pipeline_collect_features(struct cobalt_featinfo *f)
+{
+ f->clock_freq = 0; /* N/A */
+}
+
#endif /* !_COBALT_KERNEL_DOVETAIL_PIPELINE_H */
diff --git a/include/cobalt/kernel/ipipe/pipeline/pipeline.h b/include/cobalt/kernel/ipipe/pipeline/pipeline.h
index ceba7e3b0..e9e357bb0 100644
--- a/include/cobalt/kernel/ipipe/pipeline/pipeline.h
+++ b/include/cobalt/kernel/ipipe/pipeline/pipeline.h
@@ -10,6 +10,7 @@
#endif
#include <pipeline/machine.h>
+#include <asm/xenomai/features.h>
#define xnsched_realtime_domain cobalt_pipeline.domain
@@ -75,4 +76,9 @@ static inline void pipeline_prepare_panic(void)
ipipe_prepare_panic();
}
+static inline void pipeline_collect_features(struct cobalt_featinfo *f)
+{
+ f->clock_freq = cobalt_pipeline.clock_freq;
+}
+
#endif /* !_COBALT_KERNEL_IPIPE_PIPELINE_H */
diff --git a/kernel/cobalt/posix/syscall.c b/kernel/cobalt/posix/syscall.c
index 3b3eaee8e..b9f33953a 100644
--- a/kernel/cobalt/posix/syscall.c
+++ b/kernel/cobalt/posix/syscall.c
@@ -332,7 +332,7 @@ static COBALT_SYSCALL(bind, lostage,
f->feat_abirev = XENOMAI_ABI_REV;
collect_arch_features(f);
- f->clock_freq = cobalt_pipeline.clock_freq;
+ pipeline_collect_features(f);
f->vdso_offset = cobalt_umm_offset(&cobalt_ppd_get(1)->umm, nkvdso);
if (cobalt_copy_to_user(u_breq, &breq, sizeof(breq)))
--
2.29.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 2/5] cobalt/sched: dovetail: disable separate per-IRQ statistics
2021-03-27 10:35 [Dovetail PATCH 0/5] More clock and IRQ abstraction Philippe Gerum
2021-03-27 10:35 ` [PATCH 1/5] cobalt/syscall: dovetail: do not expose clock frequency to user Philippe Gerum
@ 2021-03-27 10:35 ` Philippe Gerum
2021-04-07 10:53 ` Jan Kiszka
2021-03-27 10:35 ` [PATCH 3/5] cobalt/intr: pipeline: abstract interrupt system inits Philippe Gerum
` (3 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Philippe Gerum @ 2021-03-27 10:35 UTC (permalink / raw)
To: xenomai
From: Philippe Gerum <rpm@xenomai.org>
This feature should be available directly from Dovetail.
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
kernel/cobalt/Kconfig | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/cobalt/Kconfig b/kernel/cobalt/Kconfig
index a266011d4..88953ff24 100644
--- a/kernel/cobalt/Kconfig
+++ b/kernel/cobalt/Kconfig
@@ -137,7 +137,7 @@ config XENO_OPT_STATS
config XENO_OPT_STATS_IRQS
bool "Account IRQ handlers separatly"
- depends on XENO_OPT_STATS
+ depends on XENO_OPT_STATS && IPIPE
default y
help
When enabled, the runtime of interrupt handlers is accounted
@@ -145,6 +145,8 @@ config XENO_OPT_STATS_IRQS
occurrence of shared interrupts is accounted on a per-handler
basis.
+ This option is available to legacy I-pipe builds only.
+
config XENO_OPT_SHIRQ
bool "Shared interrupts"
help
--
2.29.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 2/5] cobalt/sched: dovetail: disable separate per-IRQ statistics
2021-03-27 10:35 ` [PATCH 2/5] cobalt/sched: dovetail: disable separate per-IRQ statistics Philippe Gerum
@ 2021-04-07 10:53 ` Jan Kiszka
2021-04-07 11:55 ` Philippe Gerum
0 siblings, 1 reply; 11+ messages in thread
From: Jan Kiszka @ 2021-04-07 10:53 UTC (permalink / raw)
To: Philippe Gerum, xenomai
On 27.03.21 11:35, Philippe Gerum wrote:
> From: Philippe Gerum <rpm@xenomai.org>
>
> This feature should be available directly from Dovetail.
>
What is the corresponding kernel option of Dovetail? Can't we select it
here for compat reasons?
Jan
> Signed-off-by: Philippe Gerum <rpm@xenomai.org>
> ---
> kernel/cobalt/Kconfig | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/cobalt/Kconfig b/kernel/cobalt/Kconfig
> index a266011d4..88953ff24 100644
> --- a/kernel/cobalt/Kconfig
> +++ b/kernel/cobalt/Kconfig
> @@ -137,7 +137,7 @@ config XENO_OPT_STATS
>
> config XENO_OPT_STATS_IRQS
> bool "Account IRQ handlers separatly"
> - depends on XENO_OPT_STATS
> + depends on XENO_OPT_STATS && IPIPE
> default y
> help
> When enabled, the runtime of interrupt handlers is accounted
> @@ -145,6 +145,8 @@ config XENO_OPT_STATS_IRQS
> occurrence of shared interrupts is accounted on a per-handler
> basis.
>
> + This option is available to legacy I-pipe builds only.
> +
> config XENO_OPT_SHIRQ
> bool "Shared interrupts"
> help
>
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/5] cobalt/sched: dovetail: disable separate per-IRQ statistics
2021-04-07 10:53 ` Jan Kiszka
@ 2021-04-07 11:55 ` Philippe Gerum
2021-04-07 16:16 ` Jan Kiszka
0 siblings, 1 reply; 11+ messages in thread
From: Philippe Gerum @ 2021-04-07 11:55 UTC (permalink / raw)
To: Jan Kiszka; +Cc: xenomai
Jan Kiszka <jan.kiszka@siemens.com> writes:
> On 27.03.21 11:35, Philippe Gerum wrote:
>> From: Philippe Gerum <rpm@xenomai.org>
>>
>> This feature should be available directly from Dovetail.
>>
>
> What is the corresponding kernel option of Dovetail? Can't we select it
> here for compat reasons?
>
Not yet implemented. I need to think about it a bit more.
> Jan
>
>> Signed-off-by: Philippe Gerum <rpm@xenomai.org>
>> ---
>> kernel/cobalt/Kconfig | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/kernel/cobalt/Kconfig b/kernel/cobalt/Kconfig
>> index a266011d4..88953ff24 100644
>> --- a/kernel/cobalt/Kconfig
>> +++ b/kernel/cobalt/Kconfig
>> @@ -137,7 +137,7 @@ config XENO_OPT_STATS
>>
>> config XENO_OPT_STATS_IRQS
>> bool "Account IRQ handlers separatly"
>> - depends on XENO_OPT_STATS
>> + depends on XENO_OPT_STATS && IPIPE
>> default y
>> help
>> When enabled, the runtime of interrupt handlers is accounted
>> @@ -145,6 +145,8 @@ config XENO_OPT_STATS_IRQS
>> occurrence of shared interrupts is accounted on a per-handler
>> basis.
>>
>> + This option is available to legacy I-pipe builds only.
>> +
>> config XENO_OPT_SHIRQ
>> bool "Shared interrupts"
>> help
>>
--
Philippe.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/5] cobalt/sched: dovetail: disable separate per-IRQ statistics
2021-04-07 11:55 ` Philippe Gerum
@ 2021-04-07 16:16 ` Jan Kiszka
0 siblings, 0 replies; 11+ messages in thread
From: Jan Kiszka @ 2021-04-07 16:16 UTC (permalink / raw)
To: Philippe Gerum; +Cc: xenomai
On 07.04.21 13:55, Philippe Gerum wrote:
>
> Jan Kiszka <jan.kiszka@siemens.com> writes:
>
>> On 27.03.21 11:35, Philippe Gerum wrote:
>>> From: Philippe Gerum <rpm@xenomai.org>
>>>
>>> This feature should be available directly from Dovetail.
>>>
>>
>> What is the corresponding kernel option of Dovetail? Can't we select it
>> here for compat reasons?
>>
>
> Not yet implemented. I need to think about it a bit more.
>
Ah, misread the comment then. Makes sense as it is for now.
Jan
>> Jan
>>
>>> Signed-off-by: Philippe Gerum <rpm@xenomai.org>
>>> ---
>>> kernel/cobalt/Kconfig | 4 +++-
>>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/kernel/cobalt/Kconfig b/kernel/cobalt/Kconfig
>>> index a266011d4..88953ff24 100644
>>> --- a/kernel/cobalt/Kconfig
>>> +++ b/kernel/cobalt/Kconfig
>>> @@ -137,7 +137,7 @@ config XENO_OPT_STATS
>>>
>>> config XENO_OPT_STATS_IRQS
>>> bool "Account IRQ handlers separatly"
>>> - depends on XENO_OPT_STATS
>>> + depends on XENO_OPT_STATS && IPIPE
>>> default y
>>> help
>>> When enabled, the runtime of interrupt handlers is accounted
>>> @@ -145,6 +145,8 @@ config XENO_OPT_STATS_IRQS
>>> occurrence of shared interrupts is accounted on a per-handler
>>> basis.
>>>
>>> + This option is available to legacy I-pipe builds only.
>>> +
>>> config XENO_OPT_SHIRQ
>>> bool "Shared interrupts"
>>> help
>>>
>
>
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 3/5] cobalt/intr: pipeline: abstract interrupt system inits
2021-03-27 10:35 [Dovetail PATCH 0/5] More clock and IRQ abstraction Philippe Gerum
2021-03-27 10:35 ` [PATCH 1/5] cobalt/syscall: dovetail: do not expose clock frequency to user Philippe Gerum
2021-03-27 10:35 ` [PATCH 2/5] cobalt/sched: dovetail: disable separate per-IRQ statistics Philippe Gerum
@ 2021-03-27 10:35 ` Philippe Gerum
2021-03-27 10:35 ` [PATCH 4/5] cobalt/intr: dovetail: implement interrupt management, handling Philippe Gerum
` (2 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Philippe Gerum @ 2021-03-27 10:35 UTC (permalink / raw)
To: xenomai
From: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
include/cobalt/kernel/intr.h | 7 +------
include/cobalt/kernel/ipipe/pipeline/irq.h | 14 ++++++++++++++
2 files changed, 15 insertions(+), 6 deletions(-)
create mode 100644 include/cobalt/kernel/ipipe/pipeline/irq.h
diff --git a/include/cobalt/kernel/intr.h b/include/cobalt/kernel/intr.h
index 107b16bfc..2636c2cbc 100644
--- a/include/cobalt/kernel/intr.h
+++ b/include/cobalt/kernel/intr.h
@@ -21,6 +21,7 @@
#include <linux/spinlock.h>
#include <cobalt/kernel/stat.h>
+#include <pipeline/irq.h>
/**
* @addtogroup cobalt_core_irq
@@ -99,16 +100,10 @@ struct xnintr_iterator {
struct xnintr *prev; /** Previously visited xnintr object (internal use). */
};
-int xnintr_mount(void);
-
void xnintr_core_clock_handler(void);
void xnintr_host_tick(struct xnsched *sched);
-void xnintr_init_proc(void);
-
-void xnintr_cleanup_proc(void);
-
/* Public interface. */
int xnintr_init(struct xnintr *intr,
diff --git a/include/cobalt/kernel/ipipe/pipeline/irq.h b/include/cobalt/kernel/ipipe/pipeline/irq.h
new file mode 100644
index 000000000..a2db772d3
--- /dev/null
+++ b/include/cobalt/kernel/ipipe/pipeline/irq.h
@@ -0,0 +1,14 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0
+ */
+
+#ifndef _COBALT_KERNEL_IPIPE_IRQ_H
+#define _COBALT_KERNEL_IPIPE_IRQ_H
+
+void xnintr_init_proc(void);
+
+void xnintr_cleanup_proc(void);
+
+int xnintr_mount(void);
+
+#endif /* !_COBALT_KERNEL_IPIPE_IRQ_H */
--
2.29.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 4/5] cobalt/intr: dovetail: implement interrupt management, handling
2021-03-27 10:35 [Dovetail PATCH 0/5] More clock and IRQ abstraction Philippe Gerum
` (2 preceding siblings ...)
2021-03-27 10:35 ` [PATCH 3/5] cobalt/intr: pipeline: abstract interrupt system inits Philippe Gerum
@ 2021-03-27 10:35 ` Philippe Gerum
2021-03-27 10:35 ` [PATCH 5/5] cobalt/intr: dovetail: Don't do anything in xnintr_enable/disable Philippe Gerum
2021-04-07 16:20 ` [Dovetail PATCH 0/5] More clock and IRQ abstraction Jan Kiszka
5 siblings, 0 replies; 11+ messages in thread
From: Philippe Gerum @ 2021-03-27 10:35 UTC (permalink / raw)
To: xenomai
From: Philippe Gerum <rpm@xenomai.org>
Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
include/cobalt/kernel/dovetail/pipeline/irq.h | 24 ++++
kernel/cobalt/dovetail/Makefile | 2 +-
kernel/cobalt/dovetail/intr.c | 133 ++++++++++++++++++
3 files changed, 158 insertions(+), 1 deletion(-)
create mode 100644 include/cobalt/kernel/dovetail/pipeline/irq.h
create mode 100644 kernel/cobalt/dovetail/intr.c
diff --git a/include/cobalt/kernel/dovetail/pipeline/irq.h b/include/cobalt/kernel/dovetail/pipeline/irq.h
new file mode 100644
index 000000000..55d9b8ff1
--- /dev/null
+++ b/include/cobalt/kernel/dovetail/pipeline/irq.h
@@ -0,0 +1,24 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0
+ */
+
+#ifndef _COBALT_KERNEL_DOVETAIL_IRQ_H
+#define _COBALT_KERNEL_DOVETAIL_IRQ_H
+
+static inline void xnintr_init_proc(void)
+{
+ /* N/A */
+}
+
+static inline void xnintr_cleanup_proc(void)
+{
+ /* N/A */
+}
+
+static inline int xnintr_mount(void)
+{
+ /* N/A */
+ return 0;
+}
+
+#endif /* !_COBALT_KERNEL_DOVETAIL_IRQ_H */
diff --git a/kernel/cobalt/dovetail/Makefile b/kernel/cobalt/dovetail/Makefile
index 1ecbd97a9..f49d3a06b 100644
--- a/kernel/cobalt/dovetail/Makefile
+++ b/kernel/cobalt/dovetail/Makefile
@@ -2,4 +2,4 @@ ccflags-y += -I$(srctree)/kernel
obj-y += pipeline.o
-pipeline-y := init.o kevents.o sched.o tick.o syscall.o
+pipeline-y := init.o kevents.o sched.o tick.o syscall.o intr.o
diff --git a/kernel/cobalt/dovetail/intr.c b/kernel/cobalt/dovetail/intr.c
new file mode 100644
index 000000000..068dfe306
--- /dev/null
+++ b/kernel/cobalt/dovetail/intr.c
@@ -0,0 +1,133 @@
+/*
+ * SPDX-License-Identifier: GPL-2.0
+ */
+
+#include <linux/interrupt.h>
+#include <linux/irq_pipeline.h>
+#include <linux/tick.h>
+#include <cobalt/kernel/sched.h>
+#include <cobalt/kernel/lock.h>
+#include <cobalt/kernel/intr.h>
+
+void xnintr_host_tick(struct xnsched *sched) /* hard irqs off */
+{
+ sched->lflags &= ~XNHTICK;
+ tick_notify_proxy();
+}
+
+/*
+ * Low-level core clock irq handler. This one forwards ticks from the
+ * Xenomai platform timer to nkclock exclusively.
+ */
+void xnintr_core_clock_handler(void)
+{
+ struct xnsched *sched;
+
+ xnlock_get(&nklock);
+ xnclock_tick(&nkclock);
+ xnlock_put(&nklock);
+
+ /*
+ * If the core clock interrupt preempted a real-time thread,
+ * any transition to the root thread has already triggered a
+ * host tick propagation from xnsched_run(), so at this point,
+ * we only need to propagate the host tick in case the
+ * interrupt preempted the root thread.
+ */
+ sched = xnsched_current();
+ if ((sched->lflags & XNHTICK) &&
+ xnthread_test_state(sched->curr, XNROOT))
+ xnintr_host_tick(sched);
+}
+
+static irqreturn_t xnintr_irq_handler(int irq, void *dev_id)
+{
+ struct xnintr *intr = dev_id;
+ int ret;
+
+ ret = intr->isr(intr);
+ XENO_WARN_ON_ONCE(USER, (ret & XN_IRQ_STATMASK) == 0);
+
+ if (ret & XN_IRQ_DISABLE)
+ disable_irq(irq);
+ else if (ret & XN_IRQ_PROPAGATE)
+ irq_post_inband(irq);
+
+ return ret & XN_IRQ_NONE ? IRQ_NONE : IRQ_HANDLED;
+}
+
+int xnintr_init(struct xnintr *intr, const char *name,
+ unsigned int irq, xnisr_t isr, xniack_t iack,
+ int flags)
+{
+ secondary_mode_only();
+
+ intr->irq = irq;
+ intr->isr = isr;
+ intr->iack = NULL; /* unused */
+ intr->cookie = NULL;
+ intr->name = name ? : "<unknown>";
+ intr->flags = flags;
+ intr->status = 0;
+ intr->unhandled = 0; /* unused */
+ raw_spin_lock_init(&intr->lock); /* unused */
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(xnintr_init);
+
+void xnintr_destroy(struct xnintr *intr)
+{
+ secondary_mode_only();
+ xnintr_detach(intr);
+}
+EXPORT_SYMBOL_GPL(xnintr_destroy);
+
+int xnintr_attach(struct xnintr *intr, void *cookie)
+{
+ int ret;
+
+ secondary_mode_only();
+
+ intr->cookie = cookie;
+
+ ret = irq_set_affinity_hint(intr->irq, &xnsched_realtime_cpus);
+ if (ret)
+ return ret;
+
+ return request_irq(intr->irq, xnintr_irq_handler, IRQF_OOB,
+ intr->name, intr);
+}
+EXPORT_SYMBOL_GPL(xnintr_attach);
+
+void xnintr_detach(struct xnintr *intr)
+{
+ secondary_mode_only();
+ free_irq(intr->irq, intr);
+}
+EXPORT_SYMBOL_GPL(xnintr_detach);
+
+void xnintr_enable(struct xnintr *intr)
+{
+ secondary_mode_only();
+ enable_irq(intr->irq);
+}
+EXPORT_SYMBOL_GPL(xnintr_enable);
+
+void xnintr_disable(struct xnintr *intr)
+{
+ secondary_mode_only();
+ disable_irq(intr->irq);
+}
+EXPORT_SYMBOL_GPL(xnintr_disable);
+
+void xnintr_affinity(struct xnintr *intr, cpumask_t cpumask)
+{
+ int ret;
+
+ secondary_mode_only();
+ ret = irq_set_affinity_hint(intr->irq, &cpumask);
+
+ WARN_ON_ONCE(ret);
+}
+EXPORT_SYMBOL_GPL(xnintr_affinity);
--
2.29.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 5/5] cobalt/intr: dovetail: Don't do anything in xnintr_enable/disable
2021-03-27 10:35 [Dovetail PATCH 0/5] More clock and IRQ abstraction Philippe Gerum
` (3 preceding siblings ...)
2021-03-27 10:35 ` [PATCH 4/5] cobalt/intr: dovetail: implement interrupt management, handling Philippe Gerum
@ 2021-03-27 10:35 ` Philippe Gerum
2021-04-07 10:55 ` Jan Kiszka
2021-04-07 16:20 ` [Dovetail PATCH 0/5] More clock and IRQ abstraction Jan Kiszka
5 siblings, 1 reply; 11+ messages in thread
From: Philippe Gerum @ 2021-03-27 10:35 UTC (permalink / raw)
To: xenomai
From: Jan Kiszka <jan.kiszka@siemens.com>
As we are using regular request/free_irq under dovetail, there is no
extra task to be done in the interrupt enable/disable services. In fact,
calling enable_irq will rather trigger "Unbalanced enable for IRQ ..."
errors.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
kernel/cobalt/dovetail/intr.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/kernel/cobalt/dovetail/intr.c b/kernel/cobalt/dovetail/intr.c
index 068dfe306..d1a1c14a9 100644
--- a/kernel/cobalt/dovetail/intr.c
+++ b/kernel/cobalt/dovetail/intr.c
@@ -109,15 +109,11 @@ EXPORT_SYMBOL_GPL(xnintr_detach);
void xnintr_enable(struct xnintr *intr)
{
- secondary_mode_only();
- enable_irq(intr->irq);
}
EXPORT_SYMBOL_GPL(xnintr_enable);
void xnintr_disable(struct xnintr *intr)
{
- secondary_mode_only();
- disable_irq(intr->irq);
}
EXPORT_SYMBOL_GPL(xnintr_disable);
--
2.29.2
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 5/5] cobalt/intr: dovetail: Don't do anything in xnintr_enable/disable
2021-03-27 10:35 ` [PATCH 5/5] cobalt/intr: dovetail: Don't do anything in xnintr_enable/disable Philippe Gerum
@ 2021-04-07 10:55 ` Jan Kiszka
0 siblings, 0 replies; 11+ messages in thread
From: Jan Kiszka @ 2021-04-07 10:55 UTC (permalink / raw)
To: Philippe Gerum, xenomai
On 27.03.21 11:35, Philippe Gerum wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> As we are using regular request/free_irq under dovetail, there is no
> extra task to be done in the interrupt enable/disable services. In fact,
> calling enable_irq will rather trigger "Unbalanced enable for IRQ ..."
> errors.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> kernel/cobalt/dovetail/intr.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/kernel/cobalt/dovetail/intr.c b/kernel/cobalt/dovetail/intr.c
> index 068dfe306..d1a1c14a9 100644
> --- a/kernel/cobalt/dovetail/intr.c
> +++ b/kernel/cobalt/dovetail/intr.c
> @@ -109,15 +109,11 @@ EXPORT_SYMBOL_GPL(xnintr_detach);
>
> void xnintr_enable(struct xnintr *intr)
> {
> - secondary_mode_only();
> - enable_irq(intr->irq);
> }
> EXPORT_SYMBOL_GPL(xnintr_enable);
>
> void xnintr_disable(struct xnintr *intr)
> {
> - secondary_mode_only();
> - disable_irq(intr->irq);
> }
> EXPORT_SYMBOL_GPL(xnintr_disable);
>
>
Please merge into patch 4, adding the reasoning there. We should not
jump back and forth if we already know the final answer.
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Dovetail PATCH 0/5] More clock and IRQ abstraction
2021-03-27 10:35 [Dovetail PATCH 0/5] More clock and IRQ abstraction Philippe Gerum
` (4 preceding siblings ...)
2021-03-27 10:35 ` [PATCH 5/5] cobalt/intr: dovetail: Don't do anything in xnintr_enable/disable Philippe Gerum
@ 2021-04-07 16:20 ` Jan Kiszka
5 siblings, 0 replies; 11+ messages in thread
From: Jan Kiszka @ 2021-04-07 16:20 UTC (permalink / raw)
To: Philippe Gerum, xenomai
On 27.03.21 11:35, Philippe Gerum wrote:
> From: Philippe Gerum <rpm@xenomai.org>
>
> Jan Kiszka (1):
> cobalt/intr: dovetail: Don't do anything in xnintr_enable/disable
>
> Philippe Gerum (4):
> cobalt/syscall: dovetail: do not expose clock frequency to user
> cobalt/sched: dovetail: disable separate per-IRQ statistics
> cobalt/intr: pipeline: abstract interrupt system inits
> cobalt/intr: dovetail: implement interrupt management, handling
>
> include/cobalt/kernel/dovetail/pipeline/irq.h | 24 ++++
> .../kernel/dovetail/pipeline/pipeline.h | 6 +
> include/cobalt/kernel/intr.h | 7 +-
> include/cobalt/kernel/ipipe/pipeline/irq.h | 14 ++
> .../cobalt/kernel/ipipe/pipeline/pipeline.h | 6 +
> kernel/cobalt/Kconfig | 4 +-
> kernel/cobalt/dovetail/Makefile | 2 +-
> kernel/cobalt/dovetail/intr.c | 129 ++++++++++++++++++
> kernel/cobalt/posix/syscall.c | 2 +-
> 9 files changed, 185 insertions(+), 9 deletions(-)
> create mode 100644 include/cobalt/kernel/dovetail/pipeline/irq.h
> create mode 100644 include/cobalt/kernel/ipipe/pipeline/irq.h
> create mode 100644 kernel/cobalt/dovetail/intr.c
>
Patches 1-3 applied to next.
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 11+ messages in thread