All of lore.kernel.org
 help / color / mirror / Atom feed
* [frederic-dynticks:core/hotplug 1/2] arch/x86/kernel/cpu/mtrr/mtrr.c:178:64: error: passing argument 3 of 'stop_machine_cpuslocked' from incompatible pointer type
@ 2026-10-09 18:34 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-09 18:34 UTC (permalink / raw)
  To: Frederic Weisbecker; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git core/hotplug
head:   ef852f3cb44950ae7ca8efd1eb384c8a36367a38
commit: 370a49ead30e94bf8e92ed3415ba86be14b8b292 [1/2] stop_machine: Add post function to execute while other CPUs can exit
config: x86_64-randconfig-2300-20261009 (https://download.01.org/0day-ci/archive/20261009/202610092006.2b5UM7Re-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261009/202610092006.2b5UM7Re-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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610092006.2b5UM7Re-lkp@intel.com/

All errors (new ones prefixed by >>):

   arch/x86/kernel/cpu/mtrr/mtrr.c: In function 'set_mtrr':
>> arch/x86/kernel/cpu/mtrr/mtrr.c:178:64: error: passing argument 3 of 'stop_machine_cpuslocked' from incompatible pointer type [-Wincompatible-pointer-types]
     178 |         stop_machine_cpuslocked(mtrr_rendezvous_handler, NULL, &data,
         |                                                                ^~~~~
         |                                                                |
         |                                                                struct set_mtrr_data *
   In file included from arch/x86/kernel/cpu/mtrr/mtrr.c:23:
   include/linux/stop_machine.h:167:65: note: expected 'const struct cpumask *' but argument is of type 'struct set_mtrr_data *'
     167 |                                           const struct cpumask *cpus)
         |                                           ~~~~~~~~~~~~~~~~~~~~~~^~~~
>> arch/x86/kernel/cpu/mtrr/mtrr.c:178:9: error: too many arguments to function 'stop_machine_cpuslocked'
     178 |         stop_machine_cpuslocked(mtrr_rendezvous_handler, NULL, &data,
         |         ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/stop_machine.h:166:28: note: declared here
     166 | static __always_inline int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data,
         |                            ^~~~~~~~~~~~~~~~~~~~~~~


vim +/stop_machine_cpuslocked +178 arch/x86/kernel/cpu/mtrr/mtrr.c

   134	
   135	/**
   136	 * set_mtrr - update mtrrs on all processors
   137	 * @reg:	mtrr in question
   138	 * @base:	mtrr base
   139	 * @size:	mtrr size
   140	 * @type:	mtrr type
   141	 *
   142	 * This is kinda tricky, but fortunately, Intel spelled it out for us cleanly:
   143	 *
   144	 * 1. Queue work to do the following on all processors:
   145	 * 2. Disable Interrupts
   146	 * 3. Wait for all procs to do so
   147	 * 4. Enter no-fill cache mode
   148	 * 5. Flush caches
   149	 * 6. Clear PGE bit
   150	 * 7. Flush all TLBs
   151	 * 8. Disable all range registers
   152	 * 9. Update the MTRRs
   153	 * 10. Enable all range registers
   154	 * 11. Flush all TLBs and caches again
   155	 * 12. Enter normal cache mode and reenable caching
   156	 * 13. Set PGE
   157	 * 14. Wait for buddies to catch up
   158	 * 15. Enable interrupts.
   159	 *
   160	 * What does that mean for us? Well, stop_machine() will ensure that
   161	 * the rendezvous handler is started on each CPU. And in lockstep they
   162	 * do the state transition of disabling interrupts, updating MTRR's
   163	 * (the CPU vendors may each do it differently, so we call mtrr_if->set()
   164	 * callback and let them take care of it.) and enabling interrupts.
   165	 *
   166	 * Note that the mechanism is the same for UP systems, too; all the SMP stuff
   167	 * becomes nops.
   168	 */
   169	static void set_mtrr(unsigned int reg, unsigned long base, unsigned long size,
   170			     mtrr_type type)
   171	{
   172		struct set_mtrr_data data = { .smp_reg = reg,
   173					      .smp_base = base,
   174					      .smp_size = size,
   175					      .smp_type = type
   176					    };
   177	
 > 178		stop_machine_cpuslocked(mtrr_rendezvous_handler, NULL, &data,
   179					cpu_online_mask);
   180	
   181		generic_rebuild_map();
   182	}
   183	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-09 18:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09 18:34 [frederic-dynticks:core/hotplug 1/2] arch/x86/kernel/cpu/mtrr/mtrr.c:178:64: error: passing argument 3 of 'stop_machine_cpuslocked' from incompatible pointer type kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.