Skip to content

Commit

Permalink
Merge tag 'microblaze-v5.18' of git://git.monstr.eu/linux-2.6-microblaze
Browse files Browse the repository at this point in the history
Pull microblaze updates from Michal Simek:

 - Small fixups

 - Remove unused pci_phys_mem_access_prot()

* tag 'microblaze-v5.18' of git://git.monstr.eu/linux-2.6-microblaze:
  microblaze/PCI: Remove pci_phys_mem_access_prot() dead code
  microblaze: add const to of_device_id
  microblaze: fix typo in a comment
  • Loading branch information
Linus Torvalds committed Mar 28, 2022
2 parents d111c9f + fcc6196 commit b83d85a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 55 deletions.
4 changes: 0 additions & 4 deletions arch/microblaze/include/asm/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ extern int pci_mmap_legacy_page_range(struct pci_bus *bus,
extern void pcibios_resource_survey(void);

struct file;
extern pgprot_t pci_phys_mem_access_prot(struct file *file,
unsigned long pfn,
unsigned long size,
pgprot_t prot);

/* This part of code was originally in xilinx-pci.h */
#ifdef CONFIG_PCI_XILINX
Expand Down
2 changes: 1 addition & 1 deletion arch/microblaze/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* 1997-11-28 Modified for POSIX.1b signals by Richard Henderson
*
* This file was was derived from the sh version, arch/sh/kernel/signal.c
* This file was derived from the sh version, arch/sh/kernel/signal.c
*
* This file is subject to the terms and conditions of the GNU General
* Public License. See the file COPYING in the main directory of this
Expand Down
49 changes: 0 additions & 49 deletions arch/microblaze/pci/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,55 +165,6 @@ int pci_iobar_pfn(struct pci_dev *pdev, int bar, struct vm_area_struct *vma)
return 0;
}

/*
* This one is used by /dev/mem and fbdev who have no clue about the
* PCI device, it tries to find the PCI device first and calls the
* above routine
*/
pgprot_t pci_phys_mem_access_prot(struct file *file,
unsigned long pfn,
unsigned long size,
pgprot_t prot)
{
struct pci_dev *pdev = NULL;
struct resource *found = NULL;
resource_size_t offset = ((resource_size_t)pfn) << PAGE_SHIFT;
int i;

if (page_is_ram(pfn))
return prot;

prot = pgprot_noncached(prot);
for_each_pci_dev(pdev) {
for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
struct resource *rp = &pdev->resource[i];
int flags = rp->flags;

/* Active and same type? */
if ((flags & IORESOURCE_MEM) == 0)
continue;
/* In the range of this resource? */
if (offset < (rp->start & PAGE_MASK) ||
offset > rp->end)
continue;
found = rp;
break;
}
if (found)
break;
}
if (found) {
if (found->flags & IORESOURCE_PREFETCH)
prot = pgprot_noncached_wc(prot);
pci_dev_put(pdev);
}

pr_debug("PCI: Non-PCI map for %llx, prot: %lx\n",
(unsigned long long)offset, pgprot_val(prot));

return prot;
}

/* This provides legacy IO read access on a bus */
int pci_legacy_read(struct pci_bus *bus, loff_t port, u32 *val, size_t size)
{
Expand Down
2 changes: 1 addition & 1 deletion arch/microblaze/pci/xilinx_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#define PCI_HOST_ENABLE_CMD (PCI_COMMAND_SERR | PCI_COMMAND_PARITY | \
PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY)

static struct of_device_id xilinx_pci_match[] = {
static const struct of_device_id xilinx_pci_match[] = {
{ .compatible = "xlnx,plbv46-pci-1.03.a", },
{}
};
Expand Down

0 comments on commit b83d85a

Please sign in to comment.