Hi Ron, Rudolf,
I've attached a shell script that does the first part of preparing the in-kernel radeon driver for coreboot.
I settled on a shell script after thinking about what coccinelle is best used for. It does look like coccinelle could do what ctags does, namely, find function definitions. However ctags has the advantage of automatically filtering out function calls that refer to any other part of the kernel (ctags only lists where the function is *defined* in the 'tags' file it outputs).
The output of this script is a coccinelle .spatch that I don't actually expect to work yet. I'll become more confident with coccinelle as I use it more. I wanted to send this as a question --
What do you think is the best way to slice up the in-kernel radeon driver? This script relies on very few special cases which should hopefully make the code reuse as painless as possible. The special cases:
1. Rename the #define radeon_init() in drivers/gpu/drm/radeon/radeon.h 2. Find struct radeon_asic initializers in drivers/gpu/drm/radeon/radeon_asic.c
After this auto-generated coccinelle .spatch, the source tree needs manual spatches applied to change kernel API calls to coreboot API calls. After looking for any pitfalls, that would be the next thing to do.
Regards, David