r12 is a scratch register right after interrupt is taken (because pushed to the stack by the CPU). It's not a scratch at the time of switch_to because the kernel/interrupt context might have use it at the time of the context-switch. This should be checked against the AAPCS.
r12 is a scratch register right after interrupt is taken (because pushed to the stack by the CPU). It's not a scratch at the time of switch_to because the kernel/interrupt context might have use it at the time of the context-switch. This should be checked against the AAPCS.