Re: [PATCH] Wistron laptop button driver

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

 



Miloslav Trmac <[email protected]> wrote:
>
> +static void call_bios(struct regs *regs)
>  +{
>  +	unsigned long flags;
>  +
>  +	preempt_disable();
>  +	local_irq_save(flags);
>  +	asm volatile ("pushl %%ebp;"
>  +		      "movl %[data], %%ebp;"
>  +		      "call *%[routine];"
>  +		      "popl %%ebp"
>  +		      : "=a" (regs->eax), "=b" (regs->ebx), "=c" (regs->ecx)
>  +		      : "0" (regs->eax), "1" (regs->ebx), "2" (regs->ecx),
>  +			[routine] "m" (bios_entry_point),
>  +			[data] "m" (bios_data_map_base)
>  +		      : "edx", "edi", "esi", "memory");
>  +	local_irq_restore(flags);
>  +	preempt_enable();
>  +}
>  +

(the preempt_disable/enable isn't needed - local_irq_save() will suffice)

gcc-2.95.x spits the dummy over this [routine] stuff.  What compiler does
this require?

Is it necessary to open-code the BIOS call in the driver?  Does it make
sense to have some library function to do this?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux