You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'cpumask-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* 'cpumask-cleanups' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus: cpumask: rename tsk_cpumask to tsk_cpus_allowed cpumask: don't recommend set_cpus_allowed hack in Documentation/cpu-hotplug.txt cpumask: avoid dereferencing struct cpumask cpumask: convert drivers/idle/i7300_idle.c to cpumask_var_t cpumask: use modern cpumask style in drivers/scsi/fcoe/fcoe.c cpumask: avoid deprecated function in mm/slab.c cpumask: use cpu_online in kernel/perf_event.c
This commit is contained in:
@@ -81,7 +81,7 @@ static u8 i7300_idle_thrtctl_saved;
|
||||
static u8 i7300_idle_thrtlow_saved;
|
||||
static u32 i7300_idle_mc_saved;
|
||||
|
||||
static cpumask_t idle_cpumask;
|
||||
static cpumask_var_t idle_cpumask;
|
||||
static ktime_t start_ktime;
|
||||
static unsigned long avg_idle_us;
|
||||
|
||||
@@ -459,9 +459,9 @@ static int i7300_idle_notifier(struct notifier_block *nb, unsigned long val,
|
||||
spin_lock_irqsave(&i7300_idle_lock, flags);
|
||||
if (val == IDLE_START) {
|
||||
|
||||
cpu_set(smp_processor_id(), idle_cpumask);
|
||||
cpumask_set_cpu(smp_processor_id(), idle_cpumask);
|
||||
|
||||
if (cpus_weight(idle_cpumask) != num_online_cpus())
|
||||
if (cpumask_weight(idle_cpumask) != num_online_cpus())
|
||||
goto end;
|
||||
|
||||
now_ktime = ktime_get();
|
||||
@@ -478,8 +478,8 @@ static int i7300_idle_notifier(struct notifier_block *nb, unsigned long val,
|
||||
i7300_idle_ioat_start();
|
||||
|
||||
} else if (val == IDLE_END) {
|
||||
cpu_clear(smp_processor_id(), idle_cpumask);
|
||||
if (cpus_weight(idle_cpumask) == (num_online_cpus() - 1)) {
|
||||
cpumask_clear_cpu(smp_processor_id(), idle_cpumask);
|
||||
if (cpumask_weight(idle_cpumask) == (num_online_cpus() - 1)) {
|
||||
/* First CPU coming out of idle */
|
||||
u64 idle_duration_us;
|
||||
|
||||
@@ -553,7 +553,6 @@ struct debugfs_file_info {
|
||||
static int __init i7300_idle_init(void)
|
||||
{
|
||||
spin_lock_init(&i7300_idle_lock);
|
||||
cpus_clear(idle_cpumask);
|
||||
total_us = 0;
|
||||
|
||||
if (i7300_idle_platform_probe(&fbd_dev, &ioat_dev, forceload))
|
||||
@@ -565,6 +564,9 @@ static int __init i7300_idle_init(void)
|
||||
if (i7300_idle_ioat_init())
|
||||
return -ENODEV;
|
||||
|
||||
if (!zalloc_cpumask_var(&idle_cpumask, GFP_KERNEL))
|
||||
return -ENOMEM;
|
||||
|
||||
debugfs_dir = debugfs_create_dir("i7300_idle", NULL);
|
||||
if (debugfs_dir) {
|
||||
int i = 0;
|
||||
@@ -589,6 +591,7 @@ static int __init i7300_idle_init(void)
|
||||
static void __exit i7300_idle_exit(void)
|
||||
{
|
||||
idle_notifier_unregister(&i7300_idle_nb);
|
||||
free_cpumask_var(idle_cpumask);
|
||||
|
||||
if (debugfs_dir) {
|
||||
int i = 0;
|
||||
|
||||
@@ -1260,7 +1260,7 @@ int fcoe_rcv(struct sk_buff *skb, struct net_device *netdev,
|
||||
"CPU.\n");
|
||||
|
||||
spin_unlock_bh(&fps->fcoe_rx_list.lock);
|
||||
cpu = first_cpu(cpu_online_map);
|
||||
cpu = cpumask_first(cpu_online_mask);
|
||||
fps = &per_cpu(fcoe_percpu, cpu);
|
||||
spin_lock_bh(&fps->fcoe_rx_list.lock);
|
||||
if (!fps->thread) {
|
||||
|
||||
Reference in New Issue
Block a user