[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-mips-kernel
Subject:    [Linux-mips-kernel]darnit (modules)
From:       sseeger () stellartec ! com (Steven Seeger)
Date:       2002-07-10 18:38:23
[Download RAW message or body]

Well my idea didn't work. It doesn't crash now, and all the things I"m
accessing are now in kernel space at an address of like 0x80028xxx and all
is good in that regard.

It still takes varying time.

I'll outline what's going on here:

The irq in question is 44. The only other irq in my whole system is 17 for
the serial port. That is passed to Linux and I don't care about what happens
to it.

This is only an outline and not the real code.

//called from low level interrupt code
static asmlinkage unsigned int dispatch_mips_interrupt(int irq, struct
pt_regs *regs)
{
	cpu_own_status *cpu;

	//irqs are disabled from the CLI at the top of the irq vector

	set_debug_low(); //causes high state on the scope to go low IF irq == 44
	do stuff locally
	set_debug_high(); //causes low state on scope to go high if irq==44

	//the above section always runs at either time X or X + 600 ns or so...this
is the least varying of them all

	if(global_irq_handler[irq] {
		set_debug_low();
		mask_irq(irq);
		//calls the kernel function that masks off the irq..that function consists
of irq -= 40 and then *VR4181_MSYSINT1REG |= irq to mask the gpio irq
		set_debug_high();

		//the above block always varies in time. sometimes it is real quick and
sometimes it takes quite a while. wtf? usually 2 us but sometimes 22

		rtai_regs[irq] = regs; //set a pointer that exists in the module's space

		set_debug_low();

		call irq handler in another module();

		set_debug_high();

		//sometimes that takes about 7 us, and sometimes 17...wtf? all it does is
read from a device on PCS1 a single halfword..and then call the kernel
unmask irq function
	}

}

So that is what's happening. If you need more detail I can just paste in the
code, but I thought it might be more easy to understand this way.

All the debug stuff does is take a local var to the irq handler called debug
(unsigned char) and *(volatile unsigned char*)0xb7ffffd0 = debug++;

That address is a parallel port on the Osprey board.

Thanks for any advice you all might have.

Steve



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Two, two, TWO treats in one.
http://thinkgeek.com/sf
_______________________________________________
Linux-mips-kernel mailing list
Linux-mips-kernel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-mips-kernel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic