openpvrsgx-devgroup / linux_openpvrsgx

This is about shaping existing GPL Linux kernel drivers for the PVR/SGX5 architecture so that they can become accepted into drivers/staging. It is NOT about reverse engineering or user-space components (firmware and libraries). Just the device driver. There may also be some glue code here for interfacing to the processor of the SoC (OMAP, Sunxi, Poulsbo, Cedarview, jz4780).
Other
42 stars 19 forks source link

Fix CPUVAddrToPFN for kernels > 4.12.0 #1

Closed jameshilliard closed 5 months ago

jameshilliard commented 4 years ago

Should fix:

drivers/staging/pvr/1.14.3699939/eurasia_km/services4/srvkm/env/linux/osfunc.c: In function ‘CPUVAddrToPFN’:
drivers/staging/pvr/1.14.3699939/eurasia_km/services4/srvkm/env/linux/osfunc.c:3444:24: error: passing argument 1 of ‘pud_offset’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3444 |     psPUD = pud_offset(psPGD, uCPUVAddr);
      |                        ^~~~~
      |                        |
      |                        pgd_t * {aka struct <anonymous> *}
In file included from ./include/linux/mm.h:99,
                 from ./include/asm-generic/cacheflush.h:6,
                 from ./arch/x86/include/asm/cacheflush.h:6,
                 from drivers/staging/pvr/1.14.3699939/eurasia_km/services4/srvkm/env/linux/osfunc.c:55:
./arch/x86/include/asm/pgtable.h:922:40: note: expected ‘p4d_t *’ {aka ‘struct <anonymous> *’} but argument is of type ‘pgd_t *’ {aka ‘struct <anonymous> *’}
  922 | static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address)
      |                                 ~~~~~~~^~~
goldelico commented 4 years ago

Am 29.09.2019 um 21:16 schrieb James Hilliard notifications@github.com:

Should fix:

drivers/staging/pvr/1.14.3699939/eurasia_km/services4/srvkm/env/linux/osfunc.c: In function ‘CPUVAddrToPFN’: drivers/staging/pvr/1.14.3699939/eurasia_km/services4/srvkm/env/linux/osfunc.c:3444:24: error: passing argument 1 of ‘pud_offset’ from incompatible pointer type [-Werror=incompatible-pointer-types] 3444 psPUD = pud_offset(psPGD, uCPUVAddr); ^~~~~
pgd_t {aka struct }

In file included from ./include/linux/mm.h:99, from ./include/asm-generic/cacheflush.h:6, from ./arch/x86/include/asm/cacheflush.h:6, from drivers/staging/pvr/1.14.3699939/eurasia_km/services4/srvkm/env/linux/osfunc.c:55: ./arch/x86/include/asm/pgtable.h:922:40: note: expected ‘p4d_t ’ {aka ‘struct ’} but argument is of type ‘pgd_t ’ {aka ‘struct ’} 922 | static inline pud_t pud_offset(p4d_t p4d, unsigned long address) | ~^ You can view, comment on, or merge this pull request online at:

https://github.com/openpvrsgx-devgroup/linux_openpvrsgx/pull/1 https://github.com/openpvrsgx-devgroup/linux_openpvrsgx/pull/1 Commit Summary

Fix CPUVAddrToPFN for kernels > 4.12.0 File Changes

M drivers/staging/pvr/1.14.3699939/eurasia_km/services4/srvkm/env/linux/osfunc.c https://github.com/openpvrsgx-devgroup/linux_openpvrsgx/pull/1/files#diff-0 (10) Patch Links:

https://github.com/openpvrsgx-devgroup/linux_openpvrsgx/pull/1.patch https://github.com/openpvrsgx-devgroup/linux_openpvrsgx/pull/1.patch https://github.com/openpvrsgx-devgroup/linux_openpvrsgx/pull/1.diff https://github.com/openpvrsgx-devgroup/linux_openpvrsgx/pull/1.diffLooks good, although I haven't seen this warning/error. May depend on compiler version.

I'll apply to next update.

BR and thanks, Nikolaus

goldelico commented 5 months ago

Has been merged long time ago...