- case MTRRIOC32_ADD_ENTRY:
- case MTRRIOC32_SET_ENTRY:
- case MTRRIOC32_DEL_ENTRY:
- case MTRRIOC32_KILL_ENTRY:
- case MTRRIOC32_ADD_PAGE_ENTRY:
- case MTRRIOC32_SET_PAGE_ENTRY:
- case MTRRIOC32_DEL_PAGE_ENTRY:
- case MTRRIOC32_KILL_PAGE_ENTRY: {
+#define MTRR_COMPAT_OP(op, type)\
+ case MTRRIOC32_##op: \
+ cmd = MTRRIOC_##op; \
+ goto compat_get_##type
+
+ MTRR_COMPAT_OP(ADD_ENTRY, sentry);
+ MTRR_COMPAT_OP(SET_ENTRY, sentry);
+ MTRR_COMPAT_OP(DEL_ENTRY, sentry);
+ MTRR_COMPAT_OP(KILL_ENTRY, sentry);
+ MTRR_COMPAT_OP(ADD_PAGE_ENTRY, sentry);
+ MTRR_COMPAT_OP(SET_PAGE_ENTRY, sentry);
+ MTRR_COMPAT_OP(DEL_PAGE_ENTRY, sentry);
+ MTRR_COMPAT_OP(KILL_PAGE_ENTRY, sentry);
+compat_get_sentry: {