hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/mips/kernel/vpe-mt.c
....@@ -92,12 +92,11 @@
9292 write_tc_c0_tchalt(read_tc_c0_tchalt() & ~TCHALT_H);
9393
9494 /*
95
- * The sde-kit passes 'memsize' to __start in $a3, so set something
96
- * here... Or set $a3 to zero and define DFLT_STACK_SIZE and
97
- * DFLT_HEAP_SIZE when you compile your program
95
+ * We don't pass the memsize here, so VPE programs need to be
96
+ * compiled with DFLT_STACK_SIZE and DFLT_HEAP_SIZE defined.
9897 */
98
+ mttgpr(7, 0);
9999 mttgpr(6, v->ntcs);
100
- mttgpr(7, physical_memsize);
101100
102101 /* set up VPE1 */
103102 /*
....@@ -313,7 +312,6 @@
313312
314313 static void vpe_device_release(struct device *cd)
315314 {
316
- kfree(cd);
317315 }
318316
319317 static struct class vpe_class = {
....@@ -497,6 +495,7 @@
497495 device_del(&vpe_device);
498496
499497 out_class:
498
+ put_device(&vpe_device);
500499 class_unregister(&vpe_class);
501500
502501 out_chrdev:
....@@ -509,7 +508,7 @@
509508 {
510509 struct vpe *v, *n;
511510
512
- device_del(&vpe_device);
511
+ device_unregister(&vpe_device);
513512 class_unregister(&vpe_class);
514513 unregister_chrdev(major, VPE_MODULE_NAME);
515514