lkml.org 
[lkml]   [2011]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject(resend) [PATCH 3/4] blackfin: don't touch task->cpus_allowed directly
    Date
    Every callter (except kthread_bind) should use proper
    set_cpus_allowed_ptr() APIs.

    Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
    Cc: Mike Frysinger <vapier@gentoo.org>
    Cc: uclinux-dist-devel@blackfin.uclinux.org
    ---

    I'm curious why this mysterious code is necessary. Why sys_clone()
    restrict allowed cpus automatically and why don't it restore the restriction
    when do_fork() is finished.

    ps: I sent this parch to wrong address (device-driver-devel@blackfin.uclinux.org).
    thus now I'm resending it.


    arch/blackfin/kernel/process.c | 6 ++----
    1 files changed, 2 insertions(+), 4 deletions(-)

    diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
    index b407bc8..6a660fa 100644
    --- a/arch/blackfin/kernel/process.c
    +++ b/arch/blackfin/kernel/process.c
    @@ -171,10 +171,8 @@ asmlinkage int bfin_clone(struct pt_regs *regs)
    unsigned long newsp;

    #ifdef __ARCH_SYNC_CORE_DCACHE
    - if (current->rt.nr_cpus_allowed == num_possible_cpus()) {
    - current->cpus_allowed = cpumask_of_cpu(smp_processor_id());
    - current->rt.nr_cpus_allowed = 1;
    - }
    + if (current->rt.nr_cpus_allowed == num_possible_cpus())
    + set_cpus_allowed_ptr(current, cpumask_of(smp_processor_id()));
    #endif

    /* syscall2 puts clone_flags in r0 and usp in r1 */
    --
    1.7.3.1






    \
     
     \ /
      Last update: 2011-04-26 03:59    [W:0.021 / U:32.364 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site