Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1346286

Re: [patch 10/20] cpu/hotplug: Make target state writeable

From "Rafael J. Wysocki" <rjw@rjwysocki.net>
Newsgroups linux.kernel
Subject Re: [patch 10/20] cpu/hotplug: Make target state writeable
Date 2016-03-01 03:00 +0100
Message-ID <r7HLs-2tR-9@gated-at.bofh.it> (permalink)
References <r6vCG-7sv-3@gated-at.bofh.it> <r7aZc-3Z9-9@gated-at.bofh.it> <r7yoP-4YQ-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Monday, February 29, 2016 04:49:24 PM Thomas Gleixner wrote:
> On Sun, 28 Feb 2016, Thomas Gleixner wrote:
> > 
> > Understood. I'll fix that thing up so that won't happen and I put it on the
> > list of things to look at deeper.
> 
> The below delta patch should do what you need, right?

Yup, thanks!

Rafael


> 8<-------------
> 
> --- a/kernel/cpu.c
> +++ b/kernel/cpu.c
> @@ -1461,6 +1461,11 @@ static ssize_t write_cpuhp_target(struct
>  	if (target != CPUHP_OFFLINE && target != CPUHP_ONLINE)
>  		return -EINVAL;
>  #endif
> +
> +	ret = lock_device_hotplug_sysfs();
> +	if (ret)
> +		return ret;
> +
>  	mutex_lock(&cpuhp_state_mutex);
>  	sp = cpuhp_get_step(target);
>  	ret = !sp->name || sp->cant_stop ? -EINVAL : 0;
> @@ -1472,6 +1477,8 @@ static ssize_t write_cpuhp_target(struct
>  		ret = do_cpu_up(dev->id, target);
>  	else
>  		ret = do_cpu_down(dev->id, target);
> +
> +	unlock_device_hotplug();
>  	return ret ? ret : count;
>  }

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[patch 10/20] cpu/hotplug: Make target state writeable Thomas Gleixner <tglx@linutronix.de> - 2016-02-26 19:50 +0100
  Re: [patch 10/20] cpu/hotplug: Make target state writeable "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-27 00:50 +0100
    Re: [patch 10/20] cpu/hotplug: Make target state writeable Thomas Gleixner <tglx@linutronix.de> - 2016-02-27 08:50 +0100
      Re: [patch 10/20] cpu/hotplug: Make target state writeable "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-02-27 15:50 +0100
        Re: [patch 10/20] cpu/hotplug: Make target state writeable Thomas Gleixner <tglx@linutronix.de> - 2016-02-28 16:00 +0100
          Re: [patch 10/20] cpu/hotplug: Make target state writeable Thomas Gleixner <tglx@linutronix.de> - 2016-02-29 17:00 +0100
            Re: [patch 10/20] cpu/hotplug: Make target state writeable "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-03-01 03:00 +0100
  [tip:smp/hotplug] cpu/hotplug: Make target state writeable tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2016-03-01 21:00 +0100
    Re: [tip:smp/hotplug] cpu/hotplug: Make target state writeable Peter Zijlstra <peterz@infradead.org> - 2016-03-02 13:50 +0100
      Re: [tip:smp/hotplug] cpu/hotplug: Make target state writeable Thomas Gleixner <tglx@linutronix.de> - 2016-03-02 21:00 +0100

csiph-web