| .. | .. |
|---|
| 92 | 92 | write_tc_c0_tchalt(read_tc_c0_tchalt() & ~TCHALT_H); |
|---|
| 93 | 93 | |
|---|
| 94 | 94 | /* |
|---|
| 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. |
|---|
| 98 | 97 | */ |
|---|
| 98 | + mttgpr(7, 0); |
|---|
| 99 | 99 | mttgpr(6, v->ntcs); |
|---|
| 100 | | - mttgpr(7, physical_memsize); |
|---|
| 101 | 100 | |
|---|
| 102 | 101 | /* set up VPE1 */ |
|---|
| 103 | 102 | /* |
|---|
| .. | .. |
|---|
| 313 | 312 | |
|---|
| 314 | 313 | static void vpe_device_release(struct device *cd) |
|---|
| 315 | 314 | { |
|---|
| 316 | | - kfree(cd); |
|---|
| 317 | 315 | } |
|---|
| 318 | 316 | |
|---|
| 319 | 317 | static struct class vpe_class = { |
|---|
| .. | .. |
|---|
| 497 | 495 | device_del(&vpe_device); |
|---|
| 498 | 496 | |
|---|
| 499 | 497 | out_class: |
|---|
| 498 | + put_device(&vpe_device); |
|---|
| 500 | 499 | class_unregister(&vpe_class); |
|---|
| 501 | 500 | |
|---|
| 502 | 501 | out_chrdev: |
|---|
| .. | .. |
|---|
| 509 | 508 | { |
|---|
| 510 | 509 | struct vpe *v, *n; |
|---|
| 511 | 510 | |
|---|
| 512 | | - device_del(&vpe_device); |
|---|
| 511 | + device_unregister(&vpe_device); |
|---|
| 513 | 512 | class_unregister(&vpe_class); |
|---|
| 514 | 513 | unregister_chrdev(major, VPE_MODULE_NAME); |
|---|
| 515 | 514 | |
|---|