From b3774a73048b91dfd173e719314e0061ef789c53 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 27 Jul 2007 19:37:51 +0100 Subject: [PATCH] --- yaml --- r: 63465 b: refs/heads/master c: 0f5d0df35ea9efe52242b9b3c79517cc50202e37 h: refs/heads/master i: 63463: cf269f9bcf36bac8b7433d6351ce88a89b4a120e v: v3 --- [refs] | 2 +- trunk/arch/mips/kernel/vpe.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 673a86e918a4..b39b312e5f33 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 41790e04e6656fa1aef205ad9a76ab4edbb5f14a +refs/heads/master: 0f5d0df35ea9efe52242b9b3c79517cc50202e37 diff --git a/trunk/arch/mips/kernel/vpe.c b/trunk/arch/mips/kernel/vpe.c index 1323cb6d058d..3c09b9785f4c 100644 --- a/trunk/arch/mips/kernel/vpe.c +++ b/trunk/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 @@ static ssize_t store_ntcs(struct class_device *dev, const char *buf, size_t len) } 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), {} };