lkml.org 
[lkml]   [2016]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/6] sparc64: Add ATU (new IOMMU) support
From
From: Tushar Dave <tushar.n.dave@oracle.com>
Date: Mon, 10 Oct 2016 11:12:03 -0700

> + /* calculate size of IOTSB */
> + table_size = (atu->size / IO_PAGE_SIZE) * 8;
> + table = kzalloc(table_size, GFP_KERNEL);
> + if (!table) {
> + err = -ENOMEM;
> + goto table_failed;
> + }
> + table = (void *)IO_PAGE_ALIGN((u64)table);

If you use the page allocator directly you can avoid all of these
funny alignment calculations.

> @@ -931,8 +1046,10 @@ static int pci_sun4v_probe(struct platform_device *op)
> struct pci_pbm_info *pbm;
> struct device_node *dp;
> struct iommu *iommu;
> + struct atu *atu;
> u32 devhandle;
> int i, err = -ENODEV;
> + static bool hv_atu = 1;

Please use true/false with boolean variables.

> + hv_atu = 0;

Likewise.

\
 
 \ /
  Last update: 2016-10-24 19:47    [W:0.064 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site