* Re: INFO: task hung in fuse_reverse_inval_entry
From: Dmitry Vyukov @ 2018-07-23 13:37 UTC (permalink / raw)
To: Miklos Szeredi; +Cc: linux-fsdevel, LKML, syzkaller-bugs, syzbot
In-Reply-To: <CAJfpegvYHYUMdo14J_of10rmg0krjd_eiATJ3D4+XqaNys9bqQ@mail.gmail.com>
On Mon, Jul 23, 2018 at 3:05 PM, Miklos Szeredi <miklos@szeredi.hu> wrote:
>>>>>> <syzbot+bb6d800770577a083f8c@syzkaller.appspotmail.com> wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> syzbot found the following crash on:
>>>>>>>
>>>>>>> HEAD commit: d72e90f33aa4 Linux 4.18-rc6
>>>>>>> git tree: upstream
>>>>>>> console output: https://syzkaller.appspot.com/x/log.txt?x=1324f794400000
>>>>>>> kernel config: https://syzkaller.appspot.com/x/.config?x=68af3495408deac5
>>>>>>> dashboard link: https://syzkaller.appspot.com/bug?extid=bb6d800770577a083f8c
>>>>>>> compiler: gcc (GCC) 8.0.1 20180413 (experimental)
>>>>>>> syzkaller repro:https://syzkaller.appspot.com/x/repro.syz?x=11564d1c400000
>>>>>>> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16fc570c400000
>>>>>>
>>>>>>
>>>>>> Hi fuse maintainers,
>>>>>>
>>>>>> We are seeing a bunch of such deadlocks in fuse on syzbot. As far as I
>>>>>> understand this is mostly working-as-intended (parts about deadlocks
>>>>>> in Documentation/filesystems/fuse.txt). The intended way to resolve
>>>>>> this is aborting connections via fusectl, right?
>>>>>
>>>>> Yes. Alternative is with "umount -f".
>>>>>
>>>>>> The doc says "Under
>>>>>> the fuse control filesystem each connection has a directory named by a
>>>>>> unique number". The question is: if I start a process and this process
>>>>>> can mount fuse, how do I kill it? I mean: totally and certainly get
>>>>>> rid of it right away? How do I find these unique numbers for the
>>>>>> mounts it created?
>>>>>
>>>>> It is the device number found in st_dev for the mount. Other than
>>>>> doing stat(2) it is possible to find out the device number by reading
>>>>> /proc/$PID/mountinfo (third field).
>>>>
>>>> Thanks. I will try to figure out fusectl connection numbers and see if
>>>> it's possible to integrate aborting into syzkaller.
>>>>
>>>>>> Taking into account that there is usually no
>>>>>> operator attached to each server, I wonder if kernel could somehow
>>>>>> auto-abort fuse on kill?
>>>>>
>>>>> Depends on what the fuse server is sleeping on. If it's trying to
>>>>> acquire an inode lock (e.g. unlink(2)), which is classical way to
>>>>> deadlock a fuse filesystem, then it will go into an uninterruptible
>>>>> sleep. There's no way in which that process can be killed except to
>>>>> force a release of the offending lock, which can only be done by
>>>>> aborting the request that is being performed while holding that lock.
>>>>
>>>> I understand that it is not killed today, but I am asking if we can
>>>> make it killable. It's all code that we can change, and if a human
>>>> operator can do it, it can be done pure programmatically on kill too,
>>>> right?
>>>
>>> Hmm, you mean if a process is in an uninterruptible sleep trying to
>>> acquire a lock on a fuse filesystem and is killed, then the fuse
>>> filesystem should be aborted?
>>>
>>> Even if we'd manage to implement that, it's a large backward
>>> incompatibility risk.
>>>
>>> I don't argue that it can be done, but I would definitely argue *if*
>>> it should be done.
>>
>>
>> I understand that we should abort only if we are sure that it's
>> actually deadlocked and there is no other way.
>> So if fuse-user process is blocked on fuse lock, then we probably
>> should do nothing. However, if the fuse-server is killed, then perhaps
>> we could abort the connection at that point. Namely, if a process that
>> has a fuse fd open is killed and it is the only process that shared
>> this fd, then we could abort the connection on arrival of the kill
>> signal (rather than wait untill all it's threads finish and then start
>> closing all fd's, this is where we get the deadlock -- some of its
>> threads won't finish). I don't know if such synchronous kill hook is
>> available, though. If several processes shared the same fuse fd, then
>> we could close the fd in each process on SIGKILL arrival, then when
>> all of these processes are killed, fuse fd will be closed and we can
>> abort the connection, which will un-deadlock all of these processes.
>> Does this look any reasonable?
>
> Biggest conceptual problem: your definition of fuse-server is weak.
> Take the following example: process A is holding the fuse device fd
> and is forwarding requests and replies to/from process B via a pipe.
> So basically A is just a proxy that does nothing interesting, the
> "real" server is B. But according to your definition B is not a
> server, only A is.
I proposed to abort fuse conn when all fuse device fd's are "killed"
(all processes having the fd opened are killed). So if _only_ process
B is killed, then, yes, it will still hang. However if A is killed or
both A and B (say, process group, everything inside of pid namespace,
etc) then the deadlock will be autoresolved without human
intervention.
> And this is just a simple example, parts of the server might be on
> different machines, etc... It's impossible to automatically detect if
> a process is acting as a fuse server or not.
It does not seem we need the precise definition. If no one ever can
write anything into the fd, we can safely abort the connection (?). If
we don't, we can either get that the process exits normally and the
connection is doomed anyway, so no difference in behavior, or we can
get a deadlock.
> We could let the fuse server itself notify the kernel that it's a fuse
> server. That might help in the cases where the deadlock is
> accidental, but obviously not in the case when done by a malicious
> agent. I'm not sure it's worth the effort. Also I have no idea how
> the respective maintainers would take the idea of "kill hooks"... It
> would probably be a lot of work for little gain.
What looks wrong to me here is that fuse is only (?) subsystem in
kernel that stops SIGKILL from working and requires complex custom
dance performed by a human operator (which is not necessary there at
all). Say, if a process has opened a socket, whatever, I don't need to
locate and abort something in socketctl fs, just SIGKILL. If a
processes has opened a file, I don't need to locate the fd in /proc
and abort it, just SIGKILL. If a process has created an ipc object, I
don't need to do any special dance, just SIGKILL. fuse is somehow very
special, if we have more such cases, it definitely won't scale.
I understand that there can be implementation difficulties, but
fundamentally that's how things should work -- choose target
processes, kill, done, right?
^ permalink raw reply
* [LTP] [PATCH] Add crypto to Makefile
From: Richard Palethorpe @ 2018-07-23 14:38 UTC (permalink / raw)
To: ltp
This is missing from my original patch set for the pcrypt_aead01 test. It
appears that the executable is not installed without it.
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
testcases/kernel/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/Makefile b/testcases/kernel/Makefile
index 11aae96fe..5acc9b8bc 100644
--- a/testcases/kernel/Makefile
+++ b/testcases/kernel/Makefile
@@ -38,6 +38,7 @@ ifneq ($(UCLINUX),1)
SUBDIRS += connectors \
containers \
controllers \
+ crypto \
device-drivers \
firmware \
fs \
--
2.16.3
^ permalink raw reply related
* Re: [PATCH 0/5] Misc Coccinelle-related improvements
From: Derrick Stolee @ 2018-07-23 14:38 UTC (permalink / raw)
To: SZEDER Gábor, Junio C Hamano
Cc: git, René Scharfe, Nguyễn Thái Ngọc Duy
In-Reply-To: <20180723135100.24288-1-szeder.dev@gmail.com>
On 7/23/2018 9:50 AM, SZEDER Gábor wrote:
> Just a couple of minor Coccinelle-related improvements:
>
> - The first two patches are small cleanups.
>
> - The last three could make life perhaps just a tad bit easier for
> devs running 'make coccicheck'.
I appreciate your focus on making 'make coccicheck' easier to use!
Reviewed-by: Derrick Stolee <dstolee@microsoft.com>
^ permalink raw reply
* Re: [Qemu-devel] [PATCH] block: Don't lock /dev/null and /dev/zero automatically
From: Max Reitz @ 2018-07-23 14:37 UTC (permalink / raw)
To: Fam Zheng; +Cc: QEMU Developers, Kevin Wolf, qemu block
In-Reply-To: <CAK1Eb9kzqTwEjkv5NN1zSYVMmg2h_6BOmxQc2Qz+-c3=_T3=7g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3137 bytes --]
On 2018-07-23 03:56, Fam Zheng wrote:
> On Sun, Jul 22, 2018 at 10:06 PM Max Reitz <mreitz@redhat.com> wrote:
>>
>> On 2018-07-22 04:37, Fam Zheng wrote:
>>> On Sun, Jul 22, 2018 at 5:08 AM Max Reitz <mreitz@redhat.com> wrote:
>>>>
>>>> On 2018-07-19 05:41, Fam Zheng wrote:
>>>>> On my Fedora 28, /dev/null is locked by some other process (couldn't
>>>>> inspect it due to the current lslocks limitation), so iotests 226 fails
>>>>> with some unexpected image locking errors because it uses qemu-io to
>>>>> open it.
>>>>>
>>>>> Actually it's safe to not use any lock on /dev/null or /dev/zero.
>>>>>
>>>>> Signed-off-by: Fam Zheng <famz@redhat.com>
>>>>> ---
>>>>> block/file-posix.c | 7 ++++++-
>>>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/block/file-posix.c b/block/file-posix.c
>>>>> index 60af4b3d51..8bf034108a 100644
>>>>> --- a/block/file-posix.c
>>>>> +++ b/block/file-posix.c
>>>>> @@ -503,7 +503,12 @@ static int raw_open_common(BlockDriverState *bs, QDict *options,
>>>>> s->use_lock = false;
>>>>> break;
>>>>> case ON_OFF_AUTO_AUTO:
>>>>> - s->use_lock = qemu_has_ofd_lock();
>>>>> + if (!strcmp(filename, "/dev/null") ||
>>>>> + !strcmp(filename, "/dev/zero")) {
>>>>
>>>> I’m not sure I like a strcmp() based on filename (though it should work
>>>> for all of the cases where someone would want to specify either of those
>>>> for a qemu block device). Isn’t there some specific major/minor number
>>>> we can use to check for these two files? Or are those Linux-specific?
>>>
>>> Yeah, I guess major/minor numbers are Linux-specific.
>>>
>>>>
>>>> I could also imagine just not locking any host_device, but since people
>>>> do use qcow2 immediately on block devices, maybe we do want to lock them.
>>>
>>> That's right.
>>>
>>>>
>>>> Finally, if really all you are trying to do is to make test code easier,
>>>> then I don’t know exactly why. Just disabling locking in 226 shouldn’t
>>>> be too hard.
>>>
>>> The tricky thing is in remembering to do that for future test cases.
>>> My machine seems to be somehow different than John's so that my 226
>>> cannot lock /dev/null, but I'm not sure that is the case for other
>>> releases, distros or system instances.
>>
>> Usually we don’t need to use /dev/null, though, because null-co:// is
>> better suited for most purposes. This is a very specific test of host
>> devices.
>>
>> Maybe we should start a doc file with common good practices about
>> writing iotests?
>
> Yes, mentioning using pseudo devices in docs/devel/testing.rst would
> probably be a good idea. So is my understanding right that you prefer
> fixing the test case and discard this patch? If so I'll send another
> version together with the doc update.
I personally would prefer fixing the test and not modifying the code,
yes. But I'm aware that it is a personal opinion.
I think another alternative would be to not lock character devices, as I
don't suppose anyone is going to use them for anything serious.
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* [PATCHv2 2/2] scsi: set timed out out mq requests to complete
From: Keith Busch @ 2018-07-23 14:37 UTC (permalink / raw)
In-Reply-To: <20180723143751.10843-1-keith.busch@intel.com>
The scsi block layer requires requests claimed by the error handling be
completed by the error handler. A previous commit allowed completions
to proceed for blk-mq, breaking that assumption.
This patch prevents completions that may race with the timeout handler
by marking the state to complete, restoring the previous behavior.
Fixes: 12f5b931 ("blk-mq: Remove generation seqeunce")
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
v1 -> v2:
Document why this is necessary in code comments.
Update to API's changed return value
drivers/scsi/scsi_error.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 8932ae81a15a..2715cdaa669c 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -296,6 +296,20 @@ enum blk_eh_timer_return scsi_times_out(struct request *req)
rtn = host->hostt->eh_timed_out(scmd);
if (rtn == BLK_EH_DONE) {
+ /*
+ * For blk-mq, we must set the request state to complete now
+ * before sending the request to the scsi error handler. This
+ * will prevent a use-after-free in the event the LLD manages
+ * to complete the request before the error handler finishes
+ * processing this timed out request.
+ *
+ * If the request was already completed, then the LLD beat the
+ * time out handler from transferring the request to the scsi
+ * error handler. In that case we can return immediately as no
+ * further action is required.
+ */
+ if (req->q->mq_ops && !blk_mq_mark_complete(req))
+ return rtn;
if (scsi_abort_command(scmd) != SUCCESS) {
set_host_byte(scmd, DID_TIME_OUT);
scsi_eh_scmd_add(scmd);
--
2.14.4
^ permalink raw reply related
* [PATCHv2 2/2] scsi: set timed out out mq requests to complete
From: Keith Busch @ 2018-07-23 14:37 UTC (permalink / raw)
To: linux-block, linux-scsi
Cc: linux-nvme, Christoph Hellwig, Jens Axboe, Jianchao Wang,
Bart Van Assche, Keith Busch
In-Reply-To: <20180723143751.10843-1-keith.busch@intel.com>
The scsi block layer requires requests claimed by the error handling be
completed by the error handler. A previous commit allowed completions
to proceed for blk-mq, breaking that assumption.
This patch prevents completions that may race with the timeout handler
by marking the state to complete, restoring the previous behavior.
Fixes: 12f5b931 ("blk-mq: Remove generation seqeunce")
Signed-off-by: Keith Busch <keith.busch@intel.com>
---
v1 -> v2:
Document why this is necessary in code comments.
Update to API's changed return value
drivers/scsi/scsi_error.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index 8932ae81a15a..2715cdaa669c 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -296,6 +296,20 @@ enum blk_eh_timer_return scsi_times_out(struct request *req)
rtn = host->hostt->eh_timed_out(scmd);
if (rtn == BLK_EH_DONE) {
+ /*
+ * For blk-mq, we must set the request state to complete now
+ * before sending the request to the scsi error handler. This
+ * will prevent a use-after-free in the event the LLD manages
+ * to complete the request before the error handler finishes
+ * processing this timed out request.
+ *
+ * If the request was already completed, then the LLD beat the
+ * time out handler from transferring the request to the scsi
+ * error handler. In that case we can return immediately as no
+ * further action is required.
+ */
+ if (req->q->mq_ops && !blk_mq_mark_complete(req))
+ return rtn;
if (scsi_abort_command(scmd) != SUCCESS) {
set_host_byte(scmd, DID_TIME_OUT);
scsi_eh_scmd_add(scmd);
--
2.14.4
^ permalink raw reply related
* [PATCHv2 1/2] blk-mq: export setting request completion state
From: Keith Busch @ 2018-07-23 14:37 UTC (permalink / raw)
This is preparing for drivers that want to directly alter the state of
their requests. No functional change here.
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
v1 -> v2:
Reversed the return value: 'true' for success instead of failure.
Document the caller's responsibilities after a successful state transtion.
block/blk-mq.c | 4 +---
include/linux/blk-mq.h | 14 ++++++++++++++
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 22326612a5d3..8f01cd7fd182 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -558,10 +558,8 @@ static void __blk_mq_complete_request(struct request *rq)
bool shared = false;
int cpu;
- if (cmpxchg(&rq->state, MQ_RQ_IN_FLIGHT, MQ_RQ_COMPLETE) !=
- MQ_RQ_IN_FLIGHT)
+ if (!blk_mq_mark_complete(rq))
return;
-
if (rq->internal_tag != -1)
blk_mq_sched_completed_request(rq);
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index 9b0fd11ce89a..4d41ed16314c 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -289,6 +289,20 @@ void blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, int nr_hw_queues);
void blk_mq_quiesce_queue_nowait(struct request_queue *q);
+/**
+ * blk_mq_mark_complete() - Set request state to complete
+ * @rq: request to set to complete state
+ *
+ * Returns true if request state was successfully set to complete. If
+ * successful, the caller is responsibile for seeing this request is ended, as
+ * blk_mq_complete_request will not work again.
+ */
+static inline bool blk_mq_mark_complete(struct request *rq)
+{
+ return cmpxchg(&rq->state, MQ_RQ_IN_FLIGHT, MQ_RQ_COMPLETE) ==
+ MQ_RQ_IN_FLIGHT;
+}
+
/*
* Driver command data is immediately after the request. So subtract request
* size to get back to the original request, add request size to get the PDU.
--
2.14.4
^ permalink raw reply related
* [PATCHv2 1/2] blk-mq: export setting request completion state
From: Keith Busch @ 2018-07-23 14:37 UTC (permalink / raw)
To: linux-block, linux-scsi
Cc: linux-nvme, Christoph Hellwig, Jens Axboe, Jianchao Wang,
Bart Van Assche, Keith Busch
This is preparing for drivers that want to directly alter the state of
their requests. No functional change here.
Signed-off-by: Keith Busch <keith.busch@intel.com>
---
v1 -> v2:
Reversed the return value: 'true' for success instead of failure.
Document the caller's responsibilities after a successful state transtion.
block/blk-mq.c | 4 +---
include/linux/blk-mq.h | 14 ++++++++++++++
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 22326612a5d3..8f01cd7fd182 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -558,10 +558,8 @@ static void __blk_mq_complete_request(struct request *rq)
bool shared = false;
int cpu;
- if (cmpxchg(&rq->state, MQ_RQ_IN_FLIGHT, MQ_RQ_COMPLETE) !=
- MQ_RQ_IN_FLIGHT)
+ if (!blk_mq_mark_complete(rq))
return;
-
if (rq->internal_tag != -1)
blk_mq_sched_completed_request(rq);
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index 9b0fd11ce89a..4d41ed16314c 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -289,6 +289,20 @@ void blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, int nr_hw_queues);
void blk_mq_quiesce_queue_nowait(struct request_queue *q);
+/**
+ * blk_mq_mark_complete() - Set request state to complete
+ * @rq: request to set to complete state
+ *
+ * Returns true if request state was successfully set to complete. If
+ * successful, the caller is responsibile for seeing this request is ended, as
+ * blk_mq_complete_request will not work again.
+ */
+static inline bool blk_mq_mark_complete(struct request *rq)
+{
+ return cmpxchg(&rq->state, MQ_RQ_IN_FLIGHT, MQ_RQ_COMPLETE) ==
+ MQ_RQ_IN_FLIGHT;
+}
+
/*
* Driver command data is immediately after the request. So subtract request
* size to get back to the original request, add request size to get the PDU.
--
2.14.4
^ permalink raw reply related
* Re: [Qemu-devel] [PATCH] qstring: Fix integer overflow
From: liujunjie (A) @ 2018-07-23 14:36 UTC (permalink / raw)
To: Markus Armbruster
Cc: wangxin (U), Gonglei (Arei), Huangweidong (C),
qemu-devel@nongnu.org
In-Reply-To: <87h8kq86f8.fsf@dusky.pond.sub.org>
Thanks for your reply.
> Really? How exactly can this happen? Please explain step by step.
There exist a qemu core related to this. You have mention that "The conversion truncates when strlen(str) - 1 exceeds INT_MAX".
Later in function qstring_from_substr, this truncated "end" will be assigned to "qstring->length" again, which is size_t. This is the key point why qemu coredumped.
Because when "end" is truncated, it can be negative number. If we assign a negative number to a size_t variable, this size_t variable can become very large.
At last, we call g_malloc to try to alloc a large number of member which cannot success. So qemu coredump.
In my example, use gdb to debug function qstring_from_substr, I can get the following message.
(gdb) p qstring->length
$4 = 18446744072383980732 (too large to allocate)
(gdb) p (int) (qstring->length)
$5 = -1325570884
(gdb) p/x (int) qstring->length
$6 = 0xb0fd64bc
(gdb) p/x qstring->length
$7 = 0xffffffffb0fd64bc
(gdb) p end
$8 = <optimized out>
> -----Original Message-----
> From: Markus Armbruster [mailto:armbru@redhat.com]
> Sent: Monday, July 23, 2018 8:48 PM
> To: liujunjie (A) <liujunjie23@huawei.com>
> Cc: wangxin (U) <wangxinxin.wang@huawei.com>; Gonglei (Arei)
> <arei.gonglei@huawei.com>; Huangweidong (C)
> <weidong.huang@huawei.com>; qemu-devel@nongnu.org
> Subject: Re: [Qemu-devel] [PATCH] qstring: Fix integer overflow
>
> liujunjie <liujunjie23@huawei.com> writes:
>
> > From: l00425170 <liujunjie23@huawei.com>
> >
> > The incoming parameters "start" and "end" is int type in
> > qstring_from_substr(), but this function can be called by
> > qstring_from_str, which is size_t type in strlen(str).
>
> Yes, there's a conversion from size_t to int in
>
> return qstring_from_substr(str, 0, strlen(str) - 1);
>
> The conversion truncates when strlen(str) - 1 exceeds INT_MAX.
>
> strlen(str) - 1 wraps around to SIZE_MAX when @str is empty.
>
> > It may result in coredump when called g_malloc later.
> > One scene to triger is to call hmp "into tlb", which may have too long
> > length of string.
>
> Really? How exactly can this happen? Please explain step by step.
>
> Aside: @end is only used as @end + 1, and all callers pass some X - 1.
> Both the addition and the subtraction can overflow. Changing the function to
> take the index behind the last character instead of the index of the last
> character would almost certainly simplify things. Not this patch's problem.
>
> >
> > Signed-off-by: l00425170 <liujunjie23@huawei.com>
> > ---
> > include/qapi/qmp/qstring.h | 2 +-
> > qobject/qstring.c | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/qapi/qmp/qstring.h b/include/qapi/qmp/qstring.h
> > index b3b3d44..3e83e3a 100644
> > --- a/include/qapi/qmp/qstring.h
> > +++ b/include/qapi/qmp/qstring.h
> > @@ -24,7 +24,7 @@ struct QString {
> >
> > QString *qstring_new(void);
> > QString *qstring_from_str(const char *str); -QString
> > *qstring_from_substr(const char *str, int start, int end);
> > +QString *qstring_from_substr(const char *str, size_t start, size_t
> > +end);
> > size_t qstring_get_length(const QString *qstring); const char
> > *qstring_get_str(const QString *qstring); const char
> > *qstring_get_try_str(const QString *qstring); diff --git
> > a/qobject/qstring.c b/qobject/qstring.c index afca54b..18b8eb8 100644
> > --- a/qobject/qstring.c
> > +++ b/qobject/qstring.c
> > @@ -37,7 +37,7 @@ size_t qstring_get_length(const QString *qstring)
> > *
> > * Return string reference
> > */
> > -QString *qstring_from_substr(const char *str, int start, int end)
> > +QString *qstring_from_substr(const char *str, size_t start, size_t
> > +end)
> > {
> > QString *qstring;
>
> The patch makes sense, but the commit message makes claims that need to be
> substantiated.
^ permalink raw reply
* Re: [PATCH 1/5] coccinelle: mark the 'coccicheck' make target as .PHONY
From: Derrick Stolee @ 2018-07-23 14:36 UTC (permalink / raw)
To: SZEDER Gábor, Junio C Hamano
Cc: git, René Scharfe, Nguyễn Thái Ngọc Duy
In-Reply-To: <20180723135100.24288-2-szeder.dev@gmail.com>
On 7/23/2018 9:50 AM, SZEDER Gábor wrote:
> The 'coccicheck' target doesn't create a file with the same name, so
> mark it as .PHONY.
>
> Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
> ---
> Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index e4b503d259..27bfc196dd 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2685,6 +2685,8 @@ C_SOURCES = $(patsubst %.o,%.c,$(C_OBJ))
> fi
> coccicheck: $(patsubst %.cocci,%.cocci.patch,$(wildcard contrib/coccinelle/*.cocci))
>
> +.PHONY: coccicheck
> +
> ### Installation rules
>
> ifneq ($(filter /%,$(firstword $(template_dir))),)
I did not know about phony targets [1] so thanks for teaching me
something today.
[1] https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
^ permalink raw reply
* Re: [PATCH v1 4/9] scsi: ufs: add option to change default UFS power management level
From: Rob Herring @ 2018-07-23 14:36 UTC (permalink / raw)
To: Asutosh Das
Cc: Subhash Jadavani, Can Guo, Vivek Gautam, Rajendra Nayak,
Vinayak Holikatti, James E.J. Bottomley, Martin K. Petersen,
linux-scsi, linux-arm-msm, Venkat Gopalakrishnan, Mark Rutland,
Mathieu Malaterre, devicetree, linux-kernel@vger.kernel.org
In-Reply-To: <4b85de8b-d03e-da93-704b-e70922a9fbea@codeaurora.org>
On Sun, Jul 22, 2018 at 9:20 PM Asutosh Das (asd)
<asutoshd@codeaurora.org> wrote:
>
> On 7/12/2018 2:03 AM, Rob Herring wrote:
> > On Fri, Jul 06, 2018 at 06:00:31PM +0530, Asutosh Das wrote:
> >> From: Subhash Jadavani <subhashj@codeaurora.org>
> >>
> >> UFS device and link can be put in multiple different low power modes hence
> >> UFS driver supports multiple different low power modes. By default UFS
> >> driver selects the default (optimal) low power mode (which gives moderate
> >> power savings and have relatively less enter and exit latencies) but
> >> we might have to tune this default power mode for different chipset
> >> platforms to meet the low power requirements/goals. Hence this patch
> >> adds option to change default UFS low power mode (level).
> >>
> >> Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
> >> Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
> >> Signed-off-by: Can Guo <cang@codeaurora.org>
> >> Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
> >> ---
> >> .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 11 ++++++++
> >> drivers/scsi/ufs/ufshcd-pltfrm.c | 14 +++++++++++
> >> drivers/scsi/ufs/ufshcd.c | 29 +++++++++++++++-------
> >> drivers/scsi/ufs/ufshcd.h | 4 +--
> >> 4 files changed, 47 insertions(+), 11 deletions(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
> >> index c39dfef..f564d9a 100644
> >> --- a/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
> >> +++ b/Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt
> >> @@ -38,6 +38,15 @@ Optional properties:
> >> defined or a value in the array is "0" then it is assumed
> >> that the frequency is set by the parent clock or a
> >> fixed rate clock source.
> >> +- rpm-level : UFS Runtime power management level. Following PM levels are supported:
> >> + 0 - Both UFS device and Link in active state (Highest power consumption)
> >> + 1 - UFS device in active state but Link in Hibern8 state
> >> + 2 - UFS device in Sleep state but Link in active state
> >> + 3 - UFS device in Sleep state and Link in hibern8 state (default PM level)
> >> + 4 - UFS device in Power-down state and Link in Hibern8 state
> >> + 5 - UFS device in Power-down state and Link in OFF state (Lowest power consumption)
> >> +- spm-level : UFS System power management level. Allowed PM levels are same as rpm-level.
> >
> > What's the default?
> >
> > I assume these are minimums? The OS can pick higher power states. This
> > seems to be a bit Linux specific (as 'runtime PM' could be considered
> > Linux specific). For every other device, we don't put this type of
> > information in DT, but is user controlled.
> I didn't completely understand your comment.
> Do you not want these properties to be in DT file?
Right, not if it is a user decision.
> When you say user-controlled, do you mean control it through sysfs entries?
Yes.
> > So really, wouldn't 1
> > property be sufficient for cases where a mode doesn't work due to
> > some h/w limitation. Otherwise, it is an OS or user decision.
> I didn't completely understand this. Could you please elaborate on your
> intent here?
The case that makes sense for this to be in DT is if there are h/w
limitations that prevent some low power modes. In such a case, that
limit is not likely specific to runtime PM or system suspend.
> >> -lanes-per-direction : number of lanes available per direction - either 1 or 2.
> >> Note that it is assume same number of lanes is used both
> >> directions at once. If not specified, default is 2 lanes per direction.
> >> @@ -66,4 +75,6 @@ Example:
> >> freq-table-hz = <100000000 200000000>, <0 0>, <0 0>;
> >> phys = <&ufsphy1>;
> >> phy-names = "ufsphy";
> >> + rpm-level = <3>;
> >
> > Why specified if 3 is the default?
> Ah yes - that should be removed.
> I'll remove it in v2.
>
> >
> >> + spm-level = <5>;
> >
> > These seem like sane defaults. When and why would you use some
> > different?
> I think each of the deeper sleep modes are associated with an increasing
> wakeup latency. For e.g. '0' would have the highest power-consumption
> and no resume latency at all as compared to '5'.
> So depending on use-cases other modes may be chosen.
The use-case can change in a running system. For example if you are
plugged in, then you probably don't want to enter a lower power mode.
Rob
^ permalink raw reply
* Re: [RFC RESEND PATCH] drm/rockchip: update cursors asynchronously through atomic.
From: Sean Paul @ 2018-07-23 14:36 UTC (permalink / raw)
To: Enric Balletbo i Serra
Cc: Sandy Huang, Heiko Stübner, David Airlie, linux-arm-kernel,
linux-kernel, dri-devel, linux-rockchip, Gustavo Padovan,
Tomasz Figa, Sean Paul, kernel, Stéphane Marchesin
In-Reply-To: <20180627211447.20927-1-enric.balletbo@collabora.com>
On Wed, Jun 27, 2018 at 11:14:47PM +0200, Enric Balletbo i Serra wrote:
> Add support to async updates of cursors by using the new atomic
> interface for that.
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
LGTM. Given rockchip hasn't weighed in on the patch, and that you've tested it
on real hardware, let's land it.
Reviewed-by: Sean Paul <seanpaul@chromium.org>
> ---
> I am sending this as RFC because I still don't have a deep knowledge of
> the hw and I am not sure if the vop_plane_update function can be reused
> in both cases, atomic_updates and atomic_async_updates. I think that
> someone with more knowledge should take a look. The patch was tested on
> a Samsung Chromebook Plus in two ways.
>
> 1. Running all igt kms_cursor_legacy and kms_atomic@plane_cursor_legacy
> tests and see that there is no regression after the patch.
>
> 2. Running weston using the atomic API.
>
> Best regards,
> Enric
>
> drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 80 ++++++++++++++++-----
> 1 file changed, 64 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index 53d4afe15278..1eb6bda924af 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -688,8 +688,7 @@ static void vop_plane_atomic_disable(struct drm_plane *plane,
> spin_unlock(&vop->reg_lock);
> }
>
> -static void vop_plane_atomic_update(struct drm_plane *plane,
> - struct drm_plane_state *old_state)
> +static void vop_plane_update(struct drm_plane *plane)
> {
> struct drm_plane_state *state = plane->state;
> struct drm_crtc *crtc = state->crtc;
> @@ -710,20 +709,6 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
> bool rb_swap;
> int format;
>
> - /*
> - * can't update plane when vop is disabled.
> - */
> - if (WARN_ON(!crtc))
> - return;
> -
> - if (WARN_ON(!vop->is_enabled))
> - return;
> -
> - if (!state->visible) {
> - vop_plane_atomic_disable(plane, old_state);
> - return;
> - }
> -
> obj = rockchip_fb_get_gem_obj(fb, 0);
> rk_obj = to_rockchip_obj(obj);
>
> @@ -794,10 +779,73 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
> spin_unlock(&vop->reg_lock);
> }
>
> +static void vop_plane_atomic_update(struct drm_plane *plane,
> + struct drm_plane_state *old_state)
> +{
> + struct drm_plane_state *state = plane->state;
> + struct vop *vop = to_vop(state->crtc);
> +
> + /*
> + * can't update plane when vop is disabled.
> + */
> + if (WARN_ON(!state->crtc))
> + return;
> +
> + if (WARN_ON(!vop->is_enabled))
> + return;
> +
> + if (!state->visible) {
> + vop_plane_atomic_disable(plane, old_state);
> + return;
> + }
> +
> + vop_plane_update(plane);
> +}
> +
> +static int vop_plane_atomic_async_check(struct drm_plane *plane,
> + struct drm_plane_state *state)
> +{
> + struct drm_crtc_state *crtc_state;
> +
> + crtc_state = drm_atomic_get_existing_crtc_state(state->state,
> + state->crtc);
> + if (WARN_ON(!crtc_state))
> + return -EINVAL;
> +
> + if (!crtc_state->active)
> + return -EINVAL;
> +
> + if (plane->state->crtc != state->crtc ||
> + plane->state->src_w != state->src_w ||
> + plane->state->src_h != state->src_h ||
> + plane->state->crtc_w != state->crtc_w ||
> + plane->state->crtc_h != state->crtc_h ||
> + !plane->state->fb ||
> + plane->state->fb != state->fb)
> + return -EINVAL;
> +
> + return 0;
> +}
> +
> +static void vop_plane_atomic_async_update(struct drm_plane *plane,
> + struct drm_plane_state *new_state)
> +{
> + plane->state->src_x = new_state->src_x;
> + plane->state->src_y = new_state->src_y;
> + plane->state->crtc_x = new_state->crtc_x;
> + plane->state->crtc_y = new_state->crtc_y;
> + plane->state->fb = new_state->fb;
> + *plane->state = *new_state;
> +
> + vop_plane_update(plane);
> +}
> +
> static const struct drm_plane_helper_funcs plane_helper_funcs = {
> .atomic_check = vop_plane_atomic_check,
> .atomic_update = vop_plane_atomic_update,
> .atomic_disable = vop_plane_atomic_disable,
> + .atomic_async_check = vop_plane_atomic_async_check,
> + .atomic_async_update = vop_plane_atomic_async_update,
> };
>
> static const struct drm_plane_funcs vop_plane_funcs = {
> --
> 2.18.0
>
--
Sean Paul, Software Engineer, Google / Chromium OS
^ permalink raw reply
* [PATCH] kvm/x86: propagate fetch fault into guest
From: Peng Hao @ 2018-07-23 14:36 UTC (permalink / raw)
To: pbonzini, rkrcmar, tglx, x86, peterz, mingo
Cc: linux-kernel, kvm, zhong.weidong, jiang.biao2, Peng Hao
When handling ept misconfig exit, it will call emulate instruction
with insn_len = 0. The decode instruction function may return a fetch
fault and should propagate to guest.
The problem will result to emulation fail.
KVM internal error. Suberror: 1
emulation failure
EAX=f81a0024 EBX=f6a07000 ECX=f6a0737c EDX=f8be0118
ESI=f6a0737c EDI=00000021 EBP=f6929f98 ESP=f6929f98
EIP=f8bdd141 EFL=00010086 [--S--P-] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =007b 00000000 ffffffff 00c0f300 DPL=3 DS [-WA]
CS =0060 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA]
SS =0068 00000000 ffffffff 00c09300 DPL=0 DS [-WA]
DS =007b 00000000 ffffffff 00c0f300 DPL=3 DS [-WA]
FS =00d8 2c044000 ffffffff 00809300 DPL=0 DS16 [-WA]
GS =0033 081a44c8 01000fff 00d0f300 DPL=3 DS [-WA]
LDT=0000 00000000 ffffffff 00000000
TR =0080 f6ea0c80 0000206b 00008b00 DPL=0 TSS32-busy
GDT= f6e99000 000000ff
IDT= fffbb000 000007ff
CR0=80050033 CR2=b757d000 CR3=35d31000 CR4=001406d0
Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
Reviewed-by: Jiang Biao <jiang.biao2@zte.com.cn>
---
arch/x86/kvm/emulate.c | 7 +++++--
arch/x86/kvm/x86.c | 4 +++-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 4c4f426..4779468 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -5105,8 +5105,11 @@ int x86_decode_insn(struct x86_emulate_ctxt *ctxt, void *insn, int insn_len)
memcpy(ctxt->fetch.data, insn, insn_len);
else {
rc = __do_insn_fetch_bytes(ctxt, 1);
- if (rc != X86EMUL_CONTINUE)
- return rc;
+ if (rc != X86EMUL_CONTINUE) {
+ if (rc == X86EMUL_PROPAGATE_FAULT)
+ ctxt->have_exception = true;
+ return rc;
+ }
}
switch (mode) {
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 0046aa7..a477f92 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -6087,8 +6087,10 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu,
if (reexecute_instruction(vcpu, cr2, write_fault_to_spt,
emulation_type))
return EMULATE_DONE;
- if (ctxt->have_exception && inject_emulated_exception(vcpu))
+ if (ctxt->have_exception) {
+ inject_emulated_exception(vcpu);
return EMULATE_DONE;
+ }
if (emulation_type & EMULTYPE_SKIP)
return EMULATE_FAIL;
return handle_emulation_failure(vcpu, emulation_type);
--
1.8.3.1
^ permalink raw reply related
* [RFC RESEND PATCH] drm/rockchip: update cursors asynchronously through atomic.
From: Sean Paul @ 2018-07-23 14:36 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20180627211447.20927-1-enric.balletbo@collabora.com>
On Wed, Jun 27, 2018 at 11:14:47PM +0200, Enric Balletbo i Serra wrote:
> Add support to async updates of cursors by using the new atomic
> interface for that.
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
LGTM. Given rockchip hasn't weighed in on the patch, and that you've tested it
on real hardware, let's land it.
Reviewed-by: Sean Paul <seanpaul@chromium.org>
> ---
> I am sending this as RFC because I still don't have a deep knowledge of
> the hw and I am not sure if the vop_plane_update function can be reused
> in both cases, atomic_updates and atomic_async_updates. I think that
> someone with more knowledge should take a look. The patch was tested on
> a Samsung Chromebook Plus in two ways.
>
> 1. Running all igt kms_cursor_legacy and kms_atomic at plane_cursor_legacy
> tests and see that there is no regression after the patch.
>
> 2. Running weston using the atomic API.
>
> Best regards,
> Enric
>
> drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 80 ++++++++++++++++-----
> 1 file changed, 64 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index 53d4afe15278..1eb6bda924af 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -688,8 +688,7 @@ static void vop_plane_atomic_disable(struct drm_plane *plane,
> spin_unlock(&vop->reg_lock);
> }
>
> -static void vop_plane_atomic_update(struct drm_plane *plane,
> - struct drm_plane_state *old_state)
> +static void vop_plane_update(struct drm_plane *plane)
> {
> struct drm_plane_state *state = plane->state;
> struct drm_crtc *crtc = state->crtc;
> @@ -710,20 +709,6 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
> bool rb_swap;
> int format;
>
> - /*
> - * can't update plane when vop is disabled.
> - */
> - if (WARN_ON(!crtc))
> - return;
> -
> - if (WARN_ON(!vop->is_enabled))
> - return;
> -
> - if (!state->visible) {
> - vop_plane_atomic_disable(plane, old_state);
> - return;
> - }
> -
> obj = rockchip_fb_get_gem_obj(fb, 0);
> rk_obj = to_rockchip_obj(obj);
>
> @@ -794,10 +779,73 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
> spin_unlock(&vop->reg_lock);
> }
>
> +static void vop_plane_atomic_update(struct drm_plane *plane,
> + struct drm_plane_state *old_state)
> +{
> + struct drm_plane_state *state = plane->state;
> + struct vop *vop = to_vop(state->crtc);
> +
> + /*
> + * can't update plane when vop is disabled.
> + */
> + if (WARN_ON(!state->crtc))
> + return;
> +
> + if (WARN_ON(!vop->is_enabled))
> + return;
> +
> + if (!state->visible) {
> + vop_plane_atomic_disable(plane, old_state);
> + return;
> + }
> +
> + vop_plane_update(plane);
> +}
> +
> +static int vop_plane_atomic_async_check(struct drm_plane *plane,
> + struct drm_plane_state *state)
> +{
> + struct drm_crtc_state *crtc_state;
> +
> + crtc_state = drm_atomic_get_existing_crtc_state(state->state,
> + state->crtc);
> + if (WARN_ON(!crtc_state))
> + return -EINVAL;
> +
> + if (!crtc_state->active)
> + return -EINVAL;
> +
> + if (plane->state->crtc != state->crtc ||
> + plane->state->src_w != state->src_w ||
> + plane->state->src_h != state->src_h ||
> + plane->state->crtc_w != state->crtc_w ||
> + plane->state->crtc_h != state->crtc_h ||
> + !plane->state->fb ||
> + plane->state->fb != state->fb)
> + return -EINVAL;
> +
> + return 0;
> +}
> +
> +static void vop_plane_atomic_async_update(struct drm_plane *plane,
> + struct drm_plane_state *new_state)
> +{
> + plane->state->src_x = new_state->src_x;
> + plane->state->src_y = new_state->src_y;
> + plane->state->crtc_x = new_state->crtc_x;
> + plane->state->crtc_y = new_state->crtc_y;
> + plane->state->fb = new_state->fb;
> + *plane->state = *new_state;
> +
> + vop_plane_update(plane);
> +}
> +
> static const struct drm_plane_helper_funcs plane_helper_funcs = {
> .atomic_check = vop_plane_atomic_check,
> .atomic_update = vop_plane_atomic_update,
> .atomic_disable = vop_plane_atomic_disable,
> + .atomic_async_check = vop_plane_atomic_async_check,
> + .atomic_async_update = vop_plane_atomic_async_update,
> };
>
> static const struct drm_plane_funcs vop_plane_funcs = {
> --
> 2.18.0
>
--
Sean Paul, Software Engineer, Google / Chromium OS
^ permalink raw reply
* Re: [RFC RESEND PATCH] drm/rockchip: update cursors asynchronously through atomic.
From: Sean Paul @ 2018-07-23 14:36 UTC (permalink / raw)
To: Enric Balletbo i Serra
Cc: kernel, Sean Paul, Gustavo Padovan, David Airlie, linux-kernel,
dri-devel, linux-rockchip, Stéphane Marchesin, Tomasz Figa,
linux-arm-kernel
In-Reply-To: <20180627211447.20927-1-enric.balletbo@collabora.com>
On Wed, Jun 27, 2018 at 11:14:47PM +0200, Enric Balletbo i Serra wrote:
> Add support to async updates of cursors by using the new atomic
> interface for that.
>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
LGTM. Given rockchip hasn't weighed in on the patch, and that you've tested it
on real hardware, let's land it.
Reviewed-by: Sean Paul <seanpaul@chromium.org>
> ---
> I am sending this as RFC because I still don't have a deep knowledge of
> the hw and I am not sure if the vop_plane_update function can be reused
> in both cases, atomic_updates and atomic_async_updates. I think that
> someone with more knowledge should take a look. The patch was tested on
> a Samsung Chromebook Plus in two ways.
>
> 1. Running all igt kms_cursor_legacy and kms_atomic@plane_cursor_legacy
> tests and see that there is no regression after the patch.
>
> 2. Running weston using the atomic API.
>
> Best regards,
> Enric
>
> drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 80 ++++++++++++++++-----
> 1 file changed, 64 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> index 53d4afe15278..1eb6bda924af 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
> @@ -688,8 +688,7 @@ static void vop_plane_atomic_disable(struct drm_plane *plane,
> spin_unlock(&vop->reg_lock);
> }
>
> -static void vop_plane_atomic_update(struct drm_plane *plane,
> - struct drm_plane_state *old_state)
> +static void vop_plane_update(struct drm_plane *plane)
> {
> struct drm_plane_state *state = plane->state;
> struct drm_crtc *crtc = state->crtc;
> @@ -710,20 +709,6 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
> bool rb_swap;
> int format;
>
> - /*
> - * can't update plane when vop is disabled.
> - */
> - if (WARN_ON(!crtc))
> - return;
> -
> - if (WARN_ON(!vop->is_enabled))
> - return;
> -
> - if (!state->visible) {
> - vop_plane_atomic_disable(plane, old_state);
> - return;
> - }
> -
> obj = rockchip_fb_get_gem_obj(fb, 0);
> rk_obj = to_rockchip_obj(obj);
>
> @@ -794,10 +779,73 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
> spin_unlock(&vop->reg_lock);
> }
>
> +static void vop_plane_atomic_update(struct drm_plane *plane,
> + struct drm_plane_state *old_state)
> +{
> + struct drm_plane_state *state = plane->state;
> + struct vop *vop = to_vop(state->crtc);
> +
> + /*
> + * can't update plane when vop is disabled.
> + */
> + if (WARN_ON(!state->crtc))
> + return;
> +
> + if (WARN_ON(!vop->is_enabled))
> + return;
> +
> + if (!state->visible) {
> + vop_plane_atomic_disable(plane, old_state);
> + return;
> + }
> +
> + vop_plane_update(plane);
> +}
> +
> +static int vop_plane_atomic_async_check(struct drm_plane *plane,
> + struct drm_plane_state *state)
> +{
> + struct drm_crtc_state *crtc_state;
> +
> + crtc_state = drm_atomic_get_existing_crtc_state(state->state,
> + state->crtc);
> + if (WARN_ON(!crtc_state))
> + return -EINVAL;
> +
> + if (!crtc_state->active)
> + return -EINVAL;
> +
> + if (plane->state->crtc != state->crtc ||
> + plane->state->src_w != state->src_w ||
> + plane->state->src_h != state->src_h ||
> + plane->state->crtc_w != state->crtc_w ||
> + plane->state->crtc_h != state->crtc_h ||
> + !plane->state->fb ||
> + plane->state->fb != state->fb)
> + return -EINVAL;
> +
> + return 0;
> +}
> +
> +static void vop_plane_atomic_async_update(struct drm_plane *plane,
> + struct drm_plane_state *new_state)
> +{
> + plane->state->src_x = new_state->src_x;
> + plane->state->src_y = new_state->src_y;
> + plane->state->crtc_x = new_state->crtc_x;
> + plane->state->crtc_y = new_state->crtc_y;
> + plane->state->fb = new_state->fb;
> + *plane->state = *new_state;
> +
> + vop_plane_update(plane);
> +}
> +
> static const struct drm_plane_helper_funcs plane_helper_funcs = {
> .atomic_check = vop_plane_atomic_check,
> .atomic_update = vop_plane_atomic_update,
> .atomic_disable = vop_plane_atomic_disable,
> + .atomic_async_check = vop_plane_atomic_async_check,
> + .atomic_async_update = vop_plane_atomic_async_update,
> };
>
> static const struct drm_plane_funcs vop_plane_funcs = {
> --
> 2.18.0
>
--
Sean Paul, Software Engineer, Google / Chromium OS
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply
* Re: [PATCH v36 0/5] Virtio-balloon: support free page reporting
From: Dr. David Alan Gilbert @ 2018-07-23 14:36 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: Wei Wang, virtio-dev, linux-kernel, virtualization, kvm, linux-mm,
mhocko, akpm, torvalds, pbonzini, liliang.opensource,
yang.zhang.wz, quan.xu0, nilal, riel, peterx
In-Reply-To: <20180723122342-mutt-send-email-mst@kernel.org>
* Michael S. Tsirkin (mst@redhat.com) wrote:
> On Fri, Jul 20, 2018 at 04:33:00PM +0800, Wei Wang wrote:
> > This patch series is separated from the previous "Virtio-balloon
> > Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT,
> > implemented by this series enables the virtio-balloon driver to report
> > hints of guest free pages to the host. It can be used to accelerate live
> > migration of VMs. Here is an introduction of this usage:
> >
> > Live migration needs to transfer the VM's memory from the source machine
> > to the destination round by round. For the 1st round, all the VM's memory
> > is transferred. From the 2nd round, only the pieces of memory that were
> > written by the guest (after the 1st round) are transferred. One method
> > that is popularly used by the hypervisor to track which part of memory is
> > written is to write-protect all the guest memory.
> >
> > This feature enables the optimization by skipping the transfer of guest
> > free pages during VM live migration. It is not concerned that the memory
> > pages are used after they are given to the hypervisor as a hint of the
> > free pages, because they will be tracked by the hypervisor and transferred
> > in the subsequent round if they are used and written.
> >
> > * Tests
> > - Test Environment
> > Host: Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
> > Guest: 8G RAM, 4 vCPU
> > Migration setup: migrate_set_speed 100G, migrate_set_downtime 2 second
> >
> > - Test Results
> > - Idle Guest Live Migration Time (results are averaged over 10 runs):
> > - Optimization v.s. Legacy = 409ms vs 1757ms --> ~77% reduction
> > (setting page poisoning zero and enabling ksm don't affect the
> > comparison result)
> > - Guest with Linux Compilation Workload (make bzImage -j4):
> > - Live Migration Time (average)
> > Optimization v.s. Legacy = 1407ms v.s. 2528ms --> ~44% reduction
> > - Linux Compilation Time
> > Optimization v.s. Legacy = 5min4s v.s. 5min12s
> > --> no obvious difference
>
> I'd like to see dgilbert's take on whether this kind of gain
> justifies adding a PV interfaces, and what kind of guest workload
> is appropriate.
>
> Cc'd.
Well, 44% is great ... although the measurement is a bit weird.
a) A 2 second downtime is very large; 300-500ms is more normal
b) I'm not sure what the 'average' is - is that just between a bunch of
repeated migrations?
c) What load was running in the guest during the live migration?
An interesting measurement to add would be to do the same test but
with a VM with a lot more RAM but the same load; you'd hope the gain
would be even better.
It would be interesting, especially because the users who are interested
are people creating VMs allocated with lots of extra memory (for the
worst case) but most of the time migrating when it's fairly idle.
Dave
>
>
> > ChangeLog:
> > v35->v36:
> > - remove the mm patch, as Linus has a suggestion to get free page
> > addresses via allocation, instead of reading from the free page
> > list.
> > - virtio-balloon:
> > - replace oom notifier with shrinker;
> > - the guest to host communication interface remains the same as
> > v32.
> > - allocate free page blocks and send to host one by one, and free
> > them after sending all the pages.
> >
> > For ChangeLogs from v22 to v35, please reference
> > https://lwn.net/Articles/759413/
> >
> > For ChangeLogs before v21, please reference
> > https://lwn.net/Articles/743660/
> >
> > Wei Wang (5):
> > virtio-balloon: remove BUG() in init_vqs
> > virtio_balloon: replace oom notifier with shrinker
> > virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
> > mm/page_poison: expose page_poisoning_enabled to kernel modules
> > virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON
> >
> > drivers/virtio/virtio_balloon.c | 456 ++++++++++++++++++++++++++++++------
> > include/uapi/linux/virtio_balloon.h | 7 +
> > mm/page_poison.c | 6 +
> > 3 files changed, 394 insertions(+), 75 deletions(-)
> >
> > --
> > 2.7.4
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply
* Re: [PATCH v36 0/5] Virtio-balloon: support free page reporting
From: Dr. David Alan Gilbert @ 2018-07-23 14:36 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: yang.zhang.wz, virtio-dev, riel, quan.xu0, kvm, nilal,
liliang.opensource, linux-kernel, virtualization, linux-mm,
pbonzini, akpm, mhocko, torvalds
In-Reply-To: <20180723122342-mutt-send-email-mst@kernel.org>
* Michael S. Tsirkin (mst@redhat.com) wrote:
> On Fri, Jul 20, 2018 at 04:33:00PM +0800, Wei Wang wrote:
> > This patch series is separated from the previous "Virtio-balloon
> > Enhancement" series. The new feature, VIRTIO_BALLOON_F_FREE_PAGE_HINT,
> > implemented by this series enables the virtio-balloon driver to report
> > hints of guest free pages to the host. It can be used to accelerate live
> > migration of VMs. Here is an introduction of this usage:
> >
> > Live migration needs to transfer the VM's memory from the source machine
> > to the destination round by round. For the 1st round, all the VM's memory
> > is transferred. From the 2nd round, only the pieces of memory that were
> > written by the guest (after the 1st round) are transferred. One method
> > that is popularly used by the hypervisor to track which part of memory is
> > written is to write-protect all the guest memory.
> >
> > This feature enables the optimization by skipping the transfer of guest
> > free pages during VM live migration. It is not concerned that the memory
> > pages are used after they are given to the hypervisor as a hint of the
> > free pages, because they will be tracked by the hypervisor and transferred
> > in the subsequent round if they are used and written.
> >
> > * Tests
> > - Test Environment
> > Host: Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz
> > Guest: 8G RAM, 4 vCPU
> > Migration setup: migrate_set_speed 100G, migrate_set_downtime 2 second
> >
> > - Test Results
> > - Idle Guest Live Migration Time (results are averaged over 10 runs):
> > - Optimization v.s. Legacy = 409ms vs 1757ms --> ~77% reduction
> > (setting page poisoning zero and enabling ksm don't affect the
> > comparison result)
> > - Guest with Linux Compilation Workload (make bzImage -j4):
> > - Live Migration Time (average)
> > Optimization v.s. Legacy = 1407ms v.s. 2528ms --> ~44% reduction
> > - Linux Compilation Time
> > Optimization v.s. Legacy = 5min4s v.s. 5min12s
> > --> no obvious difference
>
> I'd like to see dgilbert's take on whether this kind of gain
> justifies adding a PV interfaces, and what kind of guest workload
> is appropriate.
>
> Cc'd.
Well, 44% is great ... although the measurement is a bit weird.
a) A 2 second downtime is very large; 300-500ms is more normal
b) I'm not sure what the 'average' is - is that just between a bunch of
repeated migrations?
c) What load was running in the guest during the live migration?
An interesting measurement to add would be to do the same test but
with a VM with a lot more RAM but the same load; you'd hope the gain
would be even better.
It would be interesting, especially because the users who are interested
are people creating VMs allocated with lots of extra memory (for the
worst case) but most of the time migrating when it's fairly idle.
Dave
>
>
> > ChangeLog:
> > v35->v36:
> > - remove the mm patch, as Linus has a suggestion to get free page
> > addresses via allocation, instead of reading from the free page
> > list.
> > - virtio-balloon:
> > - replace oom notifier with shrinker;
> > - the guest to host communication interface remains the same as
> > v32.
> > - allocate free page blocks and send to host one by one, and free
> > them after sending all the pages.
> >
> > For ChangeLogs from v22 to v35, please reference
> > https://lwn.net/Articles/759413/
> >
> > For ChangeLogs before v21, please reference
> > https://lwn.net/Articles/743660/
> >
> > Wei Wang (5):
> > virtio-balloon: remove BUG() in init_vqs
> > virtio_balloon: replace oom notifier with shrinker
> > virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT
> > mm/page_poison: expose page_poisoning_enabled to kernel modules
> > virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON
> >
> > drivers/virtio/virtio_balloon.c | 456 ++++++++++++++++++++++++++++++------
> > include/uapi/linux/virtio_balloon.h | 7 +
> > mm/page_poison.c | 6 +
> > 3 files changed, 394 insertions(+), 75 deletions(-)
> >
> > --
> > 2.7.4
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
^ permalink raw reply
* Re: linux-next: Tree for Jul 23
From: Michael Ellerman @ 2018-07-23 14:35 UTC (permalink / raw)
To: Stephen Rothwell, Linux-Next Mailing List; +Cc: Linux Kernel Mailing List
In-Reply-To: <20180723200032.221a8f18@canb.auug.org.au>
Stephen Rothwell <sfr@canb.auug.org.au> writes:
> Hi all,
>
> Changes since 20180720:
>
> Dropped trees: xarray, ida (complex conflicts)
>
> The drm-msm tree gained a conflict against the drm tree and a build
> failure due to an interaction with the drm tree for which I added a
> merge fix patch.
>
> The kvm-arm tree gained a conflict against the arm64 tree.
>
> The driver-core tree gained a conflict against the net-next tree.
>
> The xarray tree gained complex conflicts against the nvdimm tree so I have
> dropped it for today (along with the ida tree that is built on top of it).
>
> The akpm-current tree gained a conflict against Linus' tree and also a
> build failure for which I reverted a commit.
>
> Non-merge commits (relative to Linus' tree): 7606
> 7110 files changed, 316203 insertions(+), 143278 deletions(-)
Hi Stephen,
Would you mind adding my "topic/hvc" branch to linux-next.
We (ppc) are notionally the maintainers for that code but it's used by
some other folks, so I'd like it to get some wider testing before I
commit it.
You should get:
9f65b81f36e3 ("tty: hvc: introduce the hv_ops.flush operation for hvc drivers")
cheers
^ permalink raw reply
* Re: [stable-4.14 00/23] block/scsi multiqueue performance enhancement and
From: Greg KH @ 2018-07-23 13:33 UTC (permalink / raw)
To: Jack Wang; +Cc: stable
In-Reply-To: <1532352285-13589-1-git-send-email-jinpuwang@gmail.com>
On Mon, Jul 23, 2018 at 03:24:22PM +0200, Jack Wang wrote:
> Hi Greg,
>
> Please consider this patchset, which include block/scsi multiqueue performance
> enhancement and bugfix.
What exactly is the performance enhancement? How can you measure it?
How did you measure it?
Which one(s) are the bugfixes in this series? Why not just submit those
separately as they should be "obvious fixes", right?
And why didn't you cc: the subsystem maintainer and mailing list here?
I need their ack before I could take these.
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH v7 4/4] kexec_file: Load kernel at top of system RAM if required
From: Michal Hocko @ 2018-07-23 14:34 UTC (permalink / raw)
To: Baoquan He
Cc: nicolas.pitre, brijesh.singh, devicetree, airlied, linux-pci,
richard.weiyang, keith.busch, jcmvbkbc, baiyaowei, kys,
frowand.list, dan.j.williams, lorenzo.pieralisi, sthemmin,
linux-nvdimm, patrik.r.jakobsson, andy.shevchenko, linux-input,
gustavo, bp, dyoung, vgoyal, thomas.lendacky, haiyangz,
maarten.lankhorst, josh, jglisse, robh+dt, seanpaul, bhelgaas,
tglx, yinghai, jonathan.derrick, chris, monstr, linux-parisc,
gregkh, dmitry.torokhov, kexec, linux-kernel, ebiederm, devel,
Andrew Morton, fengguang.wu, linuxppc-dev, davem
In-Reply-To: <20180719151753.GB7147@localhost.localdomain>
On Thu 19-07-18 23:17:53, Baoquan He wrote:
> Kexec has been a formal feature in our distro, and customers owning
> those kind of very large machine can make use of this feature to speed
> up the reboot process. On uefi machine, the kexec_file loading will
> search place to put kernel under 4G from top to down. As we know, the
> 1st 4G space is DMA32 ZONE, dma, pci mmcfg, bios etc all try to consume
> it. It may have possibility to not be able to find a usable space for
> kernel/initrd. From the top down of the whole memory space, we don't
> have this worry.
I do not have the full context here but let me note that you should be
careful when doing top-down reservation because you can easily get into
hotplugable memory and break the hotremove usecase. We even warn when
this is done. See memblock_find_in_range_node
--
Michal Hocko
SUSE Labs
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply
* Re: [PATCH v7 4/4] kexec_file: Load kernel at top of system RAM if required
From: Michal Hocko @ 2018-07-23 14:34 UTC (permalink / raw)
To: Baoquan He
Cc: nicolas.pitre, brijesh.singh, devicetree, airlied, linux-pci,
richard.weiyang, jcmvbkbc, baiyaowei, kys, frowand.list,
lorenzo.pieralisi, sthemmin, linux-nvdimm, patrik.r.jakobsson,
andy.shevchenko, linux-input, gustavo, bp, dyoung,
thomas.lendacky, haiyangz, maarten.lankhorst, josh, jglisse,
robh+dt, seanpaul, bhelgaas, tglx, yinghai, jonathan.derrick,
chris, monstr, linux-parisc, gregkh, dmitry.torokhov, kexec,
linux-kernel, ebiederm, devel, Andrew Morton, fengguang.wu,
linuxppc-dev, davem
In-Reply-To: <20180719151753.GB7147@localhost.localdomain>
On Thu 19-07-18 23:17:53, Baoquan He wrote:
> Kexec has been a formal feature in our distro, and customers owning
> those kind of very large machine can make use of this feature to speed
> up the reboot process. On uefi machine, the kexec_file loading will
> search place to put kernel under 4G from top to down. As we know, the
> 1st 4G space is DMA32 ZONE, dma, pci mmcfg, bios etc all try to consume
> it. It may have possibility to not be able to find a usable space for
> kernel/initrd. From the top down of the whole memory space, we don't
> have this worry.
I do not have the full context here but let me note that you should be
careful when doing top-down reservation because you can easily get into
hotplugable memory and break the hotremove usecase. We even warn when
this is done. See memblock_find_in_range_node
--
Michal Hocko
SUSE Labs
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
^ permalink raw reply
* Re: [PATCH v7 4/4] kexec_file: Load kernel at top of system RAM if required
From: Michal Hocko @ 2018-07-23 14:34 UTC (permalink / raw)
To: Baoquan He
Cc: Andrew Morton, linux-kernel, robh+dt, dan.j.williams,
nicolas.pitre, josh, fengguang.wu, bp, andy.shevchenko,
patrik.r.jakobsson, airlied, kys, haiyangz, sthemmin,
dmitry.torokhov, frowand.list, keith.busch, jonathan.derrick,
lorenzo.pieralisi, bhelgaas, tglx, brijesh.singh, jglisse,
thomas.lendacky, gregkh, baiyaowei, richard.weiyang, devel,
linux-input, linux-nvdimm, devicetree
In-Reply-To: <20180719151753.GB7147@localhost.localdomain>
On Thu 19-07-18 23:17:53, Baoquan He wrote:
> Kexec has been a formal feature in our distro, and customers owning
> those kind of very large machine can make use of this feature to speed
> up the reboot process. On uefi machine, the kexec_file loading will
> search place to put kernel under 4G from top to down. As we know, the
> 1st 4G space is DMA32 ZONE, dma, pci mmcfg, bios etc all try to consume
> it. It may have possibility to not be able to find a usable space for
> kernel/initrd. From the top down of the whole memory space, we don't
> have this worry.
I do not have the full context here but let me note that you should be
careful when doing top-down reservation because you can easily get into
hotplugable memory and break the hotremove usecase. We even warn when
this is done. See memblock_find_in_range_node
--
Michal Hocko
SUSE Labs
^ permalink raw reply
* Re: [PATCH v7 4/4] kexec_file: Load kernel at top of system RAM if required
From: Michal Hocko @ 2018-07-23 14:34 UTC (permalink / raw)
To: Baoquan He
Cc: Andrew Morton, linux-kernel, robh+dt, dan.j.williams,
nicolas.pitre, josh, fengguang.wu, bp, andy.shevchenko,
patrik.r.jakobsson, airlied, kys, haiyangz, sthemmin,
dmitry.torokhov, frowand.list, keith.busch, jonathan.derrick,
lorenzo.pieralisi, bhelgaas, tglx, brijesh.singh, jglisse,
thomas.lendacky, gregkh, baiyaowei, richard.weiyang, devel,
linux-input, linux-nvdimm, devicetree
In-Reply-To: <20180719151753.GB7147@localhost.localdomain>
On Thu 19-07-18 23:17:53, Baoquan He wrote:
> Kexec has been a formal feature in our distro, and customers owning
> those kind of very large machine can make use of this feature to speed
> up the reboot process. On uefi machine, the kexec_file loading will
> search place to put kernel under 4G from top to down. As we know, the
> 1st 4G space is DMA32 ZONE, dma, pci mmcfg, bios etc all try to consume
> it. It may have possibility to not be able to find a usable space for
> kernel/initrd. From the top down of the whole memory space, we don't
> have this worry.
I do not have the full context here but let me note that you should be
careful when doing top-down reservation because you can easily get into
hotplugable memory and break the hotremove usecase. We even warn when
this is done. See memblock_find_in_range_node
--
Michal Hocko
SUSE Labs
^ permalink raw reply
* Re: [PATCH 4/5] coccinelle: put sane filenames into output patches
From: Derrick Stolee @ 2018-07-23 14:34 UTC (permalink / raw)
To: SZEDER Gábor, Junio C Hamano
Cc: git, René Scharfe, Nguyễn Thái Ngọc Duy
In-Reply-To: <20180723135100.24288-5-szeder.dev@gmail.com>
On 7/23/2018 9:50 AM, SZEDER Gábor wrote:
> Coccinelle outputs its suggested transformations as patches, whose
> header looks something like this:
>
> --- commit.c
> +++ /tmp/cocci-output-19250-7ae78a-commit.c
>
> Note the lack of 'diff --opts <old> <new>' line, the differing number
> of path components on the --- and +++ lines, and the nonsensical
> filename on the +++ line. 'patch -p0' can still apply these patches,
> as it takes the filename to be modified from the --- line. Alas, 'git
> apply' can't, because it takes the filename from the +++ line, and
> then complains about the nonexisting file.
>
> Pass the '--patch .' options to Coccinelle via the SPATCH_FLAGS 'make'
> variable, as it seems to make it generate proper context diff patches,
> with the header starting with a 'diff ...' line and containing sane
> filenames. The resulting 'contrib/coccinelle/*.cocci.patch' files
> then can be applied both with 'git apply' and 'patch' (even without
> '-p0').
>
> Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
> ---
> Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 73e2d16926..72ea29df4e 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -564,7 +564,7 @@ SPATCH = spatch
> export TCL_PATH TCLTK_PATH
>
> SPARSE_FLAGS =
> -SPATCH_FLAGS = --all-includes
> +SPATCH_FLAGS = --all-includes --patch .
Thank you for this! These garbage filenames cause significant pain when
trying to apply the suggested patch.
^ permalink raw reply
* [PATCH] drm/etnaviv: fix crash in GPU suspend when init failed due to buffer placement
From: Lucas Stach @ 2018-07-23 14:34 UTC (permalink / raw)
To: dri-devel; +Cc: patchwork-lst, etnaviv, kernel, Russell King
When the suballocator was unable to provide a suitable buffer for the MMUv1
linear window, we roll back the GPU initialization. As the GPU is runtime
resumed at that point we need to clear the kernel cmdbuf suballoc entry to
properly skip any attempt to manipulate the cmdbuf when the GPU gets shut
down in the runtime suspend later on.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index 18c2224ba0b8..ab8dfe7f69d6 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -799,6 +799,7 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
free_buffer:
etnaviv_cmdbuf_free(&gpu->buffer);
+ gpu->buffer.suballoc = NULL;
destroy_iommu:
etnaviv_iommu_destroy(gpu->mmu);
gpu->mmu = NULL;
--
2.18.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
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.