Since you all obviously know more than I do, can somebody please explain to me what the __asm volatile (or __asm__ __volatile__ for some compilers) actually is good for and how it can be used?
In all the example kernels I constantly come across something like
Code: Select all
unsigned inportb(unsigned port)
{
unsigned ret_val;
__asm volatile("inb %w1,%b0" : "=a"(ret_val) : "d"(port));
return ret_val;
}