Altera_Forum
Honored Contributor
19 years agoioremap() bug in Nios2 kernel
There is a critical bug, in the ioremap() function. It didn't uncache the address mapping.
It existed for all Nios2 kernel released. This will cause problems in mtd driver, and others. Smcnutt noted it in 2004. Feiwu had problem in netflash lately. Please check this, (and let me know if you have better idea) Please patch, __ioremap() in file arch/nios2nommu/mm/ioremap.c /* * Map some physical address range into the kernel address space. */ void *__ioremap(unsigned long physaddr, unsigned long size, int cacheflag) { return (void *)(physaddr | 0x80000000); // always uncached } Another issue, which existed in kernel 2.6.16 and 2.6.17 . Miked and Heing had resolved the problems of module loading from initramfs and BOA by updating the file , linux-2.6.x/fs/ramfs/file-nommu.c, as it was fixed in kernel 2.6.18 int ramfs_nommu_mmap(struct file *file, struct vm_area_struct *vma) { return vma->vm_flags & VM_SHARED ? 0 : -ENOSYS; }