All of lore.kernel.org
 help / color / mirror / Atom feed
From: kosaki.motohiro@gmail.com (KOSAKI Motohiro)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCHv2 4/4] ARM: dma-mapping: remove custom consistent dma region
Date: Wed, 30 May 2012 03:22:53 -0400	[thread overview]
Message-ID: <4FC5CACD.6000105@gmail.com> (raw)
In-Reply-To: <019401cd3e34$0c6af4d0$2540de70$%szyprowski@samsung.com>

(5/30/12 3:15 AM), Marek Szyprowski wrote:
> Hello,
>
> On Wednesday, May 30, 2012 2:11 AM KOSAKI Motohiro wrote:
>
>>>    static void *
>>>    __dma_alloc_remap(struct page *page, size_t size, gfp_t gfp, pgprot_t prot,
>>>    	const void *caller)
>>>    {
>>> -	struct arm_vmregion *c;
>>> -	size_t align;
>>> -	int bit;
>>> +	struct vm_struct *area;
>>> +	unsigned long addr;
>>>
>>> -	if (!consistent_pte) {
>>> -		printk(KERN_ERR "%s: not initialised\n", __func__);
>>> +	area = get_vm_area_caller(size, VM_DMA | VM_USERMAP, caller);
>>
>> In this patch, VM_DMA is only used here. So, is this no effect?
>
> I introduced it mainly to let user know which areas have been allocated by the dma-mapping api.

vma->flags are limited resource, it has only 32 (or 64) bits. Please don't use it for such unimportant
thing.


> I also plan to add a check suggested by Minchan Kim in __dma_free_remap() if the vmalloc area
> have been in fact allocated with VM_DMA set.

WARNING: multiple messages have this Message-ID (diff)
From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: 'KOSAKI Motohiro' <kosaki.motohiro@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	'Kyungmin Park' <kyungmin.park@samsung.com>,
	'Arnd Bergmann' <arnd@arndb.de>,
	'Russell King - ARM Linux' <linux@arm.linux.org.uk>,
	'Chunsang Jeong' <chunsang.jeong@linaro.org>,
	'Krishna Reddy' <vdumpa@nvidia.com>,
	'Konrad Rzeszutek Wilk' <konrad.wilk@oracle.com>,
	'Hiroshi Doyu' <hdoyu@nvidia.com>,
	'Subash Patel' <subashrp@gmail.com>
Subject: Re: [PATCHv2 4/4] ARM: dma-mapping: remove custom consistent dma region
Date: Wed, 30 May 2012 03:22:53 -0400	[thread overview]
Message-ID: <4FC5CACD.6000105@gmail.com> (raw)
In-Reply-To: <019401cd3e34$0c6af4d0$2540de70$%szyprowski@samsung.com>

(5/30/12 3:15 AM), Marek Szyprowski wrote:
> Hello,
>
> On Wednesday, May 30, 2012 2:11 AM KOSAKI Motohiro wrote:
>
>>>    static void *
>>>    __dma_alloc_remap(struct page *page, size_t size, gfp_t gfp, pgprot_t prot,
>>>    	const void *caller)
>>>    {
>>> -	struct arm_vmregion *c;
>>> -	size_t align;
>>> -	int bit;
>>> +	struct vm_struct *area;
>>> +	unsigned long addr;
>>>
>>> -	if (!consistent_pte) {
>>> -		printk(KERN_ERR "%s: not initialised\n", __func__);
>>> +	area = get_vm_area_caller(size, VM_DMA | VM_USERMAP, caller);
>>
>> In this patch, VM_DMA is only used here. So, is this no effect?
>
> I introduced it mainly to let user know which areas have been allocated by the dma-mapping api.

vma->flags are limited resource, it has only 32 (or 64) bits. Please don't use it for such unimportant
thing.


> I also plan to add a check suggested by Minchan Kim in __dma_free_remap() if the vmalloc area
> have been in fact allocated with VM_DMA set.


--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: "'KOSAKI Motohiro'" <kosaki.motohiro@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	"'Kyungmin Park'" <kyungmin.park@samsung.com>,
	"'Arnd Bergmann'" <arnd@arndb.de>,
	"'Russell King - ARM Linux'" <linux@arm.linux.org.uk>,
	"'Chunsang Jeong'" <chunsang.jeong@linaro.org>,
	"'Krishna Reddy'" <vdumpa@nvidia.com>,
	"'Konrad Rzeszutek Wilk'" <konrad.wilk@oracle.com>,
	"'Hiroshi Doyu'" <hdoyu@nvidia.com>,
	"'Subash Patel'" <subashrp@gmail.com>
Subject: Re: [PATCHv2 4/4] ARM: dma-mapping: remove custom consistent dma region
Date: Wed, 30 May 2012 03:22:53 -0400	[thread overview]
Message-ID: <4FC5CACD.6000105@gmail.com> (raw)
In-Reply-To: <019401cd3e34$0c6af4d0$2540de70$%szyprowski@samsung.com>

(5/30/12 3:15 AM), Marek Szyprowski wrote:
> Hello,
>
> On Wednesday, May 30, 2012 2:11 AM KOSAKI Motohiro wrote:
>
>>>    static void *
>>>    __dma_alloc_remap(struct page *page, size_t size, gfp_t gfp, pgprot_t prot,
>>>    	const void *caller)
>>>    {
>>> -	struct arm_vmregion *c;
>>> -	size_t align;
>>> -	int bit;
>>> +	struct vm_struct *area;
>>> +	unsigned long addr;
>>>
>>> -	if (!consistent_pte) {
>>> -		printk(KERN_ERR "%s: not initialised\n", __func__);
>>> +	area = get_vm_area_caller(size, VM_DMA | VM_USERMAP, caller);
>>
>> In this patch, VM_DMA is only used here. So, is this no effect?
>
> I introduced it mainly to let user know which areas have been allocated by the dma-mapping api.

vma->flags are limited resource, it has only 32 (or 64) bits. Please don't use it for such unimportant
thing.


> I also plan to add a check suggested by Minchan Kim in __dma_free_remap() if the vmalloc area
> have been in fact allocated with VM_DMA set.



  reply	other threads:[~2012-05-30  7:22 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-17 10:54 [PATCHv2 0/4] ARM: replace custom consistent dma region with vmalloc Marek Szyprowski
2012-05-17 10:54 ` Marek Szyprowski
2012-05-17 10:54 ` Marek Szyprowski
2012-05-17 10:54 ` [PATCHv2 1/4] mm: vmalloc: use const void * for caller argument Marek Szyprowski
2012-05-17 10:54   ` Marek Szyprowski
2012-05-17 10:54   ` Marek Szyprowski
2012-05-22  6:58   ` Minchan Kim
2012-05-22  6:58     ` Minchan Kim
2012-05-22  6:58     ` Minchan Kim
2012-05-17 10:54 ` [PATCHv2 2/4] mm: vmalloc: export find_vm_area() function Marek Szyprowski
2012-05-17 10:54   ` Marek Szyprowski
2012-05-17 10:54   ` Marek Szyprowski
2012-05-22  7:01   ` Minchan Kim
2012-05-22  7:01     ` Minchan Kim
2012-05-22  7:01     ` Minchan Kim
2012-05-17 10:54 ` [PATCHv2 3/4] mm: vmalloc: add VM_DMA flag to indicate areas used by dma-mapping framework Marek Szyprowski
2012-05-17 10:54   ` Marek Szyprowski
2012-05-17 10:54   ` Marek Szyprowski
2012-05-22  7:07   ` Minchan Kim
2012-05-22  7:07     ` Minchan Kim
2012-05-22  7:07     ` Minchan Kim
2012-05-24 12:26     ` Marek Szyprowski
2012-05-24 12:26       ` Marek Szyprowski
2012-05-24 12:26       ` Marek Szyprowski
2012-05-24 12:28       ` Paul Mundt
2012-05-24 12:28         ` Paul Mundt
2012-05-24 12:28         ` Paul Mundt
2012-05-27 12:35         ` KOSAKI Motohiro
2012-05-27 12:35           ` KOSAKI Motohiro
2012-05-27 12:35           ` KOSAKI Motohiro
2012-05-28  8:19           ` Marek Szyprowski
2012-05-28  8:19             ` Marek Szyprowski
2012-05-28  8:19             ` Marek Szyprowski
2012-05-29 15:07             ` Konrad Rzeszutek Wilk
2012-05-29 15:07               ` Konrad Rzeszutek Wilk
2012-05-29 15:07               ` Konrad Rzeszutek Wilk
2012-05-17 10:54 ` [PATCHv2 4/4] ARM: dma-mapping: remove custom consistent dma region Marek Szyprowski
2012-05-17 10:54   ` Marek Szyprowski
2012-05-17 10:54   ` Marek Szyprowski
2012-05-22  7:33   ` Minchan Kim
2012-05-22  7:33     ` Minchan Kim
2012-05-22  7:33     ` Minchan Kim
2012-05-22 12:50     ` Marek Szyprowski
2012-05-22 12:50       ` Marek Szyprowski
2012-05-22 12:50       ` Marek Szyprowski
2012-05-30  0:11   ` KOSAKI Motohiro
2012-05-30  0:11     ` KOSAKI Motohiro
2012-05-30  0:11     ` KOSAKI Motohiro
2012-05-30  7:15     ` Marek Szyprowski
2012-05-30  7:15       ` Marek Szyprowski
2012-05-30  7:15       ` Marek Szyprowski
2012-05-30  7:22       ` KOSAKI Motohiro [this message]
2012-05-30  7:22         ` KOSAKI Motohiro
2012-05-30  7:22         ` KOSAKI Motohiro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FC5CACD.6000105@gmail.com \
    --to=kosaki.motohiro@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.