public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* Porting driver from x86
@ 2005-02-10 13:11 Eric Desjardins
  2005-02-10 15:05 ` Eric Desjardins
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Eric Desjardins @ 2005-02-10 13:11 UTC (permalink / raw)
  To: linux-ia64

Hi,

I'm not to familiar with kernel code but I'm trying to port a kernel
driver from x86 to ia64.

I was just wondering how should I translate that:

static int interrupts_blocked()
{
   unsigned long flags = 0;
                                                                                                        
   __save_flags(flags);
  
   return (flags & X86_EFLAGS_IF) =
0;                                                                                                 
}

Thanks for any help I can get...

Eric


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Porting driver from x86
  2005-02-10 13:11 Porting driver from x86 Eric Desjardins
@ 2005-02-10 15:05 ` Eric Desjardins
  2005-02-10 15:06 ` Matthew Wilcox
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Eric Desjardins @ 2005-02-10 15:05 UTC (permalink / raw)
  To: linux-ia64

The drivers want's to know if it has been put to sleep or not. It's not
used often. It's not my code and the reasons seems a bit obscure to me.

It is possible to do it anyway?

Eric

On Thu, 2005-02-10 at 10:06, Matthew Wilcox wrote:
> On Thu, Feb 10, 2005 at 08:11:55AM -0500, Eric Desjardins wrote:
> > I'm not to familiar with kernel code but I'm trying to port a kernel
> > driver from x86 to ia64.
> > 
> > I was just wondering how should I translate that:
> > 
> > static int interrupts_blocked()
> 
> Drivers shouldn't need to know whether interrupts are blocked or not.
> What are you trying to do?
-- 
Eric Desjardins <eric.desjardins@discreet.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Porting driver from x86
  2005-02-10 13:11 Porting driver from x86 Eric Desjardins
  2005-02-10 15:05 ` Eric Desjardins
@ 2005-02-10 15:06 ` Matthew Wilcox
  2005-02-10 16:34 ` Eric Desjardins
  2005-02-10 16:41 ` Matthew Wilcox
  3 siblings, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2005-02-10 15:06 UTC (permalink / raw)
  To: linux-ia64

On Thu, Feb 10, 2005 at 08:11:55AM -0500, Eric Desjardins wrote:
> I'm not to familiar with kernel code but I'm trying to port a kernel
> driver from x86 to ia64.
> 
> I was just wondering how should I translate that:
> 
> static int interrupts_blocked()

Drivers shouldn't need to know whether interrupts are blocked or not.
What are you trying to do?

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Porting driver from x86
  2005-02-10 13:11 Porting driver from x86 Eric Desjardins
  2005-02-10 15:05 ` Eric Desjardins
  2005-02-10 15:06 ` Matthew Wilcox
@ 2005-02-10 16:34 ` Eric Desjardins
  2005-02-10 16:41 ` Matthew Wilcox
  3 siblings, 0 replies; 5+ messages in thread
From: Eric Desjardins @ 2005-02-10 16:34 UTC (permalink / raw)
  To: linux-ia64

It's close source unfortunately.

Eric

On Thu, 2005-02-10 at 11:41, Matthew Wilcox wrote:
> On Thu, Feb 10, 2005 at 10:05:04AM -0500, Eric Desjardins wrote:
> > The drivers want's to know if it has been put to sleep or not. It's not
> > used often. It's not my code and the reasons seems a bit obscure to me.
> 
> Do you mean "wants to know if it can sleep or not"?  If so, checking like
> this isn't appropriate -- it should already know whether or not it can sleep.
> Where's the source to this driver?
-- 
Eric Desjardins <eric.desjardins@discreet.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Porting driver from x86
  2005-02-10 13:11 Porting driver from x86 Eric Desjardins
                   ` (2 preceding siblings ...)
  2005-02-10 16:34 ` Eric Desjardins
@ 2005-02-10 16:41 ` Matthew Wilcox
  3 siblings, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2005-02-10 16:41 UTC (permalink / raw)
  To: linux-ia64

On Thu, Feb 10, 2005 at 10:05:04AM -0500, Eric Desjardins wrote:
> The drivers want's to know if it has been put to sleep or not. It's not
> used often. It's not my code and the reasons seems a bit obscure to me.

Do you mean "wants to know if it can sleep or not"?  If so, checking like
this isn't appropriate -- it should already know whether or not it can sleep.
Where's the source to this driver?

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-02-10 16:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-10 13:11 Porting driver from x86 Eric Desjardins
2005-02-10 15:05 ` Eric Desjardins
2005-02-10 15:06 ` Matthew Wilcox
2005-02-10 16:34 ` Eric Desjardins
2005-02-10 16:41 ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox