From patchwork Tue Sep 10 13:11:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Capper X-Patchwork-Id: 19895 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f71.google.com (mail-yh0-f71.google.com [209.85.213.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4D83A25A72 for ; Tue, 10 Sep 2013 13:11:45 +0000 (UTC) Received: by mail-yh0-f71.google.com with SMTP id a41sf9368685yho.2 for ; Tue, 10 Sep 2013 06:11:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=aHuV9dNLPeafztOs8uQb6mQTaQ2Mf95hFwClrR1jA/M=; b=DdixHpJnZWNpMCUmSuION3pSpz7kazPiCJWC8jUJ26KBkPHHg4+tcXfzpEuzIGYr+c cYwfFzAS8dhC7KfGYjWqsCyz26/6TmxkeLKuasM6Ob6rD+hXG6HDvBAq8YzuZ48x/pxP RuKqHvxa1SD8FMQgppvDUf0cdQtKhVhuK2IjjBGrImZSycZE/do51sagEM1n3u3XKHz6 3E0kPcUuXZchKzVdeGyv4QANARUnqAV1tF3G5bO+7yy2Ahv0GZ9KRbB22Y0I6PcP/RMu e+hKDK0P/ertjCGFRcK/9Own9ezyIO1ICqKUZVB1KKv/prL3YKfhhqzvuod4oJHb9TdW jLEw== X-Received: by 10.58.118.201 with SMTP id ko9mr1825412veb.8.1378818704812; Tue, 10 Sep 2013 06:11:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.99.106 with SMTP id ep10ls2165613qeb.59.gmail; Tue, 10 Sep 2013 06:11:44 -0700 (PDT) X-Received: by 10.59.8.232 with SMTP id dn8mr22617817ved.8.1378818704541; Tue, 10 Sep 2013 06:11:44 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id un5si4428390vcb.22.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 06:11:44 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ha12so5197331vcb.9 for ; Tue, 10 Sep 2013 06:11:44 -0700 (PDT) X-Gm-Message-State: ALoCoQljdjhBx5QgRZzcc9A/LS9Tb+ROX36QeeA1Bch1XEWfpMGF9VF3mw8yW/16fthQTJ7yfnQL X-Received: by 10.58.133.66 with SMTP id pa2mr11032106veb.18.1378818704455; Tue, 10 Sep 2013 06:11:44 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp650vcz; Tue, 10 Sep 2013 06:11:43 -0700 (PDT) X-Received: by 10.180.89.147 with SMTP id bo19mr12894694wib.3.1378818702973; Tue, 10 Sep 2013 06:11:42 -0700 (PDT) Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) by mx.google.com with ESMTPS id vs1si6938106wjc.33.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 06:11:42 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.179 is neither permitted nor denied by best guess record for domain of steve.capper@linaro.org) client-ip=209.85.212.179; Received: by mail-wi0-f179.google.com with SMTP id hm2so659582wib.12 for ; Tue, 10 Sep 2013 06:11:42 -0700 (PDT) X-Received: by 10.194.93.135 with SMTP id cu7mr257125wjb.73.1378818702271; Tue, 10 Sep 2013 06:11:42 -0700 (PDT) Received: from marmot.wormnet.eu (marmot.wormnet.eu. [188.246.204.87]) by mx.google.com with ESMTPSA id fv10sm3175989wic.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Sep 2013 06:11:41 -0700 (PDT) From: Steve Capper To: libhugetlbfs-devel@lists.sourceforge.net Cc: patches@linaro.org, linaro-dev@lists.linaro.org, Steve Capper Subject: [PATCH 2/5] Aarch64 unit test fixes. Date: Tue, 10 Sep 2013 14:11:29 +0100 Message-Id: <1378818692-24952-3-git-send-email-steve.capper@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1378818692-24952-1-git-send-email-steve.capper@linaro.org> References: <1378818692-24952-1-git-send-email-steve.capper@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: steve.capper@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , On Aarch64, zero bytes are illegal instructions, this is added to the icache-hygiene test. In mremap-expand-slice-collision, if __LP64__ is defined then mappings are attempted at 1TB boundaries which are outside the allowable mmap region for Aarch64. For __aarch64__ we change this mapping back to 256MB slices. Signed-off-by: Steve Capper --- tests/icache-hygiene.c | 7 ++++--- tests/mremap-expand-slice-collision.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/icache-hygiene.c b/tests/icache-hygiene.c index 51792b3..876ce10 100644 --- a/tests/icache-hygiene.c +++ b/tests/icache-hygiene.c @@ -54,7 +54,7 @@ static void cacheflush(void *p) { #if defined(__powerpc__) asm volatile("dcbst 0,%0; sync; icbi 0,%0; isync" : : "r"(p)); -#elif defined(__arm__) +#elif defined(__arm__) || defined(__aarch64__) __clear_cache(p, p + COPY_SIZE); #endif } @@ -87,8 +87,9 @@ static void *sig_expected; static void sig_handler(int signum, siginfo_t *si, void *uc) { #if defined(__powerpc__) || defined(__powerpc64__) || defined(__ia64__) || \ - defined(__s390__) || defined(__s390x__) || defined(__sparc__) - /* On powerpc and ia64 and s390, 0 bytes are an illegal + defined(__s390__) || defined(__s390x__) || defined(__sparc__) || \ + defined(__aarch64__) + /* On powerpc, ia64, s390 and Aarch64, 0 bytes are an illegal * instruction, so, if the icache is cleared properly, we SIGILL * as soon as we jump into the cleared page */ if (signum == SIGILL) { diff --git a/tests/mremap-expand-slice-collision.c b/tests/mremap-expand-slice-collision.c index c25f4c6..853f3c3 100644 --- a/tests/mremap-expand-slice-collision.c +++ b/tests/mremap-expand-slice-collision.c @@ -38,7 +38,7 @@ void init_slice_boundary(int fd) unsigned long slice_size; void *p1, *p2, *heap; int slices_ok, i, rc; -#ifdef __LP64__ +#if defined(__LP64__) && !defined(__aarch64__) /* powerpc: 1TB slices starting at 1 TB */ slice_boundary = 0x10000000000; slice_size = 0x10000000000;