From patchwork Fri Jun 10 16:34:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Emilio Cota X-Patchwork-Id: 9170099 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 914356048C for ; Fri, 10 Jun 2016 16:37:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 843B0271E0 for ; Fri, 10 Jun 2016 16:37:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7937B28342; Fri, 10 Jun 2016 16:37:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, FAKE_REPLY_C, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E27DC271E0 for ; Fri, 10 Jun 2016 16:37:25 +0000 (UTC) Received: from localhost ([::1]:43344 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBPQy-0004aI-Pr for patchwork-qemu-devel@patchwork.kernel.org; Fri, 10 Jun 2016 12:37:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBPOU-00039k-KT for qemu-devel@nongnu.org; Fri, 10 Jun 2016 12:34:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bBPOP-000163-Gs for qemu-devel@nongnu.org; Fri, 10 Jun 2016 12:34:49 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:58622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bBPON-00014t-4w for qemu-devel@nongnu.org; Fri, 10 Jun 2016 12:34:45 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 2AEF521BA4; Fri, 10 Jun 2016 12:34:33 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Fri, 10 Jun 2016 12:34:33 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=braap.org; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:subject:to:x-sasl-enc:x-sasl-enc; s= mesmtp; bh=5+5VkMxsd7nCnSMHPf6eYApGS+E=; b=DS9QCUFZyCR7mYm+TIl67 jdGc7r+5UeSUwEdJpV+JpA/7ZrxDwtNdzZCgfCUEUC6SN/eTyas5CTQvqfLp53RC 3iL78/sJJDIVEeXpMuiKLIygpz1MUp6/arALrweEuGg8rEwO85xS7Q2za2pFw67N 33aZz8WfeUvLla0ZaID4hE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=smtpout; bh=5+5VkMxsd7nCnSMHPf6eYApGS+ E=; b=NcYG/KIwQELs/QWo1d13ZnB5eEOlzSJh6dWPVLhy6O4MBPxdym9NlFyKqo X7fmVPP1pVnjJiLnwy2ioY/e/crCaT1a0xjuSPp2CRkoYmxPPriQ4ptXf1181k/k jeLHlW8qyciSrDnNpN3AsfRo20GR2Tkhd0P5s0124CmuzSUJQ= X-Sasl-enc: FMWe2iDTgc7ljDQrYcDO+JnwGtVdN8J8+VxrCIYVbpeA 1465576472 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id CD91FCCDB2; Fri, 10 Jun 2016 12:34:32 -0400 (EDT) Date: Fri, 10 Jun 2016 12:34:32 -0400 From: "Emilio G. Cota" To: Peter Maydell Message-ID: <20160610163432.GA22231@flamenco> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.26 Subject: Re: [Qemu-devel] [PULL 00/15] tb hash improvements X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: QEMU Developers , Richard Henderson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Jun 10, 2016 at 16:33:10 +0100, Peter Maydell wrote: > Fails to build on ppc64be :-( > > In file included from /home/pm215/qemu/include/qemu/thread.h:4:0, > from /home/pm215/qemu/include/block/aio.h:20, > from /home/pm215/qemu/include/block/block.h:4, > from /home/pm215/qemu/include/monitor/monitor.h:6, > from /home/pm215/qemu/trace/control.c:23: > /home/pm215/qemu/include/qemu/processor.h:24:35: error: expected > identifier or ‘(’ before string constant > "or 2, 2, 2;" ::: "memory") On Fri, Jun 10, 2016 at 16:57:19 +0100, Peter Maydell wrote: > Also fails trying to build a test on 32-bit: > > /home/petmay01/qemu/tests/qht-bench.c: In function 'pr_params': > /home/petmay01/qemu/tests/qht-bench.c:270:5: error: format '%zu' > expects argument of type 'size_t', but argument 2 has type 'long > unsigned int' [-Werror=format=] > printf(" lookup range: %zu\n", lookup_range); Can you please test again after applying the appended delta? Thanks, Emilio diff --git a/include/qemu/processor.h b/include/qemu/processor.h index 42bcc99..c28d7e3 100644 --- a/include/qemu/processor.h +++ b/include/qemu/processor.h @@ -20,8 +20,12 @@ #elif defined(__powerpc64__) /* set Hardware Multi-Threading (HMT) priority to low; then back to medium */ -# define cpu_relax() asm volatile("or 1, 1, 1;" - "or 2, 2, 2;" ::: "memory") +# define cpu_relax() \ + do { \ + asm volatile("or 1,1,1"); \ + asm volatile("or 2,2,2"); \ + barrier(); \ + } while (0) #else # define cpu_relax() barrier() diff --git a/tests/qht-bench.c b/tests/qht-bench.c index c7f73b4..ad8efbc 100644 --- a/tests/qht-bench.c +++ b/tests/qht-bench.c @@ -267,8 +267,8 @@ static void pr_params(void) printf(" update rate: %f%%\n", update_rate * 100.0); printf(" offset: %ld\n", populate_offset); printf(" initial key range: %zu\n", init_range); - printf(" lookup range: %zu\n", lookup_range); - printf(" update range: %zu\n", update_range); + printf(" lookup range: %lu\n", lookup_range); + printf(" update range: %lu\n", update_range); } static void do_threshold(double rate, uint64_t *threshold)