else
insns = &p->cheetah_safari[0];
break;
+ case hypervisor:
+ insns = &p->sun4v[0];
+ break;
default:
prom_printf("Unknown cpu type, halting.\n");
prom_halt();
#endif
}
+static void __init gl_patch(void)
+{
+ struct gl_1insn_patch_entry *p;
+
+ if (tlb_type != hypervisor)
+ return;
+
+ p = &__gl_1insn_patch;
+ while (p < &__gl_1insn_patch_end) {
+ unsigned long addr = p->addr;
+
+ *(unsigned int *) (addr + 0) = p->insn;
+ __asm__ __volatile__("flush %0" : : "r" (addr + 0));
+
+ p++;
+ }
+}
+
void __init setup_arch(char **cmdline_p)
{
/* Initialize PROM console and command line. */
*/
per_cpu_patch();
+ gl_patch();
+
boot_flags_init(*cmdline_p);
idprom_init();