Linux-mm Archive on lore.kernel.org
 help / color / Atom feed
From: Hillf Danton <hdanton@sina.com>
To: Thomas Hellstrom <thomas_os@shipmail.org>,
	Thomas Hellstrom <thellstrom@vmware.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-mm@kvack.org, pv-drivers@vmware.com,
	linux-graphics-maintainer@vmware.com,
	Andrew Morton <akpm@linux-foundation.org>,
	Matthew Wilcox <willy@infradead.org>,
	Will Deacon <will.deacon@arm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Rik van Riel <riel@surriel.com>, Minchan Kim <minchan@kernel.org>,
	Michal Hocko <mhocko@suse.com>, Huang Ying <ying.huang@intel.com>,
	Souptick Joarder <jrdr.linux@gmail.com>,
	jglisse@redhat.com, christian.koenig@amd.com,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [RFC PATCH 3/7] drm/ttm: TTM fault handler helpers
Date: Fri, 13 Sep 2019 21:40:39 +0800
Message-ID: <20190913134039.3164-1-hdanton@sina.com> (raw)
In-Reply-To: <20190913093213.27254-1-thomas_os@shipmail.org>


On Fri, 13 Sep 2019 11:32:09 +0200
> 
>  	err = ttm_mem_io_lock(man, true);
> -	if (unlikely(err != 0)) {
> -		ret = VM_FAULT_NOPAGE;
> -		goto out_unlock;
> -	}
> +	if (unlikely(err != 0))
> +		return VM_FAULT_NOPAGE;
>  	err = ttm_mem_io_reserve_vm(bo);
> -	if (unlikely(err != 0)) {
> -		ret = VM_FAULT_SIGBUS;
> -		goto out_io_unlock;
> -	}
> +	if (unlikely(err != 0))
> +		return VM_FAULT_SIGBUS;
> 
Hehe, no hurry.

> @@ -295,8 +307,28 @@ static vm_fault_t ttm_bo_vm_fault(struct vm_fault *vmf)
>  	ret = VM_FAULT_NOPAGE;
>  out_io_unlock:
>  	ttm_mem_io_unlock(man);
> -out_unlock:
> +	return ret;
> +}
> +EXPORT_SYMBOL(ttm_bo_vm_fault_reserved);



  parent reply index

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-13  9:32 [RFC PATCH 0/7] Emulated coherent graphics memory take 2 Thomas Hellström (VMware)
2019-09-13  9:32 ` [RFC PATCH 1/7] mm: Add write-protect and clean utilities for address space ranges Thomas Hellström (VMware)
2019-09-13 11:11   ` Thomas Hellström (VMware)
2019-09-13  9:32 ` [RFC PATCH 2/7] drm/ttm: Allow the driver to provide the ttm struct vm_operations_struct Thomas Hellström (VMware)
2019-09-13  9:32 ` [RFC PATCH 3/7] drm/ttm: TTM fault handler helpers Thomas Hellström (VMware)
2019-09-13 15:18   ` Matthew Wilcox
2019-09-13 16:08     ` Thomas Hellström (VMware)
2019-09-13  9:32 ` [RFC PATCH 4/7] drm/vmwgfx: Implement an infrastructure for write-coherent resources Thomas Hellström (VMware)
2019-09-13  9:32 ` [RFC PATCH 5/7] drm/vmwgfx: Use an RBtree instead of linked list for MOB resources Thomas Hellström (VMware)
2019-09-13  9:32 ` [RFC PATCH 6/7] drm/vmwgfx: Implement an infrastructure for read-coherent resources Thomas Hellström (VMware)
2019-09-13  9:32 ` [RFC PATCH 7/7] drm/vmwgfx: Add surface dirty-tracking callbacks Thomas Hellström (VMware)
2019-09-13 13:40 ` Hillf Danton [this message]
2019-09-13 14:34   ` [RFC PATCH 3/7] drm/ttm: TTM fault handler helpers Thomas Hellström (VMware)
2019-09-13 16:23   ` Thomas Hellström (VMware)

Reply instructions:

You may reply publically 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=20190913134039.3164-1-hdanton@sina.com \
    --to=hdanton@sina.com \
    --cc=akpm@linux-foundation.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hch@infradead.org \
    --cc=jglisse@redhat.com \
    --cc=jrdr.linux@gmail.com \
    --cc=linux-graphics-maintainer@vmware.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=minchan@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pv-drivers@vmware.com \
    --cc=riel@surriel.com \
    --cc=thellstrom@vmware.com \
    --cc=thomas_os@shipmail.org \
    --cc=will.deacon@arm.com \
    --cc=willy@infradead.org \
    --cc=ying.huang@intel.com \
    /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

Linux-mm Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mm/0 linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ https://lore.kernel.org/linux-mm \
		linux-mm@kvack.org linux-mm@archiver.kernel.org
	public-inbox-index linux-mm


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kvack.linux-mm


AGPL code for this site: git clone https://public-inbox.org/ public-inbox