linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo
  2003-07-15 16:14 ` Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo Kathy Frazier
@ 2003-07-15 15:31   ` Richard B. Johnson
  2003-07-15 15:58     ` SCSI ATA driver in 2.4.22 ? Jeff Mock
  2003-07-15 17:06   ` Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo Brian Gerst
  1 sibling, 1 reply; 12+ messages in thread
From: Richard B. Johnson @ 2003-07-15 15:31 UTC (permalink / raw)
  To: Kathy Frazier; +Cc: Andi Kleen, linux-kernel

On Tue, 15 Jul 2003, Kathy Frazier wrote:

> Thanks for your reply, Andi.
>
> >> We have a proprietary PCI board installed in a (UP) system with an ASUS
> P4PE
> >> motherboard (uses Intel 845PE chipset). This system is running Red Hat
> 9.0
>
> >Have you checked the 845 errata sheets on the Intel website?
> >Perhaps it is some known hardware bug.
>
> >One thing you could try is to use Local APIC / IO APIC interrupt processing
> >instead of 8259.
>
> Our hardware engineer has combed the Intel and ASUS websites, but found
> nothing.  I'll give the APIC a try and see if I get different results and
> let you know.
>
> >>
> >> /* start timer */
> >> dmatimer.expires = jiffies + 0.5*HZ;
>
> >That's a serious bug. You cannot use floating point in the kernel.
> >It will corrupt the FP state of the user process.
>
> HZ on the INTEL platform is 100, so this should simply add 50 to the current
> value of jiffies.  Besides, assigning the value to the unsigned int field
> (expires) will truncate it to an integer anyway.  Is there a more
> appropriate way to handle a short timeout?

It will truncate it at runtime.

I suggest

	dmatimer.expires = jiffies + HZ/2;

Also, you you need to use the time_before() macro, like

	while ( time_before(jiffies, dmatimer.expires) )
            do_something();

... so you don't have a timer-wrap problem during jiffie rollover if
you haven't already done so (I don't have your source here).

>
> Thanks,
> Kathy


Cheers,
Dick Johnson
Penguin : Linux version 2.4.20 on an i686 machine (797.90 BogoMips).
Why is the government concerned about the lunatic fringe? Think about it.


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

* SCSI ATA driver in 2.4.22 ?
  2003-07-15 15:31   ` Richard B. Johnson
@ 2003-07-15 15:58     ` Jeff Mock
  2003-07-15 16:14       ` Jeff Garzik
  0 siblings, 1 reply; 12+ messages in thread
From: Jeff Mock @ 2003-07-15 15:58 UTC (permalink / raw)
  To: linux-kernel


Is Jeff Garzik's SCSI ATA driver going in 2.4.22?  I've been using it
with great success with 2.4.21-ac4, but I haven't seen it in any
of the 2.4.22-pre kernels.

If it's not going in, is there an alternative for accessing serial
ATA devices in native/enhanced mode rather than legacy mode?


By the way, if you name your child libata, some say the name has
some nice qualities:

    http://www.kabalarians.com/male/libata.htm

jeff


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

* RE: Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo
       [not found] <m3el0stw23.fsf@averell.firstfloor.org>
@ 2003-07-15 16:14 ` Kathy Frazier
  2003-07-15 15:31   ` Richard B. Johnson
  2003-07-15 17:06   ` Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo Brian Gerst
  0 siblings, 2 replies; 12+ messages in thread
From: Kathy Frazier @ 2003-07-15 16:14 UTC (permalink / raw)
  To: Andi Kleen, linux-kernel

Thanks for your reply, Andi.

>> We have a proprietary PCI board installed in a (UP) system with an ASUS
P4PE
>> motherboard (uses Intel 845PE chipset). This system is running Red Hat
9.0

>Have you checked the 845 errata sheets on the Intel website?
>Perhaps it is some known hardware bug.

>One thing you could try is to use Local APIC / IO APIC interrupt processing
>instead of 8259.

