Re: [PATCH] x86_64: fix problems due to use of "outb" to port 80 on some AMD64x2 laptops, etc.




* Rene Herman <rene.herman@xxxxxxxxx> wrote:

/*
- * This should be approx 2 Bo*oMips to start (note initial shift), and will
- * still work even if initially too large, it will just take slightly longer
+ * Initial value roughly corresponds to a 1 GHz CPU
*/
-unsigned long loops_per_jiffy = (1<<12);
+unsigned long loops_per_jiffy = 1000000000 / HZ;

EXPORT_SYMBOL(loops_per_jiffy);

this is a factor of ~2400 increase - this will take an eternity to boot on
any older CPU.

Only any outb_p's used before loops_per_jiffy is calibrated are
affected.

yes - but there are a couple of early udelays, which would thus be
affected.

This pre-calibation thing is what's historically held this change back
(it's been discussed dozens of times before). At 4096, not any machine
is going to have an appreciable delay before calibration when
switching from the outb to 0x80.

i dont think this should matter: old systems that truly _need_ the ISA
delay will be slow enough to not trip up. (nor are they really affected
by these early delays - the delays were more for crappy ISA devices that
get initialized later down, when the delay loop is already calibrated)

modern systems learned to depend on the PCI write posting side-effects
of port 0x80 activities - those wont be helped by this initialization
change either. That is a far more serious concern.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH] x86_64: fix problems due to use of "outb" to port 80 on some AMD64x2 laptops, etc.
    ... + * Initial value roughly corresponds to a 1 GHz CPU ... not any machine is going to have an appreciable delay before calibration when switching from the outb to 0x80. ...
    (Linux-Kernel)
  • Re: fxp hack in sys/net/if.c?
    ... The reasoning behind moving the delay in to shared code is not very compelling. ... Add workaround for fxp issue at interface initialization with IPv6. ...
    (freebsd-net)
  • Re: Design of a programmable delay line
    ... I can do recalibration in the video blanking time (this for a video ... should stay between 3 and 4 ns for the whole temperature range, ... so you can assume that there are enough calibration cycles. ... For a future project I need to design a programmable delay line. ...
    (comp.arch.fpga)
  • Re: Calibration issues with USB disc present.
    ... George, again, there has been some SMI resistant delay calibration code ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Calibration issues with USB disc present.
    ... > virtualization where time-based calibration may be interrupted. ... > George, again, there has been some SMI resistant delay calibration code ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)