From patchwork Tue May 7 12:41:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 16733 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f198.google.com (mail-gh0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7719B238FD for ; Tue, 7 May 2013 12:42:06 +0000 (UTC) Received: by mail-gh0-f198.google.com with SMTP id r13sf458627ghr.5 for ; Tue, 07 May 2013 05:41:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:x-received :x-forwarded-to:x-forwarded-for:delivered-to:x-received:received-spf :x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-forwarded-message-id:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=s+fXwBu2POeb7gZGMuJwPGc8N4N4Y3e1iLNz3QsHsP8=; b=CefiqMqLOpZ3oERjFGncPO8x7bUyswHrSA4FMSTKmlhPpkCn6YFoPzgHuh1NWiTghS gsZT0MTTFc+UMcRoSw1GT4WHnF3bgwf+Rat+lwvp2vEgrCXgAtGA3WObKR9vo+cEzoVF F50tBt13tnaOPQCBmXVZBVyNn1ivcRnBRXiDKM/fCWJ8S7BHD/OPcpo1AlE5ZZBaODnN oONZDoZ0gcAOVjh0/Io1aQj2oadFLSM9GEjNjAjNsFEAomR3hVPlcSPiYbt0PGSwBDCl zXd0YOuA1yjbLkHCQ7WtIrbcfFeDFes8xe9cB532c6doe/NQ9JUcmOBYnUAEUH/VlfWf 30zg== X-Received: by 10.236.17.170 with SMTP id j30mr1241113yhj.4.1367930507517; Tue, 07 May 2013 05:41:47 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.16.164 with SMTP id h4ls240091qed.40.gmail; Tue, 07 May 2013 05:41:47 -0700 (PDT) X-Received: by 10.52.122.18 with SMTP id lo18mr892595vdb.32.1367930507301; Tue, 07 May 2013 05:41:47 -0700 (PDT) Received: from mail-ve0-x22b.google.com (mail-ve0-x22b.google.com [2607:f8b0:400c:c01::22b]) by mx.google.com with ESMTPS id j8si12250144vcn.59.2013.05.07.05.41.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 May 2013 05:41:47 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22b is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22b; Received: by mail-ve0-f171.google.com with SMTP id oy12so439325veb.2 for ; Tue, 07 May 2013 05:41:47 -0700 (PDT) X-Received: by 10.58.227.104 with SMTP id rz8mr940944vec.22.1367930507197; Tue, 07 May 2013 05:41:47 -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.58.127.98 with SMTP id nf2csp98850veb; Tue, 7 May 2013 05:41:46 -0700 (PDT) X-Received: by 10.58.50.7 with SMTP id y7mr1054662ven.24.1367930506536; Tue, 07 May 2013 05:41:46 -0700 (PDT) Received: from mail-vb0-x231.google.com (mail-vb0-x231.google.com [2607:f8b0:400c:c02::231]) by mx.google.com with ESMTPS id x12si12263827vcv.26.2013.05.07.05.41.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 May 2013 05:41:46 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::231 is neither permitted nor denied by best guess record for domain of andre.przywara@linaro.org) client-ip=2607:f8b0:400c:c02::231; Received: by mail-vb0-f49.google.com with SMTP id q12so402527vbe.8 for ; Tue, 07 May 2013 05:41:46 -0700 (PDT) X-Received: by 10.58.144.231 with SMTP id sp7mr1038758veb.34.1367930506238; Tue, 07 May 2013 05:41:46 -0700 (PDT) Received: from [192.168.2.19] (f053084149.adsl.alicedsl.de. [78.53.84.149]) by mx.google.com with ESMTPSA id zd13sm20956124vdb.1.2013.05.07.05.41.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 07 May 2013 05:41:45 -0700 (PDT) Message-ID: <5188F66F.80201@linaro.org> Date: Tue, 07 May 2013 14:41:19 +0200 From: Andre Przywara User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: patches@linaro.org Subject: Fwd: [PATCH] fdt: update embedded header file from upstream to fix compilation References: <1367930219-14361-1-git-send-email-andre.przywara@linaro.org> In-Reply-To: <1367930219-14361-1-git-send-email-andre.przywara@linaro.org> X-Forwarded-Message-Id: <1367930219-14361-1-git-send-email-andre.przywara@linaro.org> X-Gm-Message-State: ALoCoQkIVaa/6x6w6eQR2LKiPRLZXENhttldES/BctQX9Nb14Fmmrl5CS5nW+NNCXH+v16vHoLl4 X-Original-Sender: andre.przywara@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22b 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: , (forgot to CC:, sorry) -------- Original Message -------- Subject: [PATCH] fdt: update embedded header file from upstream to fix compilation Date: Tue, 7 May 2013 14:36:59 +0200 From: Andre Przywara To: aliguori@us.ibm.com CC: qemu-devel@nongnu.org, jdl@jdl.com, kim.phillips@freescale.com, hollisb@us.ibm.com, Andre Przywara Upstream dtc.git introduced a change in libfdt_env.h, which breaks compilation with QEMU's version of it: CC arm-softmmu/device_tree.o In file included from /usr/include/libfdt.h:55:0, from /src/qemu.git/device_tree.c:28: /usr/include/fdt.h:7:2: error: unknown type name 'fdt32_t' ... The culprit is: commit feafcd972cb744750a65728440c99526e6199a6d Author: Kim Phillips Date: Wed Nov 28 17:33:01 2012 -0600 dtc/libfdt: introduce fdt types for annotation by endian checkers ... Pull the new definitions into QEMU's version of the file. This change also works with older installed versions of dtc. The upstream version got a "GPL or BSD" dual license header meanwhile. I retained the original GPL license header from QEMU, only added the original copyrights. Signed-off-by: Andre Przywara --- include/libfdt_env.h | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/include/libfdt_env.h b/include/libfdt_env.h index 3667d4c..aad54bb 100644 --- a/include/libfdt_env.h +++ b/include/libfdt_env.h @@ -1,4 +1,12 @@ +#ifndef _LIBFDT_ENV_H +#define _LIBFDT_ENV_H /* + * libfdt - Flat Device Tree manipulation + * Copyright (C) 2006 David Gibson, IBM Corporation. + * Copyright 2012 Kim Phillips, Freescale Semiconductor. + * Adaptation to QEMU: Copyright IBM Corp. 2008 + * by Hollis Blanchard + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, version 2, as * published by the Free Software Foundation. @@ -11,16 +19,23 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, see . * - * Copyright IBM Corp. 2008 - * Authors: Hollis Blanchard * */ -#ifndef _LIBFDT_ENV_H -#define _LIBFDT_ENV_H - #include "qemu/bswap.h" +#ifdef __CHECKER__ +#define __force __attribute__((force)) +#define __bitwise __attribute__((bitwise)) +#else +#define __force +#define __bitwise +#endif + +typedef uint16_t __bitwise fdt16_t; +typedef uint32_t __bitwise fdt32_t; +typedef uint64_t __bitwise fdt64_t; + #ifdef HOST_WORDS_BIGENDIAN #define fdt32_to_cpu(x) (x) #define cpu_to_fdt32(x) (x)