public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jon Mason <jdmason@us.ibm.com>
To: Muli Ben-Yehuda <muli@il.ibm.com>
Cc: Jon Mason <jdmason@us.ibm.com>,
	linux-kernel@vger.kernel.org, ak@suse.de, tony.luck@intel.com,
	linux-ia64@vger.kernel.org, mulix@mulix.org
Subject: Re: [PATCH 2/3] swiotlb: create __alloc_bootmem_low_nopanic and add support in SWIOTLB
Date: Sun, 7 May 2006 23:58:23 -0500	[thread overview]
Message-ID: <20060508045822.GB7729@us.ibm.com> (raw)
In-Reply-To: <20060507085036.GF6015@rhun.haifa.ibm.com>

On Sun, May 07, 2006 at 11:50:36AM +0300, Muli Ben-Yehuda wrote:
> On Thu, May 04, 2006 at 03:59:29PM -0500, Jon Mason wrote:
> 
> > Per Andi Kleen's suggestion in the review of our Calgary IOMMU code, I
> > tried to use the alloc_bootmem_nopanic that Andi recently added.
> > Unfortunately, it needs low mem for our translation tables, so we needed
> > a new function to do this.
> > 
> > I have updated swiotlb to take advantage of this new function (and
> > added an error path to lib/swiotlb.c and resulting fallout from
> > calling functions).
> > 
> > This patch has been tested individually and cumulatively on x86_64 and
> > cross-compile tested on IA64.  Since I have no IA64 hardware, any
> > testing on that platform would be appreciated.
> 
> A couple of minor nits below, otherwise looks good.
> 
> > Signed-off-by: Jon Mason <jdmason@us.ibm.com>
> 
> Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
> 
> > diff -r b5bb5fea7490 -r 62dc1eb0c5e2 include/linux/bootmem.h
> > --- a/include/linux/bootmem.h	Tue Apr 25 18:18:55 2006
> > +++ b/include/linux/bootmem.h	Wed Apr 26 16:12:39 2006
> > @@ -46,6 +46,7 @@
> >  extern void __init free_bootmem (unsigned long addr, unsigned long size);
> >  extern void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal);
> >  extern void * __init __alloc_bootmem_nopanic (unsigned long size, unsigned long align, unsigned long goal);
> > +extern void * __init __alloc_bootmem_low_nopanic(unsigned long size, unsigned long align, unsigned long goal);
> 
> Would be nice to convert this and the preceding declarations to 80
> chars per line, please.
> 
> > diff -r b5bb5fea7490 -r 62dc1eb0c5e2 mm/bootmem.c
> > --- a/mm/bootmem.c	Tue Apr 25 18:18:55 2006
> > +++ b/mm/bootmem.c	Wed Apr 26 16:12:39 2006
> > @@ -463,3 +463,16 @@
> >  {
> >  	return __alloc_bootmem_core(pgdat->bdata, size, align, goal, LOW32LIMIT);
> >  }
> > +
> > +void * __init __alloc_bootmem_low_nopanic(unsigned long size, 
> > +					unsigned long align, unsigned long goal)
> > +{
> > +	bootmem_data_t *bdata;
> > +	void *ptr;
> > +
> > +	list_for_each_entry(bdata, &bdata_list, list)
> > +		if ((ptr = __alloc_bootmem_core(bdata, size, align, goal, 
> > +						LOW32LIMIT)))
> > +			return(ptr);
> 
> This should be 'return ptr';

I completely agree with both nits, but the changes follow the style
currently in the files.  I'll do a clean-up patch to both of the
files in question.  :)

Thanks,
Jon

> 
> Cheers,
> Muli

  reply	other threads:[~2006-05-08  4:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-04 20:59 [PATCH 2/3] swiotlb: create __alloc_bootmem_low_nopanic and add support in SWIOTLB Jon Mason
2006-05-07  8:50 ` Muli Ben-Yehuda
2006-05-08  4:58   ` Jon Mason [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-05-08 23:28 Luck, Tony
2006-05-09 20:29 ` Jon Mason
2006-05-09 21:04 Luck, Tony
2006-05-09 21:26 ` Jon Mason
2006-05-09 22:08 Luck, Tony

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=20060508045822.GB7729@us.ibm.com \
    --to=jdmason@us.ibm.com \
    --cc=ak@suse.de \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=muli@il.ibm.com \
    --cc=mulix@mulix.org \
    --cc=tony.luck@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox