parisc: ccio-dma.c: Added tab instead of spaces

Single spaces has been removed and replaced with tabs.
This is done to maintain code uniformity.

Signed-off-by: Shubhankar Kuranagatti <shubhankarvk@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
Shubhankar Kuranagatti 2021-04-28 21:09:42 +05:30 committed by Helge Deller
parent ab9c13a4b5
commit 8ef5b28d67

View File

@ -111,29 +111,29 @@
#define CMD_TLB_PURGE 33 /* IO_COMMAND to Purge I/O TLB entry */ #define CMD_TLB_PURGE 33 /* IO_COMMAND to Purge I/O TLB entry */
struct ioa_registers { struct ioa_registers {
/* Runway Supervisory Set */ /* Runway Supervisory Set */
int32_t unused1[12]; int32_t unused1[12];
uint32_t io_command; /* Offset 12 */ uint32_t io_command; /* Offset 12 */
uint32_t io_status; /* Offset 13 */ uint32_t io_status; /* Offset 13 */
uint32_t io_control; /* Offset 14 */ uint32_t io_control; /* Offset 14 */
int32_t unused2[1]; int32_t unused2[1];
/* Runway Auxiliary Register Set */ /* Runway Auxiliary Register Set */
uint32_t io_err_resp; /* Offset 0 */ uint32_t io_err_resp; /* Offset 0 */
uint32_t io_err_info; /* Offset 1 */ uint32_t io_err_info; /* Offset 1 */
uint32_t io_err_req; /* Offset 2 */ uint32_t io_err_req; /* Offset 2 */
uint32_t io_err_resp_hi; /* Offset 3 */ uint32_t io_err_resp_hi; /* Offset 3 */
uint32_t io_tlb_entry_m; /* Offset 4 */ uint32_t io_tlb_entry_m; /* Offset 4 */
uint32_t io_tlb_entry_l; /* Offset 5 */ uint32_t io_tlb_entry_l; /* Offset 5 */
uint32_t unused3[1]; uint32_t unused3[1];
uint32_t io_pdir_base; /* Offset 7 */ uint32_t io_pdir_base; /* Offset 7 */
uint32_t io_io_low_hv; /* Offset 8 */ uint32_t io_io_low_hv; /* Offset 8 */
uint32_t io_io_high_hv; /* Offset 9 */ uint32_t io_io_high_hv; /* Offset 9 */
uint32_t unused4[1]; uint32_t unused4[1];
uint32_t io_chain_id_mask; /* Offset 11 */ uint32_t io_chain_id_mask; /* Offset 11 */
uint32_t unused5[2]; uint32_t unused5[2];
uint32_t io_io_low; /* Offset 14 */ uint32_t io_io_low; /* Offset 14 */
uint32_t io_io_high; /* Offset 15 */ uint32_t io_io_high; /* Offset 15 */
}; };
/* /*
@ -198,7 +198,7 @@ struct ioa_registers {
** In order for a Runway address to reside within GSC+ extended address space: ** In order for a Runway address to reside within GSC+ extended address space:
** Runway Address [0:7] must identically compare to 8'b11111111 ** Runway Address [0:7] must identically compare to 8'b11111111
** Runway Address [8:11] must be equal to IO_IO_LOW(_HV)[16:19] ** Runway Address [8:11] must be equal to IO_IO_LOW(_HV)[16:19]
** Runway Address [12:23] must be greater than or equal to ** Runway Address [12:23] must be greater than or equal to
** IO_IO_LOW(_HV)[20:31] and less than IO_IO_HIGH(_HV)[20:31]. ** IO_IO_LOW(_HV)[20:31] and less than IO_IO_HIGH(_HV)[20:31].
** Runway Address [24:39] is not used in the comparison. ** Runway Address [24:39] is not used in the comparison.
** **
@ -226,10 +226,10 @@ struct ioc {
struct ioa_registers __iomem *ioc_regs; /* I/O MMU base address */ struct ioa_registers __iomem *ioc_regs; /* I/O MMU base address */
u8 *res_map; /* resource map, bit == pdir entry */ u8 *res_map; /* resource map, bit == pdir entry */
u64 *pdir_base; /* physical base address */ u64 *pdir_base; /* physical base address */
u32 pdir_size; /* bytes, function of IOV Space size */ u32 pdir_size; /* bytes, function of IOV Space size */
u32 res_hint; /* next available IOVP - u32 res_hint; /* next available IOVP -
circular search */ circular search */
u32 res_size; /* size of resource map in bytes */ u32 res_size; /* size of resource map in bytes */
spinlock_t res_lock; spinlock_t res_lock;
#ifdef CCIO_COLLECT_STATS #ifdef CCIO_COLLECT_STATS
@ -249,7 +249,7 @@ struct ioc {
unsigned short cujo20_bug; unsigned short cujo20_bug;
/* STUFF We don't need in performance path */ /* STUFF We don't need in performance path */
u32 chainid_shift; /* specify bit location of chain_id */ u32 chainid_shift; /* specify bit location of chain_id */
struct ioc *next; /* Linked list of discovered iocs */ struct ioc *next; /* Linked list of discovered iocs */
const char *name; /* device name from firmware */ const char *name; /* device name from firmware */
unsigned int hw_path; /* the hardware path this ioc is associatd with */ unsigned int hw_path; /* the hardware path this ioc is associatd with */
@ -293,7 +293,7 @@ static int ioc_count;
** cause the kernel to panic anyhow. ** cause the kernel to panic anyhow.
*/ */
#define CCIO_SEARCH_LOOP(ioc, res_idx, mask, size) \ #define CCIO_SEARCH_LOOP(ioc, res_idx, mask, size) \
for(; res_ptr < res_end; ++res_ptr) { \ for (; res_ptr < res_end; ++res_ptr) { \
int ret;\ int ret;\
unsigned int idx;\ unsigned int idx;\
idx = (unsigned int)((unsigned long)res_ptr - (unsigned long)ioc->res_map); \ idx = (unsigned int)((unsigned long)res_ptr - (unsigned long)ioc->res_map); \
@ -309,9 +309,9 @@ static int ioc_count;
#define CCIO_FIND_FREE_MAPPING(ioa, res_idx, mask, size) \ #define CCIO_FIND_FREE_MAPPING(ioa, res_idx, mask, size) \
u##size *res_ptr = (u##size *)&((ioc)->res_map[ioa->res_hint & ~((size >> 3) - 1)]); \ u##size *res_ptr = (u##size *)&((ioc)->res_map[ioa->res_hint & ~((size >> 3) - 1)]); \
u##size *res_end = (u##size *)&(ioc)->res_map[ioa->res_size]; \ u##size *res_end = (u##size *)&(ioc)->res_map[ioa->res_size]; \
CCIO_SEARCH_LOOP(ioc, res_idx, mask, size); \ CCIO_SEARCH_LOOP(ioc, res_idx, mask, size); \
res_ptr = (u##size *)&(ioc)->res_map[0]; \ res_ptr = (u##size *)&(ioc)->res_map[0]; \
CCIO_SEARCH_LOOP(ioa, res_idx, mask, size); CCIO_SEARCH_LOOP(ioa, res_idx, mask, size);
/* /*
** Find available bit in this ioa's resource map. ** Find available bit in this ioa's resource map.
@ -348,9 +348,9 @@ ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size)
BUG_ON(pages_needed == 0); BUG_ON(pages_needed == 0);
BUG_ON((pages_needed * IOVP_SIZE) > DMA_CHUNK_SIZE); BUG_ON((pages_needed * IOVP_SIZE) > DMA_CHUNK_SIZE);
DBG_RES("%s() size: %d pages_needed %d\n", DBG_RES("%s() size: %d pages_needed %d\n",
__func__, size, pages_needed); __func__, size, pages_needed);
/* /*
** "seek and ye shall find"...praying never hurts either... ** "seek and ye shall find"...praying never hurts either...
@ -416,7 +416,7 @@ resource_found:
#define CCIO_FREE_MAPPINGS(ioc, res_idx, mask, size) \ #define CCIO_FREE_MAPPINGS(ioc, res_idx, mask, size) \
u##size *res_ptr = (u##size *)&((ioc)->res_map[res_idx]); \ u##size *res_ptr = (u##size *)&((ioc)->res_map[res_idx]); \
BUG_ON((*res_ptr & mask) != mask); \ BUG_ON((*res_ptr & mask) != mask); \
*res_ptr &= ~(mask); *res_ptr &= ~(mask);
/** /**
* ccio_free_range - Free pages from the ioc's resource map. * ccio_free_range - Free pages from the ioc's resource map.
@ -845,7 +845,7 @@ static void *
ccio_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag, ccio_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag,
unsigned long attrs) unsigned long attrs)
{ {
void *ret; void *ret;
#if 0 #if 0
/* GRANT Need to establish hierarchy for non-PCI devs as well /* GRANT Need to establish hierarchy for non-PCI devs as well
** and then provide matching gsc_map_xxx() functions for them as well. ** and then provide matching gsc_map_xxx() functions for them as well.
@ -856,7 +856,7 @@ ccio_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag,
return 0; return 0;
} }
#endif #endif
ret = (void *) __get_free_pages(flag, get_order(size)); ret = (void *) __get_free_pages(flag, get_order(size));
if (ret) { if (ret) {
memset(ret, 0, size); memset(ret, 0, size);
@ -1022,8 +1022,8 @@ static const struct dma_map_ops ccio_ops = {
.free = ccio_free, .free = ccio_free,
.map_page = ccio_map_page, .map_page = ccio_map_page,
.unmap_page = ccio_unmap_page, .unmap_page = ccio_unmap_page,
.map_sg = ccio_map_sg, .map_sg = ccio_map_sg,
.unmap_sg = ccio_unmap_sg, .unmap_sg = ccio_unmap_sg,
.get_sgtable = dma_common_get_sgtable, .get_sgtable = dma_common_get_sgtable,
.alloc_pages = dma_common_alloc_pages, .alloc_pages = dma_common_alloc_pages,
.free_pages = dma_common_free_pages, .free_pages = dma_common_free_pages,
@ -1080,7 +1080,7 @@ static int ccio_proc_info(struct seq_file *m, void *p)
max = ioc->usingle_pages - ioc->usg_pages; max = ioc->usingle_pages - ioc->usg_pages;
seq_printf(m, "pci_unmap_single: %8ld calls %8ld pages (avg %d/1000)\n", seq_printf(m, "pci_unmap_single: %8ld calls %8ld pages (avg %d/1000)\n",
min, max, (int)((max * 1000)/min)); min, max, (int)((max * 1000)/min));
seq_printf(m, "pci_map_sg() : %8ld calls %8ld pages (avg %d/1000)\n", seq_printf(m, "pci_map_sg() : %8ld calls %8ld pages (avg %d/1000)\n",
ioc->msg_calls, ioc->msg_pages, ioc->msg_calls, ioc->msg_pages,
(int)((ioc->msg_pages * 1000)/ioc->msg_calls)); (int)((ioc->msg_pages * 1000)/ioc->msg_calls));
@ -1169,7 +1169,7 @@ void __init ccio_cujo20_fixup(struct parisc_device *cujo, u32 iovp)
idx = PDIR_INDEX(iovp) >> 3; idx = PDIR_INDEX(iovp) >> 3;
while (idx < ioc->res_size) { while (idx < ioc->res_size) {
res_ptr[idx] |= 0xff; res_ptr[idx] |= 0xff;
idx += PDIR_INDEX(CUJO_20_STEP) >> 3; idx += PDIR_INDEX(CUJO_20_STEP) >> 3;
} }
} }
@ -1297,7 +1297,7 @@ ccio_ioc_init(struct ioc *ioc)
DBG_INIT(" base %p\n", ioc->pdir_base); DBG_INIT(" base %p\n", ioc->pdir_base);
/* resource map size dictated by pdir_size */ /* resource map size dictated by pdir_size */
ioc->res_size = (ioc->pdir_size / sizeof(u64)) >> 3; ioc->res_size = (ioc->pdir_size / sizeof(u64)) >> 3;
DBG_INIT("%s() res_size 0x%x\n", __func__, ioc->res_size); DBG_INIT("%s() res_size 0x%x\n", __func__, ioc->res_size);
ioc->res_map = (u8 *)__get_free_pages(GFP_KERNEL, ioc->res_map = (u8 *)__get_free_pages(GFP_KERNEL,