Re: Accessing PCI Memory Mapped Registers in Linux Kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mulyadi,

On Tue, Dec 21, 2010 at 9:59 AM, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> wrote:
Hi Daniel.........

On Tue, Dec 21, 2010 at 16:04, YOUNGWHAN SONG <breadncup@xxxxxxxxx> wrote:
> test_foo = (struct foo*)regsva;

I was thinking differently, could it be that casting...as shown
above...introduce this behaviour? what if you just point to the
address...directly without any "container" such as struct foo?

 
> printk(KERN_DBG "value TEST1: 0x%lx\n", readl(test_foo->TEST1));
> printk(KERN_DBG "value 0: 0x%x\n", readw(&test_foo->a1[0]);
> printk(KERN_DBG "value 1: 0x%x\n", readw(&test_foo->a1[1]);

in the above statement, it means "take the address of a1[0 and read
some bytes from that address", right?

--
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

As we've talked, it looks the code would be ok, but I guess architecture doesn't handle the 16 bit address correctly. Our team will find a way to get through this by modifying the PCI module.

Thanks, Mulaydi for this post.

Have a great day.

Daniel
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux