diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mod/devicetable-offsets.c | 2 | ||||
-rw-r--r-- | scripts/mod/file2alias.c | 32 | ||||
-rw-r--r-- | scripts/mod/modpost.c | 3 |
3 files changed, 34 insertions, 3 deletions
diff --git a/scripts/mod/devicetable-offsets.c b/scripts/mod/devicetable-offsets.c index eff7de1fc82e..e70fcd12eeeb 100644 --- a/scripts/mod/devicetable-offsets.c +++ b/scripts/mod/devicetable-offsets.c | |||
@@ -63,6 +63,8 @@ int main(void) | |||
63 | 63 | ||
64 | DEVID(acpi_device_id); | 64 | DEVID(acpi_device_id); |
65 | DEVID_FIELD(acpi_device_id, id); | 65 | DEVID_FIELD(acpi_device_id, id); |
66 | DEVID_FIELD(acpi_device_id, cls); | ||
67 | DEVID_FIELD(acpi_device_id, cls_msk); | ||
66 | 68 | ||
67 | DEVID(pnp_device_id); | 69 | DEVID(pnp_device_id); |
68 | DEVID_FIELD(pnp_device_id, id); | 70 | DEVID_FIELD(pnp_device_id, id); |
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 84c86f3cd6cd..5f2088209132 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -523,12 +523,40 @@ static int do_serio_entry(const char *filename, | |||
523 | } | 523 | } |
524 | ADD_TO_DEVTABLE("serio", serio_device_id, do_serio_entry); | 524 | ADD_TO_DEVTABLE("serio", serio_device_id, do_serio_entry); |
525 | 525 | ||
526 | /* looks like: "acpi:ACPI0003 or acpi:PNP0C0B" or "acpi:LNXVIDEO" */ | 526 | /* looks like: "acpi:ACPI0003" or "acpi:PNP0C0B" or "acpi:LNXVIDEO" or |
527 | * "acpi:bbsspp" (bb=base-class, ss=sub-class, pp=prog-if) | ||
528 | * | ||
529 | * NOTE: Each driver should use one of the following : _HID, _CIDs | ||
530 | * or _CLS. Also, bb, ss, and pp can be substituted with ?? | ||
531 | * as don't care byte. | ||
532 | */ | ||
527 | static int do_acpi_entry(const char *filename, | 533 | static int do_acpi_entry(const char *filename, |
528 | void *symval, char *alias) | 534 | void *symval, char *alias) |
529 | { | 535 | { |
530 | DEF_FIELD_ADDR(symval, acpi_device_id, id); | 536 | DEF_FIELD_ADDR(symval, acpi_device_id, id); |
531 | sprintf(alias, "acpi*:%s:*", *id); | 537 | DEF_FIELD_ADDR(symval, acpi_device_id, cls); |
538 | DEF_FIELD_ADDR(symval, acpi_device_id, cls_msk); | ||
539 | |||
540 | if (id && strlen((const char *)*id)) | ||
541 | sprintf(alias, "acpi*:%s:*", *id); | ||
542 | else if (cls) { | ||
543 | int i, byte_shift, cnt = 0; | ||
544 | unsigned int msk; | ||
545 | |||
546 | sprintf(&alias[cnt], "acpi*:"); | ||
547 | cnt = 6; | ||
548 | for (i = 1; i <= 3; i++) { | ||
549 | byte_shift = 8 * (3-i); | ||
550 | msk = (*cls_msk >> byte_shift) & 0xFF; | ||
551 | if (msk) | ||
552 | sprintf(&alias[cnt], "%02x", | ||
553 | (*cls >> byte_shift) & 0xFF); | ||
554 | else | ||
555 | sprintf(&alias[cnt], "??"); | ||
556 | cnt += 2; | ||
557 | } | ||
558 | sprintf(&alias[cnt], ":*"); | ||
559 | } | ||
532 | return 1; | 560 | return 1; |
533 | } | 561 | } |
534 | ADD_TO_DEVTABLE("acpi", acpi_device_id, do_acpi_entry); | 562 | ADD_TO_DEVTABLE("acpi", acpi_device_id, do_acpi_entry); |
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 91ee1b2e0f9a..12d3db3bd46b 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -886,7 +886,8 @@ static void check_section(const char *modname, struct elf_info *elf, | |||
886 | #define TEXT_SECTIONS ".text", ".text.unlikely", ".sched.text", \ | 886 | #define TEXT_SECTIONS ".text", ".text.unlikely", ".sched.text", \ |
887 | ".kprobes.text" | 887 | ".kprobes.text" |
888 | #define OTHER_TEXT_SECTIONS ".ref.text", ".head.text", ".spinlock.text", \ | 888 | #define OTHER_TEXT_SECTIONS ".ref.text", ".head.text", ".spinlock.text", \ |
889 | ".fixup", ".entry.text", ".exception.text", ".text.*" | 889 | ".fixup", ".entry.text", ".exception.text", ".text.*", \ |
890 | ".coldtext" | ||
890 | 891 | ||
891 | #define INIT_SECTIONS ".init.*" | 892 | #define INIT_SECTIONS ".init.*" |
892 | #define MEM_INIT_SECTIONS ".meminit.*" | 893 | #define MEM_INIT_SECTIONS ".meminit.*" |