diff options
Diffstat (limited to 'arch/sparc/kernel/mdesc.c')
-rw-r--r-- | arch/sparc/kernel/mdesc.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/sparc/kernel/mdesc.c b/arch/sparc/kernel/mdesc.c index 831c001604e8..b90bf23e3aab 100644 --- a/arch/sparc/kernel/mdesc.c +++ b/arch/sparc/kernel/mdesc.c | |||
@@ -571,9 +571,7 @@ static void __init report_platform_properties(void) | |||
571 | mdesc_release(hp); | 571 | mdesc_release(hp); |
572 | } | 572 | } |
573 | 573 | ||
574 | static void __cpuinit fill_in_one_cache(cpuinfo_sparc *c, | 574 | static void fill_in_one_cache(cpuinfo_sparc *c, struct mdesc_handle *hp, u64 mp) |
575 | struct mdesc_handle *hp, | ||
576 | u64 mp) | ||
577 | { | 575 | { |
578 | const u64 *level = mdesc_get_property(hp, mp, "level", NULL); | 576 | const u64 *level = mdesc_get_property(hp, mp, "level", NULL); |
579 | const u64 *size = mdesc_get_property(hp, mp, "size", NULL); | 577 | const u64 *size = mdesc_get_property(hp, mp, "size", NULL); |
@@ -616,7 +614,7 @@ static void __cpuinit fill_in_one_cache(cpuinfo_sparc *c, | |||
616 | } | 614 | } |
617 | } | 615 | } |
618 | 616 | ||
619 | static void __cpuinit mark_core_ids(struct mdesc_handle *hp, u64 mp, int core_id) | 617 | static void mark_core_ids(struct mdesc_handle *hp, u64 mp, int core_id) |
620 | { | 618 | { |
621 | u64 a; | 619 | u64 a; |
622 | 620 | ||
@@ -649,7 +647,7 @@ static void __cpuinit mark_core_ids(struct mdesc_handle *hp, u64 mp, int core_id | |||
649 | } | 647 | } |
650 | } | 648 | } |
651 | 649 | ||
652 | static void __cpuinit set_core_ids(struct mdesc_handle *hp) | 650 | static void set_core_ids(struct mdesc_handle *hp) |
653 | { | 651 | { |
654 | int idx; | 652 | int idx; |
655 | u64 mp; | 653 | u64 mp; |
@@ -674,7 +672,7 @@ static void __cpuinit set_core_ids(struct mdesc_handle *hp) | |||
674 | } | 672 | } |
675 | } | 673 | } |
676 | 674 | ||
677 | static void __cpuinit mark_proc_ids(struct mdesc_handle *hp, u64 mp, int proc_id) | 675 | static void mark_proc_ids(struct mdesc_handle *hp, u64 mp, int proc_id) |
678 | { | 676 | { |
679 | u64 a; | 677 | u64 a; |
680 | 678 | ||
@@ -693,7 +691,7 @@ static void __cpuinit mark_proc_ids(struct mdesc_handle *hp, u64 mp, int proc_id | |||
693 | } | 691 | } |
694 | } | 692 | } |
695 | 693 | ||
696 | static void __cpuinit __set_proc_ids(struct mdesc_handle *hp, const char *exec_unit_name) | 694 | static void __set_proc_ids(struct mdesc_handle *hp, const char *exec_unit_name) |
697 | { | 695 | { |
698 | int idx; | 696 | int idx; |
699 | u64 mp; | 697 | u64 mp; |
@@ -714,14 +712,14 @@ static void __cpuinit __set_proc_ids(struct mdesc_handle *hp, const char *exec_u | |||
714 | } | 712 | } |
715 | } | 713 | } |
716 | 714 | ||
717 | static void __cpuinit set_proc_ids(struct mdesc_handle *hp) | 715 | static void set_proc_ids(struct mdesc_handle *hp) |
718 | { | 716 | { |
719 | __set_proc_ids(hp, "exec_unit"); | 717 | __set_proc_ids(hp, "exec_unit"); |
720 | __set_proc_ids(hp, "exec-unit"); | 718 | __set_proc_ids(hp, "exec-unit"); |
721 | } | 719 | } |
722 | 720 | ||
723 | static void __cpuinit get_one_mondo_bits(const u64 *p, unsigned int *mask, | 721 | static void get_one_mondo_bits(const u64 *p, unsigned int *mask, |
724 | unsigned long def, unsigned long max) | 722 | unsigned long def, unsigned long max) |
725 | { | 723 | { |
726 | u64 val; | 724 | u64 val; |
727 | 725 | ||
@@ -742,8 +740,8 @@ use_default: | |||
742 | *mask = ((1U << def) * 64U) - 1U; | 740 | *mask = ((1U << def) * 64U) - 1U; |
743 | } | 741 | } |
744 | 742 | ||
745 | static void __cpuinit get_mondo_data(struct mdesc_handle *hp, u64 mp, | 743 | static void get_mondo_data(struct mdesc_handle *hp, u64 mp, |
746 | struct trap_per_cpu *tb) | 744 | struct trap_per_cpu *tb) |
747 | { | 745 | { |
748 | static int printed; | 746 | static int printed; |
749 | const u64 *val; | 747 | const u64 *val; |
@@ -769,7 +767,7 @@ static void __cpuinit get_mondo_data(struct mdesc_handle *hp, u64 mp, | |||
769 | } | 767 | } |
770 | } | 768 | } |
771 | 769 | ||
772 | static void * __cpuinit mdesc_iterate_over_cpus(void *(*func)(struct mdesc_handle *, u64, int, void *), void *arg, cpumask_t *mask) | 770 | static void *mdesc_iterate_over_cpus(void *(*func)(struct mdesc_handle *, u64, int, void *), void *arg, cpumask_t *mask) |
773 | { | 771 | { |
774 | struct mdesc_handle *hp = mdesc_grab(); | 772 | struct mdesc_handle *hp = mdesc_grab(); |
775 | void *ret = NULL; | 773 | void *ret = NULL; |
@@ -799,7 +797,8 @@ out: | |||
799 | return ret; | 797 | return ret; |
800 | } | 798 | } |
801 | 799 | ||
802 | static void * __cpuinit record_one_cpu(struct mdesc_handle *hp, u64 mp, int cpuid, void *arg) | 800 | static void *record_one_cpu(struct mdesc_handle *hp, u64 mp, int cpuid, |
801 | void *arg) | ||
803 | { | 802 | { |
804 | ncpus_probed++; | 803 | ncpus_probed++; |
805 | #ifdef CONFIG_SMP | 804 | #ifdef CONFIG_SMP |
@@ -808,7 +807,7 @@ static void * __cpuinit record_one_cpu(struct mdesc_handle *hp, u64 mp, int cpui | |||
808 | return NULL; | 807 | return NULL; |
809 | } | 808 | } |
810 | 809 | ||
811 | void __cpuinit mdesc_populate_present_mask(cpumask_t *mask) | 810 | void mdesc_populate_present_mask(cpumask_t *mask) |
812 | { | 811 | { |
813 | if (tlb_type != hypervisor) | 812 | if (tlb_type != hypervisor) |
814 | return; | 813 | return; |
@@ -841,7 +840,8 @@ void __init mdesc_get_page_sizes(cpumask_t *mask, unsigned long *pgsz_mask) | |||
841 | mdesc_iterate_over_cpus(check_one_pgsz, pgsz_mask, mask); | 840 | mdesc_iterate_over_cpus(check_one_pgsz, pgsz_mask, mask); |
842 | } | 841 | } |
843 | 842 | ||
844 | static void * __cpuinit fill_in_one_cpu(struct mdesc_handle *hp, u64 mp, int cpuid, void *arg) | 843 | static void *fill_in_one_cpu(struct mdesc_handle *hp, u64 mp, int cpuid, |
844 | void *arg) | ||
845 | { | 845 | { |
846 | const u64 *cfreq = mdesc_get_property(hp, mp, "clock-frequency", NULL); | 846 | const u64 *cfreq = mdesc_get_property(hp, mp, "clock-frequency", NULL); |
847 | struct trap_per_cpu *tb; | 847 | struct trap_per_cpu *tb; |
@@ -890,7 +890,7 @@ static void * __cpuinit fill_in_one_cpu(struct mdesc_handle *hp, u64 mp, int cpu | |||
890 | return NULL; | 890 | return NULL; |
891 | } | 891 | } |
892 | 892 | ||
893 | void __cpuinit mdesc_fill_in_cpu_data(cpumask_t *mask) | 893 | void mdesc_fill_in_cpu_data(cpumask_t *mask) |
894 | { | 894 | { |
895 | struct mdesc_handle *hp; | 895 | struct mdesc_handle *hp; |
896 | 896 | ||