Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0f5d0df35ea9efe52242b9b3c79517cc50202e37
Commit:     0f5d0df35ea9efe52242b9b3c79517cc50202e37
Parent:     41790e04e6656fa1aef205ad9a76ab4edbb5f14a
Author:     Ralf Baechle <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 27 19:37:51 2007 +0100
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Tue Jul 31 21:35:26 2007 +0100

    [MIPS] RP: Sysfs interface for stopping RP program
    
    The old method of attempting to load a invalid program was just too icky.
    
    Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
---
 arch/mips/kernel/vpe.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c
index 1323cb6..3c09b97 100644
--- a/arch/mips/kernel/vpe.c
+++ b/arch/mips/kernel/vpe.c
@@ -1340,6 +1340,23 @@ static void kspd_sp_exit( int sp_id)
 }
 #endif
 
+static ssize_t store_kill(struct class_device *dev, const char *buf, size_t 
len)
+{
+       struct vpe *vpe = get_vpe(tclimit);
+       struct vpe_notifications *not;
+
+       list_for_each_entry(not, &vpe->notify, list) {
+               not->stop(tclimit);
+       }
+
+       release_progmem(vpe->load_addr);
+       cleanup_tc(get_tc(tclimit));
+       vpe_stop(vpe);
+       vpe_free(vpe);
+
+       return len;
+}
+
 static ssize_t show_ntcs(struct class_device *cd, char *buf)
 {
        struct vpe *vpe = get_vpe(tclimit);
@@ -1369,6 +1386,7 @@ out_einval:
 }
 
 static struct class_device_attribute vpe_class_attributes[] = {
+       __ATTR(kill, S_IWUSR, NULL, store_kill),
        __ATTR(ntcs, S_IRUGO | S_IWUSR, show_ntcs, store_ntcs),
        {}
 };
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to