2010/3/3 Florian Fainelli <[email protected]>:
> Hi Bernhard,
>
> Le dimanche 21 février 2010 17:54:10, Bernhard Loos a écrit :
>> Annnd, I forgot to add the patch :/
>> Sorry about all the noise.
>>
>>    Bernhard
>>
>
> Why did you move the reboot fixup function to a separate file and why does it
> have to overried the machine_emergency_restart callback?
>
> If the kernel does not call the reboot fixup on emergency_restart, then it
> might be rather fixed instead of doing this hack.


The first problem is there:
http://lxr.linux.no/linux+*/arch/x86/kernel/reboot.c#L461 .
emergency_vmx_disable_all() crashes for some reason. It may be the
cpuid instruction, but i'm not sure, I didn't look very closely into
it, because of the second problem.
That's there: http://lxr.linux.no/linux+*/arch/x86/kernel/reboot_fixups_32.c#L71
.
mach_reboot_fixups() scans the pci bus to find the right fixup to
execute, which it can't do in irq context under all circumstences, but
the wdt uses a nmi irq to reboot the system.
That's probably also fixable, but a this point, I decided it's easier
and cleaner to override the machine_emergency_restart callback. It is
implemented as a function pointer after all, so I may as well use it.

     Bernhard

(I responded privately the first time, sorry about that)

> --
> Best regards, Florian Fainelli
> Email: [email protected]
> Web: http://openwrt.org
> IRC: [florian] on irc.freenode.net
> -------------------------------
>
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to