Skip to content

How to fix the file fl2000_surface.c after use command make in 5.19.0-46-generic #95

@fusesuphasin

Description

@fusesuphasin

make -C /usr/src/linux-headers-5.19.0-45-generic M=/home/suphasin/FL2000/src modules
make[1]: Entering directory '/usr/src/linux-headers-5.19.0-45-generic'
CC [M] /home/suphasin/FL2000/src/fl2000_surface.o
/home/suphasin/FL2000/src/fl2000_surface.c: In function ‘fl2000_surface_pin_down’:
/home/suphasin/FL2000/src/fl2000_surface.c:109:49: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
109 | down_read(&current->mm->mmap_sem);
| ^~~~~~~~
| mmap_base
/home/suphasin/FL2000/src/fl2000_surface.c:115:47: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
115 | up_read(&current->mm->mmap_sem);
| ^~~~~~~~
| mmap_base
/home/suphasin/FL2000/src/fl2000_surface.c:129:41: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
129 | down_read(&current->mm->mmap_sem);
| ^~~~~~~~
| mmap_base
/home/suphasin/FL2000/src/fl2000_surface.c:144:39: error: ‘struct mm_struct’ has no member named ‘mmap_sem’; did you mean ‘mmap_base’?
144 | up_read(&current->mm->mmap_sem);
| ^~~~~~~~
| mmap_base
/home/suphasin/FL2000/src/fl2000_surface.c: In function ‘fl2000_surface_map’:
/home/suphasin/FL2000/src/fl2000_surface.c:228:42: error: too many arguments to function ‘vm_map_ram’
228 | surface->mapped_buffer = vm_map_ram(
| ^~~~~~~~~~
In file included from /home/suphasin/FL2000/src/fl2000_include.h:30,
from /home/suphasin/FL2000/src/fl2000_surface.c:8:
./include/linux/vmalloc.h:129:14: note: declared here
129 | extern void *vm_map_ram(struct page **pages, unsigned int count, int node);
| ^~~~~~~~~~
make[2]: *** [scripts/Makefile.build:257: /home/suphasin/FL2000/src/fl2000_surface.o] Error 1
make[1]: *** [Makefile:1857: /home/suphasin/FL2000/src] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.19.0-45-generic'
make: *** [Makefile:41: all] Error 2


Then i change mmap_sem to mmap base then its still error with pointer

so i fixed like this issue, its still not run pass yet.
#94

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions