Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1507493 > unrolled thread
| Started by | David Miller <davem@davemloft.net> |
|---|---|
| First post | 2016-10-24 19:50 +0200 |
| Last post | 2016-10-24 22:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 2/6] sparc64: Add ATU (new IOMMU) support David Miller <davem@davemloft.net> - 2016-10-24 19:50 +0200
Re: [PATCH 2/6] sparc64: Add ATU (new IOMMU) support tndave <tushar.n.dave@oracle.com> - 2016-10-24 22:50 +0200
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-10-24 19:50 +0200 |
| Subject | Re: [PATCH 2/6] sparc64: Add ATU (new IOMMU) support |
| Message-ID | <svRxM-2mA-13@gated-at.bofh.it> |
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.
[toc] | [next] | [standalone]
| From | tndave <tushar.n.dave@oracle.com> |
|---|---|
| Date | 2016-10-24 22:50 +0200 |
| Message-ID | <svUlY-4eX-35@gated-at.bofh.it> |
| In reply to | #1507493 |
On 10/24/2016 10:46 AM, David Miller wrote:
> 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.
Okay. I will look into this.
>
>> @@ -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.
Sure.
>
>> + hv_atu = 0;
>
> Likewise.
>
Thanks.
-Tushar
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web