Skip to content
Snippets Groups Projects
Select Git revision
  • cff7d378d3fdbb53db9b6e2578b14855f401cd41
  • seco_lf-6.6.52-2.2.1 default protected
  • integrate/gitlab-ci/use-board-only-instead-codename-and-board-in-the-configuration/into/seco_lf-6.6.52-2.2.1
  • seco_lf-6.6.52-2.2.1-tr8mp-dtb
  • seco_lf-6.6.52-2.2.1-tr8mp-mcu
  • integrate/gitlab-ci/use-board-only-instead-codename-and-board-in-the-configuration/into/seco_lf-5.10.y
  • seco_lf-6.6.23-2.0.0_e39-e83-p4-devicetree
  • integrate/gitlab-ci/cleaos-894-rename-distros-into-build-tergets/into/seco_lf-5.10.y
  • integrate/gitlab-ci/cleaos-894-rename-distros-into-build-tergets/into/seco_lf-6.6.52-2.2.1
  • seco_lf-5.10.y protected
  • seco_lf-6.6.52-2.2.1_e88-dev
  • seco_lf-6.6.52-2.2.1_ov5640-mx95-dev
  • seco_lf-6.6.52-2.2.1-tr8mp-rgb-defconfig
  • seco_lf-6.6.52-2.2.1-tr8mp-dev
  • seco_lf-6.6.52-2.2.1-tr8mp-dtbo
  • seco_lf-6.6.52-2.2.1-tr8mp-rv3028
  • seco_lf-6.6.52-2.2.1-tr8mp-fpga
  • seco_lf-6.6.52-2.2.1_stm32g0-dev
  • seco_lf-6.6.52-2.2.1_remove-mwifiex_d18
  • seco_lf-6.6.52-2.2.1_e88-dbg-uart-dev
  • seco_lf_v2024.04_6.6.52_2.2.x-e39-e83-devicetrees
  • lf-6.6.52-2.2.1
  • lf-6.1.55-2.2.1
  • lf-6.6.3-1.0.0
  • lf-6.6.3-imx95-er2
  • lf-6.1.55-2.2.0
  • lf-6.6.y-imx95-er1
  • lf-5.15.71-2.2.2
  • lf-6.1.36-2.1.0
  • lf-5.15.71-2.2.1
  • lf-6.1.22-2.0.0
  • lf-6.1.1-1.0.1
  • rel_imx_5.4.24_2.1.4
  • rel_imx_4.9.88_2.0.13
  • rel_imx_4.14.98_2.3.5
  • lf-6.1.1-1.0.0
  • rel_imx_5.4.3_2.0.2
  • lf-5.15.71-2.2.0
  • lf-5.10.72-2.2.3
  • lf-5.15.52-2.1.0
  • imx_5.15.52_imx8ulp_er1
41 results

cpu.c

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    cpu.c 23.05 KiB
    /* CPU control.
     * (C) 2001, 2002, 2003, 2004 Rusty Russell
     *
     * This code is licenced under the GPL.
     */
    #include <linux/proc_fs.h>
    #include <linux/smp.h>
    #include <linux/init.h>
    #include <linux/notifier.h>
    #include <linux/sched.h>
    #include <linux/unistd.h>
    #include <linux/cpu.h>
    #include <linux/oom.h>
    #include <linux/rcupdate.h>
    #include <linux/export.h>
    #include <linux/bug.h>
    #include <linux/kthread.h>
    #include <linux/stop_machine.h>
    #include <linux/mutex.h>
    #include <linux/gfp.h>
    #include <linux/suspend.h>
    #include <linux/lockdep.h>
    #include <linux/tick.h>
    #include <linux/irq.h>
    
    #include <trace/events/power.h>
    #define CREATE_TRACE_POINTS
    #include <trace/events/cpuhp.h>
    
    #include "smpboot.h"
    
    /**
     * cpuhp_cpu_state - Per cpu hotplug state storage
     * @state:	The current cpu state
     * @target:	The target state
     */
    struct cpuhp_cpu_state {
    	enum cpuhp_state	state;
    	enum cpuhp_state	target;
    };
    
    static DEFINE_PER_CPU(struct cpuhp_cpu_state, cpuhp_state);
    
    /**
     * cpuhp_step - Hotplug state machine step
     * @name:	Name of the step
     * @startup:	Startup function of the step
     * @teardown:	Teardown function of the step
     * @skip_onerr:	Do not invoke the functions on error rollback
     *		Will go away once the notifiers	are gone
     */
    struct cpuhp_step {
    	const char	*name;
    	int		(*startup)(unsigned int cpu);
    	int		(*teardown)(unsigned int cpu);
    	bool		skip_onerr;
    };
    
    static struct cpuhp_step cpuhp_bp_states[];
    
    /**
     * cpuhp_invoke_callback _ Invoke the callbacks for a given state
     * @cpu:	The cpu for which the callback should be invoked
     * @step:	The step in the state machine
     * @cb:		The callback function to invoke
     *
     * Called from cpu hotplug and from the state register machinery
     */
    static int cpuhp_invoke_callback(unsigned int cpu, enum cpuhp_state step,
    				 int (*cb)(unsigned int))