mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Miloslav Trmac <mitr@volny.cz>
Cc: vojtech@suse.cz, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Wistron laptop button driver
Date: Wed, 7 Sep 2005 22:23:47 -0700	[thread overview]
Message-ID: <20050907222347.493f1047.akpm@osdl.org> (raw)
In-Reply-To: <431E4E28.5020604@volny.cz>

Miloslav Trmac <mitr@volny.cz> 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?

  reply	other threads:[~2005-09-08  5:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-07  2:19 Miloslav Trmac
2005-09-08  5:23 ` Andrew Morton [this message]
2005-09-08  9:32   ` Miloslav Trmac
2005-09-08  6:43 ` Pekka Enberg
2005-09-08  9:36   ` Miloslav Trmac
2005-09-25 21:35 ` Miloslav Trmac

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050907222347.493f1047.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mitr@volny.cz \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®