Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3875c5c0 authored by David S. Miller's avatar David S. Miller
Browse files

[SPARC64]: Kill pci_controller->pbms_same_domain



We don't do the "Simba APB is a PBM" bogosity for Sabre
controllers any longer, so this pbms_same_domain thing
is no longer necessary.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8d3aee93
Loading
Loading
Loading
Loading
+12 −63
Original line number Original line Diff line number Diff line
@@ -857,36 +857,6 @@ static int __pci_mmap_make_offset_bus(struct pci_dev *pdev, struct vm_area_struc
	unsigned long space_size, user_offset, user_size;
	unsigned long space_size, user_offset, user_size;


	p = pbm->parent;
	p = pbm->parent;
	if (p->pbms_same_domain) {
		unsigned long lowest, highest;

		lowest = ~0UL; highest = 0UL;
		if (mmap_state == pci_mmap_io) {
			if (p->pbm_A.io_space.flags) {
				lowest = p->pbm_A.io_space.start;
				highest = p->pbm_A.io_space.end + 1;
			}
			if (p->pbm_B.io_space.flags) {
				if (lowest > p->pbm_B.io_space.start)
					lowest = p->pbm_B.io_space.start;
				if (highest < p->pbm_B.io_space.end + 1)
					highest = p->pbm_B.io_space.end + 1;
			}
			space_size = highest - lowest;
		} else {
			if (p->pbm_A.mem_space.flags) {
				lowest = p->pbm_A.mem_space.start;
				highest = p->pbm_A.mem_space.end + 1;
			}
			if (p->pbm_B.mem_space.flags) {
				if (lowest > p->pbm_B.mem_space.start)
					lowest = p->pbm_B.mem_space.start;
				if (highest < p->pbm_B.mem_space.end + 1)
					highest = p->pbm_B.mem_space.end + 1;
			}
			space_size = highest - lowest;
		}
	} else {
	if (mmap_state == pci_mmap_io) {
	if (mmap_state == pci_mmap_io) {
		space_size = (pbm->io_space.end -
		space_size = (pbm->io_space.end -
			      pbm->io_space.start) + 1;
			      pbm->io_space.start) + 1;
@@ -894,7 +864,6 @@ static int __pci_mmap_make_offset_bus(struct pci_dev *pdev, struct vm_area_struc
		space_size = (pbm->mem_space.end -
		space_size = (pbm->mem_space.end -
			      pbm->mem_space.start) + 1;
			      pbm->mem_space.start) + 1;
	}
	}
	}


	/* Make sure the request is in range. */
	/* Make sure the request is in range. */
	user_offset = vma->vm_pgoff << PAGE_SHIFT;
	user_offset = vma->vm_pgoff << PAGE_SHIFT;
@@ -904,24 +873,6 @@ static int __pci_mmap_make_offset_bus(struct pci_dev *pdev, struct vm_area_struc
	    (user_offset + user_size) > space_size)
	    (user_offset + user_size) > space_size)
		return -EINVAL;
		return -EINVAL;


	if (p->pbms_same_domain) {
		unsigned long lowest = ~0UL;

		if (mmap_state == pci_mmap_io) {
			if (p->pbm_A.io_space.flags)
				lowest = p->pbm_A.io_space.start;
			if (p->pbm_B.io_space.flags &&
			    lowest > p->pbm_B.io_space.start)
				lowest = p->pbm_B.io_space.start;
		} else {
			if (p->pbm_A.mem_space.flags)
				lowest = p->pbm_A.mem_space.start;
			if (p->pbm_B.mem_space.flags &&
			    lowest > p->pbm_B.mem_space.start)
				lowest = p->pbm_B.mem_space.start;
		}
		vma->vm_pgoff = (lowest + user_offset) >> PAGE_SHIFT;
	} else {
	if (mmap_state == pci_mmap_io) {
	if (mmap_state == pci_mmap_io) {
		vma->vm_pgoff = (pbm->io_space.start +
		vma->vm_pgoff = (pbm->io_space.start +
				 user_offset) >> PAGE_SHIFT;
				 user_offset) >> PAGE_SHIFT;
@@ -929,7 +880,6 @@ static int __pci_mmap_make_offset_bus(struct pci_dev *pdev, struct vm_area_struc
		vma->vm_pgoff = (pbm->mem_space.start +
		vma->vm_pgoff = (pbm->mem_space.start +
				 user_offset) >> PAGE_SHIFT;
				 user_offset) >> PAGE_SHIFT;
	}
	}
	}


	return 0;
	return 0;
}
}
@@ -1062,7 +1012,6 @@ int pci_domain_nr(struct pci_bus *pbus)
		struct pci_controller_info *p = pbm->parent;
		struct pci_controller_info *p = pbm->parent;


		ret = p->index;
		ret = p->index;
		if (p->pbms_same_domain == 0)
		ret = ((ret << 1) +
		ret = ((ret << 1) +
		       ((pbm == &pbm->parent->pbm_B) ? 1 : 0));
		       ((pbm == &pbm->parent->pbm_B) ? 1 : 0));
	}
	}
+0 −1
Original line number Original line Diff line number Diff line
@@ -1163,7 +1163,6 @@ void psycho_init(struct device_node *dp, char *model_name)
	p->pbm_A.portid = upa_portid;
	p->pbm_A.portid = upa_portid;
	p->pbm_B.portid = upa_portid;
	p->pbm_B.portid = upa_portid;
	p->index = pci_num_controllers++;
	p->index = pci_num_controllers++;
	p->pbms_same_domain = 0;
	p->scan_bus = psycho_scan_bus;
	p->scan_bus = psycho_scan_bus;
	p->pci_ops = &psycho_ops;
	p->pci_ops = &psycho_ops;


+0 −1
Original line number Original line Diff line number Diff line
@@ -1052,7 +1052,6 @@ void sabre_init(struct device_node *dp, char *model_name)


	p->pbm_A.portid = upa_portid;
	p->pbm_A.portid = upa_portid;
	p->index = pci_num_controllers++;
	p->index = pci_num_controllers++;
	p->pbms_same_domain = 1;
	p->scan_bus = sabre_scan_bus;
	p->scan_bus = sabre_scan_bus;
	p->pci_ops = &sabre_ops;
	p->pci_ops = &sabre_ops;


+0 −1
Original line number Original line Diff line number Diff line
@@ -1330,7 +1330,6 @@ void sun4v_pci_init(struct device_node *dp, char *model_name)
	pci_controller_root = p;
	pci_controller_root = p;


	p->index = pci_num_controllers++;
	p->index = pci_num_controllers++;
	p->pbms_same_domain = 0;


	p->scan_bus = pci_sun4v_scan_bus;
	p->scan_bus = pci_sun4v_scan_bus;
#ifdef CONFIG_PCI_MSI
#ifdef CONFIG_PCI_MSI
+0 −3
Original line number Original line Diff line number Diff line
@@ -215,9 +215,6 @@ struct pci_controller_info {
	 */
	 */
	int				index;
	int				index;


	/* Do the PBMs both exist in the same PCI domain? */
	int				pbms_same_domain;

	/* The PCI bus modules controlled by us. */
	/* The PCI bus modules controlled by us. */
	struct pci_pbm_info		pbm_A;
	struct pci_pbm_info		pbm_A;
	struct pci_pbm_info		pbm_B;
	struct pci_pbm_info		pbm_B;