Skip to content

Commit 01d72a9

Browse files
committed
PCI: Remove unused pci_dma_burst_advice()
pci_dma_burst_advice() was added by e24c2d9 ("[PATCH] PCI: DMA bursting advice") but apparently never used. Remove it. Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Michal Simek <[email protected]> # microblaze CC: David S. Miller <[email protected]>
1 parent d59d36a commit 01d72a9

File tree

15 files changed

+0
-200
lines changed

15 files changed

+0
-200
lines changed

arch/alpha/include/asm/pci.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,6 @@ extern void pcibios_set_master(struct pci_dev *dev);
7171
/* implement the pci_ DMA API in terms of the generic device dma_ one */
7272
#include <asm-generic/pci-dma-compat.h>
7373

74-
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
75-
enum pci_dma_burst_strategy *strat,
76-
unsigned long *strategy_parameter)
77-
{
78-
unsigned long cacheline_size;
79-
u8 byte;
80-
81-
pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &byte);
82-
if (byte == 0)
83-
cacheline_size = 1024;
84-
else
85-
cacheline_size = (int) byte * 4;
86-
87-
*strat = PCI_DMA_BURST_BOUNDARY;
88-
*strategy_parameter = cacheline_size;
89-
}
9074
#endif
9175

9276
/* TODO: integrate with include/asm-generic/pci.h ? */

arch/arm/include/asm/pci.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ static inline int pci_proc_domain(struct pci_bus *bus)
3131
*/
3232
#define PCI_DMA_BUS_IS_PHYS (1)
3333

34-
#ifdef CONFIG_PCI
35-
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
36-
enum pci_dma_burst_strategy *strat,
37-
unsigned long *strategy_parameter)
38-
{
39-
*strat = PCI_DMA_BURST_INFINITY;
40-
*strategy_parameter = ~0UL;
41-
}
42-
#endif
43-
4434
#define HAVE_PCI_MMAP
4535
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
4636
enum pci_mmap_state mmap_state, int write_combine);

arch/frv/include/asm/pci.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,6 @@ extern void pci_free_consistent(struct pci_dev *hwdev, size_t size,
4141
/* Return the index of the PCI controller for device PDEV. */
4242
#define pci_controller_num(PDEV) (0)
4343

44-
#ifdef CONFIG_PCI
45-
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
46-
enum pci_dma_burst_strategy *strat,
47-
unsigned long *strategy_parameter)
48-
{
49-
*strat = PCI_DMA_BURST_INFINITY;
50-
*strategy_parameter = ~0UL;
51-
}
52-
#endif
53-
5444
/*
5545
* These are pretty much arbitrary with the CoMEM implementation.
5646
* We have the whole address space to ourselves.

arch/ia64/include/asm/pci.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -52,25 +52,6 @@ extern unsigned long ia64_max_iommu_merge_mask;
5252

5353
#include <asm-generic/pci-dma-compat.h>
5454

55-
#ifdef CONFIG_PCI
56-
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
57-
enum pci_dma_burst_strategy *strat,
58-
unsigned long *strategy_parameter)
59-
{
60-
unsigned long cacheline_size;
61-
u8 byte;
62-
63-
pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &byte);
64-
if (byte == 0)
65-
cacheline_size = 1024;
66-
else
67-
cacheline_size = (int) byte * 4;
68-
69-
*strat = PCI_DMA_BURST_MULTIPLE;
70-
*strategy_parameter = cacheline_size;
71-
}
72-
#endif
73-
7455
#define HAVE_PCI_MMAP
7556
extern int pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma,
7657
enum pci_mmap_state mmap_state, int write_combine);

arch/microblaze/include/asm/pci.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,6 @@ struct pci_dev;
4444
*/
4545
#define pcibios_assign_all_busses() 0
4646

47-
#ifdef CONFIG_PCI
48-
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
49-
enum pci_dma_burst_strategy *strat,
50-
unsigned long *strategy_parameter)
51-
{
52-
*strat = PCI_DMA_BURST_INFINITY;
53-
*strategy_parameter = ~0UL;
54-
}
55-
#endif
56-
5747
extern int pci_domain_nr(struct pci_bus *bus);
5848

5949
/* Decide whether to display the domain number in /proc */