Our hardware engineer has combed the Intel and ASUS websites, but found
nothing.  I'll give the APIC a try and see if I get different results and
let you know.

>>
>> /* start timer */
>> dmatimer.expires = jiffies + 0.5*HZ;

>That's a serious bug. You cannot use floating point in the kernel.
>It will corrupt the FP state of the user process.

HZ on the INTEL platform is 100, so this should simply add 50 to the current
value of jiffies.  Besides, assigning the value to the unsigned int field
(expires) will truncate it to an integer anyway.  Is there a more
appropriate way to handle a short timeout?

Thanks,
Kathy


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

* Re: SCSI ATA driver in 2.4.22 ?
  2003-07-15 15:58     ` SCSI ATA driver in 2.4.22 ? Jeff Mock
@ 2003-07-15 16:14       ` Jeff Garzik
  0 siblings, 0 replies; 12+ messages in thread
From: Jeff Garzik @ 2003-07-15 16:14 UTC (permalink / raw)
  To: Jeff Mock; +Cc: linux-kernel

On Tue, Jul 15, 2003 at 08:58:16AM -0700, Jeff Mock wrote:
> 
> Is Jeff Garzik's SCSI ATA driver going in 2.4.22?  I've been using it
> with great success with 2.4.21-ac4, but I haven't seen it in any
> of the 2.4.22-pre kernels.
> 
> If it's not going in, is there an alternative for accessing serial
> ATA devices in native/enhanced mode rather than legacy mode?

My preference would be to merge into 2.6.0-test first, then send it to
Marcelo after that.  Otherwise, people upgrading 2.4->2.6 would get
shafted.

Besides that, I certainly would not object to it being in 2.4.22.
(but I'm biased :))


> By the way, if you name your child libata, some say the name has
> some nice qualities:
> 
>    http://www.kabalarians.com/male/libata.htm

That rules ;-)

	Jeff




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

* Re: Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo
  2003-07-15 16:14 ` Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo Kathy Frazier
  2003-07-15 15:31   ` Richard B. Johnson
@ 2003-07-15 17:06   ` Brian Gerst
  2003-07-15 17:43     ` Jamie Lokier
  2003-07-15 17:59     ` Luciano Miguel Ferreira Rocha
  1 sibling, 2 replies; 12+ messages in thread
From: Brian Gerst @ 2003-07-15 17:06 UTC (permalink / raw)
  To: Kathy Frazier; +Cc: Andi Kleen, linux-kernel

Kathy Frazier wrote:
> Thanks for your reply, Andi.
> 
> 
>>>We have a proprietary PCI board installed in a (UP) system with an ASUS
> 
> P4PE
> 
>>>motherboard (uses Intel 845PE chipset). This system is running Red Hat
> 
> 9.0
> 
> 
>>Have you checked the 845 errata sheets on the Intel website?
>>Perhaps it is some known hardware bug.
> 
> 
>>One thing you could try is to use Local APIC / IO APIC interrupt processing
>>instead of 8259.
> 
> 
> Our hardware engineer has combed the Intel and ASUS websites, but found
> nothing.  I'll give the APIC a try and see if I get different results and
> let you know.
> 
> 
>>>/* start timer */
>>>dmatimer.expires = jiffies + 0.5*HZ;
> 
> 
>>That's a serious bug. You cannot use floating point in the kernel.
>>It will corrupt the FP state of the user process.
> 
> 
> HZ on the INTEL platform is 100, so this should simply add 50 to the current
> value of jiffies.  Besides, assigning the value to the unsigned int field
> (expires) will truncate it to an integer anyway.

Use HZ/2 instead.  GCC doesn't optimize floating point constants to the 
same degree it does integers, because it doesn't know what mode 
(rounding, precision) the FPU is in.

--
				Brian Gerst


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

* Re: Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo
  2003-07-15 17:06   ` Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo Brian Gerst
@ 2003-07-15 17:43     ` Jamie Lokier
  2003-07-15 17:59     ` Luciano Miguel Ferreira Rocha
  1 sibling, 0 replies; 12+ messages in thread
