* Patch cpu_switch() by removing the UserLocal register code at the end. * For MIPS hardware that don't support UserLocal Register Implementation * we remove the instructions that update this register which may cause a * reserved instruction exception in the kernel. */
| 76 | * reserved instruction exception in the kernel. |
| 77 | */ |
| 78 | static void |
| 79 | remove_userlocal_code(uint32_t *cpu_switch_code) |
| 80 | { |
| 81 | uint32_t *instructp; |
| 82 | |
| 83 | instructp = cpu_switch_code; |
| 84 | instructp[0] = _JR_RA; |
| 85 | instructp[1] = _NOP; |
| 86 | } |
| 87 | |
| 88 | /* |
| 89 | * Attempt to identify the MIPS CPU as much as possible. |