arch/mips/include/asm/pci.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,6 @@ struct pci_dev;
113113
*/
114114
extern unsigned int PCI_DMA_BUS_IS_PHYS;
115115

116-
#ifdef CONFIG_PCI
117-
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
118-
enum pci_dma_burst_strategy *strat,
119-
unsigned long *strategy_parameter)
120-
{
121-
*strat = PCI_DMA_BURST_INFINITY;
122-
*strategy_parameter = ~0UL;
123-
}
124-
#endif
125-
126116
#ifdef CONFIG_PCI_DOMAINS
127117
#define pci_domain_nr(bus) ((struct pci_controller *)(bus)->sysdata)->index
128118

arch/parisc/include/asm/pci.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -196,25 +196,6 @@ static inline void pcibios_register_hba(struct pci_hba_data *x)
196196
/* export the pci_ DMA API in terms of the dma_ one */
197197
#include <asm-generic/pci-dma-compat.h>
198198

199-
#ifdef CONFIG_PCI
200-
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
201-
enum pci_dma_burst_strategy *strat,
202-
unsigned long *strategy_parameter)
203-
{
204-
unsigned long cacheline_size;
205-
u8 byte;
206-
207-
pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &byte);
208-
if (byte == 0)
209-
cacheline_size = 1024;
210-
else
211-
cacheline_size = (int) byte * 4;
212-
213-
*strat = PCI_DMA_BURST_MULTIPLE;
214-
*strategy_parameter = cacheline_size;
215-
}
216-
#endif
217-
218199
static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)
219200
{
220201
return channel ? 15 : 14;

arch/powerpc/include/asm/pci.h

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -71,36 +71,6 @@ extern struct dma_map_ops *get_pci_dma_ops(void);
7171
*/
7272
#define PCI_DISABLE_MWI
7373

74-
#ifdef CONFIG_PCI
75-
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
76-
enum pci_dma_burst_strategy *strat,
77-
unsigned long *strategy_parameter)
78-
{
79-
unsigned long cacheline_size;
80-
u8 byte;
81-
82-
pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &byte);
83-
if (byte == 0)
84-
cacheline_size = 1024;
85-
else
86-
cacheline_size = (int) byte * 4;
87-
88-
*strat = PCI_DMA_BURST_MULTIPLE;
89-
*strategy_parameter = cacheline_size;
90-
}
91-
#endif
92-
93-
#else /* 32-bit */
94-
95-
#ifdef CONFIG_PCI
96-
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
97-
enum pci_dma_burst_strategy *strat,
98-
unsigned long *strategy_parameter)
99-
{
100-
*strat = PCI_DMA_BURST_INFINITY;
101-
*strategy_parameter = ~0UL;
102-
}
103-
#endif
10474
#endif /* CONFIG_PPC64 */
10575

10676
extern int pci_domain_nr(struct pci_bus *bus);

arch/sh/include/asm/pci.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -86,24 +86,6 @@ extern void pcibios_set_master(struct pci_dev *dev);
8686
* direct memory write.
8787
*/
8888
#define PCI_DISABLE_MWI
89-
90-
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
91-
enum pci_dma_burst_strategy *strat,
92-
unsigned long *strategy_parameter)
93-
{
94-
unsigned long cacheline_size;
95-
u8 byte;
96-
97-
pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &byte);
98-
99-
if (byte == 0)
100-
cacheline_size = L1_CACHE_BYTES;
101-
else
102-
cacheline_size = byte << 2;
103-
104-
*strat = PCI_DMA_BURST_MULTIPLE;
105-
*strategy_parameter = cacheline_size;
106-
}
10789
#endif
10890

10991
/* Board-specific fixup routines. */

arch/sparc/include/asm/pci_32.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,6 @@
2222

2323
struct pci_dev;
2424

25-
#ifdef CONFIG_PCI
26-
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
27-
enum pci_dma_burst_strategy *strat,
28-
unsigned long *strategy_parameter)
29-
{
30-
*strat = PCI_DMA_BURST_INFINITY;
31-
*strategy_parameter = ~0UL;
32-
}
33-
#endif
34-
3525
#endif /* __KERNEL__ */
3626

