void cpus_read_unlock(void);
 int  cpus_read_trylock(void);
 void lockdep_assert_cpus_held(void);
+void cpu_hotplug_disable_offlining(void);
 void cpu_hotplug_disable(void);
 void cpu_hotplug_enable(void);
 void clear_tasks_mm_cpumask(int cpu);
 static inline void cpus_read_unlock(void) { }
 static inline int  cpus_read_trylock(void) { return true; }
 static inline void lockdep_assert_cpus_held(void) { }
+static inline void cpu_hotplug_disable_offlining(void) { }
 static inline void cpu_hotplug_disable(void) { }
 static inline void cpu_hotplug_enable(void) { }
 static inline int remove_cpu(unsigned int cpu) { return -EPERM; }
 
 
 DEFINE_STATIC_PERCPU_RWSEM(cpu_hotplug_lock);
 
+static bool cpu_hotplug_offline_disabled __ro_after_init;
+
 void cpus_read_lock(void)
 {
        percpu_down_read(&cpu_hotplug_lock);
        rwsem_release(&cpu_hotplug_lock.dep_map, _THIS_IP_);
 }
 
+/* Declare CPU offlining not supported */
+void cpu_hotplug_disable_offlining(void)
+{
+       cpu_maps_update_begin();
+       cpu_hotplug_offline_disabled = true;
+       cpu_maps_update_done();
+}
+
 /*
  * Wait for currently running CPU hotplug operations to complete (if any) and
  * disable future CPU hotplug (from sysfs). The 'cpu_add_remove_lock' protects
         * If the platform does not support hotplug, report it explicitly to
         * differentiate it from a transient offlining failure.
         */
-       if (cc_platform_has(CC_ATTR_HOTPLUG_DISABLED))
+       if (cc_platform_has(CC_ATTR_HOTPLUG_DISABLED) ||
+           cpu_hotplug_offline_disabled)
                return -EOPNOTSUPP;
        if (cpu_hotplug_disabled)
                return -EBUSY;