Add a tool to work on i915 hardware in user mode
This is the beginning of a tool that transforms the i9x5 code to user mode code. Consider this a very early stage although it does produce two programs. Requires spatch 1.0 or greater. To try it out, assuming you have an up-to-date spatch, sh transform make make broken Please don't fall to the temptation to auto-magicize this process. It's primitive for a reason. That said, suggestions welcome of course. Change-Id: I0188e36637b198b06c17f6d3c714d990e88bd57d Signed-off-by: Ronald G. Minnich <rminnich@chromium.org> Reviewed-on: http://review.coreboot.org/1003 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
committed by
Stefan Reinauer
parent
44a89b34f8
commit
564e90f571
148
util/i915tool/spatches/fixcalls.cocci
Normal file
148
util/i915tool/spatches/fixcalls.cocci
Normal file
@@ -0,0 +1,148 @@
|
||||
@@
|
||||
identifier f;
|
||||
type T;
|
||||
@@
|
||||
T f(...){<...
|
||||
-vga_get_uninterruptible(...);
|
||||
...>}
|
||||
@@
|
||||
identifier f;
|
||||
type T;
|
||||
@@
|
||||
T f(...){<...
|
||||
-vga_put(...);
|
||||
...>}
|
||||
@@
|
||||
identifier f;
|
||||
type T;
|
||||
@@
|
||||
T f(...){<...
|
||||
-intel_init_quirks(...);
|
||||
...>}
|
||||
@@
|
||||
identifier f;
|
||||
type T;
|
||||
@@
|
||||
T f(...){<...
|
||||
-drm_mode_config_init(...);
|
||||
...>}
|
||||
@@
|
||||
identifier f;
|
||||
type T;
|
||||
@@
|
||||
T f(...){<...
|
||||
-INIT_WORK(...);
|
||||
...>}
|
||||
@@
|
||||
identifier f;
|
||||
type T;
|
||||
@@
|
||||
T f(...){<...
|
||||
-setup_timer(...);
|
||||
...>}
|
||||
@@
|
||||
identifier f;
|
||||
type T;
|
||||
@@
|
||||
T f(...){<...
|
||||
-DRM_DEBUG_KMS(
|
||||
+fprintf(stderr,
|
||||
...);
|
||||
...>}
|
||||
@@
|
||||
identifier f;
|
||||
type T;
|
||||
@@
|
||||
T f(...){<...
|
||||
-DRM_ERROR(
|
||||
+fprintf(stderr,
|
||||
...);
|
||||
...>}
|
||||
@@
|
||||
identifier f;
|
||||
type T;
|
||||
@@
|
||||
T f(...){<...
|
||||
-DRM_DEBUG(
|
||||
+fprintf(stderr,
|
||||
...);
|
||||
...>}
|
||||
@@
|
||||
identifier f;
|
||||
type T;
|
||||
@@
|
||||
T f(...){<...
|
||||
-DRM_DEBUG_DRIVER(
|
||||
+fprintf(stderr,
|
||||
...);
|
||||
...>}
|
||||
@@
|
||||
identifier f;
|
||||
type T;
|
||||
@@
|
||||
T f(...){<...
|
||||
-intel_init_display(...);
|
||||
...>}
|
||||
@ rulekz @
|
||||
identifier t;
|
||||
identifier f;
|
||||
expression E1, E2;
|
||||
type T;
|
||||
@@
|
||||
T f(...){<...
|
||||
t = kzalloc(E1, E2);
|
||||
...>}
|
||||
@@
|
||||
identifier rulekz.f;
|
||||
expression E1, E2;
|
||||
@@
|
||||
|
||||
- kzalloc(E1
|
||||
+ calloc(1, E1
|
||||
- ,E2
|
||||
)
|
||||
@@
|
||||
identifier d;
|
||||
@@
|
||||
-static
|
||||
const struct pci_device_id d[] = {...};
|
||||
@@
|
||||
expression E1;
|
||||
@@
|
||||
-WARN(
|
||||
+if (
|
||||
E1
|
||||
-,
|
||||
+) fprintf(stderr,
|
||||
...);
|
||||
@@
|
||||
expression E1;
|
||||
@@
|
||||
-BUG_ON(
|
||||
+assert(
|
||||
E1);
|
||||
@@
|
||||
@@
|
||||
-jiffies
|
||||
+msecs()
|
||||
@@
|
||||
expression E1;
|
||||
@@
|
||||
-jiffies_to_msecs(
|
||||
E1
|
||||
-)
|
||||
@@
|
||||
expression E1;
|
||||
@@
|
||||
-msecs_to_jiffies(
|
||||
E1
|
||||
-)
|
||||
@@
|
||||
expression E1, E2;
|
||||
@@
|
||||
-time_after(
|
||||
+(
|
||||
E1
|
||||
-,
|
||||
+>
|
||||
E2)
|
Reference in New Issue
Block a user