Comment 132 for bug 2034477

Revision history for this message
In , jwrdegoede (jwrdegoede-linux-kernel-bugs) wrote :

(In reply to Mario Limonciello (AMD) from comment #51)
> Created attachment 305250 [details]
> run missing bios init sequence (v2)
>
> OK thanks! Can you see if this version works still too?

First of all let me say that I'm happy that we seem to be heading to a conclusion with a fix here.

2 comments about the v2 patch:

1. Are all models starting with 82 AMD based laptops? I thought the 82 indicated the introduction year of the model. So this can also run on Intel based models now ? IOW I think this maybe needs a if (boot_cpu_has(X86_FEATURE_ZEN)) check ?

2. I'm wondering if it would not be better to re-run the PIC detection after force-enabling it. So something like this:

        bool retried = false;

        /* ... */
        raw_spin_lock_irqsave(&i8259A_lock, flags);

retry:
        outb(0xff, PIC_SLAVE_IMR); /* mask all of 8259A-2 */
        outb(probe_val, PIC_MASTER_IMR);
        new_val = inb(PIC_MASTER_IMR);
        if (new_val != probe_val) {
                if (!retried && boot_cpu_has(X86_FEATURE_ZEN) &&
                    dmi_check_system(amd_force_enable_pic_table)) {
                        retried = true;
                        goto retry;
                }
                printk(KERN_INFO "Using NULL legacy PIC\n");
                ...

At least it seems to me that re-doing the check after the force enable to see if the force-enable actually worked is maybe a good idea ?