tree: https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git linux-5.13.y-rt-testing head: cdfc6ae55ef52147859af8c8a9f82c4858eed749 commit: 4b788a578cc2be37f1761f07407a9d920ecb0671 [10/227] printk: introduce kernel sync mode config: m68k-randconfig-r005-20210712 (attached as .config) compiler: m68k-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git/commit/?id=4b788a578cc2be37f1761f07407a9d920ecb0671 git remote add linux-rt-devel https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git git fetch --no-tags linux-rt-devel linux-5.13.y-rt-testing git checkout 4b788a578cc2be37f1761f07407a9d920ecb0671 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): kernel/printk/printk.c:177:5: warning: no previous prototype for 'devkmsg_sysctl_set_loglvl' [-Wmissing-prototypes] 177 | int devkmsg_sysctl_set_loglvl(struct ctl_table *table, int write, | ^~~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:2428:2: error: #error FIXME 2428 | #error FIXME | ^~~~~ kernel/printk/printk.c: In function 'console_unlock': >> kernel/printk/printk.c:2790:9: error: implicit declaration of function 'read_console_seq'; did you mean 'up_console_sem'? [-Werror=implicit-function-declaration] 2790 | seq = read_console_seq(); | ^~~~~~~~~~~~~~~~ | up_console_sem kernel/printk/printk.c:2796:4: error: implicit declaration of function 'latched_seq_write' [-Werror=implicit-function-declaration] 2796 | latched_seq_write(&console_seq, r.info->seq); | ^~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +2790 kernel/printk/printk.c 2724 2725 /** 2726 * console_unlock - unlock the console system 2727 * 2728 * Releases the console_lock which the caller holds on the console system 2729 * and the console driver list. 2730 * 2731 * While the console_lock was held, console output may have been buffered 2732 * by printk(). If this is the case, console_unlock(); emits 2733 * the output prior to releasing the lock. 2734 * 2735 * If there is output waiting, we wake /dev/kmsg and syslog() users. 2736 * 2737 * console_unlock(); may be called from any context. 2738 */ 2739 void console_unlock(void) 2740 { 2741 static char ext_text[CONSOLE_EXT_LOG_MAX]; 2742 static char text[CONSOLE_LOG_MAX]; 2743 unsigned long flags; 2744 bool do_cond_resched, retry; 2745 struct printk_info info; 2746 struct printk_record r; 2747 u64 seq; 2748 2749 if (console_suspended) { 2750 up_console_sem(); 2751 return; 2752 } 2753 2754 prb_rec_init_rd(&r, &info, text, sizeof(text)); 2755 2756 /* 2757 * Console drivers are called with interrupts disabled, so 2758 * @console_may_schedule should be cleared before; however, we may 2759 * end up dumping a lot of lines, for example, if called from 2760 * console registration path, and should invoke cond_resched() 2761 * between lines if allowable. Not doing so can cause a very long 2762 * scheduling stall on a slow console leading to RCU stall and 2763 * softlockup warnings which exacerbate the issue with more 2764 * messages practically incapacitating the system. 2765 * 2766 * console_trylock() is not able to detect the preemptive 2767 * context reliably. Therefore the value must be stored before 2768 * and cleared after the "again" goto label. 2769 */ 2770 do_cond_resched = console_may_schedule; 2771 again: 2772 console_may_schedule = 0; 2773 2774 /* 2775 * We released the console_sem lock, so we need to recheck if 2776 * cpu is online and (if not) is there at least one CON_ANYTIME 2777 * console. 2778 */ 2779 if (!can_use_console()) { 2780 console_locked = 0; 2781 up_console_sem(); 2782 return; 2783 } 2784 2785 for (;;) { 2786 size_t ext_len = 0; 2787 size_t len; 2788 2789 skip: > 2790 seq = read_console_seq(); 2791 if (!prb_read_valid(prb, seq, &r)) 2792 break; 2793 2794 if (seq != r.info->seq) { 2795 console_dropped += r.info->seq - seq; 2796 latched_seq_write(&console_seq, r.info->seq); 2797 seq = r.info->seq; 2798 } 2799 2800 if (suppress_message_printing(r.info->level)) { 2801 /* 2802 * Skip record we have buffered and already printed 2803 * directly to the console when we received it, and 2804 * record that has level above the console loglevel. 2805 */ 2806 latched_seq_write(&console_seq, seq + 1); 2807 goto skip; 2808 } 2809 2810 /* Output to all consoles once old messages replayed. */ 2811 if (unlikely(exclusive_console && 2812 seq >= exclusive_console_stop_seq)) { 2813 exclusive_console = NULL; 2814 } 2815 2816 /* 2817 * Handle extended console text first because later 2818 * record_print_text() will modify the record buffer in-place. 2819 */ 2820 if (nr_ext_console_drivers) { 2821 ext_len = info_print_ext_header(ext_text, 2822 sizeof(ext_text), 2823 r.info); 2824 ext_len += msg_print_ext_body(ext_text + ext_len, 2825 sizeof(ext_text) - ext_len, 2826 &r.text_buf[0], 2827 r.info->text_len, 2828 &r.info->dev_info); 2829 } 2830 len = record_print_text(&r, 2831 console_msg_format & MSG_FORMAT_SYSLOG, 2832 printk_time); 2833 latched_seq_write(&console_seq, seq + 1); 2834 2835 printk_safe_enter_irqsave(flags); 2836 2837 /* 2838 * While actively printing out messages, if another printk() 2839 * were to occur on another CPU, it may wait for this one to 2840 * finish. This task can not be preempted if there is a 2841 * waiter waiting to take over. 2842 */ 2843 console_lock_spinning_enable(); 2844 2845 stop_critical_timings(); /* don't trace print latency */ 2846 call_console_drivers(ext_text, ext_len, text, len); 2847 start_critical_timings(); 2848 2849 if (console_lock_spinning_disable_and_check()) { 2850 printk_safe_exit_irqrestore(flags); 2851 return; 2852 } 2853 2854 printk_safe_exit_irqrestore(flags); 2855 2856 if (do_cond_resched) 2857 cond_resched(); 2858 } 2859 2860 console_locked = 0; 2861 2862 up_console_sem(); 2863 2864 /* 2865 * Someone could have filled up the buffer again, so re-check if there's 2866 * something to flush. In case we cannot trylock the console_sem again, 2867 * there's a new owner and the console_unlock() from them will do the 2868 * flush, no worries. 2869 */ 2870 retry = prb_read_valid(prb, read_console_seq(), NULL); 2871 if (retry && console_trylock()) 2872 goto again; 2873 } 2874 EXPORT_SYMBOL(console_unlock); 2875 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org