Skip to contentSkip to conversation

mysterious prblem with IO memory

DISCUSSION Christoph Baumann 1 participant 2 messages Sep 24, 2003 – Sep 25, 2003

lore
Share & tools
lore
#0 lore raw

Hi,

developing a driver (currently with a vanilla 2.4.20 kernel) for a PCI card i encountered a mysterious behaviour. I get the IO addresses from the card configuration space and use ioremap_nocache to get virtual addresses for usage with write[bwl]. This works to some extend (the card behaves as expected). But then at some random moment i get error messages about dereferencing a NULL pointer and severe crashes afterwards. When i put a printk("%p\n",address) before each write[bwl] everything is fine (appart from lots of log entries). I also tried wmb() after the write commands which didn't help. Any idea?

Mit freundlichen Gruessen / Best regards
Dipl.-Phys. Christoph Baumann
---
SORCUS Computer GmbH
Im Breitspiel 11 c
D-69126 Heidelberg

Tel.: +49(0)6221/3206-0
Fax: +49(0)6221/3206-66

#1 lore raw

Re: mysterious problem with IO memory

Update:
I wrapped the calls to ioremap to align the requested address and range to PAGE_SIZE. This helps. But when i do 'insmod' and 'rmmod' several times i get severe Oops from kjournald.

Mit freundlichen Gruessen / Best regards
Dipl.-Phys. Christoph Baumann
---
SORCUS Computer GmbH
Im Breitspiel 11 c
D-69126 Heidelberg

Tel.: +49(0)6221/3206-0
Fax: +49(0)6221/3206-66