Home
last modified time | relevance | path

Searched full:cpu (Results 1 – 25 of 4369) sorted by relevance

12345678910>>...175

/linux-3.3/Documentation/ABI/testing/
Dsysfs-devices-system-cpu1 What: /sys/devices/system/cpu/
5 A collection of both global and individual CPU attributes
7 Individual CPU attributes are contained in subdirectories
8 named by the kernel's logical CPU number, e.g.:
10 /sys/devices/system/cpu/cpu#/
12 What: /sys/devices/system/cpu/sched_mc_power_savings
13 /sys/devices/system/cpu/sched_smt_power_savings
22 2 - Also bias task wakeups to semi-idle cpu package for power
37 What: /sys/devices/system/cpu/kernel_max
38 /sys/devices/system/cpu/offline
[all …]
/linux-3.3/arch/x86/xen/
Dsmp.c5 * very straightforward. Bringing a CPU up is simply a matter of
10 * Because virtual CPUs can be scheduled onto any real CPU, there's no
23 #include <asm/cpu.h>
62 int cpu = smp_processor_id(); in cpu_bringup() local
71 cpu = smp_processor_id(); in cpu_bringup()
72 smp_store_cpu_info(cpu); in cpu_bringup()
73 cpu_data(cpu).x86_max_cores = 1; in cpu_bringup()
74 set_cpu_sibling_map(cpu); in cpu_bringup()
78 set_cpu_online(cpu, true); in cpu_bringup()
94 static int xen_smp_intr_init(unsigned int cpu) in xen_smp_intr_init() argument
[all …]
/linux-3.3/arch/arm/kernel/
Dsmp.c21 #include <linux/cpu.h>
31 #include <asm/cpu.h>
61 int __cpuinit __cpu_up(unsigned int cpu) in __cpu_up() argument
63 struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu); in __cpu_up()
72 idle = fork_idle(cpu); in __cpu_up()
74 printk(KERN_ERR "CPU%u: fork() failed\n", cpu); in __cpu_up()
83 init_idle(idle, cpu); in __cpu_up()
97 * Now bring the CPU into our world. in __cpu_up()
99 ret = boot_secondary(cpu, idle); in __cpu_up()
104 * CPU was successfully started, wait for it in __cpu_up()
[all …]
/linux-3.3/arch/powerpc/kernel/
Dsmp.c31 #include <linux/cpu.h>
74 /* State of each CPU during hotplug phases */
206 void smp_muxed_ipi_set_data(int cpu, unsigned long data) in smp_muxed_ipi_set_data() argument
208 struct cpu_messages *info = &per_cpu(ipi_message, cpu); in smp_muxed_ipi_set_data()
213 void smp_muxed_ipi_message_pass(int cpu, int msg) in smp_muxed_ipi_message_pass() argument
215 struct cpu_messages *info = &per_cpu(ipi_message, cpu); in smp_muxed_ipi_message_pass()
220 smp_ops->cause_ipi(cpu, info->data); in smp_muxed_ipi_message_pass()
251 static inline void do_message_pass(int cpu, int msg) in do_message_pass() argument
254 smp_ops->message_pass(cpu, msg); in do_message_pass()
257 smp_muxed_ipi_message_pass(cpu, msg); in do_message_pass()
[all …]
Dtau_6xx.c2 * temp.c Thermal management for cpu's with Thermal Assist Units
7 * dynamic power management to limit peak CPU temp (using ICTC)
10 * Silly, crazy ideas: use cpu load (from scheduler) and ICTC to extend battery
52 void set_thresholds(unsigned long cpu) in set_thresholds() argument
59 mtspr(SPRN_THRM1, THRM1_THRES(tau[cpu].low) | THRM1_V | THRM1_TIE | THRM1_TID); in set_thresholds()
64 mtspr (SPRN_THRM2, THRM1_THRES(tau[cpu].high) | THRM1_V | THRM1_TIE); in set_thresholds()
67 mtspr(SPRN_THRM1, THRM1_THRES(tau[cpu].low) | THRM1_V | THRM1_TID); in set_thresholds()
68 mtspr(SPRN_THRM2, THRM1_THRES(tau[cpu].high) | THRM1_V); in set_thresholds()
72 void TAUupdate(int cpu) in TAUupdate() argument
84 if (tau[cpu].low >= step_size){ in TAUupdate()
[all …]
/linux-3.3/drivers/xen/
Dcpu_hotplug.c7 #include <asm/cpu.h>
9 static void enable_hotplug_cpu(int cpu) in enable_hotplug_cpu() argument
11 if (!cpu_present(cpu)) in enable_hotplug_cpu()
12 arch_register_cpu(cpu); in enable_hotplug_cpu()
14 set_cpu_present(cpu, true); in enable_hotplug_cpu()
17 static void disable_hotplug_cpu(int cpu) in disable_hotplug_cpu() argument
19 if (cpu_present(cpu)) in disable_hotplug_cpu()
20 arch_unregister_cpu(cpu); in disable_hotplug_cpu()
22 set_cpu_present(cpu, false); in disable_hotplug_cpu()
25 static int vcpu_online(unsigned int cpu) in vcpu_online() argument
[all …]
/linux-3.3/drivers/base/
Dcpu.c2 * CPU subsystem support
9 #include <linux/cpu.h>
19 .name = "cpu",
20 .dev_name = "cpu",
31 struct cpu *cpu = container_of(dev, struct cpu, dev); in show_online() local
33 return sprintf(buf, "%u\n", !!cpu_online(cpu->dev.id)); in show_online()
40 struct cpu *cpu = container_of(dev, struct cpu, dev); in store_online() local
46 ret = cpu_down(cpu->dev.id); in store_online()
51 ret = cpu_up(cpu->dev.id); in store_online()
66 static void __cpuinit register_cpu_control(struct cpu *cpu) in register_cpu_control() argument
[all …]
/linux-3.3/include/linux/
Dcpumask.h6 * set of CPU's in a system, one bit position per CPU number. In general,
42 * cpu_possible_mask- has bit 'cpu' set iff cpu is populatable
43 * cpu_present_mask - has bit 'cpu' set iff cpu is populated
44 * cpu_online_mask - has bit 'cpu' set iff cpu available to scheduler
45 * cpu_active_mask - has bit 'cpu' set iff cpu available to migration
49 * The cpu_possible_mask is fixed at boot time, as the set of CPU id's
69 * assumption that their single CPU is online. The UP
75 * only one CPU.
88 #define cpu_online(cpu) cpumask_test_cpu((cpu), cpu_online_mask) argument
89 #define cpu_possible(cpu) cpumask_test_cpu((cpu), cpu_possible_mask) argument
[all …]
/linux-3.3/drivers/cpufreq/
Dcpufreq_userspace.c21 #include <linux/cpu.h>
32 static DEFINE_PER_CPU(unsigned int, cpu_cur_freq); /* current CPU freq */
33 static DEFINE_PER_CPU(unsigned int, cpu_set_freq); /* CPU freq desired by
47 if (!per_cpu(cpu_is_managed, freq->cpu)) in userspace_cpufreq_notifier()
51 pr_debug("saving cpu_cur_freq of cpu %u to be %u kHz\n", in userspace_cpufreq_notifier()
52 freq->cpu, freq->new); in userspace_cpufreq_notifier()
53 per_cpu(cpu_cur_freq, freq->cpu) = freq->new; in userspace_cpufreq_notifier()
65 * cpufreq_set - set the CPU frequency
69 * Sets the CPU frequency to freq.
75 pr_debug("cpufreq_set for cpu %u, freq %u kHz\n", policy->cpu, freq); in cpufreq_set()
[all …]
Dcpufreq.c8 * Added handling for CPU hotplug
10 * Fix handling for CPU hotplug -- affected CPUs
28 #include <linux/cpu.h>
43 /* This one keeps track of the previously set governor of a removed CPU */
49 * cpu_policy_rwsem is a per CPU reader-writer semaphore designed to cure
56 * the policy altogether (eg. CPU hotplug), will hold this lock in write
60 * - All holders of the lock should check to make sure that the CPU they
70 #define lock_policy_rwsem(mode, cpu) \ argument
72 (int cpu) \
74 int policy_cpu = per_cpu(cpufreq_policy_cpu, cpu); \
[all …]
/linux-3.3/arch/s390/kernel/
Dsmp.c13 * We work with logical cpu numbering everywhere we can. The only
14 * functions using the real cpu address (got from STAP) are the sigp
16 * That means that cpu_number_map[i] == i for every cpu. cpu_number_map is
17 * used e.g. to find the idle task belonging to a logical cpu. Every array
18 * in the kernel is sorted by the logical cpu number and not by the physical
23 #define KMSG_COMPONENT "cpu"
37 #include <linux/cpu.h>
55 #include <asm/cpu.h>
58 /* logical cpu to cpu address */
74 static DEFINE_PER_CPU(struct cpu, cpu_devices);
[all …]
/linux-3.3/tools/power/cpupower/lib/
Dcpufreq.c16 int cpufreq_cpu_exists(unsigned int cpu) in cpufreq_cpu_exists() argument
18 return sysfs_cpu_exists(cpu); in cpufreq_cpu_exists()
21 unsigned long cpufreq_get_freq_kernel(unsigned int cpu) in cpufreq_get_freq_kernel() argument
23 return sysfs_get_freq_kernel(cpu); in cpufreq_get_freq_kernel()
26 unsigned long cpufreq_get_freq_hardware(unsigned int cpu) in cpufreq_get_freq_hardware() argument
28 return sysfs_get_freq_hardware(cpu); in cpufreq_get_freq_hardware()
31 unsigned long cpufreq_get_transition_latency(unsigned int cpu) in cpufreq_get_transition_latency() argument
33 return sysfs_get_freq_transition_latency(cpu); in cpufreq_get_transition_latency()
36 int cpufreq_get_hardware_limits(unsigned int cpu, in cpufreq_get_hardware_limits() argument
42 return sysfs_get_freq_hardware_limits(cpu, min, max); in cpufreq_get_hardware_limits()
[all …]
/linux-3.3/arch/s390/oprofile/
Dhwsampler.c16 #include <linux/cpu.h>
126 static int smp_ctl_ssctl_stop(int cpu) in smp_ctl_ssctl_stop() argument
132 cb = &per_cpu(sampler_cpu_buffer, cpu); in smp_ctl_ssctl_stop()
138 smp_call_function_single(cpu, execute_ssctl, &ep, 1); in smp_ctl_ssctl_stop()
141 printk(KERN_ERR "hwsampler: CPU %d CPUMF SSCTL failed.\n", cpu); in smp_ctl_ssctl_stop()
146 smp_call_function_single(cpu, execute_qsi, &ep, 1); in smp_ctl_ssctl_stop()
156 static int smp_ctl_ssctl_deactivate(int cpu) in smp_ctl_ssctl_deactivate() argument
162 cb = &per_cpu(sampler_cpu_buffer, cpu); in smp_ctl_ssctl_deactivate()
168 smp_call_function_single(cpu, execute_ssctl, &ep, 1); in smp_ctl_ssctl_deactivate()
171 printk(KERN_ERR "hwsampler: CPU %d CPUMF SSCTL failed.\n", cpu); in smp_ctl_ssctl_deactivate()
[all …]
/linux-3.3/arch/blackfin/mm/
Dsram-alloc.c68 unsigned int cpu; in l1sram_init() local
77 for (cpu = 0; cpu < num_possible_cpus(); ++cpu) { in l1sram_init()
78 per_cpu(free_l1_ssram_head, cpu).next = in l1sram_init()
80 if (!per_cpu(free_l1_ssram_head, cpu).next) { in l1sram_init()
85 per_cpu(free_l1_ssram_head, cpu).next->paddr = (void *)get_l1_scratch_start_cpu(cpu) + reserve; in l1sram_init()
86 per_cpu(free_l1_ssram_head, cpu).next->size = L1_SCRATCH_LENGTH - reserve; in l1sram_init()
87 per_cpu(free_l1_ssram_head, cpu).next->pid = 0; in l1sram_init()
88 per_cpu(free_l1_ssram_head, cpu).next->next = NULL; in l1sram_init()
90 per_cpu(used_l1_ssram_head, cpu).next = NULL; in l1sram_init()
93 spin_lock_init(&per_cpu(l1sram_lock, cpu)); in l1sram_init()
[all …]
/linux-3.3/arch/x86/kernel/
Dsetup_percpu.c21 #include <asm/cpu.h>
69 unsigned int cpu; in pcpu_need_numa() local
71 for_each_possible_cpu(cpu) { in pcpu_need_numa()
72 int node = early_cpu_to_node(cpu); in pcpu_need_numa()
87 * @cpu: cpu to allocate for
91 * Allocate @size bytes aligned at @align for cpu @cpu. This wrapper
98 static void * __init pcpu_alloc_bootmem(unsigned int cpu, unsigned long size, in pcpu_alloc_bootmem() argument
103 int node = early_cpu_to_node(cpu); in pcpu_alloc_bootmem()
108 pr_info("cpu %d has no node %d or node-local memory\n", in pcpu_alloc_bootmem()
109 cpu, node); in pcpu_alloc_bootmem()
[all …]
/linux-3.3/arch/ia64/xen/
Dirq_xen.c23 #include <linux/cpu.h>
137 * port needs to be freed at device/cpu down. So we cache the
146 __xen_register_percpu_irq(unsigned int cpu, unsigned int vec, in __xen_register_percpu_irq() argument
154 snprintf(per_cpu(xen_timer_name, cpu), in __xen_register_percpu_irq()
155 sizeof(per_cpu(xen_timer_name, cpu)), in __xen_register_percpu_irq()
156 "%s%d", action->name, cpu); in __xen_register_percpu_irq()
157 irq = bind_virq_to_irqhandler(VIRQ_ITC, cpu, in __xen_register_percpu_irq()
159 per_cpu(xen_timer_name, cpu), action->dev_id); in __xen_register_percpu_irq()
160 per_cpu(xen_timer_irq, cpu) = irq; in __xen_register_percpu_irq()
163 snprintf(per_cpu(xen_resched_name, cpu), in __xen_register_percpu_irq()
[all …]
/linux-3.3/arch/microblaze/kernel/cpu/
Dcpuinfo-static.c23 void __init set_cpuinfo_static(struct cpuinfo *ci, struct device_node *cpu) in set_cpuinfo_static() argument
28 (fcpu(cpu, "xlnx,use-barrel") ? PVR0_USE_BARREL_MASK : 0) | in set_cpuinfo_static()
29 (fcpu(cpu, "xlnx,use-msr-instr") ? PVR2_USE_MSR_INSTR : 0) | in set_cpuinfo_static()
30 (fcpu(cpu, "xlnx,use-pcmp-instr") ? PVR2_USE_PCMP_INSTR : 0) | in set_cpuinfo_static()
31 (fcpu(cpu, "xlnx,use-div") ? PVR0_USE_DIV_MASK : 0); in set_cpuinfo_static()
43 ci->use_mult = fcpu(cpu, "xlnx,use-hw-mul"); in set_cpuinfo_static()
51 ci->use_fpu = fcpu(cpu, "xlnx,use-fpu"); in set_cpuinfo_static()
59 (fcpu(cpu, "xlnx,unaligned-exceptions") ? in set_cpuinfo_static()
61 (fcpu(cpu, "xlnx,ill-opcode-exception") ? in set_cpuinfo_static()
63 (fcpu(cpu, "xlnx,iopb-bus-exception") ? in set_cpuinfo_static()
[all …]
/linux-3.3/kernel/trace/
Dtrace_workqueue.c18 /* A cpu workqueue thread */
22 int cpu; member
28 * on a single CPU.
33 /* List of workqueue threads on one cpu */
43 #define workqueue_cpu_stat(cpu) (&per_cpu(all_workqueue_stat, cpu)) argument
56 int cpu = cpumask_first(&wq_thread->cpus_allowed); in probe_workqueue_insertion() local
60 spin_lock_irqsave(&workqueue_cpu_stat(cpu)->lock, flags); in probe_workqueue_insertion()
61 list_for_each_entry(node, &workqueue_cpu_stat(cpu)->list, list) { in probe_workqueue_insertion()
69 spin_unlock_irqrestore(&workqueue_cpu_stat(cpu)->lock, flags); in probe_workqueue_insertion()
78 int cpu = cpumask_first(&wq_thread->cpus_allowed); in probe_workqueue_execution() local
[all …]
/linux-3.3/kernel/
Dcpu.c1 /* CPU control.
12 #include <linux/cpu.h>
52 * an ongoing cpu hotplug operation.
89 * Note that during a cpu-hotplug operation, the new readers, if any,
174 static inline void check_for_tasks(int cpu) in check_for_tasks() argument
180 if (task_cpu(p) == cpu && p->state == TASK_RUNNING && in check_for_tasks()
182 printk(KERN_WARNING "Task %s (pid = %d) is on cpu %d " in check_for_tasks()
184 p->comm, task_pid_nr(p), cpu, in check_for_tasks()
195 /* Take this CPU down. */
201 /* Ensure this CPU doesn't handle any more interrupts. */ in take_cpu_down()
[all …]
/linux-3.3/arch/powerpc/platforms/pseries/
Dhotplug-cpu.c2 * pseries CPU Hotplug infrastructure.
25 #include <linux/cpu.h>
69 enum cpu_state_vals get_cpu_current_state(int cpu) in get_cpu_current_state() argument
71 return per_cpu(current_state, cpu); in get_cpu_current_state()
74 void set_cpu_current_state(int cpu, enum cpu_state_vals state) in set_cpu_current_state() argument
76 per_cpu(current_state, cpu) = state; in set_cpu_current_state()
79 enum cpu_state_vals get_preferred_offline_state(int cpu) in get_preferred_offline_state() argument
81 return per_cpu(preferred_offline_state, cpu); in get_preferred_offline_state()
84 void set_preferred_offline_state(int cpu, enum cpu_state_vals state) in set_preferred_offline_state() argument
86 per_cpu(preferred_offline_state, cpu) = state; in set_preferred_offline_state()
[all …]
/linux-3.3/arch/um/kernel/
Dsmp.c25 /* Per CPU bogomips and other parameters
37 void smp_send_reschedule(int cpu) in smp_send_reschedule() argument
39 os_write_file(cpu_data[cpu].ipi_pipe[1], "R", 1); in smp_send_reschedule()
49 if (i == current_thread->cpu) in smp_send_stop()
61 int cpu = (int) cpup, err; in idle_proc() local
63 err = os_pipe(cpu_data[cpu].ipi_pipe, 1, 1); in idle_proc()
65 panic("CPU#%d failed to create IPI pipe, err = %d", cpu, -err); in idle_proc()
67 os_set_fd_async(cpu_data[cpu].ipi_pipe[0]); in idle_proc()
70 if (cpu_test_and_set(cpu, cpu_callin_map)) { in idle_proc()
71 printk(KERN_ERR "huh, CPU#%d already present??\n", cpu); in idle_proc()
[all …]
/linux-3.3/arch/sh/kernel/
Dsmp.c21 #include <linux/cpu.h>
37 /* State of each CPU */
48 static inline void __cpuinit smp_store_cpu_info(unsigned int cpu) in smp_store_cpu_info() argument
50 struct sh_cpuinfo *c = cpu_data + cpu; in smp_store_cpu_info()
59 unsigned int cpu = smp_processor_id(); in smp_prepare_cpus() local
62 current_thread_info()->cpu = cpu; in smp_prepare_cpus()
72 unsigned int cpu = smp_processor_id(); in smp_prepare_boot_cpu() local
74 __cpu_number_map[0] = cpu; in smp_prepare_boot_cpu()
75 __cpu_logical_map[0] = cpu; in smp_prepare_boot_cpu()
77 set_cpu_online(cpu, true); in smp_prepare_boot_cpu()
[all …]
/linux-3.3/drivers/lguest/
Dhypercalls.c37 static void do_hcall(struct lg_cpu *cpu, struct hcall_args *args) in do_hcall() argument
57 kill_guest(cpu, "already have lguest_data"); in do_hcall()
68 __lgread(cpu, msg, args->arg1, sizeof(msg)); in do_hcall()
70 kill_guest(cpu, "CRASH: %s", msg); in do_hcall()
72 cpu->lg->dead = ERR_PTR(-ERESTART); in do_hcall()
78 guest_pagetable_clear_all(cpu); in do_hcall()
80 guest_pagetable_flush_user(cpu); in do_hcall()
88 guest_new_pagetable(cpu, args->arg1); in do_hcall()
91 guest_set_stack(cpu, args->arg1, args->arg2, args->arg3); in do_hcall()
95 guest_set_pte(cpu, args->arg1, args->arg2, in do_hcall()
[all …]
/linux-3.3/Documentation/
Dcpu-hotplug.txt1 CPU hotplug Support in Linux(tm) Kernel
4 CPU Hotplug Core:
24 reporting and correction capabilities in processors. CPU architectures permit
25 partitioning support, where compute resources of a single CPU could be made
28 node insertion and removal require support for CPU hotplug.
31 provisioning reasons, or for RAS purposes to keep an offending CPU off
32 system execution path. Hence the need for CPU hotplug support in the
35 A more novel use of CPU-hotplug support is its use today in suspend
40 General Stuff about CPU Hotplug
74 CPU maps and such
[all …]
/linux-3.3/arch/ia64/kernel/
Derr_inject.c30 #include <linux/cpu.h>
61 u32 cpu=dev->id; \
62 return sprintf(buf, "%lx\n", name[cpu]); \
70 unsigned int cpu=dev->id; \
71 name[cpu] = simple_strtoull(buf, NULL, 16); \
78 * processor. The cpu number in driver is only used for storing data. in show()
84 unsigned int cpu=dev->id; in show() local
88 printk(KERN_DEBUG "pal_mc_err_inject for cpu%d:\n", cpu); in show()
89 printk(KERN_DEBUG "err_type_info=%lx,\n", err_type_info[cpu]); in show()
90 printk(KERN_DEBUG "err_struct_info=%lx,\n", err_struct_info[cpu]); in show()
[all …]

12345678910>>...175