From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQjIB-0001r1-2x for qemu-devel@nongnu.org; Sun, 29 May 2011 12:56:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQjI9-0002Xm-6h for qemu-devel@nongnu.org; Sun, 29 May 2011 12:56:43 -0400 Received: from speedy.comstyle.com ([206.51.28.2]:47976 helo=mail.comstyle.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQjI9-0002XO-3g for qemu-devel@nongnu.org; Sun, 29 May 2011 12:56:41 -0400 Message-ID: <4DE27AC3.6000105@comstyle.com> Date: Sun, 29 May 2011 12:56:35 -0400 From: Brad MIME-Version: 1.0 References: <20110526030518.GA4978@rox.home.comstyle.com> <1306414681.1458.8.camel@Nokia-N900> <4DDEE2FD.2010405@comstyle.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] Add ppc_init_cacheline_sizes() function for OpenBSD. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: qemu-devel@nongnu.org On 26/05/11 8:20 PM, malc wrote: > On Thu, 26 May 2011, Brad wrote: > >> On 26/05/11 9:15 AM, malc wrote: >>> On Thu, 26 May 2011, Brad wrote: >>> >>>> ----- Original message ----- >>>>> On Wed, 25 May 2011, Brad wrote: >>>>> >>>>>> Add ppc_init_cacheline_sizes() function for OpenBSD to fix compilation >>>>>> of PowerPC host support for OpenBSD/powerpc based architectures. >>>>>> >>>>>> Signed-off-by: Brad Smith >>>>>> > > [..snip..] > >> >> Well this is the behavior of our kernel no matter what the CPU type is. >> >> from sys/arch/powerpc/cpu.h.. >> >> >> #define CACHELINE 32 /* Note that this value is really >> hardwired */ >> > > [..snip..] > > I sure hope that OpenBSD doesn't use this value for dcbz/a's on ppc's with > less than 32 bytes per cache line and am not sure i want to take this > patch even if the kernel itself does this, not without some nagging printf > in the init cache line function urging OpenBSD kernel developers to fix > things.. USE_DCBZ is not defined. /* * Fill the given physical page with zeros. */ void pmap_zero_page(struct vm_page *pg) { paddr_t pa = VM_PAGE_TO_PHYS(pg); #ifdef USE_DCBZ int i; paddr_t addr = zero_page; #endif /* simple_lock(&pmap_zero_page_lock); */ pmap_kenter_pa(zero_page, pa, VM_PROT_READ|VM_PROT_WRITE); #ifdef USE_DCBZ for (i = PAGE_SIZE/CACHELINESIZE; i>0; i--) { __asm volatile ("dcbz 0,%0" :: "r"(addr)); addr += CACHELINESIZE; } #else bzero((void *)zero_page, PAGE_SIZE); #endif pmap_kremove_pg(zero_page); /* simple_unlock(&pmap_zero_page_lock); */ } -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.