From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F7C5E94115 for ; Fri, 6 Oct 2023 20:11:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233444AbjJFULF (ORCPT ); Fri, 6 Oct 2023 16:11:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233410AbjJFULD (ORCPT ); Fri, 6 Oct 2023 16:11:03 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E70612A for ; Fri, 6 Oct 2023 13:10:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696623034; x=1728159034; h=date:from:to:cc:subject:message-id:mime-version; bh=k/B6ba6+KS7otmaFOzpuH/jF1QS/AFG3jTa3Dh+IQxQ=; b=SSzJAiPhOogcqvnR0xiqeFod0R2AVvD1y/0O4MPhKsP5eVFs3KbmZ4m9 ul4hD89keBcu6vB9zef+A2FEwyNZnCLrzE9DBCJG4q0ZRs5p7KocBsKC0 Q6Xb9dukixOQ+ZZPt9H/i/7g/RwgPNDniZs0sKgc0OA10C3djUQc/2gYe +4PyKaV7jbw5lKg+HLW8chZyjlC1kmSIr0kbSI4LiFYduYdDvEs3WhWDz HmDI6VKmZgYWiTns9ktZ3aFrZ+6OsI2/5H5Ng5bxoldM/c1I6dKdJxZjD 44s3TlXyH2AOSYzJQWqpdCZOHxdNbjtW+zbJOV6neFTggSRlE8pCmhAaK A==; X-IronPort-AV: E=McAfee;i="6600,9927,10855"; a="414820357" X-IronPort-AV: E=Sophos;i="6.03,204,1694761200"; d="scan'208";a="414820357" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2023 13:10:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10855"; a="926069192" X-IronPort-AV: E=Sophos;i="6.03,204,1694761200"; d="scan'208";a="926069192" Received: from lkp-server01.sh.intel.com (HELO 8a3a91ad4240) ([10.239.97.150]) by orsmga005.jf.intel.com with ESMTP; 06 Oct 2023 13:10:31 -0700 Received: from kbuild by 8a3a91ad4240 with local (Exim 4.96) (envelope-from ) id 1qor9Y-0003bL-36; Fri, 06 Oct 2023 20:10:28 +0000 Date: Sat, 7 Oct 2023 04:09:56 +0800 From: kernel test robot To: Thomas Gleixner Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org, Frederic Weisbecker Subject: kernel/time/tick-broadcast.c:1026: warning: Function parameter or member 'from_periodic' not described in 'tick_broadcast_setup_oneshot' Message-ID: <202310070327.tlkIwubD-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Thomas, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: af95dc6fdc25e616051d0234aad638e15c02ec8f commit: f9d36cf445ffff0b913ba187a3eff78028f9b1fb tick/broadcast: Make broadcast device replacement work correctly date: 5 months ago config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20231007/202310070327.tlkIwubD-lkp@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231007/202310070327.tlkIwubD-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202310070327.tlkIwubD-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/time/tick-broadcast.c:1026: warning: Function parameter or member 'bc' not described in 'tick_broadcast_setup_oneshot' >> kernel/time/tick-broadcast.c:1026: warning: Function parameter or member 'from_periodic' not described in 'tick_broadcast_setup_oneshot' vim +1026 kernel/time/tick-broadcast.c f73f64d5687192 Thomas Gleixner 2020-11-17 1020 79bf2bb335b85d Thomas Gleixner 2007-02-16 1021 /** 8dce39c231af55 Li Zefan 2007-11-05 1022 * tick_broadcast_setup_oneshot - setup the broadcast device 79bf2bb335b85d Thomas Gleixner 2007-02-16 1023 */ f9d36cf445ffff Thomas Gleixner 2023-05-06 1024 static void tick_broadcast_setup_oneshot(struct clock_event_device *bc, f9d36cf445ffff Thomas Gleixner 2023-05-06 1025 bool from_periodic) 79bf2bb335b85d Thomas Gleixner 2007-02-16 @1026 { 07f4beb0b5bbfa Thomas Gleixner 2011-05-16 1027 int cpu = smp_processor_id(); f9d36cf445ffff Thomas Gleixner 2023-05-06 1028 ktime_t nexttick = 0; 07f4beb0b5bbfa Thomas Gleixner 2011-05-16 1029 c1a9eeb938b543 Thomas Gleixner 2016-12-15 1030 if (!bc) c1a9eeb938b543 Thomas Gleixner 2016-12-15 1031 return; c1a9eeb938b543 Thomas Gleixner 2016-12-15 1032 f9d36cf445ffff Thomas Gleixner 2023-05-06 1033 /* f9d36cf445ffff Thomas Gleixner 2023-05-06 1034 * When the broadcast device was switched to oneshot by the first f9d36cf445ffff Thomas Gleixner 2023-05-06 1035 * CPU handling the NOHZ change, the other CPUs will reach this f9d36cf445ffff Thomas Gleixner 2023-05-06 1036 * code via hrtimer_run_queues() -> tick_check_oneshot_change() f9d36cf445ffff Thomas Gleixner 2023-05-06 1037 * too. Set up the broadcast device only once! f9d36cf445ffff Thomas Gleixner 2023-05-06 1038 */ f9d36cf445ffff Thomas Gleixner 2023-05-06 1039 if (bc->event_handler == tick_handle_oneshot_broadcast) { f9d36cf445ffff Thomas Gleixner 2023-05-06 1040 /* f9d36cf445ffff Thomas Gleixner 2023-05-06 1041 * The CPU which switched from periodic to oneshot mode f9d36cf445ffff Thomas Gleixner 2023-05-06 1042 * set the broadcast oneshot bit for all other CPUs which f9d36cf445ffff Thomas Gleixner 2023-05-06 1043 * are in the general (periodic) broadcast mask to ensure f9d36cf445ffff Thomas Gleixner 2023-05-06 1044 * that CPUs which wait for the periodic broadcast are f9d36cf445ffff Thomas Gleixner 2023-05-06 1045 * woken up. f9d36cf445ffff Thomas Gleixner 2023-05-06 1046 * f9d36cf445ffff Thomas Gleixner 2023-05-06 1047 * Clear the bit for the local CPU as the set bit would f9d36cf445ffff Thomas Gleixner 2023-05-06 1048 * prevent the first tick_broadcast_enter() after this CPU f9d36cf445ffff Thomas Gleixner 2023-05-06 1049 * switched to oneshot state to program the broadcast f9d36cf445ffff Thomas Gleixner 2023-05-06 1050 * device. f9d36cf445ffff Thomas Gleixner 2023-05-06 1051 * f9d36cf445ffff Thomas Gleixner 2023-05-06 1052 * This code can also be reached via tick_broadcast_control(), f9d36cf445ffff Thomas Gleixner 2023-05-06 1053 * but this cannot avoid the tick_broadcast_clear_oneshot() f9d36cf445ffff Thomas Gleixner 2023-05-06 1054 * as that would break the periodic to oneshot transition of f9d36cf445ffff Thomas Gleixner 2023-05-06 1055 * secondary CPUs. But that's harmless as the below only f9d36cf445ffff Thomas Gleixner 2023-05-06 1056 * clears already cleared bits. f9d36cf445ffff Thomas Gleixner 2023-05-06 1057 */ f9d36cf445ffff Thomas Gleixner 2023-05-06 1058 tick_broadcast_clear_oneshot(cpu); f9d36cf445ffff Thomas Gleixner 2023-05-06 1059 return; f9d36cf445ffff Thomas Gleixner 2023-05-06 1060 } f9d36cf445ffff Thomas Gleixner 2023-05-06 1061 7300711e8c6824 Thomas Gleixner 2008-09-06 1062 79bf2bb335b85d Thomas Gleixner 2007-02-16 1063 bc->event_handler = tick_handle_oneshot_broadcast; f9d36cf445ffff Thomas Gleixner 2023-05-06 1064 bc->next_event = KTIME_MAX; 7300711e8c6824 Thomas Gleixner 2008-09-06 1065 7300711e8c6824 Thomas Gleixner 2008-09-06 1066 /* f9d36cf445ffff Thomas Gleixner 2023-05-06 1067 * When the tick mode is switched from periodic to oneshot it must f9d36cf445ffff Thomas Gleixner 2023-05-06 1068 * be ensured that CPUs which are waiting for periodic broadcast f9d36cf445ffff Thomas Gleixner 2023-05-06 1069 * get their wake-up at the next tick. This is achieved by ORing f9d36cf445ffff Thomas Gleixner 2023-05-06 1070 * tick_broadcast_mask into tick_broadcast_oneshot_mask. f9d36cf445ffff Thomas Gleixner 2023-05-06 1071 * f9d36cf445ffff Thomas Gleixner 2023-05-06 1072 * For other callers, e.g. broadcast device replacement, f9d36cf445ffff Thomas Gleixner 2023-05-06 1073 * tick_broadcast_oneshot_mask must not be touched as this would f9d36cf445ffff Thomas Gleixner 2023-05-06 1074 * set bits for CPUs which are already NOHZ, but not idle. Their f9d36cf445ffff Thomas Gleixner 2023-05-06 1075 * next tick_broadcast_enter() would observe the bit set and fail f9d36cf445ffff Thomas Gleixner 2023-05-06 1076 * to update the expiry time and the broadcast event device. 7300711e8c6824 Thomas Gleixner 2008-09-06 1077 */ f9d36cf445ffff Thomas Gleixner 2023-05-06 1078 if (from_periodic) { b352bc1cbc2913 Thomas Gleixner 2013-03-05 1079 cpumask_copy(tmpmask, tick_broadcast_mask); f9d36cf445ffff Thomas Gleixner 2023-05-06 1080 /* Remove the local CPU as it is obviously not idle */ b352bc1cbc2913 Thomas Gleixner 2013-03-05 1081 cpumask_clear_cpu(cpu, tmpmask); f9d36cf445ffff Thomas Gleixner 2023-05-06 1082 cpumask_or(tick_broadcast_oneshot_mask, tick_broadcast_oneshot_mask, tmpmask); 7300711e8c6824 Thomas Gleixner 2008-09-06 1083 f9d36cf445ffff Thomas Gleixner 2023-05-06 1084 /* f9d36cf445ffff Thomas Gleixner 2023-05-06 1085 * Ensure that the oneshot broadcast handler will wake the f9d36cf445ffff Thomas Gleixner 2023-05-06 1086 * CPUs which are still waiting for periodic broadcast. f9d36cf445ffff Thomas Gleixner 2023-05-06 1087 */ f9d36cf445ffff Thomas Gleixner 2023-05-06 1088 nexttick = tick_get_next_period(); f9d36cf445ffff Thomas Gleixner 2023-05-06 1089 tick_broadcast_init_next_event(tmpmask, nexttick); f73f64d5687192 Thomas Gleixner 2020-11-17 1090 07f4beb0b5bbfa Thomas Gleixner 2011-05-16 1091 /* f9d36cf445ffff Thomas Gleixner 2023-05-06 1092 * If the underlying broadcast clock event device is f9d36cf445ffff Thomas Gleixner 2023-05-06 1093 * already in oneshot state, then there is nothing to do. f9d36cf445ffff Thomas Gleixner 2023-05-06 1094 * The device was already armed for the next tick f9d36cf445ffff Thomas Gleixner 2023-05-06 1095 * in tick_handle_broadcast_periodic() 07f4beb0b5bbfa Thomas Gleixner 2011-05-16 1096 */ f9d36cf445ffff Thomas Gleixner 2023-05-06 1097 if (clockevent_state_oneshot(bc)) f9d36cf445ffff Thomas Gleixner 2023-05-06 1098 return; 79bf2bb335b85d Thomas Gleixner 2007-02-16 1099 } f9d36cf445ffff Thomas Gleixner 2023-05-06 1100 f9d36cf445ffff Thomas Gleixner 2023-05-06 1101 /* f9d36cf445ffff Thomas Gleixner 2023-05-06 1102 * When switching from periodic to oneshot mode arm the broadcast f9d36cf445ffff Thomas Gleixner 2023-05-06 1103 * device for the next tick. f9d36cf445ffff Thomas Gleixner 2023-05-06 1104 * f9d36cf445ffff Thomas Gleixner 2023-05-06 1105 * If the broadcast device has been replaced in oneshot mode and f9d36cf445ffff Thomas Gleixner 2023-05-06 1106 * the oneshot broadcast mask is not empty, then arm it to expire f9d36cf445ffff Thomas Gleixner 2023-05-06 1107 * immediately in order to reevaluate the next expiring timer. f9d36cf445ffff Thomas Gleixner 2023-05-06 1108 * @nexttick is 0 and therefore in the past which will cause the f9d36cf445ffff Thomas Gleixner 2023-05-06 1109 * clockevent code to force an event. f9d36cf445ffff Thomas Gleixner 2023-05-06 1110 * f9d36cf445ffff Thomas Gleixner 2023-05-06 1111 * For both cases the programming can be avoided when the oneshot f9d36cf445ffff Thomas Gleixner 2023-05-06 1112 * broadcast mask is empty. f9d36cf445ffff Thomas Gleixner 2023-05-06 1113 * f9d36cf445ffff Thomas Gleixner 2023-05-06 1114 * tick_broadcast_set_event() implicitly switches the broadcast f9d36cf445ffff Thomas Gleixner 2023-05-06 1115 * device to oneshot state. f9d36cf445ffff Thomas Gleixner 2023-05-06 1116 */ f9d36cf445ffff Thomas Gleixner 2023-05-06 1117 if (!cpumask_empty(tick_broadcast_oneshot_mask)) f9d36cf445ffff Thomas Gleixner 2023-05-06 1118 tick_broadcast_set_event(bc, cpu, nexttick); 9c17bcda991000 Thomas Gleixner 2008-09-03 1119 } 79bf2bb335b85d Thomas Gleixner 2007-02-16 1120 :::::: The code at line 1026 was first introduced by commit :::::: 79bf2bb335b85db25d27421c798595a2fa2a0e82 [PATCH] tick-management: dyntick / highres functionality :::::: TO: Thomas Gleixner :::::: CC: Linus Torvalds -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki