- 03 Apr, 2019 40 commits
-
-
-
-
-
Philippe Gerum authored
Fix up the Zynq GPIO driver in order to channel interrupts through the interrupt pipeline.
-
Fix up the pl061 GPIO driver in order to channel interrupts through the interrupt pipeline.
-
Fix up the MXC GPIO driver (i.MX series) in order to channel interrupts through the interrupt pipeline.
-
Fix up the Marvell EBU GPIO controller driver in order to channel interrupts through the interrupt pipeline.
-
Fix up the Davinci GPIO driver in order to channel interrupts through the interrupt pipeline.
-
Fix up the omap GPIO driver in order to channel interrupts through the interrupt pipeline.
-
The arch_timer_mem_use_virtual variable is used to judge the type of memory-mapped timer, it can not be used to judge the type of CP15 timer, so fix this issue, otherwise it will lead to kernel panic when running as a VM. Signed-off-by:
Dongjiu Geng <gengdongjiu@huawei.com>
-
Fix up the ARM architected timer driver in order to channel interrupts through the interrupt pipeline. FIXME: split.
-
This change will add support for bcm2835 chips. This includes the raspberry pi 0 and 1 family of boards. FIXME: split.
-
Expose the clocksource to userland processes via the ARM-specific user-TSC interface.
-
Expose the clocksource to userland processes via the ARM-specific user-TSC interface.
-
Expose the clocksource to userland processes via the ARM-specific user-TSC interface if enabled.
-
Expose the clocksource to userland processes via the ARM-specific user-TSC interface.
-
Expose the clocksource to userland processes via the ARM-specific user-TSC interface.
-
Expose the clocksource to userland processes via the ARM-specific user-TSC interface.
-
Expose the clocksource to userland processes via the ARM-specific user-TSC interface.
-
Philippe Gerum authored
Add a kernel interface for sharing CPU idling control between the host kernel and a co-kernel. The former invokes ipipe_cpuidle_control() which the latter should implement, for determining whether entering a sleep state is ok. This hook should return boolean true if so. The co-kernel may veto such entry if need be, in order to prevent latency spikes, as exiting sleep states might be costly depending on the CPU idling operation being used.
-
Do the fixups in the generic pin controller driver required to channel the incoming interrupts through the interrupt pipeline.
-
Philippe Gerum authored
The generic GPIO chip needs to be hard locked as its handlers may be called from out-of-band code running in the head domain. To this end, convert the regular spinlock protecting the gpio_chip descriptor to a hard lock.
-
Philippe Gerum authored
Enabling ftrace for a co-kernel running in the head domain of a pipelined interrupt context means to: - make sure that ftrace's live kernel code patching still runs unpreempted by any head domain activity (so that the latter can't tread on invalid or half-baked changes in the .text section). - allow the co-kernel code running in the head domain to traverse ftrace's tracepoints safely. The changes introduced by this commit ensure this by fixing up some key critical sections so that interrupts are still disabled in the CPU, undoing the interrupt flag virtualization in those particular cases.
-
Philippe Gerum authored
Co-kernels cannot bear with the extra latency caused by memory access faults involved in COW or overcommit. __ipipe_disable_ondemand_mappings() force commits all common memory mappings with physical RAM. In addition, the architecture code is given a chance to pre-load page table entries for ioremap and vmalloc memory, for preventing further minor faults accessing such memory due to PTE misses (if that ever makes sense for them). Revisit: Further COW breaking in copy_user_page() and copy_pte_range() may be useless once __ipipe_disable_ondemand_mappings() has run for a co-kernel task, since all of its mappings have been populated, and unCOWed if applicable.
-
Philippe Gerum authored
IPIPE_KEVT_CLEANUP is emitted before a process memory context is entirely dropped, after all the mappings have been exited. Per-process resources which might be maintained by the co-kernel could be released there, as all tasks have exited.
-
Philippe Gerum authored
Emit IPIPE_KEVT_SETAFFINITY to the co-kernel when the target task is about to move to another CPU. CPU migration can only take place from the root domain, the pipeline does not provide any support for migrating tasks from the head domain, and derives several key assumptions based on this invariant.
-
Philippe Gerum authored
Emit IPIPE_KEVT_SIGWAKE when the target task is about to receive a (regular) signal. The co-kernel may decide to schedule a transition of the recipient to the root domain in order to have it handle that signal asap, which is commonly required for keeping the kernel sane. This notification is always sent from the context of the issuer.
-
Philippe Gerum authored
Emit IPIPE_KEVT_EXIT from do_exit() to the co-kernel before the current task has dropped the files and mappings it owns.
-
Philippe Gerum authored
In order for the hypervisor to operate properly in presence of a co-kernel, we need: - the virtualization core to know when the hypervisor stalls due to a preemption by the co-kernel. - to know when the VM enters and leaves guest mode.
-
Philippe Gerum authored
Catch invalid calls of root-only code from the head domain from common paths which may lead to blocking the current task linux-wise. Checks are enabled by CONFIG_IPIPE_DEBUG_CONTEXT.
-
Philippe Gerum authored
This is the basic code enabling alternate control of tasks between the regular kernel and an embedded co-kernel. The changes cover the following aspects: - extend the per-thread information block with a private area usable by the co-kernel for storing additional state information - provide the API enabling a scheduler exchange mechanism, so that tasks can run under the control of either kernel alternatively. This includes a service to move the current task to the head domain under the control of the co-kernel, and the converse service to re-enter the root domain once the co-kernel has released such task. - ensure the generic context switching code can be used from any domain, serializing execution as required. These changes have to be paired with arch-specific code further enabling context switching from the head domain.
-
Philippe Gerum authored
Announce all clock event chips as they are registered to the out-of-band tick device infrastructure, so that we can interpose on key handlers in their descriptors.
-
Philippe Gerum authored
In order to propagate the "host real-time update" event to a co-kernek (IPIPE_KEVT_HOSTRT), we need the clock shift value of the monotonic clock to be passed to the legacy vDSO handler, for (re)calculating the new wall clock time which is eventually announced to the co-kernel. Only architectures which still implement the legacy update_vsyscall_old() interface need this change.
-
Philippe Gerum authored
Add the core API for enabling (regular) kernel event notifications to a co-kernel running over the head domain. For instance, such a co-kernel may need to know when a task is about to be resumed upon signal receipt, or when it gets an access fault trap. This commit adds the client-side API for enabling such notification for class of events, but does not provide the notification points per se, which comes later.
-
Philippe Gerum authored
A raw output handler (.write_raw) is added to the console descriptor for writing (short) text output unmodified, without any logging, header or preparation whatsoever, usable from any pipeline domain. The dedicated raw_printk() variant formats the output message then passes it on to the handler holding a hard spinlock, irqs off. This is a very basic debug channel for situations when resorting to the fairly complex printk() handling is not an option. Unlike early consoles, regular consoles can provide a raw output service past the boot sequence. Raw output handlers are typically provided by serial console devices.
-
Philippe Gerum authored
When dumping a stack backtrace, we neither need nor want to disable root stage IRQs over the head stage, where CPU migration can't happen. Conversely, we neither need nor want to disable hard IRQs from the head stage, so that latency won't skyrocket either.
-
Philippe Gerum authored
Just like printk(), dev_printk() cannot run from the head domain and/or with hard IRQs disabled. In such a case, log the output directly into the staging buffer we use for printk(). NOTE: when redirected to the buffer, the output does not include the dev_printk() header text but is merely sent as-is to the log.
-
Philippe Gerum authored
The printk() machinery cannot immediately invoke the console driver(s) when called from the head domain, since such driver code belongs to the root domain and cannot be shared between domains. Output issued from the head domain is formatted then logged into a staging buffer, and a dedicated virtual IRQ is posted to the root domain for notification. When the virtual IRQ handler runs, the contents of the staging buffer is flushed to the printk() interface anew, which may eventually pass the output on to the console drivers from such a context.
-
Philippe Gerum authored
We must not allow out-of-band activity to resume while we are busy suspending the devices in the system, until the PM sleep state has been fully entered. Pair existing virtual IRQ disabling calls which only apply to the root domain with hard ones.
-
Philippe Gerum authored
We might have out-of-band code calling try_module_get() from the head domain, or from a section covered by a hard spinlock where the root domain must not reschedule. This requires the preemption management calls in try_module_get() (and the converse module_put()) to be converted to their hard variant. REVISIT: using try_module_get() from such contexts is questionable, client domains should be fixed.
-