Age | Commit message (Collapse) | Author | Files | Lines |
|
Create a kthread for each console to perform console printing. Now
all console printing is fully asynchronous except for the boot
console and when the kernel enters sync mode (and there are atomic
consoles available).
The console_lock() and console_unlock() functions now only do what
their name says... locking and unlocking of the console.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
When the kernel performs an OOPS, enter into "sync mode":
- only atomic consoles (write_atomic() callback) will print
- printing occurs within vprintk_store() instead of console_unlock()
CONSOLE_LOG_MAX is moved to printk.h to support the per-console
buffer used in sync mode.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
In preparation for atomic printing, change @console_seq to use
seqcount_latch so that it can be read without requiring @console_sem.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
boot_delay_msec() is always called immediately before printk_delay()
so just call it from within printk_delay().
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
Move printk_delay() "as is" further up so that they can be used by
new functions in an upcoming commit.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
Implement a non-sleeping NMI-safe write_atomic() console function in
order to support emergency console printing.
Since interrupts need to be disabled during transmit, all usage of
the IER register is wrapped with access functions that use the
console_atomic_lock() function to synchronize register access while
tracking the state of the interrupts. This is necessary because
write_atomic() can be called from an NMI context that has preempted
write_atomic().
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
Currently kdb uses the @oops_in_progress hack to mirror kdb output
to all active consoles from NMI context. Ignoring locks is unsafe.
Now that an NMI-safe atomic interfaces is available for consoles,
use that interface to mirror kdb output.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
Add a write_atomic() callback to the console. This is an optional
function for console drivers. The function must be atomic (including
NMI safe) for writing to the console.
Console drivers must still implement the write() callback. The
write_atomic() callback will only be used in special situations,
such as when the kernel panics.
Creating an NMI safe write_atomic() that must synchronize with
write() requires a careful implementation of the console driver. To
aid with the implementation, a set of console_atomic_*() functions
are provided:
void console_atomic_lock(unsigned long flags);
void console_atomic_unlock(unsigned long flags);
These functions synchronize using the printk cpulock and disable
hardware interrupts.
kgdb makes use of its own cpulock (@dbg_master_lock, @kgdb_active)
during cpu roundup. This will conflict with the printk cpulock.
Therefore, a CPU must ensure that it is not holding the printk
cpulock when calling kgdb_cpu_enter(). If it is, it must allow its
printk context to complete first.
A new helper function kgdb_roundup_delay() is introduced for kgdb
to determine if it is holding the printk cpulock. If so, a flag is
set so that when the printk cpulock is released, kgdb will be
re-triggered for that CPU.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
The printk cpulock functions use local_irq_disable(). This means that
hardware interrupts are also disabled on PREEMPT_RT. To make this
clear, rename the functions to use the raw_ prefix:
raw_printk_cpu_lock_irqsave(flags);
raw_printk_cpu_unlock_irqrestore(flags);
Also, these functions were a NOP for !CONFIG_SMP. But for !CONFIG_SMP
they still need to disable hardware interrupts. So modify them
appropriately for this.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
arch_faults_on_old_pte() relies on the calling context being
non-preemptible. CONFIG_PREEMPT_RT turns the PTE lock into a sleepable
spinlock, which doesn't disable preemption once acquired, triggering the
warning in arch_faults_on_old_pte().
It does however disable migration, ensuring the task remains on the same
CPU during the entirety of the critical section, making the read of
cpu_has_hw_af() safe and stable.
Make arch_faults_on_old_pte() check migratable() instead of preemptible().
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20210811201354.1976839-5-valentin.schneider@arm.com
|
|
Some areas use preempt_disable() + preempt_enable() to safely access
per-CPU data. The PREEMPT_RT folks have shown this can also be done by
keeping preemption enabled and instead disabling migration (and acquiring a
sleepable lock, if relevant).
Introduce a helper which checks whether the current task can be migrated
elsewhere, IOW if it is pinned to its local CPU in the current
context. This can help determining if per-CPU properties can be safely
accessed.
Note that CPU affinity is not checked here, as a preemptible task can have
its affinity changed at any given time (including if it has
PF_NO_SETAFFINITY, when hotplug gets involved).
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
[bigeasy: Return false on UP, call it is_migratable().]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/20210811201354.1976839-3-valentin.schneider@arm.com
|
|
Valentin reported warnings about suspicious RCU usage on RT kernels. Those
happen when offloading of RCU callbacks is enabled:
WARNING: suspicious RCU usage
5.13.0-rt1 #20 Not tainted
-----------------------------
kernel/rcu/tree_plugin.h:69 Unsafe read of RCU_NOCB offloaded state!
rcu_rdp_is_offloaded (kernel/rcu/tree_plugin.h:69 kernel/rcu/tree_plugin.h:58)
rcu_core (kernel/rcu/tree.c:2332 kernel/rcu/tree.c:2398 kernel/rcu/tree.c:2777)
rcu_cpu_kthread (./include/linux/bottom_half.h:32 kernel/rcu/tree.c:2876)
The reason is that rcu_rdp_is_offloaded() is invoked without one of the
required protections on RT enabled kernels because local_bh_disable() does
not disable preemption on RT.
Valentin proposed to add a local lock to the code in question, but that's
suboptimal in several aspects:
1) local locks add extra code to !RT kernels for no value.
2) All possible callsites have to audited and amended when affected
possible at an outer function level due to lock nesting issues.
3) As the local lock has to be taken at the outer functions it's required
to release and reacquire them in the inner code sections which might
voluntary schedule, e.g. rcu_do_batch().
Both callsites of rcu_rdp_is_offloaded() which trigger this check invoke
rcu_rdp_is_offloaded() in the variable declaration section right at the top
of the functions. But the actual usage of the result is either within a
section which provides the required protections or after such a section.
So the obvious solution is to move the invocation into the code sections
which provide the proper protections, which solves the problem for RT and
does not have any impact on !RT kernels.
Reported-by: Valentin Schneider <valentin.schneider@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
|
|
|
|
CR_8138: Add ISP control for video2 and video3.
See merge request sdk/linux!977
|
|
CR_6614: Add support for libcamera
See merge request sdk/linux!970
|
|
Signed-off-by: zejian.su <zejian.su@starfivetech.com>
|
|
histogram data to the SC buffer.
|
|
controls are: WB, CAR, CCM, CFA, CTC, DBC, DNYUV, GMARGB, LCCF, OBC, OECF, R2Y, SAT, SHRP, YCRV, SC
|
|
Fix enum isp subdev code bug.
Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
|
|
Update format pad table one by one, it can simply code.
Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
|
|
Add isp sc buffer point.
Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
|
|
Add new conctrl for jh7110 isp.
Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
|
|
Add isp frame sync event.
Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
|
|
Add V4L2_CAP_IO_MC capabilities.
Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
|
|
CR_7252_vf2_wifi_dongle_5.15_ziv.xu
See merge request sbc/linux!174
|
|
|
|
wifi dongle revert to one interface
Signed-off-by: ziv.xu <ziv.xu@starfive.com>
|
|
'CR_7479_linux5.15_refix_mosaic_cursor_and_improve_display_perfmance_4K30_Windsome.Zeng' into 'jh7110-5.15.y-devel'
CR 7479 Revert to original code on update_fb
See merge request sdk/linux!974
|
|
Signed-off-by: Windsome Zeng <windsome.zeng@starfivetech.com>
|
|
CR_7889_vf2_qspi_5.15_ziv.xu
See merge request sbc/linux!173
|
|
|
|
CR_7889_evb_qspi_5.15_ziv.xu
See merge request sdk/linux!972
|
|
modify qspi dts
Signed-off-by: ziv.xu <ziv.xu@starfive.com>
|
|
modify qspi dts
Signed-off-by: ziv.xu <ziv.xu@starfive.com>
|
|
|
|
CR_7607_reset_hal.feng
See merge request sdk/linux!969
|
|
reset_starfive_jh7110_generic_probe() is never called by
other modules, so drop the EXPORT_SYMBOL_GPL for it.
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
|
|
|
|
'CR_7479_linux5.15_refix_mosaic_cursor_and_improve_display_perfmance_4K30_Windsome.Zeng' into 'jh7110-5.15.y-devel'
CR 7479 Enlarge flush cache size to avoid flick
See merge request sdk/linux!966
|
|
camera.
Signed-off-by: Windsome Zeng <windsome.zeng@starfivetech.com>
|
|
|
|
CR_6347 display : hdmi: fix hotplug hang
See merge request sdk/linux!960
|
|
CR_7149_5.15: uart: 8250: add reset operation in runtime PM
See merge request sdk/linux!964
|
|
'CR_7479_linux5.15_refix_mosaic_cursor_and_improve_display_perfmance_4K30_Windsome.Zeng' into 'jh7110-5.15.y-devel'
CR 7479 Refix mmosaic cursor and improve display performance to 4K30
See merge request sdk/linux!959
|
|
will drop 50% performance. Just do real flush data while cursor is about to change.
Other plane: According to the behavior of L2 cache controller in U74, only the last 2MB data is needed to be flushed.
For 4K resolution, it will reduce flush loops from 518400 to 32768 on each frame update.
Signed-off-by: Windsome Zeng <windsome.zeng@starfivetech.com>
|
|
add reset operation in runtime PM
Signed-off-by: William Qiu <william.qiu@starfivetech.com>
|
|
Fixed the probability of hdmi crash after repeated insertion and removal
Signed-off-by: keith.zhao <keith.zhao@starfivetech.com>
|
|
'vf2-515-devel'
CR_7358_VF2_5.15: riscv: drm: panel: update radxa panel startup process and support accelerator-sc7a20 && riscv: iio: accel: add sc7a20 support for linux 515
See merge request sbc/linux!171
|
|
|
|
CR 7193 [515] driver: pci: Update reset timing as the requirement in PCIe base spec r6.0
See merge request sdk/linux!957
|