Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75216
b: refs/heads/master
c: c68cb23
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Dec 27, 2007
1 parent 8df3fa2 commit 2de4acf
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6c05c3d064dbb83be88cba3189beb5db9d2dfc3
refs/heads/master: c68cb23dde29fb107575656effa46f7b9440ac04
16 changes: 16 additions & 0 deletions trunk/arch/sparc64/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1275,4 +1275,20 @@ int pci_dma_supported(struct pci_dev *pdev, u64 device_mask)
return (device_mask & dma_addr_mask) == dma_addr_mask;
}

void pci_resource_to_user(const struct pci_dev *pdev, int bar,
const struct resource *rp, resource_size_t *start,
resource_size_t *end)
{
struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller;
unsigned long offset;

if (rp->flags & IORESOURCE_IO)
offset = pbm->io_space.start;
else
offset = pbm->mem_space.start;

*start = rp->start - offset;
*end = rp->end - offset;
}

#endif /* !(CONFIG_PCI) */
3 changes: 0 additions & 3 deletions trunk/include/asm-generic/tlb.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ tlb_flush_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
static inline void
tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end)
{
#ifdef CONFIG_QUICKLIST
tlb->need_flush += &__get_cpu_var(quicklist)[0].nr_pages != 0;
#endif
tlb_flush_mmu(tlb, start, end);

/* keep the page table cache within bounds */
Expand Down
4 changes: 4 additions & 0 deletions trunk/include/asm-sparc64/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
struct device_node;
extern struct device_node *pci_device_to_OF_node(struct pci_dev *pdev);

#define HAVE_ARCH_PCI_RESOURCE_TO_USER
extern void pci_resource_to_user(const struct pci_dev *dev, int bar,
const struct resource *rsrc,
resource_size_t *start, resource_size_t *end);
#endif /* __KERNEL__ */

#endif /* __SPARC64_PCI_H */

0 comments on commit 2de4acf

Please sign in to comment.