diff options
Diffstat (limited to 'scripts/mod')
-rw-r--r-- | scripts/mod/devicetable-offsets.c | 4 | ||||
-rw-r--r-- | scripts/mod/file2alias.c | 15 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 9 |
3 files changed, 28 insertions, 0 deletions
diff --git a/scripts/mod/devicetable-offsets.c b/scripts/mod/devicetable-offsets.c index 9826b9a6543c..9fad6afe4c41 100644 --- a/scripts/mod/devicetable-offsets.c +++ b/scripts/mod/devicetable-offsets.c | |||
@@ -203,6 +203,10 @@ int main(void) | |||
203 | DEVID_FIELD(hda_device_id, rev_id); | 203 | DEVID_FIELD(hda_device_id, rev_id); |
204 | DEVID_FIELD(hda_device_id, api_version); | 204 | DEVID_FIELD(hda_device_id, api_version); |
205 | 205 | ||
206 | DEVID(sdw_device_id); | ||
207 | DEVID_FIELD(sdw_device_id, mfg_id); | ||
208 | DEVID_FIELD(sdw_device_id, part_id); | ||
209 | |||
206 | DEVID(fsl_mc_device_id); | 210 | DEVID(fsl_mc_device_id); |
207 | DEVID_FIELD(fsl_mc_device_id, vendor); | 211 | DEVID_FIELD(fsl_mc_device_id, vendor); |
208 | DEVID_FIELD(fsl_mc_device_id, obj_type); | 212 | DEVID_FIELD(fsl_mc_device_id, obj_type); |
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 6ef6e63f96fd..b9beeaa4695b 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -1289,6 +1289,21 @@ static int do_hda_entry(const char *filename, void *symval, char *alias) | |||
1289 | } | 1289 | } |
1290 | ADD_TO_DEVTABLE("hdaudio", hda_device_id, do_hda_entry); | 1290 | ADD_TO_DEVTABLE("hdaudio", hda_device_id, do_hda_entry); |
1291 | 1291 | ||
1292 | /* Looks like: sdw:mNpN */ | ||
1293 | static int do_sdw_entry(const char *filename, void *symval, char *alias) | ||
1294 | { | ||
1295 | DEF_FIELD(symval, sdw_device_id, mfg_id); | ||
1296 | DEF_FIELD(symval, sdw_device_id, part_id); | ||
1297 | |||
1298 | strcpy(alias, "sdw:"); | ||
1299 | ADD(alias, "m", mfg_id != 0, mfg_id); | ||
1300 | ADD(alias, "p", part_id != 0, part_id); | ||
1301 | |||
1302 | add_wildcard(alias); | ||
1303 | return 1; | ||
1304 | } | ||
1305 | ADD_TO_DEVTABLE("sdw", sdw_device_id, do_sdw_entry); | ||
1306 | |||
1292 | /* Looks like: fsl-mc:vNdN */ | 1307 | /* Looks like: fsl-mc:vNdN */ |
1293 | static int do_fsl_mc_entry(const char *filename, void *symval, | 1308 | static int do_fsl_mc_entry(const char *filename, void *symval, |
1294 | char *alias) | 1309 | char *alias) |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 49dfcd556c78..9917f928d0fd 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -2165,6 +2165,14 @@ static void add_intree_flag(struct buffer *b, int is_intree) | |||
2165 | buf_printf(b, "\nMODULE_INFO(intree, \"Y\");\n"); | 2165 | buf_printf(b, "\nMODULE_INFO(intree, \"Y\");\n"); |
2166 | } | 2166 | } |
2167 | 2167 | ||
2168 | /* Cannot check for assembler */ | ||
2169 | static void add_retpoline(struct buffer *b) | ||
2170 | { | ||
2171 | buf_printf(b, "\n#ifdef RETPOLINE\n"); | ||
2172 | buf_printf(b, "MODULE_INFO(retpoline, \"Y\");\n"); | ||
2173 | buf_printf(b, "#endif\n"); | ||
2174 | } | ||
2175 | |||
2168 | static void add_staging_flag(struct buffer *b, const char *name) | 2176 | static void add_staging_flag(struct buffer *b, const char *name) |
2169 | { | 2177 | { |
2170 | static const char *staging_dir = "drivers/staging"; | 2178 | static const char *staging_dir = "drivers/staging"; |
@@ -2506,6 +2514,7 @@ int main(int argc, char **argv) | |||
2506 | err |= check_modname_len(mod); | 2514 | err |= check_modname_len(mod); |
2507 | add_header(&buf, mod); | 2515 | add_header(&buf, mod); |
2508 | add_intree_flag(&buf, !external_module); | 2516 | add_intree_flag(&buf, !external_module); |
2517 | add_retpoline(&buf); | ||
2509 | add_staging_flag(&buf, mod->name); | 2518 | add_staging_flag(&buf, mod->name); |
2510 | err |= add_versions(&buf, mod); | 2519 | err |= add_versions(&buf, mod); |
2511 | add_depends(&buf, mod, modules); | 2520 | add_depends(&buf, mod, modules); |