Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp6984956imm; Tue, 24 Jul 2018 06:36:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcT/fxlalee0Np/QBH0wraDSOLdc/kW/U1j8gs5ZVYBYnsP1ejuxsABa8bBZ/+Odm0/bD6i X-Received: by 2002:a63:1262:: with SMTP id 34-v6mr16748035pgs.154.1532439408739; Tue, 24 Jul 2018 06:36:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532439408; cv=none; d=google.com; s=arc-20160816; b=alrF/P3pfvwxulzpU7U6E+7D8NXvx41H37dLdADfwbeiXcWHyxiwUdNpZBpHdjrP6A a38Ypfkr8WWPkjsrKE2ueJlUyKme1o7FoAJ405PbAjGPTA0oeXjHI4pZpbagxgiP4LAY 5BxXYYB3zaFGjZMp2khmSyTFePOyWSjWZFTRbTVIcrJGtLVYD3fYLT00GAi6CD/rbfm+ YKh0N4NHEoatJX6XufTgEPSrSJB/mJLVebyZSELlCAVY3otIxvE2W+yAHTzXsOqY5uCV dKeJoeNgOcbX1K2eMGWKIB8cjLzipHpHXnJGLx2LE75tEOK/2T4jFbWkkDEuSn7b8BxE AMwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=DxwA46rfNWzVwaysnN1wqm4+glssjQdjUYUo9bSlWLQ=; b=uY1XaS3uFqM0GLrvj6K8aNhkCaGOj4MEH5rvct5Lziwvb0eveFO4zEFxB/poa6nrhG ZjKxE4JHfQE3EXuPfkjJuu3+jkQiMHJMPWA0HCXBmd5juqHaNpr2x82V9lYzPhmAw0RD 9EPLKqm6bcBWGn5JOTC1tRM2W+j7bQ73Z/8dcQbQlQnlk55gpoIsendas0pADu3200yY YOrUV4o6NOmgq23Hby0Fh13LA2Dll/Rq1TPFlldO9q/xqI6FXuJ3FKGN6JNTuqwfNQ/w QvYmvviR01Q4G+NUbccXPuydi6JfrChQnsxp01038Xl0VTxEgIufRjCHNwGUcCpa5IeO FRaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gliWVfAP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v129-v6si10641883pgv.610.2018.07.24.06.36.33; Tue, 24 Jul 2018 06:36:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gliWVfAP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388385AbeGXOkW (ORCPT + 99 others); Tue, 24 Jul 2018 10:40:22 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:37659 "EHLO mail-oi0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388321AbeGXOkW (ORCPT ); Tue, 24 Jul 2018 10:40:22 -0400 Received: by mail-oi0-f45.google.com with SMTP id k81-v6so7461987oib.4 for ; Tue, 24 Jul 2018 06:33:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=DxwA46rfNWzVwaysnN1wqm4+glssjQdjUYUo9bSlWLQ=; b=gliWVfAPDD1qEJzU1dtPk9LI57iIeU1wXUEitTjlIoI98T/Aj4kZfRKkW2wqSRvxm3 b1ZPR8R4tobSvIJ4vQAI9OpmzrlltQvSBd+ME3NVciiEu8g1dv5f4krnAG8+3bD4DYIA P68lIlqbuSxgrqYWgT6b9h1aKy0U1XdNrrChE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=DxwA46rfNWzVwaysnN1wqm4+glssjQdjUYUo9bSlWLQ=; b=VvgR+5tVMuEOHVHFKmWQkTTORMybRtU9+AisFm/JHySBONlCdrnAzob0Ja6E7w0K+F OwPIfieo8ISbpiFVAo40zNmRXKLunyIl/zOSa5wida0jg+6soPApCi1T7d1lfLrv/hzu JbICLlIn0J3uH3ReFGeiGt0lbiabRxs4TRj4c0AX+3TOA8ax2zZa6th/MeIGfV6yG9eX l+HAWTIqPbeRuZ3j+qQcxddoppyFv91S11qS3qIFh2xBRQ8iFkVm3AWEBuDT/FOqpx5s Z554+NxmnGpUmfzdyAWWnhfceobFvOw7a2uqC1fctX3Z1dJQaxtfwoP87rVGfnFFhQCN ivdw== X-Gm-Message-State: AOUpUlHGMZGMTuLvHB6QdxKDwGExpOje0VfpucHGTo1Gg+btX+F1mhM6 F9XIbF9r0zchVwiIfRbYJxh92w== X-Received: by 2002:aca:de04:: with SMTP id v4-v6mr3408859oig.328.1532439230822; Tue, 24 Jul 2018 06:33:50 -0700 (PDT) Received: from di3.localdomain (68-248-140-212.lightspeed.austtx.sbcglobal.net. [68.248.140.212]) by smtp.gmail.com with ESMTPSA id r3-v6sm8502975oig.49.2018.07.24.06.33.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 06:33:50 -0700 (PDT) From: Brian Brooks To: ast@kernel.org, daniel@iogearbox.net, bjorn.topel@intel.com, magnus.karlsson@intel.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Brooks Subject: [PATCH bpf-next] samples/bpf: xdpsock: order memory on AArch64 Date: Tue, 24 Jul 2018 08:33:37 -0500 Message-Id: <20180724133337.20175-1-brian.brooks@linaro.org> X-Mailer: git-send-email 2.18.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Brian Brooks --- samples/bpf/xdpsock_user.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c index 5904b1543831..1e82f7c617c3 100644 --- a/samples/bpf/xdpsock_user.c +++ b/samples/bpf/xdpsock_user.c @@ -145,8 +145,13 @@ static void dump_stats(void); } while (0) #define barrier() __asm__ __volatile__("": : :"memory") +#ifdef __aarch64__ +#define u_smp_rmb() __asm__ __volatile__("dmb ishld": : :"memory") +#define u_smp_wmb() __asm__ __volatile__("dmb ishst": : :"memory") +#else #define u_smp_rmb() barrier() #define u_smp_wmb() barrier() +#endif #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) -- 2.18.0