3727
#ifndef CONFIG_LEON_PCI

arch/sparc/include/asm/pci_64.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,6 @@
3131
#define PCI64_REQUIRED_MASK (~(u64)0)
3232
#define PCI64_ADDR_BASE 0xfffc000000000000UL
3333

34-
#ifdef CONFIG_PCI
35-
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
36-
enum pci_dma_burst_strategy *strat,
37-
unsigned long *strategy_parameter)
38-
{
39-
unsigned long cacheline_size;
40-
u8 byte;
41-
42-
pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &byte);
43-
if (byte == 0)
44-
cacheline_size = 1024;
45-
else
46-
cacheline_size = (int) byte * 4;
47-
48-
*strat = PCI_DMA_BURST_BOUNDARY;
49-
*strategy_parameter = cacheline_size;
50-
}
51-
#endif
52-
5334
/* Return the index of the PCI controller for device PDEV. */
5435

5536
int pci_domain_nr(struct pci_bus *bus);

arch/unicore32/include/asm/pci.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@
1818
#include <asm-generic/pci.h>
1919
#include <mach/hardware.h> /* for PCIBIOS_MIN_* */
2020

21-
#ifdef CONFIG_PCI
22-
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
23-
enum pci_dma_burst_strategy *strat,
24-
unsigned long *strategy_parameter)
25-
{
26-
*strat = PCI_DMA_BURST_INFINITY;
27-
*strategy_parameter = ~0UL;
28-
}
29-
#endif
30-
3121
#define HAVE_PCI_MMAP
3222
extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
3323
enum pci_mmap_state mmap_state, int write_combine);

arch/x86/include/asm/pci.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,6 @@ extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
8080

8181
#ifdef CONFIG_PCI
8282
extern void early_quirks(void);
83-
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
84-
enum pci_dma_burst_strategy *strat,
85-
unsigned long *strategy_parameter)
86-
{
87-
*strat = PCI_DMA_BURST_INFINITY;
88-
*strategy_parameter = ~0UL;
89-
}
9083
#else
9184
static inline void early_quirks(void) { }
9285
#endif

drivers/net/ethernet/sun/cassini.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3058,7 +3058,6 @@ static void cas_init_mac(struct cas *cp)
30583058
/* setup core arbitration weight register */
30593059
writel(CAWR_RR_DIS, cp->regs + REG_CAWR);
30603060

3061-
/* XXX Use pci_dma_burst_advice() */
30623061
#if !defined(CONFIG_SPARC64) && !defined(CONFIG_ALPHA)
30633062
/* set the infinite burst register for chips that don't have
30643063
* pci issues.

include/linux/pci.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,15 +1197,6 @@ int pci_set_vga_state(struct pci_dev *pdev, bool decode,
11971197
#define pci_pool_alloc(pool, flags, handle) dma_pool_alloc(pool, flags, handle)
11981198
#define pci_pool_free(pool, vaddr, addr) dma_pool_free(pool, vaddr, addr)
11991199

1200-
enum pci_dma_burst_strategy {
1201-
PCI_DMA_BURST_INFINITY, /* make bursts as large as possible,
1202-
strategy_parameter is N/A */
1203-
PCI_DMA_BURST_BOUNDARY, /* disconnect at every strategy_parameter
1204-
byte boundaries */
1205-
PCI_DMA_BURST_MULTIPLE, /* disconnect at some multiple of
1206-
strategy_parameter byte boundaries */
1207-
};
1208-
12091200
struct msix_entry {
12101201
u32 vector; /* kernel uses to write allocated vector */
12111202
u16 entry; /* driver uses to specify entry, OS writes */
@@ -1430,8 +1421,6 @@ static inline int pci_request_regions(struct pci_dev *dev, const char *res_name)
14301421
{ return -EIO; }
14311422
static inline void pci_release_regions(struct pci_dev *dev) { }
14321423

1433-
#define pci_dma_burst_advice(pdev, strat, strategy_parameter) do { } while (0)
1434-
14351424
static inline void pci_block_cfg_access(struct pci_dev *dev) { }
14361425
static inline int pci_block_cfg_access_in_atomic(struct pci_dev *dev)
14371426
{ return 0; }

0 commit comments

Comments
 (0)