lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_7716E99906A9D63D4592EFB6@qq.com>
Date:   Tue, 26 Sep 2017 09:48:01 +0800
From:   "陈华才" <chenhc@...ote.com>
To:     "Christoph Hellwig" <hch@....de>
Cc:     "Christoph Hellwig" <hch@....de>,
        "Marek Szyprowski" <m.szyprowski@...sung.com>,
        "Robin Murphy" <robin.murphy@....com>,
        "Andrew Morton" <akpm@...ux-foundation.org>,
        "Fuxin Zhang" <zhangfx@...ote.com>,
        "linux-kernel" <linux-kernel@...r.kernel.org>,
        "Ralf Baechle" <ralf@...ux-mips.org>,
        "James Hogan" <james.hogan@...tec.com>,
        "linux-mips" <linux-mips@...ux-mips.org>,
        "James E . J . Bottomley" 
        <jejb@...ux.vnet.ibm.com>,
        "Martin K . Petersen" 
        <martin.petersen@...cle.com>,
        "linux-scsi" <linux-scsi@...r.kernel.org>,
        "Roland Dreier" <rolandd@...co.com>,
        "Pawel Osciak" <pawel@...iak.com>,
        "Kyungmin Park" <kyungmin.park@...sung.com>,
        "Michael Chan" <michael.chan@...adcom.com>,
        "Benjamin Herrenschmidt" 
        <benh@...nel.crashing.org>,
        "Ivan Mikhaylov" <ivan@...ibm.com>,
        "Tariq Toukan" <tariqt@...lanox.com>,
        "Andy Gross" <agross@...eaurora.org>,
        "Mark A . Greer" <mgreer@...sta.com>,
        "Robert Baldyga" <r.baldyga@...sung.com>,
        "stable" <stable@...r.kernel.org>
Subject: Re: [PATCH V7 1/2] dma-mapping: Rework dma_get_cache_alignment()

Hi, Christoph,

Can I put the declaration in asm/dma-coherence.h?

And, last time you said it is OK to pass a NULL to dma_get_cache_alignment() and cc all driver maintainers. I have do so.

Huacai

------------------ Original ------------------
From:  "Christoph Hellwig"<hch@....de>;
Date:  Mon, Sep 25, 2017 08:51 PM
To:  "Huacai Chen"<chenhc@...ote.com>; 
Cc:  "Christoph Hellwig"<hch@....de>; "Marek Szyprowski"<m.szyprowski@...sung.com>; "Robin Murphy"<robin.murphy@....com>; "Andrew Morton"<akpm@...ux-foundation.org>; "Fuxin Zhang"<zhangfx@...ote.com>; "linux-kernel"<linux-kernel@...r.kernel.org>; "Ralf Baechle"<ralf@...ux-mips.org>; "James Hogan"<james.hogan@...tec.com>; "linux-mips"<linux-mips@...ux-mips.org>; "James E . J . Bottomley"<jejb@...ux.vnet.ibm.com>; "Martin K . Petersen"<martin.petersen@...cle.com>; "linux-scsi"<linux-scsi@...r.kernel.org>; "Roland Dreier"<rolandd@...co.com>; "Pawel Osciak"<pawel@...iak.com>; "Kyungmin Park"<kyungmin.park@...sung.com>; "Michael Chan"<michael.chan@...adcom.com>; "Benjamin Herrenschmidt"<benh@...nel.crashing.org>; "Ivan Mikhaylov"<ivan@...ibm.com>; "Tariq Toukan"<tariqt@...lanox.com>; "Andy Gross"<agross@...eaurora.org>; "Mark A . Greer"<mgreer@...sta.com>; "Robert Baldyga"<r.baldyga@...sung.com>; "stable"<stable@...r.kernel.org>; 
Subject:  Re: [PATCH V7 1/2] dma-mapping: Rework dma_get_cache_alignment()

 
> index aba7138..e2c5d9e 100644
> --- a/arch/mips/include/asm/dma-mapping.h
> +++ b/arch/mips/include/asm/dma-mapping.h
> @@ -39,4 +39,6 @@ static inline void arch_setup_dma_ops(struct device *dev, u64 dma_base,
>  #endif
>  }
>  
> +int mips_get_cache_alignment(struct device *dev);

All the other mips generic dma helpers are prefixed mips_dma_*
so it might make sense to follow that.

Also please don't add arch-local helpers to asm/dma-mapping.h - this
is a header used by linux/dma-mapping.h and should not contain
implementation details if avoidable.

> +					   dma_get_cache_alignment(NULL)) / mdev->limits.mtt_seg_size;

As said before - please don't pass NULL to this function but the proper
device, which would be &mdev->pdev->dev in this case for example.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