From: Jamie Lokier @ 2003-07-15 17:43 UTC (permalink / raw)
  To: Brian Gerst; +Cc: Kathy Frazier, Andi Kleen, linux-kernel

Brian Gerst wrote:
> >>>dmatimer.expires = jiffies + 0.5*HZ;
> >>
> >>That's a serious bug. You cannot use floating point in the kernel.
> >>It will corrupt the FP state of the user process.
> >
> >HZ on the INTEL platform is 100, so this should simply add 50 to the 
> >current
> >value of jiffies.  Besides, assigning the value to the unsigned int field
> >(expires) will truncate it to an integer anyway.
> 
> Use HZ/2 instead.  GCC doesn't optimize floating point constants to the 
> same degree it does integers, because it doesn't know what mode 
> (rounding, precision) the FPU is in.

Optimising this to an integer add of 50 would be incorrect anyway.
Think about jiffies == 0xfffffffe.

The first statement is equivalent to:

	dmatimer.expires = (unsigned long) ((double) + 50)

and would set dmatimer.expires to 0xffffffff.

Whereas the HZ/2 form is correct!

Have a nice day,
-- Jamie

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

* Re: Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo
  2003-07-15 17:06   ` Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo Brian Gerst
  2003-07-15 17:43     ` Jamie Lokier
@ 2003-07-15 17:59     ` Luciano Miguel Ferreira Rocha
  2003-07-15 18:24       ` Brian Gerst
  1 sibling, 1 reply; 12+ messages in thread
From: Luciano Miguel Ferreira Rocha @ 2003-07-15 17:59 UTC (permalink / raw)
  To: Brian Gerst; +Cc: linux-kernel

On Tue, Jul 15, 2003 at 01:06:19PM -0400, Brian Gerst wrote:
> Use HZ/2 instead.  GCC doesn't optimize floating point constants to the 
> same degree it does integers, because it doesn't know what mode 
> (rounding, precision) the FPU is in.

Isn't (HZ >> 1) better?

Regards,
Luciano Rocha

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

* Re: Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo
  2003-07-15 17:59     ` Luciano Miguel Ferreira Rocha
@ 2003-07-15 18:24       ` Brian Gerst
  2003-07-15 18:44         ` Alan Cox
  0 siblings, 1 reply; 12+ messages in thread
From: Brian Gerst @ 2003-07-15 18:24 UTC (permalink / raw)
  To: Luciano Miguel Ferreira Rocha; +Cc: linux-kernel

Luciano Miguel Ferreira Rocha wrote:
> On Tue, Jul 15, 2003 at 01:06:19PM -0400, Brian Gerst wrote:
> 
>>Use HZ/2 instead.  GCC doesn't optimize floating point constants to the 
>>same degree it does integers, because it doesn't know what mode 
>>(rounding, precision) the FPU is in.
> 
> 
> Isn't (HZ >> 1) better?

Same thing.  GCC knows that division by a power of 2 is just a shift.

--
				Brian Gerst


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

* Re: Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo
  2003-07-15 18:24       ` Brian Gerst
@ 2003-07-15 18:44         ` Alan Cox
  2003-07-15 19:44           ` Jamie Lokier
  2003-07-20 21:04           ` Riley Williams
  0 siblings, 2 replies; 12+ messages in thread
From: Alan Cox @ 2003-07-15 18:44 UTC (permalink / raw)
  To: Brian Gerst; +Cc: Luciano Miguel Ferreira Rocha, Linux Kernel Mailing List

On Maw, 2003-07-15 at 19:24, Brian Gerst wrote:
> Luciano Miguel Ferreira Rocha wrote:
> > On Tue, Jul 15, 2003 at 01:06:19PM -0400, Brian Gerst wrote:
> > 
> >>Use HZ/2 instead.  GCC doesn't optimize floating point constants to the 
> >>same degree it does integers, because it doesn't know what mode 
> >>(rounding, precision) the FPU is in.
> > 
> > 
> > Isn't (HZ >> 1) better?
> 
> Same thing.  GCC knows that division by a power of 2 is just a shift.

Only for unsigned

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

* Re: Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo
  2003-07-15 18:44         ` Alan Cox
@ 2003-07-15 19:44           ` Jamie Lokier
  2003-07-20 21:04           ` Riley Williams
  1 sibling, 0 replies; 12+ messages in thread
From: Jamie Lokier @ 2003-07-15 19:44 UTC (permalink / raw)
  To: Alan Cox
  Cc: Brian Gerst, Luciano Miguel Ferreira Rocha, Linux Kernel Mailing List

Alan Cox wrote:
> > > Isn't (HZ >> 1) better?
> > 
> > Same thing.  GCC knows that division by a power of 2 is just a shift.
> 
> Only for unsigned

Or when HZ is constant :)

-- J?amie

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

* Re: Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo
  2003-07-15 18:44         ` Alan Cox
  2003-07-15 19:44           ` Jamie Lokier
@ 2003-07-20 21:04           ` Riley Williams
  2003-07-20 22:25             ` Jeremy Fitzhardinge
  1 sibling, 1 reply; 12+ messages in thread
From: Riley Williams @ 2003-07-20 21:04 UTC (permalink / raw)
  To: Alan Cox; +Cc: Linux Kernel Mailing List

Hi Alan.

 >>>> Use HZ/2 instead.  GCC doesn't optimize floating point constants
 >>>> to the same degree it does integers, because it doesn't know what
 >>>> mode (rounding, precision) the FPU is in.

 >>> Isn't (HZ >> 1) better?

 >> Same thing. GCC knows that division by a power of 2 is just a shift.

 > Only for unsigned

When I did the "Assembler Language Maths Logic" module for my degree,
we learned that processors used SRL (Shift Right Logical) to divide
unsigned numbers by powers of 2, and SRA (Shift Right Arithmetic) to
divide signed numbers by powers of 2. Can't GCC handle that?

Best wishes from Riley.
---
 * Nothing as pretty as a smile, nothing as ugly as a frown.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.502 / Virus Database: 300 - Release Date: 18-Jul-2003


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

* Re: Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo
  2003-07-20 21:04           ` Riley Williams
@ 2003-07-20 22:25             ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 12+ messages in thread
From: Jeremy Fitzhardinge @ 2003-07-20 22:25 UTC (permalink / raw)
  To: Riley Williams; +Cc: Alan Cox, Linux Kernel Mailing List

On Sun, 2003-07-20 at 14:04, Riley Williams wrote:
> When I did the "Assembler Language Maths Logic" module for my degree,
> we learned that processors used SRL (Shift Right Logical) to divide
> unsigned numbers by powers of 2, and SRA (Shift Right Arithmetic) to
> divide signed numbers by powers of 2. Can't GCC handle that?

Sure it can, but >>1 isn't the same as /2 for signed numbers.

(Hint: -1 / 2 != -1)

	J


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

end of thread, other threads:[~2003-07-20 22:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <m3el0stw23.fsf@averell.firstfloor.org>
2003-07-15 16:14 ` Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo Kathy Frazier
2003-07-15 15:31   ` Richard B. Johnson
2003-07-15 15:58     ` SCSI ATA driver in 2.4.22 ? Jeff Mock
2003-07-15 16:14       ` Jeff Garzik
2003-07-15 17:06   ` Interrupt doesn't make it to the 8259 on a ASUS P4PE mobo Brian Gerst
2003-07-15 17:43     ` Jamie Lokier
2003-07-15 17:59     ` Luciano Miguel Ferreira Rocha
2003-07-15 18:24       ` Brian Gerst
2003-07-15 18:44         ` Alan Cox
2003-07-15 19:44           ` Jamie Lokier
2003-07-20 21:04           ` Riley Williams
2003-07-20 22:25             ` Jeremy Fitzhardinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).