- 07 Mar, 2021 40 commits
-
-
This patch enables the Intel pinctrl/GPIO core driver to operate in a pipelined interrupt system. However, it does not allow chained GPIO IRQs to be handled from the head stage of such pipeline yet. In other words, the chained GPIO interrupts can safely be handled from the in-band stage when CONFIG_IPIPE is turned on, but cannot be routed to a real-time application. Enabling full support will require the I-pipe core to handle IRQs chained from a shared parent interrupt natively, which it is not implemented at the moment. Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
The pipeline core must be given an opportunity to fixup the interrupt descriptor right before a flow handler is assigned to it. To this end, make sure the irq_set_[chip_]handler_[name_]locked() helpers also call __fixup_irq_handler(). Signed-off-by:
Philippe Gerum <rpm@xenomai.org> Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
This uses the same pattern as ftrace for calling ipipe_trace_panic_dump, resulting in one fill less that needs to be patched for ipipe. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
This is in line with what ftrace does and ensures that setups with lowered log levels will not miss this important information. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
We do not need the special handling of __DO_TRACE(..., rcuidle=1) when running over the head domain. In fact, we cannot use it because it switches to srcu which is incompatible with that context. It's safe to switch to normal RCU because no head domain caller of a trace_*_rcuidle tracepoints should do this from rcu-problematic paths, specifically idle. Ported from the dovetail queue. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
When a huge number of CPUs is available (e.g. CONFIG_MAXSMP/x86), we might overflow the stack with cpumask_t variables in ipipe_select_timer(). Allocate the cpumask we need there dynamically instead. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
When a huge number of CPUs is available (e.g. CONFIG_MAXSMP/x86), we might overflow the stack with cpumask_t variables in ipipe_critical_enter(). Instead of allocating cpumask_var_t dynamically for these, rely on the fact that we cannot reenter the code accessing them by design, so those variables may be moved to local static storage. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Some configurations may define more than 256K distinct interrupts (e.g. CONFIG_MAXSMP/x86), which is the limit for the current 3-level mapping used for logging IRQs. Add a 4th mapping level to support configurations up to 16M interrupts. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Needed on x86 at least when CONFIG_IPIPE is off. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
-
Jan Kiszka authored
x86 may generate one, so change the signature. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Likely needed since c942cee4 which split enabling and startup. This fixes unpopulated vectors in the IOAPIC on x86 at least, possibly more. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
It's time to let ipipe_enable_irq return a proper error as it will gain another function that may fail. Drop the WARN_ON_ONCE in favor of that. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Breaks in non-debug builds otherwise, e.g. https://travis-ci.com/xenomai-ci/xenomai/jobs/212725223 Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
All callers of lockdep_hardirqs_on/off already filter out !ipipe_root_p. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Lost in d7fc2c06 ("lockdep: ipipe: exclude the head stage from IRQ state tracing") but still needed by x86 at least. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Since 9beae1ea , we are supposed to pass down flags, not just 0 or 1. Luckily, 1 happened to be FOLL_WRITE, so we did the right thing by chance. Moreover, get_user_pages is deprecated in favor of its locked/unlocked/ fast variants. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
If evtdev should be NULL, we will crash on get_dev_mode(evtdev) further down. So this test is never false in absence of sever bugs. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
A long time ago (probably in 2.6-times), someone converted spaces to tabs, shuffling the layout around this way, and by forgetting to account for the multi-domain removal. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
Since 4.9, we need to declare continued lines via KERN_CONT. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
-
-
-
Jan Kiszka authored
When a CPU is unplugged, make sure to drop all per-CPU ipipe timer devices when removing the CPU. Otherwise, we will corrupt the device list when re-registering the host timer on CPU onlining. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
linux/ipipe_base.h was originally designed to circumvment #include hell by exporting only a subset of core definitions with minimum dependencies to other inner headers. The latest code reorganization fixed this issue in a better way, and linux/ipipe.h is currently the only direct reader of linux/ipipe_base.h, so let's merge both headers back as linux/ipipe.h.
-
Jan Kiszka authored
At least one arch, infamous x86, has a difference of NR_syscalls depending on compat vs. native ABI. Account for that by introducing a function that can deliver the currently valid syscall number if an arch implements such a service. In all other cases, this change is functionally no difference. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
This I-pipe hook reports the desired resumption mode to the subscriber: resume all process tasks or just single-step a particular one? The use case is to enable synchronous stopping / resuming of all head tasks of a ptraced real-time process. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
Jan Kiszka authored
A little bit inspired by the kernel's user return notifier, this introduces an I-pipe hook before the kernel jumps back to a userspace context from the root domain. The hook is design to allow a switch back to the head domain, thus will not run through signal/preemption checks when returning from the callback over head. It is guaranteed to fire on return from interrupts and exceptions but may also fire on certain syscall-return paths. The first use case for the hook is resumption of ptraced tasks over head if they were stopped in that domain. This provides just the generic infrastructure, the invocation of __ipipe_notify_user_intreturn as well as the definition of TIP_USERINTRET are architecture-specific. Signed-off-by:
Jan Kiszka <jan.kiszka@siemens.com>
-
-
__ipipe_migrate_head() should not BUG() unconditionally when failing to schedule out a thread, but rather let the real-time core handle the situation a bit more gracefully.
-
Only timers stolen away from the host kernel should be early acked by the pipeline core. Otherwise, the regular IRQ handler associated to the timer would duplicate the action. The IRQ line is left masked, waiting for the IRQ flow handler to unmask it eventually.
-
Although we don't want to disable the hardware not to wreck the outstanding timing requests managed by the co-kernel, we should nevertheless notify it about entering the ONESHOT_STOPPED mode, so that it may disable the host tick emulation.
-
There is no point in interposing on clock chip handlers for which there was no support originally. In some cases (oneshot_stopped), we may even get a kernel fault, jumping to a NULL address. Interpose on non-NULL original handlers only.
-
Although we won't allow disabling the hardware when the clock event logic switches a device to stopped mode - so that we won't affect the timer logic running on the head stage unexpectedly -, we still have to enable the hardware when switched (back) to oneshot mode, since it may have been stopped prior to interposing on the device in ipipe_timer_start(). Failing to do so would leave the hardware shut down for both regular and Xenomai operations, with no mean to bring it up again.
-
-
-
-
-
-