Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1261894

Re: [PATCH 2/2] dma: add Qualcomm Technologies HIDMA channel driver

From Sinan Kaya <okaya@codeaurora.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] dma: add Qualcomm Technologies HIDMA channel driver
Date 2015-11-03 22:10 +0100
Message-ID <qqR06-842-7@gated-at.bofh.it> (permalink)
References <qp8eK-oK-5@gated-at.bofh.it> <qqumT-1BG-29@gated-at.bofh.it> <qqCkp-6QN-3@gated-at.bofh.it> <qqHk6-1z5-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 11/3/2015 5:43 AM, Arnd Bergmann wrote:
> Ok, got it.
>
> Best add an explanation like the above in the interrupt handler,
> to prevent this from accidentally getting 'cleaned up' to use
> readl(), or copied into a driver that uses PCI ordering rules
> where it is actually wrong.
>

I'm adding this disclaimer into the ISR routine.

	/*
	 * Fine tuned for this HW...
	 *
	 * This ISR has been designed for this particular hardware. Relaxed read
	 * and write accessors are used for performance reasons due to interrupt
	 * delivery guarantees. Do not copy this code blindly and expect
	 * that to work.
	 */


> I think it should be done like this:
>
> - anything that is not performance critical, use normal readl/writel
> - in the fast path, add a comment to each readl_relaxed()/writel_relaxed()
>    that is safe in this driver but that would not be safe in a PCI
>    device
> - For the ones that would be safe on PCI as weel, use
>    readl_relaxed()/writel_relaxed() without a comment on each one,
>    but clarify somewhere that these are all intentional.

Makes sense.

-- 
Sinan Kaya
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a 
Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH 2/2] dma: add Qualcomm Technologies HIDMA channel driver Sinan Kaya <okaya@codeaurora.org> - 2015-11-01 20:00 +0100
  Re: [PATCH 2/2] dma: add Qualcomm Technologies HIDMA channel driver Timur Tabi <timur@codeaurora.org> - 2015-11-01 21:30 +0100
    Re: [PATCH 2/2] dma: add Qualcomm Technologies HIDMA channel driver Sinan Kaya <okaya@codeaurora.org> - 2015-11-01 21:30 +0100
  Re: [PATCH 2/2] dma: add Qualcomm Technologies HIDMA channel driver Arnd Bergmann <arnd@arndb.de> - 2015-11-02 17:40 +0100
    Re: [PATCH 2/2] dma: add Qualcomm Technologies HIDMA channel driver Sinan Kaya <okaya@codeaurora.org> - 2015-11-02 20:30 +0100
      Re: [PATCH 2/2] dma: add Qualcomm Technologies HIDMA channel driver Arnd Bergmann <arnd@arndb.de> - 2015-11-02 22:00 +0100
        Re: [PATCH 2/2] dma: add Qualcomm Technologies HIDMA channel driver Sinan Kaya <okaya@codeaurora.org> - 2015-11-03 06:30 +0100
          Re: [PATCH 2/2] dma: add Qualcomm Technologies HIDMA channel driver Arnd Bergmann <arnd@arndb.de> - 2015-11-03 11:50 +0100
            Re: [PATCH 2/2] dma: add Qualcomm Technologies HIDMA channel driver Sinan Kaya <okaya@codeaurora.org> - 2015-11-03 22:10 +0100
              Re: [PATCH 2/2] dma: add Qualcomm Technologies HIDMA channel driver Arnd Bergmann <arnd@arndb.de> - 2015-11-03 22:20 +0100

csiph-web