Re: Stopping devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Maybe I'm misunderstanding what it is you are trying to do, but how about :
> 
> local_irq_save(flags);
> preempt_disable();
> msleep(2);
> preempt_enable();
> local_irq_restore(flags);

I wish this would be so simple.
I must be sure that there is no PCI bus master activity and no other 
interrupt besides INT0. If something will break processor sleep 
before 1ms then CPU will be frozen. preempt_disable() causes lots 
of "scheduling while atomic" messages if used to protect PCI suspend 
(with PREEMPT set) because I must have local interrupts enabled.
So this overkill is probably necessary if I want longhaul now, 
not in distant future.


----------------------------------------------------------------------
Dzis tez mozesz wygrac playera MP3 >>> http://link.interia.pl/f1947


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux