diff options
author | Jaswinder Singh Rajput <jaswinder@infradead.org> | 2009-01-08 05:13:26 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-08 09:37:37 -0500 |
commit | 1eb1b3b65dc3e3ffcc6a60e115c085c0c11c1077 (patch) | |
tree | 92a5c8d565f9e0eed2b4c08c9abf1fc8cf0dddcb | |
parent | 41401db698cbb5d1869776bf336881db267e7d19 (diff) |
x86: rename all fields of mpf_intel mpf_X to X
Impact: cleanup, solve 80 columns wrap problems
It would be cleaner to rename all the mpf->mpf_X fields to
mpf->X - that alone would give 4 characters per usage site.
(we already know that it's an 'mpf' entity -
no need to duplicate that in the field too)
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/include/asm/mpspec_def.h | 20 | ||||
-rw-r--r-- | arch/x86/kernel/mpparse.c | 50 |
2 files changed, 35 insertions, 35 deletions
diff --git a/arch/x86/include/asm/mpspec_def.h b/arch/x86/include/asm/mpspec_def.h index 187dc9201932..4a7f96d7c188 100644 --- a/arch/x86/include/asm/mpspec_def.h +++ b/arch/x86/include/asm/mpspec_def.h | |||
@@ -26,16 +26,16 @@ | |||
26 | 26 | ||
27 | /* Intel MP Floating Pointer Structure */ | 27 | /* Intel MP Floating Pointer Structure */ |
28 | struct mpf_intel { | 28 | struct mpf_intel { |
29 | char mpf_signature[4]; /* "_MP_" */ | 29 | char signature[4]; /* "_MP_" */ |
30 | unsigned int mpf_physptr; /* Configuration table address */ | 30 | unsigned int physptr; /* Configuration table address */ |
31 | unsigned char mpf_length; /* Our length (paragraphs) */ | 31 | unsigned char length; /* Our length (paragraphs) */ |
32 | unsigned char mpf_specification;/* Specification version */ | 32 | unsigned char specification; /* Specification version */ |
33 | unsigned char mpf_checksum; /* Checksum (makes sum 0) */ | 33 | unsigned char checksum; /* Checksum (makes sum 0) */ |
34 | unsigned char mpf_feature1; /* Standard or configuration ? */ | 34 | unsigned char feature1; /* Standard or configuration ? */ |
35 | unsigned char mpf_feature2; /* Bit7 set for IMCR|PIC */ | 35 | unsigned char feature2; /* Bit7 set for IMCR|PIC */ |
36 | unsigned char mpf_feature3; /* Unused (0) */ | 36 | unsigned char feature3; /* Unused (0) */ |
37 | unsigned char mpf_feature4; /* Unused (0) */ | 37 | unsigned char feature4; /* Unused (0) */ |
38 | unsigned char mpf_feature5; /* Unused (0) */ | 38 | unsigned char feature5; /* Unused (0) */ |
39 | }; | 39 | }; |
40 | 40 | ||
41 | #define MPC_SIGNATURE "PCMP" | 41 | #define MPC_SIGNATURE "PCMP" |
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 6cea941c4dbb..8385d4e7e15d 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -597,9 +597,9 @@ static void __init __get_smp_config(unsigned int early) | |||
597 | } | 597 | } |
598 | 598 | ||
599 | printk(KERN_INFO "Intel MultiProcessor Specification v1.%d\n", | 599 | printk(KERN_INFO "Intel MultiProcessor Specification v1.%d\n", |
600 | mpf->mpf_specification); | 600 | mpf->specification); |
601 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32) | 601 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32) |
602 | if (mpf->mpf_feature2 & (1 << 7)) { | 602 | if (mpf->feature2 & (1 << 7)) { |
603 | printk(KERN_INFO " IMCR and PIC compatibility mode.\n"); | 603 | printk(KERN_INFO " IMCR and PIC compatibility mode.\n"); |
604 | pic_mode = 1; | 604 | pic_mode = 1; |
605 | } else { | 605 | } else { |
@@ -610,7 +610,7 @@ static void __init __get_smp_config(unsigned int early) | |||
610 | /* | 610 | /* |
611 | * Now see if we need to read further. | 611 | * Now see if we need to read further. |
612 | */ | 612 | */ |
613 | if (mpf->mpf_feature1 != 0) { | 613 | if (mpf->feature1 != 0) { |
614 | if (early) { | 614 | if (early) { |
615 | /* | 615 | /* |
616 | * local APIC has default address | 616 | * local APIC has default address |
@@ -620,16 +620,16 @@ static void __init __get_smp_config(unsigned int early) | |||
620 | } | 620 | } |
621 | 621 | ||
622 | printk(KERN_INFO "Default MP configuration #%d\n", | 622 | printk(KERN_INFO "Default MP configuration #%d\n", |
623 | mpf->mpf_feature1); | 623 | mpf->feature1); |
624 | construct_default_ISA_mptable(mpf->mpf_feature1); | 624 | construct_default_ISA_mptable(mpf->feature1); |
625 | 625 | ||
626 | } else if (mpf->mpf_physptr) { | 626 | } else if (mpf->physptr) { |
627 | 627 | ||
628 | /* | 628 | /* |
629 | * Read the physical hardware table. Anything here will | 629 | * Read the physical hardware table. Anything here will |
630 | * override the defaults. | 630 | * override the defaults. |
631 | */ | 631 | */ |
632 | if (!smp_read_mpc(phys_to_virt(mpf->mpf_physptr), early)) { | 632 | if (!smp_read_mpc(phys_to_virt(mpf->physptr), early)) { |
633 | #ifdef CONFIG_X86_LOCAL_APIC | 633 | #ifdef CONFIG_X86_LOCAL_APIC |
634 | smp_found_config = 0; | 634 | smp_found_config = 0; |
635 | #endif | 635 | #endif |
@@ -696,10 +696,10 @@ static int __init smp_scan_config(unsigned long base, unsigned long length, | |||
696 | while (length > 0) { | 696 | while (length > 0) { |
697 | mpf = (struct mpf_intel *)bp; | 697 | mpf = (struct mpf_intel *)bp; |
698 | if ((*bp == SMP_MAGIC_IDENT) && | 698 | if ((*bp == SMP_MAGIC_IDENT) && |
699 | (mpf->mpf_length == 1) && | 699 | (mpf->length == 1) && |
700 | !mpf_checksum((unsigned char *)bp, 16) && | 700 | !mpf_checksum((unsigned char *)bp, 16) && |
701 | ((mpf->mpf_specification == 1) | 701 | ((mpf->specification == 1) |
702 | || (mpf->mpf_specification == 4))) { | 702 | || (mpf->specification == 4))) { |
703 | #ifdef CONFIG_X86_LOCAL_APIC | 703 | #ifdef CONFIG_X86_LOCAL_APIC |
704 | smp_found_config = 1; | 704 | smp_found_config = 1; |
705 | #endif | 705 | #endif |
@@ -712,7 +712,7 @@ static int __init smp_scan_config(unsigned long base, unsigned long length, | |||
712 | return 1; | 712 | return 1; |
713 | reserve_bootmem_generic(virt_to_phys(mpf), PAGE_SIZE, | 713 | reserve_bootmem_generic(virt_to_phys(mpf), PAGE_SIZE, |
714 | BOOTMEM_DEFAULT); | 714 | BOOTMEM_DEFAULT); |
715 | if (mpf->mpf_physptr) { | 715 | if (mpf->physptr) { |
716 | unsigned long size = PAGE_SIZE; | 716 | unsigned long size = PAGE_SIZE; |
717 | #ifdef CONFIG_X86_32 | 717 | #ifdef CONFIG_X86_32 |
718 | /* | 718 | /* |
@@ -721,14 +721,14 @@ static int __init smp_scan_config(unsigned long base, unsigned long length, | |||
721 | * the bottom is mapped now. | 721 | * the bottom is mapped now. |
722 | * PC-9800's MPC table places on the very last | 722 | * PC-9800's MPC table places on the very last |
723 | * of physical memory; so that simply reserving | 723 | * of physical memory; so that simply reserving |
724 | * PAGE_SIZE from mpg->mpf_physptr yields BUG() | 724 | * PAGE_SIZE from mpf->physptr yields BUG() |
725 | * in reserve_bootmem. | 725 | * in reserve_bootmem. |
726 | */ | 726 | */ |
727 | unsigned long end = max_low_pfn * PAGE_SIZE; | 727 | unsigned long end = max_low_pfn * PAGE_SIZE; |
728 | if (mpf->mpf_physptr + size > end) | 728 | if (mpf->physptr + size > end) |
729 | size = end - mpf->mpf_physptr; | 729 | size = end - mpf->physptr; |
730 | #endif | 730 | #endif |
731 | reserve_bootmem_generic(mpf->mpf_physptr, size, | 731 | reserve_bootmem_generic(mpf->physptr, size, |
732 | BOOTMEM_DEFAULT); | 732 | BOOTMEM_DEFAULT); |
733 | } | 733 | } |
734 | 734 | ||
@@ -1013,19 +1013,19 @@ static int __init update_mp_table(void) | |||
1013 | /* | 1013 | /* |
1014 | * Now see if we need to go further. | 1014 | * Now see if we need to go further. |
1015 | */ | 1015 | */ |
1016 | if (mpf->mpf_feature1 != 0) | 1016 | if (mpf->feature1 != 0) |
1017 | return 0; | 1017 | return 0; |
1018 | 1018 | ||
1019 | if (!mpf->mpf_physptr) | 1019 | if (!mpf->physptr) |
1020 | return 0; | 1020 | return 0; |
1021 | 1021 | ||
1022 | mpc = phys_to_virt(mpf->mpf_physptr); | 1022 | mpc = phys_to_virt(mpf->physptr); |
1023 | 1023 | ||
1024 | if (!smp_check_mpc(mpc, oem, str)) | 1024 | if (!smp_check_mpc(mpc, oem, str)) |
1025 | return 0; | 1025 | return 0; |
1026 | 1026 | ||
1027 | printk(KERN_INFO "mpf: %lx\n", virt_to_phys(mpf)); | 1027 | printk(KERN_INFO "mpf: %lx\n", virt_to_phys(mpf)); |
1028 | printk(KERN_INFO "mpf_physptr: %x\n", mpf->mpf_physptr); | 1028 | printk(KERN_INFO "physptr: %x\n", mpf->physptr); |
1029 | 1029 | ||
1030 | if (mpc_new_phys && mpc->length > mpc_new_length) { | 1030 | if (mpc_new_phys && mpc->length > mpc_new_length) { |
1031 | mpc_new_phys = 0; | 1031 | mpc_new_phys = 0; |
@@ -1046,23 +1046,23 @@ static int __init update_mp_table(void) | |||
1046 | } | 1046 | } |
1047 | printk(KERN_INFO "use in-positon replacing\n"); | 1047 | printk(KERN_INFO "use in-positon replacing\n"); |
1048 | } else { | 1048 | } else { |
1049 | mpf->mpf_physptr = mpc_new_phys; | 1049 | mpf->physptr = mpc_new_phys; |
1050 | mpc_new = phys_to_virt(mpc_new_phys); | 1050 | mpc_new = phys_to_virt(mpc_new_phys); |
1051 | memcpy(mpc_new, mpc, mpc->length); | 1051 | memcpy(mpc_new, mpc, mpc->length); |
1052 | mpc = mpc_new; | 1052 | mpc = mpc_new; |
1053 | /* check if we can modify that */ | 1053 | /* check if we can modify that */ |
1054 | if (mpc_new_phys - mpf->mpf_physptr) { | 1054 | if (mpc_new_phys - mpf->physptr) { |
1055 | struct mpf_intel *mpf_new; | 1055 | struct mpf_intel *mpf_new; |
1056 | /* steal 16 bytes from [0, 1k) */ | 1056 | /* steal 16 bytes from [0, 1k) */ |
1057 | printk(KERN_INFO "mpf new: %x\n", 0x400 - 16); | 1057 | printk(KERN_INFO "mpf new: %x\n", 0x400 - 16); |
1058 | mpf_new = phys_to_virt(0x400 - 16); | 1058 | mpf_new = phys_to_virt(0x400 - 16); |
1059 | memcpy(mpf_new, mpf, 16); | 1059 | memcpy(mpf_new, mpf, 16); |
1060 | mpf = mpf_new; | 1060 | mpf = mpf_new; |
1061 | mpf->mpf_physptr = mpc_new_phys; | 1061 | mpf->physptr = mpc_new_phys; |
1062 | } | 1062 | } |
1063 | mpf->mpf_checksum = 0; | 1063 | mpf->checksum = 0; |
1064 | mpf->mpf_checksum -= mpf_checksum((unsigned char *)mpf, 16); | 1064 | mpf->checksum -= mpf_checksum((unsigned char *)mpf, 16); |
1065 | printk(KERN_INFO "mpf_physptr new: %x\n", mpf->mpf_physptr); | 1065 | printk(KERN_INFO "physptr new: %x\n", mpf->physptr); |
1066 | } | 1066 | } |
1067 | 1067 | ||
1068 | /* | 1068 | /* |