Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'powerpc-6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

- Fix atomic sleep warnings at boot due to get_phb_number() taking a
mutex with a spinlock held on some machines.

- Add missing PMU selftests to .gitignores.

Thanks to Guenter Roeck and Russell Currey.

* tag 'powerpc-6.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
selftests/powerpc: Add missing PMU selftests to .gitignores
powerpc/pci: Fix get_phb_number() locking

+44 -10
+10 -6
arch/powerpc/kernel/pci-common.c
··· 68 68 pci_dma_ops = dma_ops; 69 69 } 70 70 71 - /* 72 - * This function should run under locking protection, specifically 73 - * hose_spinlock. 74 - */ 75 71 static int get_phb_number(struct device_node *dn) 76 72 { 77 73 int ret, phb_id = -1; ··· 104 108 if (!ret) 105 109 phb_id = (int)(prop & (MAX_PHBS - 1)); 106 110 111 + spin_lock(&hose_spinlock); 112 + 107 113 /* We need to be sure to not use the same PHB number twice. */ 108 114 if ((phb_id >= 0) && !test_and_set_bit(phb_id, phb_bitmap)) 109 - return phb_id; 115 + goto out_unlock; 110 116 111 117 /* If everything fails then fallback to dynamic PHB numbering. */ 112 118 phb_id = find_first_zero_bit(phb_bitmap, MAX_PHBS); 113 119 BUG_ON(phb_id >= MAX_PHBS); 114 120 set_bit(phb_id, phb_bitmap); 121 + 122 + out_unlock: 123 + spin_unlock(&hose_spinlock); 115 124 116 125 return phb_id; 117 126 } ··· 128 127 phb = zalloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL); 129 128 if (phb == NULL) 130 129 return NULL; 131 - spin_lock(&hose_spinlock); 130 + 132 131 phb->global_number = get_phb_number(dev); 132 + 133 + spin_lock(&hose_spinlock); 133 134 list_add_tail(&phb->list_node, &hose_list); 134 135 spin_unlock(&hose_spinlock); 136 + 135 137 phb->dn = dev; 136 138 phb->is_dynamic = slab_is_available(); 137 139 #ifdef CONFIG_PPC64
+20
tools/testing/selftests/powerpc/pmu/event_code_tests/.gitignore
··· 1 + blacklisted_events_test 2 + event_alternatives_tests_p10 3 + event_alternatives_tests_p9 4 + generic_events_valid_test 5 + group_constraint_cache_test 6 + group_constraint_l2l3_sel_test 7 + group_constraint_mmcra_sample_test 8 + group_constraint_pmc56_test 9 + group_constraint_pmc_count_test 10 + group_constraint_radix_scope_qual_test 11 + group_constraint_repeat_test 12 + group_constraint_thresh_cmp_test 13 + group_constraint_thresh_ctl_test 14 + group_constraint_thresh_sel_test 15 + group_constraint_unit_test 16 + group_pmc56_exclude_constraints_test 17 + hw_cache_event_type_test 18 + invalid_event_code_test 19 + reserved_bits_mmcra_sample_elig_mode_test 20 + reserved_bits_mmcra_thresh_ctl_test
+14 -4
tools/testing/selftests/powerpc/pmu/sampling_tests/.gitignore
··· 1 - mmcr0_exceptionbits_test 1 + bhrb_filter_map_test 2 + bhrb_no_crash_wo_pmu_test 3 + intr_regs_no_crash_wo_pmu_test 2 4 mmcr0_cc56run_test 3 - mmcr0_pmccext_test 4 - mmcr0_pmcjce_test 5 + mmcr0_exceptionbits_test 5 6 mmcr0_fc56_pmc1ce_test 6 7 mmcr0_fc56_pmc56_test 8 + mmcr0_pmccext_test 9 + mmcr0_pmcjce_test 7 10 mmcr1_comb_test 8 - mmcr2_l2l3_test 11 + mmcr1_sel_unit_cache_test 9 12 mmcr2_fcs_fch_test 13 + mmcr2_l2l3_test 10 14 mmcr3_src_test 15 + mmcra_bhrb_any_test 16 + mmcra_bhrb_cond_test 17 + mmcra_bhrb_disable_no_branch_test 18 + mmcra_bhrb_disable_test 19 + mmcra_bhrb_ind_call_test 20 + mmcra_thresh_cmp_test 11 21 mmcra_thresh_marked_sample_test