From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH] linux: force proper address translation in Dell RBU Date: Thu, 19 Nov 2009 12:22:45 -0500 Message-ID: <20091119172245.GA9507@phenom.dumpdata.com> References: <4B0522FB0200007800020C9D@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <4B0522FB0200007800020C9D@vpn.id2.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jan Beulich Cc: xen-devel@lists.xensource.com, Douglas_Warzecha@Dell.com List-Id: xen-devel@lists.xenproject.org On Thu, Nov 19, 2009 at 09:50:35AM +0000, Jan Beulich wrote: > Replacing virt_to_phys() by virt_to_bus(), and adding code to ensure > contiguity as required by the firmware. > > As usual, written and tested on 2.6.27.37 and made apply to the 2.6.18 > tree without further testing. > > Signed-off-by: Jan Beulich > Tested-by: Douglas Warzecha > > --- sle11-2009-10-16.orig/drivers/firmware/dell_rbu.c 2009-02-02 09:22:26.000000000 +0100 > +++ sle11-2009-10-16/drivers/firmware/dell_rbu.c 2009-10-26 16:34:16.000000000 +0100 > @@ -169,9 +169,28 @@ static int create_packet(void *data, siz > spin_lock(&rbu_data.lock); > goto out_alloc_packet_array; > } > +#ifdef CONFIG_XEN > + if (ordernum && xen_create_contiguous_region( > + (unsigned long)packet_data_temp_buf, ordernum, 0)) { > + free_pages((unsigned long)packet_data_temp_buf, > + ordernum); > + printk(KERN_WARNING > + "dell_rbu:%s: failed to adjust new " > + "packet\n", __func__); > + retval = -ENOMEM; > + spin_lock(&rbu_data.lock); > + goto out_alloc_packet_array; > + } > +#endif I was under the impression we did not want to create any of the #ifdef CONFIG_XEN at all. As a matter of fact, to actually eliminate or minimize the level of them. Is there no other way to do this?