Subject: linux-next: manual merge of the printk tree with Linus' tree

From: Stephen Rothwell <[email-masked]>
Date: Wed, 29 May 2024 11:28:49 +1000

Hi all,

Today's linux-next merge of the printk tree got a conflict in:

  include/linux/printk.h

between commit:

  693f75b91a91 ("printk: Add function to replay kernel log on consoles")

from Linus' tree and commits:

  7e4289a0c15f ("nbcon: Add API to acquire context for non-printing operations")
  8a192e951d8a ("printk: nbcon: Add unsafe flushing on panic")
  dc0f096fb7aa ("printk: Coordinate direct printing in panic")

from the printk tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/linux/printk.h
index 40afab23881a,69f40a71c438..000000000000
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@@ -195,7 -195,10 +198,11 @@@ void show_regs_print_info(const char *l
  extern asmlinkage void dump_stack_lvl(const char *log_lvl) __cold;
  extern asmlinkage void dump_stack(void) __cold;
  void printk_trigger_flush(void);
 +void console_replay_all(void);
+ void printk_legacy_allow_panic_sync(void);
+ extern bool nbcon_device_try_acquire(struct console *con);
+ extern void nbcon_device_release(struct console *con);
+ void nbcon_atomic_flush_unsafe(void);
  #else
  static inline __printf(1, 0)
  int vprintk(const char *s, va_list args)
@@@ -275,9 -278,24 +282,27 @@@ static inline void dump_stack(void
  static inline void printk_trigger_flush(void)
  {
  }
 +static inline void console_replay_all(void)
 +{
 +}
+ 
+ static inline void printk_legacy_allow_panic_sync(void)
+ {
+ }
+ 
+ static inline bool nbcon_device_try_acquire(struct console *con)
+ {
+ 	return false;
+ }
+ 
+ static inline void nbcon_device_release(struct console *con)
+ {
+ }
+ 
+ static inline void nbcon_atomic_flush_unsafe(void)
+ {
+ }
+ 
  #endif
  
  bool this_cpu_in_panic(void);