All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: dhowells@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH, RFC] kill odd mm context pinning hack in frv
Date: Thu, 11 Aug 2005 19:23:12 +0200	[thread overview]
Message-ID: <20050811172312.GA10202@lst.de> (raw)

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 */

             reply	other threads:[~2005-08-11 17:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-11 17:23 Christoph Hellwig [this message]
2005-08-11 17:57 ` [PATCH, RFC] kill odd mm context pinning hack in frv David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050811172312.GA10202@lst.de \
    --to=hch@lst.de \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.