<div dir="ltr"><div><div><div><div><div>Hi Ron, Rudolf,<br><br></div>I've attached a shell script that does the first part of preparing the in-kernel radeon driver for coreboot.<br><br></div>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).<br>
<br></div>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 --<br><br></div>
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:<br><br>1. Rename the #define radeon_init() in drivers/gpu/drm/radeon/radeon.h<br>
</div><div>2. Find struct radeon_asic initializers in drivers/gpu/drm/radeon/radeon_asic.c<br><br></div><div>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.<br>
</div><div><div><div><div><br></div><div>Regards,<br>David<br></div></div></div></div></div>