lkml.org 
[lkml]   [2012]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/11] kexec: introduce kexec_ops struct
On Fri, Sep 28, 2012 at 08:49:16AM +0100, Jan Beulich wrote:
> >>> On 27.09.12 at 20:06, Daniel Kiper <daniel.kiper@oracle.com> wrote:
> > Some kexec/kdump implementations (e.g. Xen PVOPS) on different archs could
> > not use default functions or require some changes in behavior of kexec/kdump
> > generic code. To cope with that problem kexec_ops struct was introduced.
> > It allows a developer to replace all or some functions and control some
> > functionality of kexec/kdump generic code.
>
> I'm not convinced that doing this at the architecture independent
> layer is really necessary/desirable. Nevertheless, if that's the right
> place, then everything else looks good to me, except for a
> cosmetic thing:

I do not like this patch, too. However, this is the simplest
solution. If you do not do that in that way then you must
duplicate most of kernel/kexec.c functionality in architecture
depndent files.

> > @@ -392,7 +435,7 @@ static void kimage_free_page_list(struct list_head *list)
> >
> > page = list_entry(pos, struct page, lru);
> > list_del(&page->lru);
> > - kimage_free_pages(page);
> > + (*kexec_ops.kimage_free_pages)(page);
>
> These constructs are generally better readable without the
> explicit yet redundant indirection:
>
> kexec_ops.kimage_free_pages(page);

I have done that in that way because during my work on memory hotplug
Andrew Morton aligned my patches to that syntax. However,
I do not insist on staying with it.

Daniel


\
 
 \ /
  Last update: 2012-10-01 14:21    [W:0.140 / U:1.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site