From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id 404145686 for ; Fri, 3 Jun 2016 10:46:47 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id n184so115112370wmn.1 for ; Fri, 03 Jun 2016 01:46:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=03zs/SyET2ye6Sad6aB6INjL1ieX5zfopl6+eHESitY=; b=L09xsq8zz3E6HyQtp1lbHYNqef4S7sqQ/9sgDy9fnYYAGuJktS/f7pJdq6ahXxmtQu JU3zTCZHquzQQ+t48yuccjMUShtS0ZDjUf3g8FY7EO6KesyfLbK94J6wZPvDheEPvJgB iqOzwsAgstv60ekcsC4lWoB3umhsqXIEHc3x6AorX4vyd4cJG/5Ce0d7jzhW9tTfNz6+ rhh8EnqA1Atx8MF79HiArx7+WopHd23p9fmPEII7gbFpl1vtdiwW6gBZaLLDI1UPqBO2 BSzoC2lkBilVjwfpahfGb0s+0fMfGcXL+5nYd+dXu7ehXjw9AdfLTDkb5Szi/PQUEC06 /tcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=03zs/SyET2ye6Sad6aB6INjL1ieX5zfopl6+eHESitY=; b=ksXFtHOpJxO/dQvSiYW/xifkdSkqseXTTJzXdW/tDkqwvs23rN2ppVz7gtNRo9lB46 y9hNirl2Mowl6IYAHD+q/pdW7ilVPRPr9+jdLZlTUDAMKe9fZWyVsnpypNxsjJmbL1lZ 2Iht5yhg6PdBx7BXjckVM30MMa0LJqEPk9tJEIcdKs/KqLa/qL1MhecQJpG4Rns6JTTB tT7RFYs/VAbhPW/7nRipN+yfk4Gv1WzlKsfsLQp07QCX9URptkyFNpevF+vSQzl4LflA UiH42wdyPhr0kzIjWG7IafjRGYnQ64h7p8h/lLwctZXKlmOsoudOgCTUPp4pvugMS8lp D8lQ== X-Gm-Message-State: ALyK8tJ8t0Nbbj3lFz+kZ3RrbrK1rm+wCaMJJwYbzel9Q1zRImf3jFyDhKE38w50IFe2Culm X-Received: by 10.28.46.83 with SMTP id u80mr29518766wmu.35.1464943606919; Fri, 03 Jun 2016 01:46:46 -0700 (PDT) Received: from xps13.localnet ([2001:660:330f:38:7e7a:91ff:fe14:f0d2]) by smtp.gmail.com with ESMTPSA id c4sm4583268wjm.24.2016.06.03.01.46.45 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 03 Jun 2016 01:46:46 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Cc: Olivier MATZ , Damjan Marion Date: Fri, 03 Jun 2016 10:46:44 +0200 Message-ID: <21865506.clYb8lqSiq@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <57513CE3.60506@6wind.com> References: <1464941723-18154-1-git-send-email-thomas.monjalon@6wind.com> <57513CE3.60506@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] eal/x86: fix clang build with -O0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2016 08:46:47 -0000 2016-06-03 10:16, Olivier MATZ: > On 06/03/2016 10:15 AM, Thomas Monjalon wrote: > > From: Damjan Marion > > > > Clang seems to have a bug with asm inside inline function rte_xabort(): > > > > rte_rtm.h:56:15: error: invalid operand for inline asm constraint 'i' > > asm volatile(".byte 0xc6,0xf8,%P0" :: "i" (status) : "memory"); > > ^ > > > > It is seen only when building with EXTRA_CFLAGS=-O0. > > > > The workaround is to replace the inline function by a macro. > > > > Fixes: ba7468997ea6 ("spinlock: add HTM lock elision for x86") > > > > Signed-off-by: Damjan Marion > > Signed-off-by: Thomas Monjalon > > Generally speaking, it's not a good idea to replace a static inline by a > macro because it relaxes type checking. Looks ok in that case to > workaround the clang issue. > > Acked-by: Olivier Matz Thanks, This patch has been appplied very quickly for the purpose of a live demo at a VPP event: https://wiki.fd.io/view/Events