2 %parse
-param
{void *format
}
3 %parse
-param
{void *scanner
}
4 %lex
-param
{void* scanner
}
12 #include <linux/compiler.h>
13 #include <linux/list.h>
14 #include <linux/bitmap.h>
17 #include "pmu-bison.h"
19 int perf_pmu_lex
(YYSTYPE * yylval_param
, void *yyscanner
);
21 #define ABORT_ON(val) \
27 static void perf_pmu_error
(void *format
, void *scanner
, const char *msg
);
29 static void perf_pmu__set_format
(unsigned long *bits
, long from
, long to
)
36 memset
(bits
, 0, BITS_TO_BYTES
(PERF_PMU_FORMAT_BITS
));
37 for
(b
= from
; b
<= to
; b
++)
44 %token PP_VALUE PP_ERROR
52 DECLARE_BITMAP
(bits
, PERF_PMU_FORMAT_BITS
);
65 perf_pmu_format__set_value
(format
, PERF_PMU_FORMAT_VALUE_CONFIG
, $3);
68 PP_CONFIG PP_VALUE
':' bits
70 perf_pmu_format__set_value
(format
, $2, $4);
76 bitmap_or
($$
, $1, $3, 64);
81 memcpy
($$
, $1, sizeof
($1));
87 perf_pmu__set_format
($$
, $1, $3);
92 perf_pmu__set_format
($$
, $1, 0);
97 static void perf_pmu_error
(void *format __maybe_unused
,
98 void *scanner __maybe_unused
,
99 const char *msg __maybe_unused
)