From: Stefano Stabellini <sstabellini@kernel.org> To: Hillf Danton <hdanton@sina.com> Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>, "Stefano Stabellini <sstabellini@kernel.org>" <sstabellini@kernel.org> Subject: Re: [patch 2/2] xen/arm: Use p2m entry with lock protection Date: Tue, 30 Apr 2019 09:21:05 -0700 (PDT) [thread overview] Message-ID: <alpine.DEB.2.10.1904300920220.27577@sstabellini-ThinkPad-X260> (raw) In-Reply-To: <20190430053741.F1C0C2080C@mail.kernel.org> [-- Attachment #1: Type: TEXT/PLAIN, Size: 1247 bytes --] On Tue, 30 Apr 2019, Hillf Danton wrote: > A new local variable is introduced for accessing p2m entry with lock protection. > Same comment about html and space damage. But the change looks correct. > > Cc: Stefano Stabellini <sstabellini@kernel.org> > > Signed-off-by: Hillf Danton <hdanton@sina.com> > > --- > > > > --- a/arch/arm/xen/p2m.c 2019-04-30 12:32:05.363768200 +0800 > > +++ b/arch/arm/xen/p2m.c 2019-04-30 12:58:19.854334100 +0800 > > @@ -70,8 +70,9 @@ unsigned long __pfn_to_mfn(unsigned long > > entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys); > > if (entry->pfn <= pfn && > > entry->pfn + entry->nr_pages > pfn) { > > + unsigned long mfn = entry->mfn + (pfn - entry->pfn); > > read_unlock_irqrestore(&p2m_lock, irqflags); > > - return entry->mfn + (pfn - entry->pfn); > > + return mfn; > > } > > if (pfn < entry->pfn) > > n = n->rb_left; > > -- > > > > > [-- Attachment #2: Type: text/plain, Size: 157 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
WARNING: multiple messages have this Message-ID (diff)
From: Stefano Stabellini <sstabellini@kernel.org> To: Hillf Danton <hdanton@sina.com> Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>, "Stefano Stabellini <sstabellini@kernel.org>" <sstabellini@kernel.org> Subject: Re: [Xen-devel] [patch 2/2] xen/arm: Use p2m entry with lock protection Date: Tue, 30 Apr 2019 09:21:05 -0700 (PDT) [thread overview] Message-ID: <alpine.DEB.2.10.1904300920220.27577@sstabellini-ThinkPad-X260> (raw) Message-ID: <20190430162105.Vba6ro0O2fFm9fuj41CEftDHpJ2puIshbCHizObIBpI@z> (raw) In-Reply-To: <20190430053741.F1C0C2080C@mail.kernel.org> [-- Attachment #1: Type: TEXT/PLAIN, Size: 1247 bytes --] On Tue, 30 Apr 2019, Hillf Danton wrote: > A new local variable is introduced for accessing p2m entry with lock protection. > Same comment about html and space damage. But the change looks correct. > > Cc: Stefano Stabellini <sstabellini@kernel.org> > > Signed-off-by: Hillf Danton <hdanton@sina.com> > > --- > > > > --- a/arch/arm/xen/p2m.c 2019-04-30 12:32:05.363768200 +0800 > > +++ b/arch/arm/xen/p2m.c 2019-04-30 12:58:19.854334100 +0800 > > @@ -70,8 +70,9 @@ unsigned long __pfn_to_mfn(unsigned long > > entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys); > > if (entry->pfn <= pfn && > > entry->pfn + entry->nr_pages > pfn) { > > + unsigned long mfn = entry->mfn + (pfn - entry->pfn); > > read_unlock_irqrestore(&p2m_lock, irqflags); > > - return entry->mfn + (pfn - entry->pfn); > > + return mfn; > > } > > if (pfn < entry->pfn) > > n = n->rb_left; > > -- > > > > > [-- Attachment #2: Type: text/plain, Size: 157 bytes --] _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel
next parent reply other threads:[~2019-04-30 16:21 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20190430053741.F1C0C2080C@mail.kernel.org> 2019-04-30 16:21 ` Stefano Stabellini [this message] 2019-04-30 16:21 ` [Xen-devel] [patch 2/2] xen/arm: Use p2m entry with lock protection Stefano Stabellini 2019-04-30 19:56 ` Stefano Stabellini 2019-04-30 19:56 ` [Xen-devel] " Stefano Stabellini 2019-04-30 5:37 Hillf Danton
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=alpine.DEB.2.10.1904300920220.27577@sstabellini-ThinkPad-X260 \ --to=sstabellini@kernel.org \ --cc=hdanton@sina.com \ --cc=xen-devel@lists.xenproject.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: linkBe 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.