From patchwork Tue Feb 3 20:42:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 44312 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0B5112034D for ; Tue, 3 Feb 2015 20:48:15 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gq15sf22428899lab.3 for ; Tue, 03 Feb 2015 12:48:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=5DD+lzxpmlShCv9Fjfx13KUjoXJ6zpWLc1HSdcTrtWA=; b=DGmxm10kJsKU9ZD7Ne17gxzMR6jgFCCD7dG+Szco+T8Naz/UX0Cv7kARuTQsIFdqUX suH5DCoSSCXgYPyb0HunczGLhQ1oO2CTmo1UJWtR/avmBYJ/BEnrgnAS8Abw9dmf496f S9XO3+9zr2QSAHYLpv4DBMADwoc9s7ToZrc8F2WvwD/ErZd7QEPnUPdO2UnmuLakVn5r ZX6XWXn0MJ6JGFV3TU/N4D46kAJwvvoLN/rEKFcQVbenZCrLvl0xH0fc647+AuGrDOzn hW/RnqxftLW/X+ik5G7OROdt62Z8Q9MaiCn/T8FzzuUnbEFS8viFwEFDQMX3/A9Y9zPd O7yA== X-Gm-Message-State: ALoCoQle8ya2oySQeKKdnkeqZNEd/aTx5DJZVwGof2tyc6QSlfmGBgUalt3Fo5fBWPNwLhwYxZ3H X-Received: by 10.152.87.15 with SMTP id t15mr3383356laz.9.1422996493990; Tue, 03 Feb 2015 12:48:13 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.11.166 with SMTP id ej6ls94896lad.50.gmail; Tue, 03 Feb 2015 12:48:13 -0800 (PST) X-Received: by 10.112.218.8 with SMTP id pc8mr26439486lbc.16.1422996493781; Tue, 03 Feb 2015 12:48:13 -0800 (PST) Received: from mail-lb0-x22f.google.com (mail-lb0-x22f.google.com. [2a00:1450:4010:c04::22f]) by mx.google.com with ESMTPS id qz8si20240893lbc.116.2015.02.03.12.48.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 12:48:13 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22f as permitted sender) client-ip=2a00:1450:4010:c04::22f; Received: by mail-lb0-f175.google.com with SMTP id 10so40916653lbg.6 for ; Tue, 03 Feb 2015 12:48:13 -0800 (PST) X-Received: by 10.152.7.229 with SMTP id m5mr27355942laa.80.1422996493664; Tue, 03 Feb 2015 12:48:13 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp77286lbj; Tue, 3 Feb 2015 12:48:13 -0800 (PST) X-Received: by 10.140.43.11 with SMTP id d11mr1010743qga.44.1422996492468; Tue, 03 Feb 2015 12:48:12 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id u3si30096195qaf.94.2015.02.03.12.48.11 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Feb 2015 12:48:12 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:33160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIkOJ-0007Vs-HK for patch@linaro.org; Tue, 03 Feb 2015 15:48:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIkJi-0000Ua-3g for qemu-devel@nongnu.org; Tue, 03 Feb 2015 15:43:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIkJd-00051B-NG for qemu-devel@nongnu.org; Tue, 03 Feb 2015 15:43:26 -0500 Received: from mail-qc0-x233.google.com ([2607:f8b0:400d:c01::233]:51513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIkJd-000516-IC for qemu-devel@nongnu.org; Tue, 03 Feb 2015 15:43:21 -0500 Received: by mail-qc0-f179.google.com with SMTP id w7so37260236qcr.10 for ; Tue, 03 Feb 2015 12:43:21 -0800 (PST) X-Received: by 10.224.11.5 with SMTP id r5mr54663893qar.67.1422996201047; Tue, 03 Feb 2015 12:43:21 -0800 (PST) Received: from pike.twiddle.home.com (50-205-143-34-static.hfc.comcastbusiness.net. [50.205.143.34]) by mx.google.com with ESMTPSA id a6sm22229337qgf.13.2015.02.03.12.43.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Feb 2015 12:43:20 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 3 Feb 2015 12:42:58 -0800 Message-Id: <1422996181-22383-8-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1422996181-22383-1-git-send-email-rth@twiddle.net> References: <1422996181-22383-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c01::233 Cc: kbastian@mail.uni-paderborn.de, peter.maydell@linaro.org Subject: [Qemu-devel] [PULL 07/10] target-s390x: Mark check_privileged() as !CONFIG_USER_ONLY X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Original-Sender: rth@twiddle.net X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c04::22f as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=fail header.i=@gmail.com Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Peter Maydell The function check_privileged() is only used in the softmmu configs; wrap it in an #ifndef CONFIG_USER_ONLY to avoid clang warnings on the linux-user builds. [rth: Remove inline marker too; it was only there to prevent exactly this warning in GCC.] Signed-off-by: Peter Maydell Reviewed-by: Stefan Weil Message-id: 1419373100-17690-2-git-send-email-peter.maydell@linaro.org Signed-off-by: Richard Henderson --- target-s390x/translate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target-s390x/translate.c b/target-s390x/translate.c index e7a6c1d..8b36eca 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -317,12 +317,14 @@ static inline void gen_illegal_opcode(DisasContext *s) gen_program_exception(s, PGM_SPECIFICATION); } -static inline void check_privileged(DisasContext *s) +#ifndef CONFIG_USER_ONLY +static void check_privileged(DisasContext *s) { if (s->tb->flags & (PSW_MASK_PSTATE >> 32)) { gen_program_exception(s, PGM_PRIVILEGED); } } +#endif static TCGv_i64 get_address(DisasContext *s, int x2, int b2, int d2) {