lkml.org 
[lkml]   [2005]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH, RFC] kill odd mm context pinning hack in frv
    David, is that more than a debugging aid?   I'm trying to get rid of
    tasklist_lock users and this one looks really suspicios..


    Signed-off-by: Christoph Hellwig <hch@lst.de>

    Index: linux-2.6/arch/frv/kernel/sysctl.c
    ===================================================================
    --- linux-2.6.orig/arch/frv/kernel/sysctl.c 2005-08-11 16:45:53.000000000 +0200
    +++ linux-2.6/arch/frv/kernel/sysctl.c 2005-08-11 19:17:24.000000000 +0200
    @@ -117,69 +117,12 @@

    } /* end procctl_frv_cachemode() */

    -/*****************************************************************************/
    -/*
    - * permit the mm_struct the nominated process is using have its MMU context ID pinned
    - */
    -#ifdef CONFIG_MMU
    -static int procctl_frv_pin_cxnr(ctl_table *table, int write, struct file *filp,
    - void *buffer, size_t *lenp, loff_t *ppos)
    -{
    - pid_t pid;
    - char buff[16], *p;
    - int len;
    -
    - len = *lenp;
    -
    - if (write) {
    - /* potential state change */
    - if (len <= 1 || len > sizeof(buff) - 1)
    - return -EINVAL;
    -
    - if (copy_from_user(buff, buffer, len) != 0)
    - return -EFAULT;
    -
    - if (buff[len - 1] == '\n')
    - buff[len - 1] = '\0';
    - else
    - buff[len] = '\0';
    -
    - pid = simple_strtoul(buff, &p, 10);
    - if (*p)
    - return -EINVAL;
    -
    - return cxn_pin_by_pid(pid);
    - }
    -
    - /* read the currently pinned CXN */
    - if (filp->f_pos > 0) {
    - *lenp = 0;
    - return 0;
    - }
    -
    - len = snprintf(buff, sizeof(buff), "%d\n", cxn_pinned);
    - if (len > *lenp)
    - len = *lenp;
    -
    - if (copy_to_user(buffer, buff, len) != 0)
    - return -EFAULT;
    -
    - *lenp = len;
    - filp->f_pos = len;
    - return 0;
    -
    -} /* end procctl_frv_pin_cxnr() */
    -#endif
    -
    /*
    * FR-V specific sysctls
    */
    static struct ctl_table frv_table[] =
    {
    { 1, "cache-mode", NULL, 0, 0644, NULL, &procctl_frv_cachemode },
    -#ifdef CONFIG_MMU
    - { 2, "pin-cxnr", NULL, 0, 0644, NULL, &procctl_frv_pin_cxnr },
    -#endif
    { 0 }
    };

    Index: linux-2.6/include/asm-frv/mmu.h
    ===================================================================
    --- linux-2.6.orig/include/asm-frv/mmu.h 2005-08-11 16:46:04.000000000 +0200
    +++ linux-2.6/include/asm-frv/mmu.h 2005-08-11 19:18:10.000000000 +0200
    @@ -34,9 +34,4 @@

    } mm_context_t;

    -#ifdef CONFIG_MMU
    -extern int __nongpreldata cxn_pinned;
    -extern int cxn_pin_by_pid(pid_t pid);
    -#endif
    -
    #endif /* _ASM_MMU_H */
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-08-11 19:25    [W:0.025 / U:1.744 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site