This is what some Intel person said:
The optimization the compiler is working around is perfectly legal.
It isn't legal C/C++ to "use" a parameter after the function has
returned.
The optimizer knows this, and that is why the code got removed. The
volatile
is necessary in order to make this kind of C code work.
The point is that once sys_iopl(unsigned long unused) returns a value,
unused is
finished. So nobody can do anything with the data associated with it after
that.
Jun
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/