@@ -579,7 +579,8 @@ static void __init pci_mmcfg_reject_broken(int early)
579
579
580
580
list_for_each_entry (cfg , & pci_mmcfg_list , list ) {
581
581
if (pci_mmcfg_check_reserved (NULL , cfg , early ) == 0 ) {
582
- pr_info (PREFIX "not using MMCONFIG\n" );
582
+ pr_info (PREFIX "not using MMCONFIG (%pR not reserved)\n" ,
583
+ & cfg -> res );
583
584
free_all_mmcfg ();
584
585
return ;
585
586
}
@@ -676,6 +677,8 @@ static int pci_mmcfg_for_each_region(int (*func)(__u64 start, __u64 size,
676
677
677
678
static void __init __pci_mmcfg_init (int early )
678
679
{
680
+ pr_debug (PREFIX "%s(%s)\n" , __func__ , early ? "early" : "late" );
681
+
679
682
pci_mmcfg_reject_broken (early );
680
683
if (list_empty (& pci_mmcfg_list ))
681
684
return ;
@@ -702,6 +705,8 @@ static int __initdata known_bridge;
702
705
703
706
void __init pci_mmcfg_early_init (void )
704
707
{
708
+ pr_debug (PREFIX "%s() pci_probe %#x\n" , __func__ , pci_probe );
709
+
705
710
if (pci_probe & PCI_PROBE_MMCONF ) {
706
711
if (pci_mmcfg_check_hostbridge ())
707
712
known_bridge = 1 ;
@@ -715,6 +720,8 @@ void __init pci_mmcfg_early_init(void)
715
720
716
721
void __init pci_mmcfg_late_init (void )
717
722
{
723
+ pr_debug (PREFIX "%s() pci_probe %#x\n" , __func__ , pci_probe );
724
+
718
725
/* MMCONFIG disabled */
719
726
if ((pci_probe & PCI_PROBE_MMCONF ) == 0 )
720
727
return ;
@@ -735,6 +742,8 @@ static int __init pci_mmcfg_late_insert_resources(void)
735
742
736
743
pci_mmcfg_running_state = true;
737
744
745
+ pr_debug (PREFIX "%s() pci_probe %#x\n" , __func__ , pci_probe );
746
+
738
747
/* If we are not using MMCONFIG, don't insert the resources. */
739
748
if ((pci_probe & PCI_PROBE_MMCONF ) == 0 )
740
749
return 1 ;
@@ -744,9 +753,12 @@ static int __init pci_mmcfg_late_insert_resources(void)
744
753
* marked so it won't cause request errors when __request_region is
745
754
* called.
746
755
*/
747
- list_for_each_entry (cfg , & pci_mmcfg_list , list )
748
- if (!cfg -> res .parent )
756
+ list_for_each_entry (cfg , & pci_mmcfg_list , list ) {
757
+ if (!cfg -> res .parent ) {
758
+ pr_debug (PREFIX "%s() insert %pR\n" , __func__ , & cfg -> res );
749
759
insert_resource (& iomem_resource , & cfg -> res );
760
+ }
761
+ }
750
762
751
763
return 0 ;
752
764
}
@@ -766,6 +778,8 @@ int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end,
766
778
struct resource * tmp = NULL ;
767
779
struct pci_mmcfg_region * cfg ;
768
780
781
+ dev_dbg (dev , "%s(%04x [bus %02x-%02x])\n" , __func__ , seg , start , end );
782
+
769
783
if (!(pci_probe & PCI_PROBE_MMCONF ) || pci_mmcfg_arch_init_failed )
770
784
return - ENODEV ;
771
785
@@ -810,8 +824,7 @@ int pci_mmconfig_insert(struct device *dev, u16 seg, u8 start, u8 end,
810
824
"%s %pR\n" ,
811
825
& cfg -> res , tmp -> name , tmp );
812
826
} else if (pci_mmcfg_arch_map (cfg )) {
813
- dev_warn (dev , "fail to map MMCONFIG %pR.\n" ,
814
- & cfg -> res );
827
+ dev_warn (dev , "fail to map MMCONFIG %pR\n" , & cfg -> res );
815
828
} else {
816
829
list_add_sorted (cfg );
817
830
dev_info (dev , "MMCONFIG at %pR (base %#lx)\n" ,
0 commit comments