Linux MIPS Architecture development
 help / color / mirror / Atom feed
  • * Re: [PATCH V8 1/5] dma-mapping: Rework dma_get_cache_alignment()
           [not found] <1508227542-13165-1-git-send-email-chenhc@lemote.com>
           [not found] ` <1508227542-13165-5-git-send-email-chenhc@lemote.com>
    @ 2017-10-18 17:23 ` Mark Greer
      2017-10-19 15:09   ` Christoph Hellwig
           [not found] ` <1508227542-13165-3-git-send-email-chenhc@lemote.com>
           [not found] ` <CGME20171017080448epcas5p2c7c53292d84838f6d06e78abf4416729@epcas5p2.samsung.com>
      3 siblings, 1 reply; 12+ messages in thread
    From: Mark Greer @ 2017-10-18 17:23 UTC (permalink / raw)
      To: Huacai Chen
      Cc: Christoph Hellwig, Marek Szyprowski, Robin Murphy, Andrew Morton,
    	Fuxin Zhang, linux-kernel, Ralf Baechle, James Hogan, linux-mips,
    	James E . J . Bottomley, Martin K . Petersen, linux-scsi,
    	Tejun Heo, linux-ide, stable, Michael S . Tsirkin, Pawel Osciak,
    	Kyungmin Park, Michael Chan, Benjamin Herrenschmidt,
    	Ivan Mikhaylov, Tariq Toukan, Andy Gross, Mark A . Greer,
    	Robert Baldyga
    
    On Tue, Oct 17, 2017 at 04:05:38PM +0800, Huacai Chen wrote:
    > Make dma_get_cache_alignment() to accept a 'dev' argument. As a result,
    > it can return different alignments due to different devices' I/O cache
    > coherency.
    > 
    > Currently, ARM/ARM64 and MIPS support coherent & noncoherent devices
    > co-exist. This may be extended in the future, so add a new function
    > pointer (i.e, get_cache_alignment) in 'struct dma_map_ops' as a generic
    > solution.
    
    Hi Huacai.
    
    > diff --git a/drivers/tty/serial/mpsc.c b/drivers/tty/serial/mpsc.c
    > index 67ffecc..c708457 100644
    > --- a/drivers/tty/serial/mpsc.c
    > +++ b/drivers/tty/serial/mpsc.c
    > @@ -81,19 +81,19 @@
    >   * Number of Tx & Rx descriptors must be powers of 2.
    >   */
    >  #define	MPSC_RXR_ENTRIES	32
    > -#define	MPSC_RXRE_SIZE		dma_get_cache_alignment()
    > +#define	MPSC_RXRE_SIZE		dma_get_cache_alignment(dma_dev)
    
    I would much prefer that you add a parameter to the macro to avoid forcing
    a non-flexible and non-obvious variable definition wherever it is used.
    What I mean is something like:
    
    #define MPSC_RXRE_SIZE(d)		dma_get_cache_alignment(d)
    
    Similarly for all of the other macros and where they're used.
    
    Thanks,
    
    Mark
    --
    
    ^ permalink raw reply	[flat|nested] 12+ messages in thread
  • [parent not found: <1508227542-13165-3-git-send-email-chenhc@lemote.com>]
  • [parent not found: <CGME20171017080448epcas5p2c7c53292d84838f6d06e78abf4416729@epcas5p2.samsung.com>]

  • end of thread, other threads:[~2017-10-19 23:53 UTC | newest]
    
    Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
    -- links below jump to the message on this page --
         [not found] <1508227542-13165-1-git-send-email-chenhc@lemote.com>
         [not found] ` <1508227542-13165-5-git-send-email-chenhc@lemote.com>
    2017-10-17  9:43   ` [PATCH V8 5/5] libata: Align DMA buffer to dma_get_cache_alignment() Sergei Shtylyov
    2017-10-18 19:54     ` Alan Cox
    2017-10-18 13:03   ` Tejun Heo
    2017-10-19  7:52     ` Matt Redfearn
    2017-10-19  7:52       ` Matt Redfearn
    2017-10-18 17:23 ` [PATCH V8 1/5] dma-mapping: Rework dma_get_cache_alignment() Mark Greer
    2017-10-19 15:09   ` Christoph Hellwig
         [not found] ` <1508227542-13165-3-git-send-email-chenhc@lemote.com>
    2017-10-19 15:10   ` [PATCH V8 3/5] scsi: Align block queue to dma_get_cache_alignment() Christoph Hellwig
         [not found] ` <CGME20171017080448epcas5p2c7c53292d84838f6d06e78abf4416729@epcas5p2.samsung.com>
         [not found]   ` <1508227542-13165-4-git-send-email-chenhc@lemote.com>
    2017-10-17 11:55     ` [PATCH V8 4/5] libsas: Align SMP req/resp " Marek Szyprowski
    2017-10-19 15:12       ` Christoph Hellwig
    2017-10-20  0:04     ` kbuild test robot
    2017-10-20  0:04       ` kbuild test robot
    

    This is a public inbox, see mirroring instructions
    for how to clone and mirror all data and code used for this inbox