Re: spca5xx freezes system



On 4/18/06, D. Hugh Redelmeier <hugh@xxxxxxxxxx> wrote:
| I emailed the developer again yesterday, and he told me that he
| believes the problem to be gcc-4.1 in FC5 (and not its kernel). That
| at least makes more sense than blaming the kernel, when the problem
| also existed with an official kernel.org kernel too.

Interesting. If this is correct, it still probably indicates a bug in
the driver code rather than GCC. Usually what has happened is that
the C compiler has gotten better at optimization, exposing new places
where the driver needed to use "volatile" or some similar mechanism.

Not always: there was a horrible bug in FC4's X last summer that was
caused by a subtle GCC bug in handling casts to volatile qualified
types. It took several of us to convince the GCC folk
that they were reading the C standard unreasonably. See the thread
starting here: http://gcc.gnu.org/ml/gcc/2005-07/msg00664.html

Here's how to test the hypothesis: recompile the driver with no
optimization. This may seem to require spelunking makefiles that are
very convoluted and obscure. If so, there is a cheating shortcut that
might work: capture the makefile log, manually edit out the
optimization flags, and manually rerun the commands.

If the driver works when compiled without optimization, this is a
strong indication that the driver is not getting along with GCC
changes. This is a good start to diagnosing the problem. If the
driver does not work when compiled without optimization, it is very
probably not a compiler/code mismatch.

I admire the effort to which you (plural) have gone to chase this down.
Many would just wait until someone else diagnosed it.

I agree that this could still point to a driver bug. I asked the
developer whether he had verified if his driver works with the
'official' gnu gcc-4.1, and he stated that he had not. I will be
unlikely to have time in the near future (within the next few weeks at
least) to rebuild a kernel against gcc-3.2 to verify his claim. So,
if someone else has the time, please let us know how it works out.


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman netllama@xxxxxxxxx
LlamaLand http://netllama.linux-sxs.org

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • Re: PXA255, same hw speed, 4.2 vs 4.1, slower performance
    ... Intel provides a C/C++ compiler that should ... > this function slower in CE 4.2 vs 4.1, or is there an optimization ... You may use kernel tracker to understand if a process (or a driver) ... The display driver is 50% faster on the old board using a test ...
    (microsoft.public.windowsce.platbuilder)
  • Re: C++, kernel mode, NDIS
    ... Actually, this does not work, since the compiler will call delete without ... So you always new with the tag and the tag says you must ... other things that should never live in the kernel. ... The C++ side effects could be taken care of by a kernel C++ subset/library, endorsed and thoroughly tested by an entity setting standards in Windows driver development... ...
    (microsoft.public.development.device.drivers)
  • Re: ddkbuild.bat How to make free build but optomization off
    ... We noticed that our debug built network driver runs faster than our free built driver. ... I want to build a free driver but turn compiler optimization off to see if that type of build will run as fast as the checked or debug build. ...
    (microsoft.public.development.device.drivers)
  • Re: spca5xx freezes system
    ... the driver code rather than GCC. ... the C compiler has gotten better at optimization, ... where the driver needed to use "volatile" or some similar mechanism. ...
    (Fedora)
  • Re: why no gcc in 9.1 personal?
    ... - They licensed the driver or part of it from someone else. ... They fear that broken drivers could damage the hardware, ... A driver or at least the kernel interface of the driver ... has to be compiled on the target machine with the very same compiler ...
    (alt.os.linux.suse)