From 8521f121d3c7d5ced67abf44dff73021437e7a87 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 3 Apr 2017 13:46:55 +0300 Subject: tegra: update to [4.1.4.0] Vibrante 4.1 Linux Drive CX2 Task-number: QTAUTO-272 Change-Id: I63a564996a363cdd14f14f51a88364f9a9f99d73 Reviewed-by: Teemu Holappa --- conf/distro/include/tegra-t18x.conf | 57 ++++++----- .../linux-libc-headers_4.%.bbappend | 26 ++++- .../recipes/linux/linux-nvidia.bbappend | 48 ++++------ .../0001-Fix-misleading-indentation-error.patch | 42 +++++++++ .../wayland/wayland/always-build-scanner.patch | 105 --------------------- .../recipes/wayland/wayland_%.bbappend | 12 +-- .../recipes/weston/weston_%.bbappend | 10 +- scripts/manifest.xml | 4 +- 8 files changed, 127 insertions(+), 177 deletions(-) create mode 100644 meta-nvidia-extras/recipes/linux/linux-nvidia/0001-Fix-misleading-indentation-error.patch delete mode 100644 meta-nvidia-extras/recipes/wayland/wayland/always-build-scanner.patch diff --git a/conf/distro/include/tegra-t18x.conf b/conf/distro/include/tegra-t18x.conf index 85b0b6c..bde2d16 100644 --- a/conf/distro/include/tegra-t18x.conf +++ b/conf/distro/include/tegra-t18x.conf @@ -1,6 +1,6 @@ ############################################################################ ## -## Copyright (C) 2016 The Qt Company Ltd. +## Copyright (C) 2017 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the Boot to Qt meta layer. @@ -27,18 +27,12 @@ ## ############################################################################ -OLDEST_KERNEL_aarch64 = "3.18" - -TARGET_CFLAGS += " -DWIN_INTERFACE_CUSTOM" - IMAGE_FSTYPES += "tar.gz" QBSP_IMAGE_CONTENT = "\ ${IMAGE_LINK_NAME}.tar.gz \ - Image \ " -KERN_DIR ?= '${@os.path.normpath("${TOPDIR}/../sources/vibrante-t186/kernel")}' PLATFORM_TOPDIR ?= '${@os.path.normpath("${TOPDIR}/../sources/vibrante-t186")}' NVLAYER_DIR ?= "${TOPDIR}/../sources/nvidia-layer" @@ -61,27 +55,42 @@ MACHINE_EXTRA_INSTALL += "\ libdrm-nv \ " -PREFERRED_PROVIDER_virtual/libgles2 ?= "tegra-drivers" -PREFERRED_PROVIDER_virtual/libgles2-dev ?= "tegra-drivers" -PREFERRED_PROVIDER_virtual/libegl ?= "tegra-drivers" -PREFERRED_PROVIDER_virtual/libegl-dev ?= "tegra-drivers" -PREFERRED_PROVIDER_virtual/egl ?= "tegra-drivers" -PREFERRED_PROVIDER_virtual/libgl ?= "tegra-drivers" -PREFERRED_PROVIDER_virtual/libgles1 ?= "tegra-drivers" -PREFERRED_PROVIDER_virtual/mesa ?= "tegra-drivers" +PREFERRED_PROVIDER_virtual/libgles2 = "tegra-drivers" +PREFERRED_PROVIDER_virtual/libgles2-dev = "tegra-drivers" +PREFERRED_PROVIDER_virtual/libegl = "tegra-drivers" +PREFERRED_PROVIDER_virtual/libegl-dev = "tegra-drivers" +PREFERRED_PROVIDER_virtual/egl = "tegra-drivers" +PREFERRED_PROVIDER_virtual/libgl = "tegra-drivers" +PREFERRED_PROVIDER_virtual/libgles1 = "tegra-drivers" +PREFERRED_PROVIDER_virtual/mesa = "tegra-drivers" +PREFERRED_PROVIDER_drm = "libdrm-nv" +PREFERRED_PROVIDER_libdrm = "libdrm-nv" +PREFERRED_PROVIDER_virtual/kernel = "linux-nvidia" +PREFERRED_VERSION_linux-libc-headers = "4.4" +PREFERRED_VERSION_nativesdk-linux-libc-headers = "4.4" BBMASK += "\ - meta-vib4/recipes-connectivity/connman \ - meta-vib4/recipes-core/toybox \ + meta-tegra/recipes-bsp/flashing \ + meta-vib4/recipes-core/busybox \ + meta-vib4/recipes-core/glibc \ meta-vib4/recipes-core/images \ + meta-vib4/recipes-core/kbd \ meta-vib4/recipes-core/packagegroups \ - meta-vib4/recipes-extended \ - meta-vib4/recipes-multimedia/audiomanager \ - meta-vib4/recipes-core/glibc \ - meta-vib4/recipes-support/lvm2 \ - meta-vib4/recipes-kernel/linux-libc-headers \ + meta-vib4/recipes-core/toybox \ meta-vib4/recipes-devtools/binutils \ - meta-vib4/recipes-yocto-ivi/packagegroups \ - meta-vib4/recipes-graphics/wayland/wayland-ivi-extension_%.bbappend \ + meta-vib4/recipes-devtools/gcc \ + meta-vib4/recipes-dummy/files \ + meta-vib4/recipes-extended/common-api \ + meta-vib4/recipes-extended/persistence-common-object \ + meta-vib4/recipes-extended/quota \ + meta-vib4/recipes-extended/xz \ meta-vib4/recipes-graphics/wayland/libinput_%.bbappend \ + meta-vib4/recipes-graphics/wayland/wayland-ivi-extension_%.bbappend \ + meta-vib4/recipes-graphics/weston \ + meta-vib4/recipes-kernel/linux-libc-headers \ + meta-vib4/recipes-multimedia/audiomanager \ + meta-vib4/recipes-navigation/gpsd \ + meta-vib4/recipes-support/keyutils \ + meta-vib4/recipes-support/lvm2 \ + meta-vib4/recipes-yocto-ivi \ " diff --git a/meta-nvidia-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend b/meta-nvidia-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend index f2bdba1..c7730c6 100644 --- a/meta-nvidia-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend +++ b/meta-nvidia-extras/recipes/linux-libc-headers/linux-libc-headers_4.%.bbappend @@ -1,7 +1,29 @@ -# Use our kernel instead of yocto which defaults to mainline 3.18 +# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. +# +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# KERN_DIR holds linux.tar.bz2 +KERN_DIR := "${LNX_TOPDIR}_src/kernel" +# Kernel source is the kernel tarball in PDK SRC_URI = "file://${KERN_DIR}/linux.tar.bz2" -PV = "3.18" +PV = "4.4" # Extracting linux.tar.bz2 creates directories # /vibrante-oss-src/kernel S = "${WORKDIR}/vibrante-oss-src/kernel" + +# Need to pass this to for oe_runmake explicitly for building outside kerneldir +EXTRA_OEMAKE += " -C ${S} O=${B}" + +# Apply RT patches +require recipes-kernel/linux/apply-rt-patches.inc diff --git a/meta-nvidia-extras/recipes/linux/linux-nvidia.bbappend b/meta-nvidia-extras/recipes/linux/linux-nvidia.bbappend index 70ee515..835dfe8 100644 --- a/meta-nvidia-extras/recipes/linux/linux-nvidia.bbappend +++ b/meta-nvidia-extras/recipes/linux/linux-nvidia.bbappend @@ -1,6 +1,6 @@ ############################################################################ ## -## Copyright (C) 2016 The Qt Company Ltd. +## Copyright (C) 2017 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the Boot to Qt meta layer. @@ -27,43 +27,31 @@ ## ############################################################################ -do_unpack_append() { - rm -rf ${STAGING_KERNEL_DIR} - ln -s ${S} ${STAGING_KERNEL_DIR} -} +FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" +SRC_URI += "file://0001-Fix-misleading-indentation-error.patch;patchdir=.." -do_kernel_defconfig_prepend () { -} +CROSS_COMPILE_PREFIX = "${CROSS_COMPILE}" -do_compile_prepend () { - # cross_compile_exports - export ARCH=${KERNEL_ARCH} - export CROSS_COMPILE=${CROSS_COMPILE} +PACKAGES += "kernel-devicetree" +FILES_kernel-devicetree = "/boot/*.dtb" - echo "CONFIG_USB_FUNCTIONFS=m" >> ${B}/.config - echo "CONFIG_USB_ACM=m" >> ${B}/.config +RDEPENDS_kernel-base = "kernel-image kernel-devicetree" - make olddefconfig +python do_patch () { + bb.build.exec_func('patch_do_patch', d) } -do_install () { - kernel_do_install - - s=$(readlink -m "${S}") - kernsrc="${STAGING_KERNEL_DIR}" - - if [ "${s}" != "${kernsrc}" ]; then - mkdir -p "${kernsrc}" - rm -rf "${kernsrc}" - mv "${S}" "${STAGING_KERNEL_DIR}" - ln -sf "${kernsrc}" "${s}" - fi +do_unpack_append() { + mkdir -p ${STAGING_KERNEL_DIR} + rm -rf ${STAGING_KERNEL_DIR} + ln -s ${S} ${STAGING_KERNEL_DIR} } -do_deploy() { - kernel_do_deploy +do_install_append() { + kernel_do_install + install -m 0664 -t ${D}/boot/ ${B}/arch/arm64/boot/dts/*.dtb } -do_compile () { - kernel_do_compile +dtbs_deploy() { + install -m 0664 -t ${DEPLOY_DIR_IMAGE} ${B}/arch/arm64/boot/dts/*.dtb } diff --git a/meta-nvidia-extras/recipes/linux/linux-nvidia/0001-Fix-misleading-indentation-error.patch b/meta-nvidia-extras/recipes/linux/linux-nvidia/0001-Fix-misleading-indentation-error.patch new file mode 100644 index 0000000..a344adc --- /dev/null +++ b/meta-nvidia-extras/recipes/linux/linux-nvidia/0001-Fix-misleading-indentation-error.patch @@ -0,0 +1,42 @@ +From 33d112e943590020f2cda2a403a755531833b016 Mon Sep 17 00:00:00 2001 +From: Samuli Piippo +Date: Fri, 31 Mar 2017 09:42:18 +0300 +Subject: [PATCH] Fix misleading-indentation error + +error: this 'if' clause does not guard... [-Werror=misleading-indentation] + if (!runlist->active_channels) +--- + nvgpu/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/nvgpu/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/nvgpu/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +index 3e57c67..e2fe4db 100644 +--- a/nvgpu/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c ++++ b/nvgpu/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +@@ -209,15 +209,15 @@ static int init_runlist(struct gk20a *g, struct fifo_gk20a *f) + if (!runlist->active_channels) + goto clean_up_runlist; + +- runlist_size = sizeof(u16) * f->num_channels; +- for (i = 0; i < MAX_RUNLIST_BUFFERS; i++) { +- int err = gk20a_gmmu_alloc_sys(g, runlist_size, +- &runlist->mem[i]); +- if (err) { +- dev_err(d, "memory allocation failed\n"); +- goto clean_up_runlist; +- } ++ runlist_size = sizeof(u16) * f->num_channels; ++ for (i = 0; i < MAX_RUNLIST_BUFFERS; i++) { ++ int err = gk20a_gmmu_alloc_sys(g, runlist_size, ++ &runlist->mem[i]); ++ if (err) { ++ dev_err(d, "memory allocation failed\n"); ++ goto clean_up_runlist; + } ++ } + mutex_init(&runlist->mutex); + + /* None of buffers is pinned if this value doesn't change. +-- +2.7.4 + diff --git a/meta-nvidia-extras/recipes/wayland/wayland/always-build-scanner.patch b/meta-nvidia-extras/recipes/wayland/wayland/always-build-scanner.patch deleted file mode 100644 index 5e0e6bf..0000000 --- a/meta-nvidia-extras/recipes/wayland/wayland/always-build-scanner.patch +++ /dev/null @@ -1,105 +0,0 @@ -build: always build wayland-scanner - -The previous idiom for building a cross-compiled Wayland is to build once for -the build host (with --enable-scanner --disable-libraries) to get a -wayland-scanner binary that can then be used in a cross-compile (with ---disable-scanner). The problem with this is that the cross wayland is missing -a wayland-scanner binary, which means you then can't do any Wayland development -on the target. - -Instead, always build wayland-scanner for the target and change ---enable/disable-scanner to --with/without-host-scanner. Normal builds use the -default of --without-host-scanner and run the wayland-scanner it just built, and -cross-compiled builds pass --with-host-scanner to use a previously built host -scanner but still get a wayland-scanner to install. - -(a theoretically neater solution would be to build two scanners if required (one -to run and one to install), but automake makes this overly complicated) - -Signed-off-by: Ross Burton -Upstream-Status: Submitted - -diff --git a/Makefile.am b/Makefile.am -index c19494f..c2d929b 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -64,16 +64,17 @@ nodist_libwayland_client_la_SOURCES = \ - - pkgconfig_DATA += src/wayland-client.pc src/wayland-server.pc - --if ENABLE_SCANNER --wayland_scanner = $(top_builddir)/wayland-scanner - bin_PROGRAMS = wayland-scanner - wayland_scanner_SOURCES = src/scanner.c - wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(AM_CFLAGS) - wayland_scanner_LDADD = $(EXPAT_LIBS) libwayland-util.la --$(BUILT_SOURCES) : wayland-scanner - pkgconfig_DATA += src/wayland-scanner.pc --else -+ -+if HOST_SCANNER - wayland_scanner = wayland-scanner -+else -+$(BUILT_SOURCES) : wayland-scanner -+wayland_scanner = $(top_builddir)/wayland-scanner - endif - - protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml -diff --git a/configure.ac b/configure.ac -index c2a804e..de0b02f 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -65,11 +65,11 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], - [[#include ]]) - AC_CHECK_HEADERS([execinfo.h]) - --AC_ARG_ENABLE([scanner], -- [AC_HELP_STRING([--disable-scanner], -- [Disable compilation of wayland-scanner])], -- [], -- [enable_scanner=yes]) -+AC_ARG_WITH([host-scanner], -+ [AC_HELP_STRING([--with-host-scanner], -+ [Use a host wayland-scanner])], -+ [], -+ [with_host_scanner=no]) - - AC_ARG_ENABLE([documentation], - [AC_HELP_STRING([--disable-documentation], -@@ -77,25 +77,23 @@ AC_ARG_ENABLE([documentation], - [], - [enable_documentation=yes]) - --AM_CONDITIONAL(ENABLE_SCANNER, test "x$enable_scanner" = xyes) -+AM_CONDITIONAL(HOST_SCANNER, test "x$with_host_scanner" = xyes) - - AC_ARG_WITH(icondir, [ --with-icondir= Look for cursor icons here], - [ ICONDIR=$withval], - [ ICONDIR=${datadir}/icons]) - AC_SUBST([ICONDIR]) - --if test "x$enable_scanner" = "xyes"; then -- PKG_CHECK_MODULES(EXPAT, [expat], [], -- [AC_CHECK_HEADERS(expat.h, [], -- [AC_MSG_ERROR([Can't find expat.h. Please install expat.])]) -- SAVE_LIBS="$LIBS" -- AC_SEARCH_LIBS(XML_ParserCreate, expat, [], -- [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) -- EXPAT_LIBS="$LIBS" -- LIBS="$SAVE_LIBS" -- AC_SUBST(EXPAT_LIBS) -- ]) --fi -+PKG_CHECK_MODULES(EXPAT, [expat], [], -+ [AC_CHECK_HEADERS(expat.h, [], -+ [AC_MSG_ERROR([Can't find expat.h. Please install expat.])]) -+ SAVE_LIBS="$LIBS" -+ AC_SEARCH_LIBS(XML_ParserCreate, expat, [], -+ [AC_MSG_ERROR([Can't find expat library. Please install expat.])]) -+ EXPAT_LIBS="$LIBS" -+ LIBS="$SAVE_LIBS" -+ AC_SUBST(EXPAT_LIBS) -+ ]) - - AC_PATH_PROG(XSLTPROC, xsltproc) - AM_CONDITIONAL([HAVE_XSLTPROC], [test "x$XSLTPROC" != "x"]) diff --git a/meta-nvidia-extras/recipes/wayland/wayland_%.bbappend b/meta-nvidia-extras/recipes/wayland/wayland_%.bbappend index 463d5a1..5ab7634 100644 --- a/meta-nvidia-extras/recipes/wayland/wayland_%.bbappend +++ b/meta-nvidia-extras/recipes/wayland/wayland_%.bbappend @@ -1,6 +1,6 @@ ############################################################################ ## -## Copyright (C) 2016 The Qt Company Ltd. +## Copyright (C) 2017 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the Boot to Qt meta layer. @@ -27,10 +27,8 @@ ## ############################################################################ -FILESEXTRAPATHS_append := ":${NVLAYER_DIR}/packages:${LNX_TOPDIR}/${PN}:${THISDIR}/${PN}" +FILESEXTRAPATHS_append := ":${LNX_TOPDIR}_src/wayland" -SRC_URI_remove = "file://${NVLAYER_DIR}/packages/wayland-1.8.1-src.tar.gz" -SRC_URI = "\ - file://wayland-1.8.1-src.tar.gz \ - file://always-build-scanner.patch \ - " +SRC_URI = "file://wayland-1.11.0-src.tar.gz" + +DEPENDS_class-target += "wayland-egl" diff --git a/meta-nvidia-extras/recipes/weston/weston_%.bbappend b/meta-nvidia-extras/recipes/weston/weston_%.bbappend index cfc286f..22f0f11 100644 --- a/meta-nvidia-extras/recipes/weston/weston_%.bbappend +++ b/meta-nvidia-extras/recipes/weston/weston_%.bbappend @@ -1,6 +1,6 @@ ############################################################################ ## -## Copyright (C) 2016 The Qt Company Ltd. +## Copyright (C) 2017 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the Boot to Qt meta layer. @@ -27,10 +27,6 @@ ## ############################################################################ -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" -S = "${WORKDIR}/${LNX_TOPDIR}/samples/wayland/weston" +PACKAGECONFIG_remove = "kms" -do_install_prepend() { - mkdir -p ${WORKDIR}/${LNX_TOPDIR}/samples/weston/tools - cp ${WORKDIR}/${LNX_TOPDIR}/samples/wayland/weston/tools/weston.ini ${WORKDIR}/${LNX_TOPDIR}/samples/weston/tools/weston.ini -} +TARGET_CFLAGS += "-DWIN_INTERFACE_CUSTOM" diff --git a/scripts/manifest.xml b/scripts/manifest.xml index 26e05b6..685e1ea 100644 --- a/scripts/manifest.xml +++ b/scripts/manifest.xml @@ -64,12 +64,12 @@ Date: Tue, 25 Apr 2017 13:29:28 +0300 Subject: Add support for Renesas R-Car Gen3 boards Support for Salvator-X (H3/M3), H3 and M3 Starter Kits. Requires driver package installed as instructed in meta-renesas and correct SOC_FAMILY set in the local.conf For Qt Company internal builds, required driver packages are in the renesas-rcar-gen3 git repository. Change-Id: I051591f98f773a1453f531ae1b49cb2f18ce93bd Reviewed-by: Teemu Holappa --- b2qt-init-build-env | 3 + conf/bblayers.conf.rcar-gen3.sample | 54 ++ conf/distro/include/h3ulcb.conf | 32 + conf/distro/include/m3ulcb.conf | 32 + conf/distro/include/rcar-gen3.inc | 66 ++ conf/distro/include/salvator-x.conf | 32 + meta-renesas-extras/conf/layer.conf | 40 + .../arm-trusted-firmware_git.bbappend | 31 + .../recipes/mesa/mesa_12.%.bbappend | 10 + .../recipes/optee-os/optee-os_git.bbappend | 30 + .../recipes/qt5/b2qt-appcontroller.bbappend | 38 + .../qt5/b2qt-appcontroller/appcontroller.conf | 8 + .../recipes/qt5/b2qt-appcontroller/kms.conf | 4 + .../recipes/qt5/qtbase/oe-device-extra.pri | 4 + .../recipes/qt5/qtbase_git.bbappend | 32 + ...-sync-include-linux-compiler-.h-with-Linu.patch | 808 +++++++++++++++++++++ .../recipes/u-boot/u-boot_%.bbappend | 36 + .../recipes/wayland/libgbm.bbappend | 30 + scripts/manifest.xml | 22 +- scripts/setup-environment.sh | 3 + 20 files changed, 1311 insertions(+), 4 deletions(-) create mode 100644 conf/bblayers.conf.rcar-gen3.sample create mode 100644 conf/distro/include/h3ulcb.conf create mode 100644 conf/distro/include/m3ulcb.conf create mode 100644 conf/distro/include/rcar-gen3.inc create mode 100644 conf/distro/include/salvator-x.conf create mode 100644 meta-renesas-extras/conf/layer.conf create mode 100644 meta-renesas-extras/recipes/arm-trusted-firmware/arm-trusted-firmware_git.bbappend create mode 100644 meta-renesas-extras/recipes/mesa/mesa_12.%.bbappend create mode 100644 meta-renesas-extras/recipes/optee-os/optee-os_git.bbappend create mode 100644 meta-renesas-extras/recipes/qt5/b2qt-appcontroller.bbappend create mode 100644 meta-renesas-extras/recipes/qt5/b2qt-appcontroller/appcontroller.conf create mode 100644 meta-renesas-extras/recipes/qt5/b2qt-appcontroller/kms.conf create mode 100644 meta-renesas-extras/recipes/qt5/qtbase/oe-device-extra.pri create mode 100644 meta-renesas-extras/recipes/qt5/qtbase_git.bbappend create mode 100644 meta-renesas-extras/recipes/u-boot/u-boot/0001-compiler-.h-sync-include-linux-compiler-.h-with-Linu.patch create mode 100644 meta-renesas-extras/recipes/u-boot/u-boot_%.bbappend create mode 100644 meta-renesas-extras/recipes/wayland/libgbm.bbappend diff --git a/b2qt-init-build-env b/b2qt-init-build-env index d72d28c..703c110 100755 --- a/b2qt-init-build-env +++ b/b2qt-init-build-env @@ -133,6 +133,9 @@ get_groups() { jetson-tx1|jetson-tk1) PROJECT_GROUPS="jetson" ;; + salvator-x|h3ulcb|m3ulcb) + PROJECT_GROUPS="renesas-gen3" + ;; *) echo "Unknown device configuration, including all meta layers" PROJECT_GROUPS="external" diff --git a/conf/bblayers.conf.rcar-gen3.sample b/conf/bblayers.conf.rcar-gen3.sample new file mode 100644 index 0000000..8f7a3c4 --- /dev/null +++ b/conf/bblayers.conf.rcar-gen3.sample @@ -0,0 +1,54 @@ +############################################################################ +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf +# changes incompatibly +POKY_BBLAYERS_CONF_VERSION = "2" + +BBPATH = "${TOPDIR}" +BBFILES ?= "" +BSPDIR := "${@os.path.abspath(os.path.dirname(d.getVar('FILE', True)) + '/../..')}" + +BBLAYERS ?= " \ + ${BSPDIR}/sources/poky/meta \ + ${BSPDIR}/sources/poky/meta-poky \ + ${BSPDIR}/sources/meta-renesas/meta-rcar-gen3 \ + ${BSPDIR}/sources/meta-freescale \ + ${BSPDIR}/sources/meta-linaro/meta-optee \ + ${BSPDIR}/sources/meta-openembedded/meta-oe \ + ${BSPDIR}/sources/meta-openembedded/meta-python \ + ${BSPDIR}/sources/meta-openembedded/meta-networking \ + ${BSPDIR}/sources/meta-openembedded/meta-initramfs \ + ${BSPDIR}/sources/meta-openembedded/meta-multimedia \ + ${BSPDIR}/sources/meta-boot2qt \ + ${BSPDIR}/sources/meta-boot2qt/meta-renesas-extras \ + ${BSPDIR}/sources/meta-mingw \ + ${BSPDIR}/sources/meta-qt5 \ + " + diff --git a/conf/distro/include/h3ulcb.conf b/conf/distro/include/h3ulcb.conf new file mode 100644 index 0000000..ddb40e0 --- /dev/null +++ b/conf/distro/include/h3ulcb.conf @@ -0,0 +1,32 @@ +############################################################################ +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +include conf/distro/include/rcar-gen3.inc + +DEPLOY_CONF_NAME = "Renesas R-Car-H3 Starter Kit Premier" diff --git a/conf/distro/include/m3ulcb.conf b/conf/distro/include/m3ulcb.conf new file mode 100644 index 0000000..cff7893 --- /dev/null +++ b/conf/distro/include/m3ulcb.conf @@ -0,0 +1,32 @@ +############################################################################ +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +include conf/distro/include/rcar-gen3.inc + +DEPLOY_CONF_NAME = "Renesas R-Car-M3 Starter Kit Pro" diff --git a/conf/distro/include/rcar-gen3.inc b/conf/distro/include/rcar-gen3.inc new file mode 100644 index 0000000..231dd27 --- /dev/null +++ b/conf/distro/include/rcar-gen3.inc @@ -0,0 +1,66 @@ +############################################################################ +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +include conf/distro/include/fsl.inc + +QBSP_IMAGE_CONTENT = "\ + ${IMAGE_LINK_NAME}.img \ + ${IMAGE_LINK_NAME}.conf \ + " + +BOOT_SPACE = "16384" + +# uncomment following if using the evaluation drivers +#DISTRO_FEATURES_append = " use_eva_pkg" + +MACHINE_FEATURES_append = " gsx multimedia" + +MULTI_PROVIDER_WHITELIST += "virtual/libgl virtual/egl virtual/libgles1 virtual/libgles2 virtual/libgbm" + +#DISTRO_FEATURES_append = " pam" +PREFERRED_PROVIDER_virtual/libgles1 = "" +PREFERRED_PROVIDER_virtual/libgles2 = "gles-user-module" +PREFERRED_PROVIDER_virtual/egl = "gles-user-module" +PREFERRED_PROVIDER_virtual/libgl = "" +PREFERRED_PROVIDER_virtual/mesa = "" +PREFERRED_PROVIDER_libgbm = "libgbm" +PREFERRED_PROVIDER_libgbm-dev = "libgbm" +PREFERRED_PROVIDER_virtual/libgbm = "libgbm" +BBMASK += "mesa-gl" + +# internal copy of R-Car_Series_Evaluation_Software_Packages used for CI +FILESEXTRAPATHS_append = "${BSPDIR}/sources/renesas-rcar-gen3/${PN}:" + +BBMASK += "\ + meta-linaro/meta-optee/recipes-security/optee \ + meta-rcar-gen3/recipes-connectivity/ppp \ + meta-rcar-gen3/recipes-graphics/mesa \ + meta-rcar-gen3/recipes-multimedia/gstreamer \ + meta-rcar-gen3/recipes-multimedia/webp \ + " diff --git a/conf/distro/include/salvator-x.conf b/conf/distro/include/salvator-x.conf new file mode 100644 index 0000000..c44dbe1 --- /dev/null +++ b/conf/distro/include/salvator-x.conf @@ -0,0 +1,32 @@ +############################################################################ +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +include conf/distro/include/rcar-gen3.inc + +DEPLOY_CONF_NAME = "Renesas R-Car H3/M3 Salvator-X" diff --git a/meta-renesas-extras/conf/layer.conf b/meta-renesas-extras/conf/layer.conf new file mode 100644 index 0000000..36091df --- /dev/null +++ b/meta-renesas-extras/conf/layer.conf @@ -0,0 +1,40 @@ +############################################################################ +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +# We have a conf and classes directory, append to BBPATH +BBPATH .= ":${LAYERDIR}" + +# We have a recipes directory, add to BBFILES +BBFILES += "${LAYERDIR}/recipes*/*/*.bb \ + ${LAYERDIR}/recipes*/*/*.bbappend \ + " + +BBFILE_COLLECTIONS += "b2qt_renesas" +BBFILE_PATTERN_b2qt_renesas := "^${LAYERDIR}/" +BBFILE_PRIORITY_b2qt_renesas = "20" diff --git a/meta-renesas-extras/recipes/arm-trusted-firmware/arm-trusted-firmware_git.bbappend b/meta-renesas-extras/recipes/arm-trusted-firmware/arm-trusted-firmware_git.bbappend new file mode 100644 index 0000000..801a073 --- /dev/null +++ b/meta-renesas-extras/recipes/arm-trusted-firmware/arm-trusted-firmware_git.bbappend @@ -0,0 +1,31 @@ +############################################################################ +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +CFLAGS[unexport] = "" +CFLAGS = "-Wno-error=pedantic" diff --git a/meta-renesas-extras/recipes/mesa/mesa_12.%.bbappend b/meta-renesas-extras/recipes/mesa/mesa_12.%.bbappend new file mode 100644 index 0000000..0542b65 --- /dev/null +++ b/meta-renesas-extras/recipes/mesa/mesa_12.%.bbappend @@ -0,0 +1,10 @@ +require include/gles-control.inc + +def map_libs(d): + if base_conditional('USE_GLES_WAYLAND', "1", "1", "0", d) == "1": + return "wayland" + + return "dummy" + +MESATARGET := "${@map_libs(d)}" +include recipes-graphics/mesa/mesa-${MESATARGET}.inc diff --git a/meta-renesas-extras/recipes/optee-os/optee-os_git.bbappend b/meta-renesas-extras/recipes/optee-os/optee-os_git.bbappend new file mode 100644 index 0000000..03862c5 --- /dev/null +++ b/meta-renesas-extras/recipes/optee-os/optee-os_git.bbappend @@ -0,0 +1,30 @@ +############################################################################ +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +CFLAGS = "-Wno-error=unused-const-variable= -Wno-error=strict-aliasing -Wno-error=shift-negative-value" diff --git a/meta-renesas-extras/recipes/qt5/b2qt-appcontroller.bbappend b/meta-renesas-extras/recipes/qt5/b2qt-appcontroller.bbappend new file mode 100644 index 0000000..708ed85 --- /dev/null +++ b/meta-renesas-extras/recipes/qt5/b2qt-appcontroller.bbappend @@ -0,0 +1,38 @@ +############################################################################ +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://kms.conf" + +FILES_${PN} += "${sysconfdir}/kms.conf" + +do_install_append() { + install -m 0644 ${WORKDIR}/kms.conf ${D}${sysconfdir}/ +} diff --git a/meta-renesas-extras/recipes/qt5/b2qt-appcontroller/appcontroller.conf b/meta-renesas-extras/recipes/qt5/b2qt-appcontroller/appcontroller.conf new file mode 100644 index 0000000..97aaa5e --- /dev/null +++ b/meta-renesas-extras/recipes/qt5/b2qt-appcontroller/appcontroller.conf @@ -0,0 +1,8 @@ +env=QML2_IMPORT_PATH=/data/user/qt/qmlplugins +env=QT_QPA_EGLFS_KMS_CONFIG=/etc/kms.conf +env=QT_IM_MODULE=qtvirtualkeyboard +env=QT_QPA_EGLFS_FORCE888=0 +env=QT_QUICK_CONTROLS_STYLE=Flat +env=XDG_RUNTIME_DIR=/tmp +env=QSG_RENDER_LOOP=basic +base=linux diff --git a/meta-renesas-extras/recipes/qt5/b2qt-appcontroller/kms.conf b/meta-renesas-extras/recipes/qt5/b2qt-appcontroller/kms.conf new file mode 100644 index 0000000..db7a503 --- /dev/null +++ b/meta-renesas-extras/recipes/qt5/b2qt-appcontroller/kms.conf @@ -0,0 +1,4 @@ +{ + "device": "/dev/dri/card0", + "hwcursor": false +} diff --git a/meta-renesas-extras/recipes/qt5/qtbase/oe-device-extra.pri b/meta-renesas-extras/recipes/qt5/qtbase/oe-device-extra.pri new file mode 100644 index 0000000..c6f88ad --- /dev/null +++ b/meta-renesas-extras/recipes/qt5/qtbase/oe-device-extra.pri @@ -0,0 +1,4 @@ +QMAKE_PLATFORM += boot2qt + +QT_QPA_DEFAULT_PLATFORM = eglfs +EGLFS_DEVICE_INTEGRATION = eglfs_kms diff --git a/meta-renesas-extras/recipes/qt5/qtbase_git.bbappend b/meta-renesas-extras/recipes/qt5/qtbase_git.bbappend new file mode 100644 index 0000000..ecba1f1 --- /dev/null +++ b/meta-renesas-extras/recipes/qt5/qtbase_git.bbappend @@ -0,0 +1,32 @@ +############################################################################ +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +PACKAGECONFIG += "gbm kms" diff --git a/meta-renesas-extras/recipes/u-boot/u-boot/0001-compiler-.h-sync-include-linux-compiler-.h-with-Linu.patch b/meta-renesas-extras/recipes/u-boot/u-boot/0001-compiler-.h-sync-include-linux-compiler-.h-with-Linu.patch new file mode 100644 index 0000000..639f67d --- /dev/null +++ b/meta-renesas-extras/recipes/u-boot/u-boot/0001-compiler-.h-sync-include-linux-compiler-.h-with-Linu.patch @@ -0,0 +1,808 @@ +From 9b2c282b348dfe966bbba967dc7a45ce817cce50 Mon Sep 17 00:00:00 2001 +From: Tom Rini +Date: Mon, 29 Feb 2016 11:34:15 -0500 +Subject: [PATCH] compiler*.h: sync include/linux/compiler*.h with Linux + 4.5-rc6 + +Copy these from Linux v4.5-rc6 tag. + +This is needed so that we can keep up with newer gcc versions. Note +that we don't have the uapi/ hierarchy from the kernel so continue to +use + +Signed-off-by: Tom Rini +--- + include/linux/compiler-gcc.h | 259 ++++++++++++++++++++++++++++++++--------- + include/linux/compiler-gcc3.h | 23 ---- + include/linux/compiler-gcc4.h | 88 -------------- + include/linux/compiler-gcc5.h | 65 ----------- + include/linux/compiler-intel.h | 5 + + include/linux/compiler.h | 178 ++++++++++++++++++++++++++-- + 6 files changed, 383 insertions(+), 235 deletions(-) + delete mode 100644 include/linux/compiler-gcc3.h + delete mode 100644 include/linux/compiler-gcc4.h + delete mode 100644 include/linux/compiler-gcc5.h + +diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h +index e057bd2..22ab246 100644 +--- a/include/linux/compiler-gcc.h ++++ b/include/linux/compiler-gcc.h +@@ -5,14 +5,28 @@ + /* + * Common definitions for all gcc versions go here. + */ +-#define GCC_VERSION (__GNUC__ * 10000 \ +- + __GNUC_MINOR__ * 100 \ +- + __GNUC_PATCHLEVEL__) +- ++#define GCC_VERSION (__GNUC__ * 10000 \ ++ + __GNUC_MINOR__ * 100 \ ++ + __GNUC_PATCHLEVEL__) + + /* Optimization barrier */ ++ + /* The "volatile" is due to gcc bugs */ + #define barrier() __asm__ __volatile__("": : :"memory") ++/* ++ * This version is i.e. to prevent dead stores elimination on @ptr ++ * where gcc and llvm may behave differently when otherwise using ++ * normal barrier(): while gcc behavior gets along with a normal ++ * barrier(), llvm needs an explicit input variable to be assumed ++ * clobbered. The issue is as follows: while the inline asm might ++ * access any memory it wants, the compiler could have fit all of ++ * @ptr into memory registers instead, and since @ptr never escaped ++ * from that, it proofed that the inline asm wasn't touching any of ++ * it. This version works well with both compilers, i.e. we're telling ++ * the compiler that the inline asm absolutely may see the contents ++ * of @ptr. See also: https://llvm.org/bugs/show_bug.cgi?id=15495 ++ */ ++#define barrier_data(ptr) __asm__ __volatile__("": :"r"(ptr) :"memory") + + /* + * This macro obfuscates arithmetic on a variable address so that gcc +@@ -32,58 +46,63 @@ + * the inline assembly constraint from =g to =r, in this particular + * case either is valid. + */ +-#define RELOC_HIDE(ptr, off) \ +- ({ unsigned long __ptr; \ +- __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ +- (typeof(ptr)) (__ptr + (off)); }) ++#define RELOC_HIDE(ptr, off) \ ++({ \ ++ unsigned long __ptr; \ ++ __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ ++ (typeof(ptr)) (__ptr + (off)); \ ++}) + + /* Make the optimizer believe the variable can be manipulated arbitrarily. */ +-#define OPTIMIZER_HIDE_VAR(var) __asm__ ("" : "=r" (var) : "0" (var)) ++#define OPTIMIZER_HIDE_VAR(var) \ ++ __asm__ ("" : "=r" (var) : "0" (var)) + + #ifdef __CHECKER__ +-#define __must_be_array(arr) 0 ++#define __must_be_array(a) 0 + #else + /* &a[0] degrades to a pointer: a different type from an array */ +-#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) ++#define __must_be_array(a) BUILD_BUG_ON_ZERO(__same_type((a), &(a)[0])) + #endif + + /* + * Force always-inline if the user requests it so via the .config, + * or if gcc is too old: + */ +-#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ ++#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ + !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) +-# define inline inline __attribute__((always_inline)) notrace +-# define __inline__ __inline__ __attribute__((always_inline)) notrace +-# define __inline __inline __attribute__((always_inline)) notrace ++#define inline inline __attribute__((always_inline)) notrace ++#define __inline__ __inline__ __attribute__((always_inline)) notrace ++#define __inline __inline __attribute__((always_inline)) notrace + #else + /* A lot of inline functions can cause havoc with function tracing */ +-# define inline inline notrace +-# define __inline__ __inline__ notrace +-# define __inline __inline notrace ++#define inline inline notrace ++#define __inline__ __inline__ notrace ++#define __inline __inline notrace + #endif + +-#define __deprecated __attribute__((deprecated)) +-#ifndef __packed +-#define __packed __attribute__((packed)) +-#endif +-#ifndef __weak +-#define __weak __attribute__((weak)) +-#endif ++#define __always_inline inline __attribute__((always_inline)) ++#define noinline __attribute__((noinline)) ++ ++#define __deprecated __attribute__((deprecated)) ++#define __packed __attribute__((packed)) ++#define __weak __attribute__((weak)) ++#define __alias(symbol) __attribute__((alias(#symbol))) + + /* +- * it doesn't make sense on ARM (currently the only user of __naked) to trace +- * naked functions because then mcount is called without stack and frame pointer +- * being set up and there is no chance to restore the lr register to the value +- * before mcount was called. ++ * it doesn't make sense on ARM (currently the only user of __naked) ++ * to trace naked functions because then mcount is called without ++ * stack and frame pointer being set up and there is no chance to ++ * restore the lr register to the value before mcount was called. ++ * ++ * The asm() bodies of naked functions often depend on standard calling ++ * conventions, therefore they must be noinline and noclone. + * +- * The asm() bodies of naked functions often depend on standard calling conventions, +- * therefore they must be noinline and noclone. GCC 4.[56] currently fail to enforce +- * this, so we must do so ourselves. See GCC PR44290. ++ * GCC 4.[56] currently fail to enforce this, so we must do so ourselves. ++ * See GCC PR44290. + */ +-#define __naked __attribute__((naked)) noinline __noclone notrace ++#define __naked __attribute__((naked)) noinline __noclone notrace + +-#define __noreturn __attribute__((noreturn)) ++#define __noreturn __attribute__((noreturn)) + + /* + * From the GCC manual: +@@ -95,34 +114,170 @@ + * would be. + * [...] + */ +-#ifndef __pure +-#define __pure __attribute__((pure)) ++#define __pure __attribute__((pure)) ++#define __aligned(x) __attribute__((aligned(x))) ++#define __printf(a, b) __attribute__((format(printf, a, b))) ++#define __scanf(a, b) __attribute__((format(scanf, a, b))) ++#define __attribute_const__ __attribute__((__const__)) ++#define __maybe_unused __attribute__((unused)) ++#define __always_unused __attribute__((unused)) ++ ++/* gcc version specific checks */ ++ ++#if GCC_VERSION < 30200 ++# error Sorry, your compiler is too old - please upgrade it. ++#endif ++ ++#if GCC_VERSION < 30300 ++# define __used __attribute__((__unused__)) ++#else ++# define __used __attribute__((__used__)) ++#endif ++ ++#ifdef CONFIG_GCOV_KERNEL ++# if GCC_VERSION < 30400 ++# error "GCOV profiling support for gcc versions below 3.4 not included" ++# endif /* __GNUC_MINOR__ */ ++#endif /* CONFIG_GCOV_KERNEL */ ++ ++#if GCC_VERSION >= 30400 ++#define __must_check __attribute__((warn_unused_result)) ++#endif ++ ++#if GCC_VERSION >= 40000 ++ ++/* GCC 4.1.[01] miscompiles __weak */ ++#ifdef __KERNEL__ ++# if GCC_VERSION >= 40100 && GCC_VERSION <= 40101 ++# error Your version of gcc miscompiles the __weak directive ++# endif ++#endif ++ ++#define __used __attribute__((__used__)) ++#define __compiler_offsetof(a, b) \ ++ __builtin_offsetof(a, b) ++ ++#if GCC_VERSION >= 40100 && GCC_VERSION < 40600 ++# define __compiletime_object_size(obj) __builtin_object_size(obj, 0) ++#endif ++ ++#if GCC_VERSION >= 40300 ++/* Mark functions as cold. gcc will assume any path leading to a call ++ * to them will be unlikely. This means a lot of manual unlikely()s ++ * are unnecessary now for any paths leading to the usual suspects ++ * like BUG(), printk(), panic() etc. [but let's keep them for now for ++ * older compilers] ++ * ++ * Early snapshots of gcc 4.3 don't support this and we can't detect this ++ * in the preprocessor, but we can live with this because they're unreleased. ++ * Maketime probing would be overkill here. ++ * ++ * gcc also has a __attribute__((__hot__)) to move hot functions into ++ * a special section, but I don't see any sense in this right now in ++ * the kernel context ++ */ ++#define __cold __attribute__((__cold__)) ++ ++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) ++ ++#ifndef __CHECKER__ ++# define __compiletime_warning(message) __attribute__((warning(message))) ++# define __compiletime_error(message) __attribute__((error(message))) ++#endif /* __CHECKER__ */ ++#endif /* GCC_VERSION >= 40300 */ ++ ++#if GCC_VERSION >= 40500 ++/* ++ * Mark a position in code as unreachable. This can be used to ++ * suppress control flow warnings after asm blocks that transfer ++ * control elsewhere. ++ * ++ * Early snapshots of gcc 4.5 don't support this and we can't detect ++ * this in the preprocessor, but we can live with this because they're ++ * unreleased. Really, we need to have autoconf for the kernel. ++ */ ++#define unreachable() __builtin_unreachable() ++ ++/* Mark a function definition as prohibited from being cloned. */ ++#define __noclone __attribute__((__noclone__)) ++ ++#endif /* GCC_VERSION >= 40500 */ ++ ++#if GCC_VERSION >= 40600 ++/* ++ * When used with Link Time Optimization, gcc can optimize away C functions or ++ * variables which are referenced only from assembly code. __visible tells the ++ * optimizer that something else uses this function or variable, thus preventing ++ * this. ++ */ ++#define __visible __attribute__((externally_visible)) + #endif +-#ifndef __aligned +-#define __aligned(x) __attribute__((aligned(x))) ++ ++ ++#if GCC_VERSION >= 40900 && !defined(__CHECKER__) ++/* ++ * __assume_aligned(n, k): Tell the optimizer that the returned ++ * pointer can be assumed to be k modulo n. The second argument is ++ * optional (default 0), so we use a variadic macro to make the ++ * shorthand. ++ * ++ * Beware: Do not apply this to functions which may return ++ * ERR_PTRs. Also, it is probably unwise to apply it to functions ++ * returning extra information in the low bits (but in that case the ++ * compiler should see some alignment anyway, when the return value is ++ * massaged by 'flags = ptr & 3; ptr &= ~3;'). ++ */ ++#define __assume_aligned(a, ...) __attribute__((__assume_aligned__(a, ## __VA_ARGS__))) + #endif +-#define __printf(a, b) __attribute__((format(printf, a, b))) +-#define __scanf(a, b) __attribute__((format(scanf, a, b))) +-#define noinline __attribute__((noinline)) +-#define __attribute_const__ __attribute__((__const__)) +-#define __maybe_unused __attribute__((unused)) +-#define __always_unused __attribute__((unused)) + +-#define __gcc_header(x) #x +-#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h) +-#define gcc_header(x) _gcc_header(x) +-#include gcc_header(__GNUC__) ++/* ++ * GCC 'asm goto' miscompiles certain code sequences: ++ * ++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 ++ * ++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. ++ * ++ * (asm goto is automatically volatile - the naming reflects this.) ++ */ ++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) ++ ++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP ++#if GCC_VERSION >= 40400 ++#define __HAVE_BUILTIN_BSWAP32__ ++#define __HAVE_BUILTIN_BSWAP64__ ++#endif ++#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600) ++#define __HAVE_BUILTIN_BSWAP16__ ++#endif ++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ ++ ++#if GCC_VERSION >= 50000 ++#define KASAN_ABI_VERSION 4 ++#elif GCC_VERSION >= 40902 ++#define KASAN_ABI_VERSION 3 ++#endif ++ ++#if GCC_VERSION >= 40902 ++/* ++ * Tell the compiler that address safety instrumentation (KASAN) ++ * should not be applied to that function. ++ * Conflicts with inlining: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 ++ */ ++#define __no_sanitize_address __attribute__((no_sanitize_address)) ++#endif ++ ++#endif /* gcc version >= 40000 specific checks */ + + #if !defined(__noclone) + #define __noclone /* not needed */ + #endif + ++#if !defined(__no_sanitize_address) ++#define __no_sanitize_address ++#endif ++ + /* + * A trick to suppress uninitialized variable warning without generating any + * code + */ + #define uninitialized_var(x) x = x +- +-#ifndef __always_inline +-#define __always_inline inline __attribute__((always_inline)) +-#endif +diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h +deleted file mode 100644 +index 7d89feb..0000000 +--- a/include/linux/compiler-gcc3.h ++++ /dev/null +@@ -1,23 +0,0 @@ +-#ifndef __LINUX_COMPILER_H +-#error "Please don't include directly, include instead." +-#endif +- +-#if GCC_VERSION < 30200 +-# error Sorry, your compiler is too old - please upgrade it. +-#endif +- +-#if GCC_VERSION >= 30300 +-# define __used __attribute__((__used__)) +-#else +-# define __used __attribute__((__unused__)) +-#endif +- +-#if GCC_VERSION >= 30400 +-#define __must_check __attribute__((warn_unused_result)) +-#endif +- +-#ifdef CONFIG_GCOV_KERNEL +-# if GCC_VERSION < 30400 +-# error "GCOV profiling support for gcc versions below 3.4 not included" +-# endif /* __GNUC_MINOR__ */ +-#endif /* CONFIG_GCOV_KERNEL */ +diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h +deleted file mode 100644 +index 2507fd2..0000000 +--- a/include/linux/compiler-gcc4.h ++++ /dev/null +@@ -1,88 +0,0 @@ +-#ifndef __LINUX_COMPILER_H +-#error "Please don't include directly, include instead." +-#endif +- +-/* GCC 4.1.[01] miscompiles __weak */ +-#ifdef __KERNEL__ +-# if GCC_VERSION >= 40100 && GCC_VERSION <= 40101 +-# error Your version of gcc miscompiles the __weak directive +-# endif +-#endif +- +-#define __used __attribute__((__used__)) +-#define __must_check __attribute__((warn_unused_result)) +-#define __compiler_offsetof(a,b) __builtin_offsetof(a,b) +- +-#if GCC_VERSION >= 40100 && GCC_VERSION < 40600 +-# define __compiletime_object_size(obj) __builtin_object_size(obj, 0) +-#endif +- +-#if GCC_VERSION >= 40300 +-/* Mark functions as cold. gcc will assume any path leading to a call +- to them will be unlikely. This means a lot of manual unlikely()s +- are unnecessary now for any paths leading to the usual suspects +- like BUG(), printk(), panic() etc. [but let's keep them for now for +- older compilers] +- +- Early snapshots of gcc 4.3 don't support this and we can't detect this +- in the preprocessor, but we can live with this because they're unreleased. +- Maketime probing would be overkill here. +- +- gcc also has a __attribute__((__hot__)) to move hot functions into +- a special section, but I don't see any sense in this right now in +- the kernel context */ +-#define __cold __attribute__((__cold__)) +- +-#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) +- +-#ifndef __CHECKER__ +-# define __compiletime_warning(message) __attribute__((warning(message))) +-# define __compiletime_error(message) __attribute__((error(message))) +-#endif /* __CHECKER__ */ +-#endif /* GCC_VERSION >= 40300 */ +- +-#if GCC_VERSION >= 40500 +-/* +- * Mark a position in code as unreachable. This can be used to +- * suppress control flow warnings after asm blocks that transfer +- * control elsewhere. +- * +- * Early snapshots of gcc 4.5 don't support this and we can't detect +- * this in the preprocessor, but we can live with this because they're +- * unreleased. Really, we need to have autoconf for the kernel. +- */ +-#define unreachable() __builtin_unreachable() +- +-/* Mark a function definition as prohibited from being cloned. */ +-#define __noclone __attribute__((__noclone__)) +- +-#endif /* GCC_VERSION >= 40500 */ +- +-#if GCC_VERSION >= 40600 +-/* +- * Tell the optimizer that something else uses this function or variable. +- */ +-#define __visible __attribute__((externally_visible)) +-#endif +- +-/* +- * GCC 'asm goto' miscompiles certain code sequences: +- * +- * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 +- * +- * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. +- * Fixed in GCC 4.8.2 and later versions. +- * +- * (asm goto is automatically volatile - the naming reflects this.) +- */ +-#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) +- +-#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP +-#if GCC_VERSION >= 40400 +-#define __HAVE_BUILTIN_BSWAP32__ +-#define __HAVE_BUILTIN_BSWAP64__ +-#endif +-#if GCC_VERSION >= 40800 || (defined(__powerpc__) && GCC_VERSION >= 40600) +-#define __HAVE_BUILTIN_BSWAP16__ +-#endif +-#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ +diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h +deleted file mode 100644 +index c8c5659..0000000 +--- a/include/linux/compiler-gcc5.h ++++ /dev/null +@@ -1,65 +0,0 @@ +-#ifndef __LINUX_COMPILER_H +-#error "Please don't include directly, include instead." +-#endif +- +-#define __used __attribute__((__used__)) +-#define __must_check __attribute__((warn_unused_result)) +-#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) +- +-/* Mark functions as cold. gcc will assume any path leading to a call +- to them will be unlikely. This means a lot of manual unlikely()s +- are unnecessary now for any paths leading to the usual suspects +- like BUG(), printk(), panic() etc. [but let's keep them for now for +- older compilers] +- +- Early snapshots of gcc 4.3 don't support this and we can't detect this +- in the preprocessor, but we can live with this because they're unreleased. +- Maketime probing would be overkill here. +- +- gcc also has a __attribute__((__hot__)) to move hot functions into +- a special section, but I don't see any sense in this right now in +- the kernel context */ +-#define __cold __attribute__((__cold__)) +- +-#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) +- +-#ifndef __CHECKER__ +-# define __compiletime_warning(message) __attribute__((warning(message))) +-# define __compiletime_error(message) __attribute__((error(message))) +-#endif /* __CHECKER__ */ +- +-/* +- * Mark a position in code as unreachable. This can be used to +- * suppress control flow warnings after asm blocks that transfer +- * control elsewhere. +- * +- * Early snapshots of gcc 4.5 don't support this and we can't detect +- * this in the preprocessor, but we can live with this because they're +- * unreleased. Really, we need to have autoconf for the kernel. +- */ +-#define unreachable() __builtin_unreachable() +- +-/* Mark a function definition as prohibited from being cloned. */ +-#define __noclone __attribute__((__noclone__)) +- +-/* +- * Tell the optimizer that something else uses this function or variable. +- */ +-#define __visible __attribute__((externally_visible)) +- +-/* +- * GCC 'asm goto' miscompiles certain code sequences: +- * +- * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 +- * +- * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. +- * +- * (asm goto is automatically volatile - the naming reflects this.) +- */ +-#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) +- +-#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP +-#define __HAVE_BUILTIN_BSWAP32__ +-#define __HAVE_BUILTIN_BSWAP64__ +-#define __HAVE_BUILTIN_BSWAP16__ +-#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ +diff --git a/include/linux/compiler-intel.h b/include/linux/compiler-intel.h +index ba147a1..d4c7113 100644 +--- a/include/linux/compiler-intel.h ++++ b/include/linux/compiler-intel.h +@@ -13,9 +13,14 @@ + /* Intel ECC compiler doesn't support gcc specific asm stmts. + * It uses intrinsics to do the equivalent things. + */ ++#undef barrier ++#undef barrier_data + #undef RELOC_HIDE + #undef OPTIMIZER_HIDE_VAR + ++#define barrier() __memory_barrier() ++#define barrier_data(ptr) barrier() ++ + #define RELOC_HIDE(ptr, off) \ + ({ unsigned long __ptr; \ + __ptr = (unsigned long) (ptr); \ +diff --git a/include/linux/compiler.h b/include/linux/compiler.h +index d5ad7b1..020ad16 100644 +--- a/include/linux/compiler.h ++++ b/include/linux/compiler.h +@@ -17,6 +17,7 @@ + # define __release(x) __context__(x,-1) + # define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) + # define __percpu __attribute__((noderef, address_space(3))) ++# define __pmem __attribute__((noderef, address_space(5))) + #ifdef CONFIG_SPARSE_RCU_POINTER + # define __rcu __attribute__((noderef, address_space(4))) + #else +@@ -42,6 +43,7 @@ extern void __chk_io_ptr(const volatile void __iomem *); + # define __cond_lock(x,c) (c) + # define __percpu + # define __rcu ++# define __pmem + #endif + + /* Indirect macros required for expanded argument pasting, eg. __LINE__. */ +@@ -54,7 +56,11 @@ extern void __chk_io_ptr(const volatile void __iomem *); + #include + #endif + ++#if defined(CC_USING_HOTPATCH) && !defined(__CHECKER__) ++#define notrace __attribute__((hotpatch(0,0))) ++#else + #define notrace __attribute__((no_instrument_function)) ++#endif + + /* Intel compiler defines __GNUC__. So we will overwrite implementations + * coming from above header files here +@@ -138,7 +144,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); + */ + #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) ) + #define __trace_if(cond) \ +- if (__builtin_constant_p((cond)) ? !!(cond) : \ ++ if (__builtin_constant_p(!!(cond)) ? !!(cond) : \ + ({ \ + int ______r; \ + static struct ftrace_branch_data \ +@@ -165,6 +171,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); + # define barrier() __memory_barrier() + #endif + ++#ifndef barrier_data ++# define barrier_data(ptr) barrier() ++#endif ++ + /* Unreachable code */ + #ifndef unreachable + # define unreachable() do { } while (1) +@@ -186,6 +196,126 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); + # define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __LINE__) + #endif + ++#include ++ ++#define __READ_ONCE_SIZE \ ++({ \ ++ switch (size) { \ ++ case 1: *(__u8 *)res = *(volatile __u8 *)p; break; \ ++ case 2: *(__u16 *)res = *(volatile __u16 *)p; break; \ ++ case 4: *(__u32 *)res = *(volatile __u32 *)p; break; \ ++ case 8: *(__u64 *)res = *(volatile __u64 *)p; break; \ ++ default: \ ++ barrier(); \ ++ __builtin_memcpy((void *)res, (const void *)p, size); \ ++ barrier(); \ ++ } \ ++}) ++ ++static __always_inline ++void __read_once_size(const volatile void *p, void *res, int size) ++{ ++ __READ_ONCE_SIZE; ++} ++ ++#ifdef CONFIG_KASAN ++/* ++ * This function is not 'inline' because __no_sanitize_address confilcts ++ * with inlining. Attempt to inline it may cause a build failure. ++ * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 ++ * '__maybe_unused' allows us to avoid defined-but-not-used warnings. ++ */ ++static __no_sanitize_address __maybe_unused ++void __read_once_size_nocheck(const volatile void *p, void *res, int size) ++{ ++ __READ_ONCE_SIZE; ++} ++#else ++static __always_inline ++void __read_once_size_nocheck(const volatile void *p, void *res, int size) ++{ ++ __READ_ONCE_SIZE; ++} ++#endif ++ ++static __always_inline void __write_once_size(volatile void *p, void *res, int size) ++{ ++ switch (size) { ++ case 1: *(volatile __u8 *)p = *(__u8 *)res; break; ++ case 2: *(volatile __u16 *)p = *(__u16 *)res; break; ++ case 4: *(volatile __u32 *)p = *(__u32 *)res; break; ++ case 8: *(volatile __u64 *)p = *(__u64 *)res; break; ++ default: ++ barrier(); ++ __builtin_memcpy((void *)p, (const void *)res, size); ++ barrier(); ++ } ++} ++ ++/* ++ * Prevent the compiler from merging or refetching reads or writes. The ++ * compiler is also forbidden from reordering successive instances of ++ * READ_ONCE, WRITE_ONCE and ACCESS_ONCE (see below), but only when the ++ * compiler is aware of some particular ordering. One way to make the ++ * compiler aware of ordering is to put the two invocations of READ_ONCE, ++ * WRITE_ONCE or ACCESS_ONCE() in different C statements. ++ * ++ * In contrast to ACCESS_ONCE these two macros will also work on aggregate ++ * data types like structs or unions. If the size of the accessed data ++ * type exceeds the word size of the machine (e.g., 32 bits or 64 bits) ++ * READ_ONCE() and WRITE_ONCE() will fall back to memcpy and print a ++ * compile-time warning. ++ * ++ * Their two major use cases are: (1) Mediating communication between ++ * process-level code and irq/NMI handlers, all running on the same CPU, ++ * and (2) Ensuring that the compiler does not fold, spindle, or otherwise ++ * mutilate accesses that either do not require ordering or that interact ++ * with an explicit memory barrier or atomic instruction that provides the ++ * required ordering. ++ */ ++ ++#define __READ_ONCE(x, check) \ ++({ \ ++ union { typeof(x) __val; char __c[1]; } __u; \ ++ if (check) \ ++ __read_once_size(&(x), __u.__c, sizeof(x)); \ ++ else \ ++ __read_once_size_nocheck(&(x), __u.__c, sizeof(x)); \ ++ __u.__val; \ ++}) ++#define READ_ONCE(x) __READ_ONCE(x, 1) ++ ++/* ++ * Use READ_ONCE_NOCHECK() instead of READ_ONCE() if you need ++ * to hide memory access from KASAN. ++ */ ++#define READ_ONCE_NOCHECK(x) __READ_ONCE(x, 0) ++ ++#define WRITE_ONCE(x, val) \ ++({ \ ++ union { typeof(x) __val; char __c[1]; } __u = \ ++ { .__val = (__force typeof(x)) (val) }; \ ++ __write_once_size(&(x), __u.__c, sizeof(x)); \ ++ __u.__val; \ ++}) ++ ++/** ++ * smp_cond_acquire() - Spin wait for cond with ACQUIRE ordering ++ * @cond: boolean expression to wait for ++ * ++ * Equivalent to using smp_load_acquire() on the condition variable but employs ++ * the control dependency of the wait to reduce the barrier on many platforms. ++ * ++ * The control dependency provides a LOAD->STORE order, the additional RMB ++ * provides LOAD->LOAD order, together they provide LOAD->{LOAD,STORE} order, ++ * aka. ACQUIRE. ++ */ ++#define smp_cond_acquire(cond) do { \ ++ while (!(cond)) \ ++ cpu_relax(); \ ++ smp_rmb(); /* ctrl + rmb := acquire */ \ ++} while (0) ++ + #endif /* __KERNEL__ */ + + #endif /* __ASSEMBLY__ */ +@@ -304,6 +434,14 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); + #define __visible + #endif + ++/* ++ * Assume alignment of return value. ++ */ ++#ifndef __assume_aligned ++#define __assume_aligned(a, ...) ++#endif ++ ++ + /* Are two types/vars the same type (ignoring qualifiers)? */ + #ifndef __same_type + # define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) +@@ -311,7 +449,7 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); + + /* Is this type a native word size -- useful for atomic operations */ + #ifndef __native_word +-# define __native_word(t) (sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) ++# define __native_word(t) (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || sizeof(t) == sizeof(int) || sizeof(t) == sizeof(long)) + #endif + + /* Compile time object size, -1 for unknown */ +@@ -373,12 +511,38 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect); + * to make the compiler aware of ordering is to put the two invocations of + * ACCESS_ONCE() in different C statements. + * +- * This macro does absolutely -nothing- to prevent the CPU from reordering, +- * merging, or refetching absolutely anything at any time. Its main intended +- * use is to mediate communication between process-level code and irq/NMI +- * handlers, all running on the same CPU. ++ * ACCESS_ONCE will only work on scalar types. For union types, ACCESS_ONCE ++ * on a union member will work as long as the size of the member matches the ++ * size of the union and the size is smaller than word size. ++ * ++ * The major use cases of ACCESS_ONCE used to be (1) Mediating communication ++ * between process-level code and irq/NMI handlers, all running on the same CPU, ++ * and (2) Ensuring that the compiler does not fold, spindle, or otherwise ++ * mutilate accesses that either do not require ordering or that interact ++ * with an explicit memory barrier or atomic instruction that provides the ++ * required ordering. ++ * ++ * If possible use READ_ONCE()/WRITE_ONCE() instead. ++ */ ++#define __ACCESS_ONCE(x) ({ \ ++ __maybe_unused typeof(x) __var = (__force typeof(x)) 0; \ ++ (volatile typeof(x) *)&(x); }) ++#define ACCESS_ONCE(x) (*__ACCESS_ONCE(x)) ++ ++/** ++ * lockless_dereference() - safely load a pointer for later dereference ++ * @p: The pointer to load ++ * ++ * Similar to rcu_dereference(), but for situations where the pointed-to ++ * object's lifetime is managed by something other than RCU. That ++ * "something other" might be reference counting or simple immortality. + */ +-#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) ++#define lockless_dereference(p) \ ++({ \ ++ typeof(p) _________p1 = READ_ONCE(p); \ ++ smp_read_barrier_depends(); /* Dependency order vs. p above. */ \ ++ (_________p1); \ ++}) + + /* Ignore/forbid kprobes attach on very low level functions marked by this attribute: */ + #ifdef CONFIG_KPROBES +-- +2.7.4 + diff --git a/meta-renesas-extras/recipes/u-boot/u-boot_%.bbappend b/meta-renesas-extras/recipes/u-boot/u-boot_%.bbappend new file mode 100644 index 0000000..361abbf --- /dev/null +++ b/meta-renesas-extras/recipes/u-boot/u-boot_%.bbappend @@ -0,0 +1,36 @@ +############################################################################ +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://0001-compiler-.h-sync-include-linux-compiler-.h-with-Linu.patch" + +do_deploy_prepend() { + cp ${B}/${UBOOT_SREC} ${S}/${UBOOT_SREC} +} diff --git a/meta-renesas-extras/recipes/wayland/libgbm.bbappend b/meta-renesas-extras/recipes/wayland/libgbm.bbappend new file mode 100644 index 0000000..fd11a50 --- /dev/null +++ b/meta-renesas-extras/recipes/wayland/libgbm.bbappend @@ -0,0 +1,30 @@ +############################################################################ +## +## Copyright (C) 2017 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the Boot to Qt meta layer. +## +## $QT_BEGIN_LICENSE:GPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 3 or (at your option) any later version +## approved by the KDE Free Qt Foundation. The licenses are as published by +## the Free Software Foundation and appearing in the file LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################ + +PROVIDES += "virtual/libgbm" diff --git a/scripts/manifest.xml b/scripts/manifest.xml index 685e1ea..9951654 100644 --- a/scripts/manifest.xml +++ b/scripts/manifest.xml @@ -1,8 +1,5 @@ - - - @@ -13,6 +10,8 @@ + + + groups="notdefault,external,fsl,ti,smx6,renesas-gen3"/> + + + Date: Fri, 5 May 2017 09:26:57 +0300 Subject: Fix USB drivers on Apalis board Apalis kernel was missing one patch that fixes crc calculation of exported symbols. That caused some exported symbols to have checksum 0x00000000 in Module.symvers and modules using those symbols refused to load. Task-number: QTBUG-60569 Change-Id: I798fc0af0138b0dffbff2850295f40f74e70a2c8 Reviewed-by: Kari Oikarinen Reviewed-by: Samuli Piippo --- .../0001-genksyms-fix-typeof-handling.patch | 1360 ++++++++++++++++++++ .../recipes/linux/linux-toradex_3.14.%.bbappend | 5 + 2 files changed, 1365 insertions(+) create mode 100644 meta-fsl-extras/recipes/linux/linux-toradex/0001-genksyms-fix-typeof-handling.patch diff --git a/meta-fsl-extras/recipes/linux/linux-toradex/0001-genksyms-fix-typeof-handling.patch b/meta-fsl-extras/recipes/linux/linux-toradex/0001-genksyms-fix-typeof-handling.patch new file mode 100644 index 0000000..6c2b553 --- /dev/null +++ b/meta-fsl-extras/recipes/linux/linux-toradex/0001-genksyms-fix-typeof-handling.patch @@ -0,0 +1,1360 @@ +From dc53324060f324e8af6867f57bf4891c13c6ef18 Mon Sep 17 00:00:00 2001 +From: Jan Beulich +Date: Thu, 3 Apr 2014 14:46:37 -0700 +Subject: [PATCH] genksyms: fix typeof() handling + +Recent increased use of typeof() throughout the tree resulted in a +number of symbols (25 in a typical distro config of ours) not getting a +proper CRC calculated for them anymore, due to the parser in genksyms +not coping with several of these uses (interestingly in the majority of +[if not all] cases the problem is due to the use of typeof() in code +preceding a certain export, not in the declaration/definition of the +exported function/object itself; I wasn't able to find a way to address +this more general parser shortcoming). + +The use of parameter_declaration is a little more relaxed than would be +ideal (permitting not just a bare type specification, but also one with +identifier), but since the same code is being passed through an actual +compiler, there's no apparent risk of allowing through any broken code. + +Otoh using parameter_declaration instead of the ad hoc +"decl_specifier_seq '*'" / "decl_specifier_seq" pair allows all types to +be handled rather than just plain ones and pointers to plain ones. + +Signed-off-by: Jan Beulich +Cc: Michal Marek +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +--- + scripts/genksyms/keywords.gperf | 5 +- + scripts/genksyms/keywords.hash.c_shipped | 133 +++---- + scripts/genksyms/lex.l | 51 ++- + scripts/genksyms/lex.lex.c_shipped | 51 ++- + scripts/genksyms/parse.tab.c_shipped | 608 ++++++++++++++++--------------- + scripts/genksyms/parse.tab.h_shipped | 29 +- + scripts/genksyms/parse.y | 5 +- + 7 files changed, 498 insertions(+), 384 deletions(-) + +diff --git a/scripts/genksyms/keywords.gperf b/scripts/genksyms/keywords.gperf +index 3e77a943e7b7..a9096d993172 100644 +--- a/scripts/genksyms/keywords.gperf ++++ b/scripts/genksyms/keywords.gperf +@@ -23,6 +23,8 @@ __inline, INLINE_KEYW + __inline__, INLINE_KEYW + __signed, SIGNED_KEYW + __signed__, SIGNED_KEYW ++__typeof, TYPEOF_KEYW ++__typeof__, TYPEOF_KEYW + __volatile, VOLATILE_KEYW + __volatile__, VOLATILE_KEYW + # According to rth, c99 defines _Bool, __restrict, __restrict__, restrict. KAO +@@ -51,9 +53,8 @@ signed, SIGNED_KEYW + static, STATIC_KEYW + struct, STRUCT_KEYW + typedef, TYPEDEF_KEYW ++typeof, TYPEOF_KEYW + union, UNION_KEYW + unsigned, UNSIGNED_KEYW + void, VOID_KEYW + volatile, VOLATILE_KEYW +-typeof, TYPEOF_KEYW +-__typeof__, TYPEOF_KEYW +diff --git a/scripts/genksyms/keywords.hash.c_shipped b/scripts/genksyms/keywords.hash.c_shipped +index 82062607e8c0..e9452482e198 100644 +--- a/scripts/genksyms/keywords.hash.c_shipped ++++ b/scripts/genksyms/keywords.hash.c_shipped +@@ -34,7 +34,7 @@ struct resword; + static const struct resword *is_reserved_word(register const char *str, register unsigned int len); + #line 8 "scripts/genksyms/keywords.gperf" + struct resword { const char *name; int token; }; +-/* maximum key range = 64, duplicates = 0 */ ++/* maximum key range = 98, duplicates = 0 */ + + #ifdef __GNUC__ + __inline +@@ -48,32 +48,32 @@ is_reserved_hash (register const char *str, register unsigned int len) + { + static const unsigned char asso_values[] = + { +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, +- 67, 67, 67, 67, 67, 67, 15, 67, 67, 67, +- 0, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 0, 67, 0, 67, 5, +- 25, 20, 15, 30, 67, 15, 67, 67, 10, 0, +- 10, 40, 20, 67, 10, 5, 0, 10, 15, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, +- 67, 67, 67, 67, 67, 67 ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 0, ++ 101, 101, 101, 101, 101, 101, 15, 101, 101, 101, ++ 0, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 0, 101, 0, 101, 5, ++ 25, 20, 55, 30, 101, 15, 101, 101, 10, 0, ++ 10, 40, 10, 101, 10, 5, 0, 10, 15, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101, 101, 101, 101, 101, ++ 101, 101, 101, 101, 101, 101 + }; + return len + asso_values[(unsigned char)str[2]] + asso_values[(unsigned char)str[0]] + asso_values[(unsigned char)str[len - 1]]; + } +@@ -89,17 +89,17 @@ is_reserved_word (register const char *str, register unsigned int len) + { + enum + { +- TOTAL_KEYWORDS = 45, ++ TOTAL_KEYWORDS = 46, + MIN_WORD_LENGTH = 3, + MAX_WORD_LENGTH = 24, + MIN_HASH_VALUE = 3, +- MAX_HASH_VALUE = 66 ++ MAX_HASH_VALUE = 100 + }; + + static const struct resword wordlist[] = + { + {""}, {""}, {""}, +-#line 33 "scripts/genksyms/keywords.gperf" ++#line 35 "scripts/genksyms/keywords.gperf" + {"asm", ASM_KEYW}, + {""}, + #line 15 "scripts/genksyms/keywords.gperf" +@@ -108,7 +108,7 @@ is_reserved_word (register const char *str, register unsigned int len) + #line 16 "scripts/genksyms/keywords.gperf" + {"__asm__", ASM_KEYW}, + {""}, {""}, +-#line 59 "scripts/genksyms/keywords.gperf" ++#line 27 "scripts/genksyms/keywords.gperf" + {"__typeof__", TYPEOF_KEYW}, + {""}, + #line 19 "scripts/genksyms/keywords.gperf" +@@ -119,31 +119,31 @@ is_reserved_word (register const char *str, register unsigned int len) + {"__const__", CONST_KEYW}, + #line 25 "scripts/genksyms/keywords.gperf" + {"__signed__", SIGNED_KEYW}, +-#line 51 "scripts/genksyms/keywords.gperf" ++#line 53 "scripts/genksyms/keywords.gperf" + {"static", STATIC_KEYW}, + {""}, +-#line 46 "scripts/genksyms/keywords.gperf" ++#line 48 "scripts/genksyms/keywords.gperf" + {"int", INT_KEYW}, +-#line 39 "scripts/genksyms/keywords.gperf" ++#line 41 "scripts/genksyms/keywords.gperf" + {"char", CHAR_KEYW}, +-#line 40 "scripts/genksyms/keywords.gperf" ++#line 42 "scripts/genksyms/keywords.gperf" + {"const", CONST_KEYW}, +-#line 52 "scripts/genksyms/keywords.gperf" ++#line 54 "scripts/genksyms/keywords.gperf" + {"struct", STRUCT_KEYW}, +-#line 31 "scripts/genksyms/keywords.gperf" ++#line 33 "scripts/genksyms/keywords.gperf" + {"__restrict__", RESTRICT_KEYW}, +-#line 32 "scripts/genksyms/keywords.gperf" ++#line 34 "scripts/genksyms/keywords.gperf" + {"restrict", RESTRICT_KEYW}, + #line 12 "scripts/genksyms/keywords.gperf" + {"EXPORT_SYMBOL_GPL_FUTURE", EXPORT_SYMBOL_KEYW}, + #line 23 "scripts/genksyms/keywords.gperf" + {"__inline__", INLINE_KEYW}, + {""}, +-#line 27 "scripts/genksyms/keywords.gperf" ++#line 29 "scripts/genksyms/keywords.gperf" + {"__volatile__", VOLATILE_KEYW}, + #line 10 "scripts/genksyms/keywords.gperf" + {"EXPORT_SYMBOL", EXPORT_SYMBOL_KEYW}, +-#line 30 "scripts/genksyms/keywords.gperf" ++#line 32 "scripts/genksyms/keywords.gperf" + {"_restrict", RESTRICT_KEYW}, + {""}, + #line 17 "scripts/genksyms/keywords.gperf" +@@ -152,56 +152,65 @@ is_reserved_word (register const char *str, register unsigned int len) + {"EXPORT_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, + #line 21 "scripts/genksyms/keywords.gperf" + {"__extension__", EXTENSION_KEYW}, +-#line 42 "scripts/genksyms/keywords.gperf" ++#line 44 "scripts/genksyms/keywords.gperf" + {"enum", ENUM_KEYW}, + #line 13 "scripts/genksyms/keywords.gperf" + {"EXPORT_UNUSED_SYMBOL", EXPORT_SYMBOL_KEYW}, +-#line 43 "scripts/genksyms/keywords.gperf" ++#line 45 "scripts/genksyms/keywords.gperf" + {"extern", EXTERN_KEYW}, + {""}, + #line 24 "scripts/genksyms/keywords.gperf" + {"__signed", SIGNED_KEYW}, + #line 14 "scripts/genksyms/keywords.gperf" + {"EXPORT_UNUSED_SYMBOL_GPL", EXPORT_SYMBOL_KEYW}, +-#line 54 "scripts/genksyms/keywords.gperf" ++#line 57 "scripts/genksyms/keywords.gperf" + {"union", UNION_KEYW}, +-#line 58 "scripts/genksyms/keywords.gperf" +- {"typeof", TYPEOF_KEYW}, +-#line 53 "scripts/genksyms/keywords.gperf" +- {"typedef", TYPEDEF_KEYW}, ++ {""}, {""}, + #line 22 "scripts/genksyms/keywords.gperf" + {"__inline", INLINE_KEYW}, +-#line 38 "scripts/genksyms/keywords.gperf" ++#line 40 "scripts/genksyms/keywords.gperf" + {"auto", AUTO_KEYW}, +-#line 26 "scripts/genksyms/keywords.gperf" ++#line 28 "scripts/genksyms/keywords.gperf" + {"__volatile", VOLATILE_KEYW}, + {""}, {""}, +-#line 55 "scripts/genksyms/keywords.gperf" ++#line 58 "scripts/genksyms/keywords.gperf" + {"unsigned", UNSIGNED_KEYW}, + {""}, +-#line 49 "scripts/genksyms/keywords.gperf" ++#line 51 "scripts/genksyms/keywords.gperf" + {"short", SHORT_KEYW}, +-#line 45 "scripts/genksyms/keywords.gperf" ++#line 47 "scripts/genksyms/keywords.gperf" + {"inline", INLINE_KEYW}, + {""}, +-#line 57 "scripts/genksyms/keywords.gperf" ++#line 60 "scripts/genksyms/keywords.gperf" + {"volatile", VOLATILE_KEYW}, +-#line 47 "scripts/genksyms/keywords.gperf" ++#line 49 "scripts/genksyms/keywords.gperf" + {"long", LONG_KEYW}, +-#line 29 "scripts/genksyms/keywords.gperf" ++#line 31 "scripts/genksyms/keywords.gperf" + {"_Bool", BOOL_KEYW}, + {""}, {""}, +-#line 48 "scripts/genksyms/keywords.gperf" ++#line 50 "scripts/genksyms/keywords.gperf" + {"register", REGISTER_KEYW}, +-#line 56 "scripts/genksyms/keywords.gperf" ++#line 59 "scripts/genksyms/keywords.gperf" + {"void", VOID_KEYW}, +-#line 44 "scripts/genksyms/keywords.gperf" +- {"float", FLOAT_KEYW}, +-#line 41 "scripts/genksyms/keywords.gperf" ++ {""}, ++#line 43 "scripts/genksyms/keywords.gperf" + {"double", DOUBLE_KEYW}, ++ {""}, ++#line 26 "scripts/genksyms/keywords.gperf" ++ {"__typeof", TYPEOF_KEYW}, ++ {""}, {""}, ++#line 52 "scripts/genksyms/keywords.gperf" ++ {"signed", SIGNED_KEYW}, + {""}, {""}, {""}, {""}, +-#line 50 "scripts/genksyms/keywords.gperf" +- {"signed", SIGNED_KEYW} ++#line 56 "scripts/genksyms/keywords.gperf" ++ {"typeof", TYPEOF_KEYW}, ++#line 55 "scripts/genksyms/keywords.gperf" ++ {"typedef", TYPEDEF_KEYW}, ++ {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, ++ {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, ++ {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, {""}, ++#line 46 "scripts/genksyms/keywords.gperf" ++ {"float", FLOAT_KEYW} + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) +diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l +index f770071719cb..e583565f2011 100644 +--- a/scripts/genksyms/lex.l ++++ b/scripts/genksyms/lex.l +@@ -129,8 +129,9 @@ int + yylex(void) + { + static enum { +- ST_NOTSTARTED, ST_NORMAL, ST_ATTRIBUTE, ST_ASM, ST_BRACKET, ST_BRACE, +- ST_EXPRESSION, ST_TABLE_1, ST_TABLE_2, ST_TABLE_3, ST_TABLE_4, ++ ST_NOTSTARTED, ST_NORMAL, ST_ATTRIBUTE, ST_ASM, ST_TYPEOF, ST_TYPEOF_1, ++ ST_BRACKET, ST_BRACE, ST_EXPRESSION, ++ ST_TABLE_1, ST_TABLE_2, ST_TABLE_3, ST_TABLE_4, + ST_TABLE_5, ST_TABLE_6 + } lexstate = ST_NOTSTARTED; + +@@ -198,6 +199,10 @@ repeat: + lexstate = ST_ASM; + count = 0; + goto repeat; ++ case TYPEOF_KEYW: ++ lexstate = ST_TYPEOF; ++ count = 0; ++ goto repeat; + + case STRUCT_KEYW: + case UNION_KEYW: +@@ -284,6 +289,48 @@ repeat: + } + break; + ++ case ST_TYPEOF: ++ switch (token) ++ { ++ case '(': ++ if ( ++count == 1 ) ++ lexstate = ST_TYPEOF_1; ++ else ++ APP; ++ goto repeat; ++ case ')': ++ APP; ++ if (--count == 0) ++ { ++ lexstate = ST_NORMAL; ++ token = TYPEOF_PHRASE; ++ break; ++ } ++ goto repeat; ++ default: ++ APP; ++ goto repeat; ++ } ++ break; ++ ++ case ST_TYPEOF_1: ++ if (token == IDENT) ++ { ++ if (is_reserved_word(yytext, yyleng) ++ || find_symbol(yytext, SYM_TYPEDEF, 1)) ++ { ++ yyless(0); ++ unput('('); ++ lexstate = ST_NORMAL; ++ token = TYPEOF_KEYW; ++ break; ++ } ++ _APP("(", 1); ++ } ++ APP; ++ lexstate = ST_TYPEOF; ++ goto repeat; ++ + case ST_BRACKET: + APP; + switch (token) +diff --git a/scripts/genksyms/lex.lex.c_shipped b/scripts/genksyms/lex.lex.c_shipped +index 0bf4157e6161..f82740a69b85 100644 +--- a/scripts/genksyms/lex.lex.c_shipped ++++ b/scripts/genksyms/lex.lex.c_shipped +@@ -1938,8 +1938,9 @@ int + yylex(void) + { + static enum { +- ST_NOTSTARTED, ST_NORMAL, ST_ATTRIBUTE, ST_ASM, ST_BRACKET, ST_BRACE, +- ST_EXPRESSION, ST_TABLE_1, ST_TABLE_2, ST_TABLE_3, ST_TABLE_4, ++ ST_NOTSTARTED, ST_NORMAL, ST_ATTRIBUTE, ST_ASM, ST_TYPEOF, ST_TYPEOF_1, ++ ST_BRACKET, ST_BRACE, ST_EXPRESSION, ++ ST_TABLE_1, ST_TABLE_2, ST_TABLE_3, ST_TABLE_4, + ST_TABLE_5, ST_TABLE_6 + } lexstate = ST_NOTSTARTED; + +@@ -2007,6 +2008,10 @@ repeat: + lexstate = ST_ASM; + count = 0; + goto repeat; ++ case TYPEOF_KEYW: ++ lexstate = ST_TYPEOF; ++ count = 0; ++ goto repeat; + + case STRUCT_KEYW: + case UNION_KEYW: +@@ -2093,6 +2098,48 @@ repeat: + } + break; + ++ case ST_TYPEOF: ++ switch (token) ++ { ++ case '(': ++ if ( ++count == 1 ) ++ lexstate = ST_TYPEOF_1; ++ else ++ APP; ++ goto repeat; ++ case ')': ++ APP; ++ if (--count == 0) ++ { ++ lexstate = ST_NORMAL; ++ token = TYPEOF_PHRASE; ++ break; ++ } ++ goto repeat; ++ default: ++ APP; ++ goto repeat; ++ } ++ break; ++ ++ case ST_TYPEOF_1: ++ if (token == IDENT) ++ { ++ if (is_reserved_word(yytext, yyleng) ++ || find_symbol(yytext, SYM_TYPEDEF, 1)) ++ { ++ yyless(0); ++ unput('('); ++ lexstate = ST_NORMAL; ++ token = TYPEOF_KEYW; ++ break; ++ } ++ _APP("(", 1); ++ } ++ APP; ++ lexstate = ST_TYPEOF; ++ goto repeat; ++ + case ST_BRACKET: + APP; + switch (token) +diff --git a/scripts/genksyms/parse.tab.c_shipped b/scripts/genksyms/parse.tab.c_shipped +index ece53c79bb59..c9f0f0ce82ff 100644 +--- a/scripts/genksyms/parse.tab.c_shipped ++++ b/scripts/genksyms/parse.tab.c_shipped +@@ -1,8 +1,8 @@ +-/* A Bison parser, made by GNU Bison 2.5. */ ++/* A Bison parser, made by GNU Bison 2.5.1. */ + + /* Bison implementation for Yacc-like parsers in C + +- Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. ++ Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -44,7 +44,7 @@ + #define YYBISON 1 + + /* Bison version. */ +-#define YYBISON_VERSION "2.5" ++#define YYBISON_VERSION "2.5.1" + + /* Skeleton name. */ + #define YYSKELETON_NAME "yacc.c" +@@ -117,6 +117,14 @@ static void record_compound(struct string_list **keyw, + + + ++# ifndef YY_NULL ++# if defined __cplusplus && 201103L <= __cplusplus ++# define YY_NULL nullptr ++# else ++# define YY_NULL 0 ++# endif ++# endif ++ + /* Enabling traces. */ + #ifndef YYDEBUG + # define YYDEBUG 1 +@@ -171,18 +179,19 @@ static void record_compound(struct string_list **keyw, + EXPORT_SYMBOL_KEYW = 284, + ASM_PHRASE = 285, + ATTRIBUTE_PHRASE = 286, +- BRACE_PHRASE = 287, +- BRACKET_PHRASE = 288, +- EXPRESSION_PHRASE = 289, +- CHAR = 290, +- DOTS = 291, +- IDENT = 292, +- INT = 293, +- REAL = 294, +- STRING = 295, +- TYPE = 296, +- OTHER = 297, +- FILENAME = 298 ++ TYPEOF_PHRASE = 287, ++ BRACE_PHRASE = 288, ++ BRACKET_PHRASE = 289, ++ EXPRESSION_PHRASE = 290, ++ CHAR = 291, ++ DOTS = 292, ++ IDENT = 293, ++ INT = 294, ++ REAL = 295, ++ STRING = 296, ++ TYPE = 297, ++ OTHER = 298, ++ FILENAME = 299 + }; + #endif + +@@ -304,6 +313,7 @@ YYID (yyi) + # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) + # include /* INFRINGES ON USER NAME SPACE */ ++ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ + # ifndef EXIT_SUCCESS + # define EXIT_SUCCESS 0 + # endif +@@ -395,20 +405,20 @@ union yyalloc + #endif + + #if defined YYCOPY_NEEDED && YYCOPY_NEEDED +-/* Copy COUNT objects from FROM to TO. The source and destination do ++/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ + # ifndef YYCOPY + # if defined __GNUC__ && 1 < __GNUC__ +-# define YYCOPY(To, From, Count) \ +- __builtin_memcpy (To, From, (Count) * sizeof (*(From))) ++# define YYCOPY(Dst, Src, Count) \ ++ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) + # else +-# define YYCOPY(To, From, Count) \ +- do \ +- { \ +- YYSIZE_T yyi; \ +- for (yyi = 0; yyi < (Count); yyi++) \ +- (To)[yyi] = (From)[yyi]; \ +- } \ ++# define YYCOPY(Dst, Src, Count) \ ++ do \ ++ { \ ++ YYSIZE_T yyi; \ ++ for (yyi = 0; yyi < (Count); yyi++) \ ++ (Dst)[yyi] = (Src)[yyi]; \ ++ } \ + while (YYID (0)) + # endif + # endif +@@ -417,20 +427,20 @@ union yyalloc + /* YYFINAL -- State number of the termination state. */ + #define YYFINAL 4 + /* YYLAST -- Last index in YYTABLE. */ +-#define YYLAST 532 ++#define YYLAST 514 + + /* YYNTOKENS -- Number of terminals. */ +-#define YYNTOKENS 53 ++#define YYNTOKENS 54 + /* YYNNTS -- Number of nonterminals. */ + #define YYNNTS 49 + /* YYNRULES -- Number of rules. */ + #define YYNRULES 132 + /* YYNRULES -- Number of states. */ +-#define YYNSTATES 188 ++#define YYNSTATES 187 + + /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ + #define YYUNDEFTOK 2 +-#define YYMAXUTOK 298 ++#define YYMAXUTOK 299 + + #define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) +@@ -442,15 +452,15 @@ static const yytype_uint8 yytranslate[] = + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 47, 49, 48, 2, 46, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 2, 2, 2, 52, 44, +- 2, 50, 2, 2, 2, 2, 2, 2, 2, 2, ++ 48, 49, 50, 2, 47, 2, 2, 2, 2, 2, ++ 2, 2, 2, 2, 2, 2, 2, 2, 53, 45, ++ 2, 51, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 51, 2, 45, 2, 2, 2, 2, ++ 2, 2, 2, 52, 2, 46, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +@@ -467,7 +477,7 @@ static const yytype_uint8 yytranslate[] = + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, +- 35, 36, 37, 38, 39, 40, 41, 42, 43 ++ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44 + }; + + #if YYDEBUG +@@ -478,78 +488,77 @@ static const yytype_uint16 yyprhs[] = + 0, 0, 3, 5, 8, 9, 12, 13, 18, 19, + 23, 25, 27, 29, 31, 34, 37, 41, 42, 44, + 46, 50, 55, 56, 58, 60, 63, 65, 67, 69, +- 71, 73, 75, 77, 79, 81, 87, 92, 95, 98, +- 101, 105, 109, 113, 116, 119, 122, 124, 126, 128, +- 130, 132, 134, 136, 138, 140, 142, 144, 147, 148, +- 150, 152, 155, 157, 159, 161, 163, 166, 168, 170, +- 175, 180, 183, 187, 191, 194, 196, 198, 200, 205, +- 210, 213, 217, 221, 224, 226, 230, 231, 233, 235, +- 239, 242, 245, 247, 248, 250, 252, 257, 262, 265, +- 269, 273, 277, 278, 280, 283, 287, 291, 292, 294, +- 296, 299, 303, 306, 307, 309, 311, 315, 318, 321, +- 323, 326, 327, 330, 334, 339, 341, 345, 347, 351, +- 354, 355, 357 ++ 71, 73, 75, 77, 79, 81, 86, 88, 91, 94, ++ 97, 101, 105, 109, 112, 115, 118, 120, 122, 124, ++ 126, 128, 130, 132, 134, 136, 138, 140, 143, 144, ++ 146, 148, 151, 153, 155, 157, 159, 162, 164, 166, ++ 171, 176, 179, 183, 187, 190, 192, 194, 196, 201, ++ 206, 209, 213, 217, 220, 222, 226, 227, 229, 231, ++ 235, 238, 241, 243, 244, 246, 248, 253, 258, 261, ++ 265, 269, 273, 274, 276, 279, 283, 287, 288, 290, ++ 292, 295, 299, 302, 303, 305, 307, 311, 314, 317, ++ 319, 322, 323, 326, 330, 335, 337, 341, 343, 347, ++ 350, 351, 353 + }; + + /* YYRHS -- A `-1'-separated list of the rules' RHS. */ + static const yytype_int8 yyrhs[] = + { +- 54, 0, -1, 55, -1, 54, 55, -1, -1, 56, +- 57, -1, -1, 12, 23, 58, 60, -1, -1, 23, +- 59, 60, -1, 60, -1, 84, -1, 99, -1, 101, +- -1, 1, 44, -1, 1, 45, -1, 64, 61, 44, +- -1, -1, 62, -1, 63, -1, 62, 46, 63, -1, +- 74, 100, 95, 85, -1, -1, 65, -1, 66, -1, +- 65, 66, -1, 67, -1, 68, -1, 5, -1, 17, +- -1, 21, -1, 11, -1, 14, -1, 69, -1, 73, +- -1, 28, 47, 65, 48, 49, -1, 28, 47, 65, +- 49, -1, 22, 37, -1, 24, 37, -1, 10, 37, +- -1, 22, 37, 87, -1, 24, 37, 87, -1, 10, +- 37, 96, -1, 10, 96, -1, 22, 87, -1, 24, +- 87, -1, 7, -1, 19, -1, 15, -1, 16, -1, +- 20, -1, 25, -1, 13, -1, 9, -1, 26, -1, +- 6, -1, 41, -1, 48, 71, -1, -1, 72, -1, +- 73, -1, 72, 73, -1, 8, -1, 27, -1, 31, +- -1, 18, -1, 70, 74, -1, 75, -1, 37, -1, +- 75, 47, 78, 49, -1, 75, 47, 1, 49, -1, +- 75, 33, -1, 47, 74, 49, -1, 47, 1, 49, +- -1, 70, 76, -1, 77, -1, 37, -1, 41, -1, +- 77, 47, 78, 49, -1, 77, 47, 1, 49, -1, +- 77, 33, -1, 47, 76, 49, -1, 47, 1, 49, +- -1, 79, 36, -1, 79, -1, 80, 46, 36, -1, +- -1, 80, -1, 81, -1, 80, 46, 81, -1, 65, +- 82, -1, 70, 82, -1, 83, -1, -1, 37, -1, +- 41, -1, 83, 47, 78, 49, -1, 83, 47, 1, +- 49, -1, 83, 33, -1, 47, 82, 49, -1, 47, +- 1, 49, -1, 64, 74, 32, -1, -1, 86, -1, +- 50, 34, -1, 51, 88, 45, -1, 51, 1, 45, +- -1, -1, 89, -1, 90, -1, 89, 90, -1, 64, +- 91, 44, -1, 1, 44, -1, -1, 92, -1, 93, +- -1, 92, 46, 93, -1, 76, 95, -1, 37, 94, +- -1, 94, -1, 52, 34, -1, -1, 95, 31, -1, +- 51, 97, 45, -1, 51, 97, 46, 45, -1, 98, +- -1, 97, 46, 98, -1, 37, -1, 37, 50, 34, +- -1, 30, 44, -1, -1, 30, -1, 29, 47, 37, +- 49, 44, -1 ++ 55, 0, -1, 56, -1, 55, 56, -1, -1, 57, ++ 58, -1, -1, 12, 23, 59, 61, -1, -1, 23, ++ 60, 61, -1, 61, -1, 85, -1, 100, -1, 102, ++ -1, 1, 45, -1, 1, 46, -1, 65, 62, 45, ++ -1, -1, 63, -1, 64, -1, 63, 47, 64, -1, ++ 75, 101, 96, 86, -1, -1, 66, -1, 67, -1, ++ 66, 67, -1, 68, -1, 69, -1, 5, -1, 17, ++ -1, 21, -1, 11, -1, 14, -1, 70, -1, 74, ++ -1, 28, 48, 82, 49, -1, 32, -1, 22, 38, ++ -1, 24, 38, -1, 10, 38, -1, 22, 38, 88, ++ -1, 24, 38, 88, -1, 10, 38, 97, -1, 10, ++ 97, -1, 22, 88, -1, 24, 88, -1, 7, -1, ++ 19, -1, 15, -1, 16, -1, 20, -1, 25, -1, ++ 13, -1, 9, -1, 26, -1, 6, -1, 42, -1, ++ 50, 72, -1, -1, 73, -1, 74, -1, 73, 74, ++ -1, 8, -1, 27, -1, 31, -1, 18, -1, 71, ++ 75, -1, 76, -1, 38, -1, 76, 48, 79, 49, ++ -1, 76, 48, 1, 49, -1, 76, 34, -1, 48, ++ 75, 49, -1, 48, 1, 49, -1, 71, 77, -1, ++ 78, -1, 38, -1, 42, -1, 78, 48, 79, 49, ++ -1, 78, 48, 1, 49, -1, 78, 34, -1, 48, ++ 77, 49, -1, 48, 1, 49, -1, 80, 37, -1, ++ 80, -1, 81, 47, 37, -1, -1, 81, -1, 82, ++ -1, 81, 47, 82, -1, 66, 83, -1, 71, 83, ++ -1, 84, -1, -1, 38, -1, 42, -1, 84, 48, ++ 79, 49, -1, 84, 48, 1, 49, -1, 84, 34, ++ -1, 48, 83, 49, -1, 48, 1, 49, -1, 65, ++ 75, 33, -1, -1, 87, -1, 51, 35, -1, 52, ++ 89, 46, -1, 52, 1, 46, -1, -1, 90, -1, ++ 91, -1, 90, 91, -1, 65, 92, 45, -1, 1, ++ 45, -1, -1, 93, -1, 94, -1, 93, 47, 94, ++ -1, 77, 96, -1, 38, 95, -1, 95, -1, 53, ++ 35, -1, -1, 96, 31, -1, 52, 98, 46, -1, ++ 52, 98, 47, 46, -1, 99, -1, 98, 47, 99, ++ -1, 38, -1, 38, 51, 35, -1, 30, 45, -1, ++ -1, 30, -1, 29, 48, 38, 49, 45, -1 + }; + + /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + static const yytype_uint16 yyrline[] = + { +- 0, 123, 123, 124, 128, 128, 134, 134, 136, 136, +- 138, 139, 140, 141, 142, 143, 147, 161, 162, 166, +- 174, 187, 193, 194, 198, 199, 203, 209, 213, 214, +- 215, 216, 217, 221, 222, 223, 224, 228, 230, 232, +- 236, 238, 240, 245, 248, 249, 253, 254, 255, 256, +- 257, 258, 259, 260, 261, 262, 263, 267, 272, 273, +- 277, 278, 282, 282, 282, 283, 291, 292, 296, 305, +- 307, 309, 311, 313, 320, 321, 325, 326, 327, 329, +- 331, 333, 335, 340, 341, 342, 346, 347, 351, 352, +- 357, 362, 364, 368, 369, 377, 381, 383, 385, 387, +- 389, 394, 403, 404, 409, 414, 415, 419, 420, 424, +- 425, 429, 431, 436, 437, 441, 442, 446, 447, 448, +- 452, 456, 457, 461, 462, 466, 467, 470, 475, 483, +- 487, 488, 492 ++ 0, 124, 124, 125, 129, 129, 135, 135, 137, 137, ++ 139, 140, 141, 142, 143, 144, 148, 162, 163, 167, ++ 175, 188, 194, 195, 199, 200, 204, 210, 214, 215, ++ 216, 217, 218, 222, 223, 224, 225, 229, 231, 233, ++ 237, 239, 241, 246, 249, 250, 254, 255, 256, 257, ++ 258, 259, 260, 261, 262, 263, 264, 268, 273, 274, ++ 278, 279, 283, 283, 283, 284, 292, 293, 297, 306, ++ 308, 310, 312, 314, 321, 322, 326, 327, 328, 330, ++ 332, 334, 336, 341, 342, 343, 347, 348, 352, 353, ++ 358, 363, 365, 369, 370, 378, 382, 384, 386, 388, ++ 390, 395, 404, 405, 410, 415, 416, 420, 421, 425, ++ 426, 430, 432, 437, 438, 442, 443, 447, 448, 449, ++ 453, 457, 458, 462, 463, 467, 468, 471, 476, 484, ++ 488, 489, 493 + }; + #endif + +@@ -565,9 +574,9 @@ static const char *const yytname[] = + "SHORT_KEYW", "SIGNED_KEYW", "STATIC_KEYW", "STRUCT_KEYW", + "TYPEDEF_KEYW", "UNION_KEYW", "UNSIGNED_KEYW", "VOID_KEYW", + "VOLATILE_KEYW", "TYPEOF_KEYW", "EXPORT_SYMBOL_KEYW", "ASM_PHRASE", +- "ATTRIBUTE_PHRASE", "BRACE_PHRASE", "BRACKET_PHRASE", ++ "ATTRIBUTE_PHRASE", "TYPEOF_PHRASE", "BRACE_PHRASE", "BRACKET_PHRASE", + "EXPRESSION_PHRASE", "CHAR", "DOTS", "IDENT", "INT", "REAL", "STRING", +- "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','", "'('", "'*'", "')'", ++ "TYPE", "OTHER", "FILENAME", "';'", "'}'", "','", "'('", "')'", "'*'", + "'='", "'{'", "':'", "$accept", "declaration_seq", "declaration", "$@1", + "declaration1", "$@2", "$@3", "simple_declaration", + "init_declarator_list_opt", "init_declarator_list", "init_declarator", +@@ -584,7 +593,7 @@ static const char *const yytname[] = + "member_declarator_list_opt", "member_declarator_list", + "member_declarator", "member_bitfield_declarator", "attribute_opt", + "enum_body", "enumerator_list", "enumerator", "asm_definition", +- "asm_phrase_opt", "export_definition", 0 ++ "asm_phrase_opt", "export_definition", YY_NULL + }; + #endif + +@@ -597,28 +606,28 @@ static const yytype_uint16 yytoknum[] = + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, +- 295, 296, 297, 298, 59, 125, 44, 40, 42, 41, +- 61, 123, 58 ++ 295, 296, 297, 298, 299, 59, 125, 44, 40, 41, ++ 42, 61, 123, 58 + }; + # endif + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ + static const yytype_uint8 yyr1[] = + { +- 0, 53, 54, 54, 56, 55, 58, 57, 59, 57, +- 57, 57, 57, 57, 57, 57, 60, 61, 61, 62, +- 62, 63, 64, 64, 65, 65, 66, 66, 67, 67, +- 67, 67, 67, 68, 68, 68, 68, 68, 68, 68, +- 68, 68, 68, 68, 68, 68, 69, 69, 69, 69, +- 69, 69, 69, 69, 69, 69, 69, 70, 71, 71, +- 72, 72, 73, 73, 73, 73, 74, 74, 75, 75, +- 75, 75, 75, 75, 76, 76, 77, 77, 77, 77, +- 77, 77, 77, 78, 78, 78, 79, 79, 80, 80, +- 81, 82, 82, 83, 83, 83, 83, 83, 83, 83, +- 83, 84, 85, 85, 86, 87, 87, 88, 88, 89, +- 89, 90, 90, 91, 91, 92, 92, 93, 93, 93, +- 94, 95, 95, 96, 96, 97, 97, 98, 98, 99, +- 100, 100, 101 ++ 0, 54, 55, 55, 57, 56, 59, 58, 60, 58, ++ 58, 58, 58, 58, 58, 58, 61, 62, 62, 63, ++ 63, 64, 65, 65, 66, 66, 67, 67, 68, 68, ++ 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, ++ 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, ++ 70, 70, 70, 70, 70, 70, 70, 71, 72, 72, ++ 73, 73, 74, 74, 74, 74, 75, 75, 76, 76, ++ 76, 76, 76, 76, 77, 77, 78, 78, 78, 78, ++ 78, 78, 78, 79, 79, 79, 80, 80, 81, 81, ++ 82, 83, 83, 84, 84, 84, 84, 84, 84, 84, ++ 84, 85, 86, 86, 87, 88, 88, 89, 89, 90, ++ 90, 91, 91, 92, 92, 93, 93, 94, 94, 94, ++ 95, 96, 96, 97, 97, 98, 98, 99, 99, 100, ++ 101, 101, 102 + }; + + /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +@@ -627,7 +636,7 @@ static const yytype_uint8 yyr2[] = + 0, 2, 1, 2, 0, 2, 0, 4, 0, 3, + 1, 1, 1, 1, 2, 2, 3, 0, 1, 1, + 3, 4, 0, 1, 1, 2, 1, 1, 1, 1, +- 1, 1, 1, 1, 1, 5, 4, 2, 2, 2, ++ 1, 1, 1, 1, 1, 4, 1, 2, 2, 2, + 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 0, 1, + 1, 2, 1, 1, 1, 1, 2, 1, 1, 4, +@@ -648,68 +657,68 @@ static const yytype_uint8 yydefact[] = + 4, 4, 2, 0, 1, 3, 0, 28, 55, 46, + 62, 53, 0, 31, 0, 52, 32, 48, 49, 29, + 65, 47, 50, 30, 0, 8, 0, 51, 54, 63, +- 0, 0, 0, 64, 56, 5, 10, 17, 23, 24, +- 26, 27, 33, 34, 11, 12, 13, 14, 15, 39, +- 0, 43, 6, 37, 0, 44, 22, 38, 45, 0, +- 0, 129, 68, 0, 58, 0, 18, 19, 0, 130, +- 67, 25, 42, 127, 0, 125, 22, 40, 0, 113, +- 0, 0, 109, 9, 17, 41, 0, 0, 0, 0, +- 57, 59, 60, 16, 0, 66, 131, 101, 121, 71, +- 0, 0, 123, 0, 7, 112, 106, 76, 77, 0, +- 0, 0, 121, 75, 0, 114, 115, 119, 105, 0, +- 110, 130, 0, 36, 0, 73, 72, 61, 20, 102, +- 0, 93, 0, 84, 87, 88, 128, 124, 126, 118, +- 0, 76, 0, 120, 74, 117, 80, 0, 111, 0, +- 35, 132, 122, 0, 21, 103, 70, 94, 56, 0, +- 93, 90, 92, 69, 83, 0, 82, 81, 0, 0, +- 116, 104, 0, 95, 0, 91, 98, 0, 85, 89, +- 79, 78, 100, 99, 0, 0, 97, 96 ++ 0, 0, 0, 64, 36, 56, 5, 10, 17, 23, ++ 24, 26, 27, 33, 34, 11, 12, 13, 14, 15, ++ 39, 0, 43, 6, 37, 0, 44, 22, 38, 45, ++ 0, 0, 129, 68, 0, 58, 0, 18, 19, 0, ++ 130, 67, 25, 42, 127, 0, 125, 22, 40, 0, ++ 113, 0, 0, 109, 9, 17, 41, 93, 0, 0, ++ 0, 0, 57, 59, 60, 16, 0, 66, 131, 101, ++ 121, 71, 0, 0, 123, 0, 7, 112, 106, 76, ++ 77, 0, 0, 0, 121, 75, 0, 114, 115, 119, ++ 105, 0, 110, 130, 94, 56, 0, 93, 90, 92, ++ 35, 0, 73, 72, 61, 20, 102, 0, 0, 84, ++ 87, 88, 128, 124, 126, 118, 0, 76, 0, 120, ++ 74, 117, 80, 0, 111, 0, 0, 95, 0, 91, ++ 98, 0, 132, 122, 0, 21, 103, 70, 69, 83, ++ 0, 82, 81, 0, 0, 116, 100, 99, 0, 0, ++ 104, 85, 89, 79, 78, 97, 96 + }; + + /* YYDEFGOTO[NTERM-NUM]. */ + static const yytype_int16 yydefgoto[] = + { +- -1, 1, 2, 3, 35, 76, 56, 36, 65, 66, +- 67, 79, 38, 39, 40, 41, 42, 68, 90, 91, +- 43, 121, 70, 112, 113, 132, 133, 134, 135, 161, +- 162, 44, 154, 155, 55, 80, 81, 82, 114, 115, +- 116, 117, 129, 51, 74, 75, 45, 98, 46 ++ -1, 1, 2, 3, 36, 77, 57, 37, 66, 67, ++ 68, 80, 39, 40, 41, 42, 43, 69, 92, 93, ++ 44, 123, 71, 114, 115, 138, 139, 140, 141, 128, ++ 129, 45, 165, 166, 56, 81, 82, 83, 116, 117, ++ 118, 119, 136, 52, 75, 76, 46, 100, 47 + }; + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +-#define YYPACT_NINF -135 ++#define YYPACT_NINF -140 + static const yytype_int16 yypact[] = + { +- -135, 20, -135, 321, -135, -135, 30, -135, -135, -135, +- -135, -135, -28, -135, 2, -135, -135, -135, -135, -135, +- -135, -135, -135, -135, -6, -135, 9, -135, -135, -135, +- -5, 15, -17, -135, -135, -135, -135, 18, 491, -135, +- -135, -135, -135, -135, -135, -135, -135, -135, -135, -22, +- 31, -135, -135, 19, 106, -135, 491, 19, -135, 491, +- 50, -135, -135, 11, -3, 51, 57, -135, 18, -14, +- 14, -135, -135, 48, 46, -135, 491, -135, 33, 32, +- 59, 154, -135, -135, 18, -135, 365, 56, 60, 61, +- -135, -3, -135, -135, 18, -135, -135, -135, -135, -135, +- 202, 74, -135, -23, -135, -135, -135, 77, -135, 16, +- 101, 49, -135, 34, 92, 93, -135, -135, -135, 94, +- -135, 110, 95, -135, 97, -135, -135, -135, -135, -20, +- 96, 410, 99, 113, 100, -135, -135, -135, -135, -135, +- 103, -135, 107, -135, -135, 111, -135, 239, -135, 32, +- -135, -135, -135, 123, -135, -135, -135, -135, -135, 3, +- 52, -135, 38, -135, -135, 454, -135, -135, 117, 128, +- -135, -135, 134, -135, 135, -135, -135, 276, -135, -135, +- -135, -135, -135, -135, 137, 138, -135, -135 ++ -140, 29, -140, 207, -140, -140, 40, -140, -140, -140, ++ -140, -140, -27, -140, 44, -140, -140, -140, -140, -140, ++ -140, -140, -140, -140, -22, -140, -18, -140, -140, -140, ++ -9, 22, 28, -140, -140, -140, -140, -140, 42, 472, ++ -140, -140, -140, -140, -140, -140, -140, -140, -140, -140, ++ 46, 43, -140, -140, 47, 107, -140, 472, 47, -140, ++ 472, 62, -140, -140, 16, -3, 57, 56, -140, 42, ++ 35, -11, -140, -140, 53, 48, -140, 472, -140, 51, ++ 21, 59, 157, -140, -140, 42, -140, 388, 58, 60, ++ 70, 81, -140, -3, -140, -140, 42, -140, -140, -140, ++ -140, -140, 253, 71, -140, -20, -140, -140, -140, 83, ++ -140, 5, 102, 34, -140, 12, 95, 94, -140, -140, ++ -140, 97, -140, 113, -140, -140, 2, 41, -140, 27, ++ -140, 99, -140, -140, -140, -140, -24, 98, 101, 109, ++ 104, -140, -140, -140, -140, -140, 105, -140, 110, -140, ++ -140, 117, -140, 298, -140, 21, 112, -140, 120, -140, ++ -140, 343, -140, -140, 121, -140, -140, -140, -140, -140, ++ 434, -140, -140, 131, 137, -140, -140, -140, 138, 141, ++ -140, -140, -140, -140, -140, -140, -140 + }; + + /* YYPGOTO[NTERM-NUM]. */ + static const yytype_int16 yypgoto[] = + { +- -135, -135, 187, -135, -135, -135, -135, -50, -135, -135, +- 98, 0, -59, -37, -135, -135, -135, -77, -135, -135, +- -54, -30, -135, -90, -135, -134, -135, -135, 24, -58, +- -135, -135, -135, -135, -18, -135, -135, 109, -135, -135, +- 44, 87, 84, 148, -135, 102, -135, -135, -135 ++ -140, -140, 190, -140, -140, -140, -140, -45, -140, -140, ++ 96, 1, -60, -31, -140, -140, -140, -78, -140, -140, ++ -55, -7, -140, -92, -140, -139, -140, -140, -59, -39, ++ -140, -140, -140, -140, -13, -140, -140, 111, -140, -140, ++ 39, 87, 84, 147, -140, 106, -140, -140, -140 + }; + + /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If +@@ -718,149 +727,145 @@ static const yytype_int16 yypgoto[] = + #define YYTABLE_NINF -109 + static const yytype_int16 yytable[] = + { +- 86, 71, 111, 37, 172, 10, 83, 69, 58, 49, +- 92, 152, 88, 169, 73, 20, 96, 140, 97, 142, +- 4, 144, 137, 50, 29, 52, 104, 61, 33, 50, +- 153, 53, 111, 89, 111, 77, -93, 127, 95, 85, +- 157, 131, 59, 185, 173, 54, 57, 99, 62, 71, +- 159, 64, -93, 141, 160, 62, 84, 108, 63, 64, +- 54, 100, 60, 109, 64, 63, 64, 146, 73, 107, +- 54, 176, 111, 108, 47, 48, 84, 105, 106, 109, +- 64, 147, 160, 160, 110, 177, 141, 87, 131, 157, +- 108, 102, 103, 173, 71, 93, 109, 64, 101, 159, +- 64, 174, 175, 94, 118, 124, 131, 78, 136, 125, +- 126, 7, 8, 9, 10, 11, 12, 13, 131, 15, +- 16, 17, 18, 19, 20, 21, 22, 23, 24, 110, +- 26, 27, 28, 29, 30, 143, 148, 33, 105, 149, +- 96, 151, 152, -22, 150, 156, 165, 34, 163, 164, +- -22, -107, 166, -22, -22, 119, 167, 171, -22, 7, +- 8, 9, 10, 11, 12, 13, 180, 15, 16, 17, +- 18, 19, 20, 21, 22, 23, 24, 181, 26, 27, +- 28, 29, 30, 182, 183, 33, 186, 187, 5, 179, +- 120, -22, 128, 170, 139, 34, 145, 72, -22, -108, +- 0, -22, -22, 130, 0, 138, -22, 7, 8, 9, +- 10, 11, 12, 13, 0, 15, 16, 17, 18, 19, +- 20, 21, 22, 23, 24, 0, 26, 27, 28, 29, +- 30, 0, 0, 33, 0, 0, 0, 0, -86, 0, +- 168, 0, 0, 34, 7, 8, 9, 10, 11, 12, +- 13, -86, 15, 16, 17, 18, 19, 20, 21, 22, +- 23, 24, 0, 26, 27, 28, 29, 30, 0, 0, +- 33, 0, 0, 0, 0, -86, 0, 184, 0, 0, +- 34, 7, 8, 9, 10, 11, 12, 13, -86, 15, +- 16, 17, 18, 19, 20, 21, 22, 23, 24, 0, +- 26, 27, 28, 29, 30, 0, 0, 33, 0, 0, +- 0, 0, -86, 0, 0, 0, 0, 34, 0, 0, +- 0, 0, 6, 0, 0, -86, 7, 8, 9, 10, +- 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, +- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, +- 31, 32, 33, 0, 0, 0, 0, 0, -22, 0, +- 0, 0, 34, 0, 0, -22, 0, 0, -22, -22, +- 7, 8, 9, 10, 11, 12, 13, 0, 15, 16, +- 17, 18, 19, 20, 21, 22, 23, 24, 0, 26, +- 27, 28, 29, 30, 0, 0, 33, 0, 0, 0, +- 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, +- 0, 0, 0, 122, 123, 7, 8, 9, 10, 11, +- 12, 13, 0, 15, 16, 17, 18, 19, 20, 21, +- 22, 23, 24, 0, 26, 27, 28, 29, 30, 0, +- 0, 33, 0, 0, 0, 0, 0, 157, 0, 0, +- 0, 158, 0, 0, 0, 0, 0, 159, 64, 7, ++ 87, 88, 113, 156, 38, 10, 146, 163, 72, 127, ++ 94, 50, 84, 59, 174, 20, 54, 90, 74, 148, ++ 58, 150, 179, 101, 29, 51, 143, 164, 33, 4, ++ 55, 70, 106, 113, 55, 113, -93, 102, 134, 60, ++ 124, 78, 87, 147, 157, 86, 152, 110, 127, 127, ++ 126, -93, 65, 111, 63, 65, 72, 91, 85, 109, ++ 153, 160, 97, 110, 64, 98, 65, 53, 99, 111, ++ 61, 65, 147, 62, 112, 161, 110, 113, 85, 124, ++ 63, 74, 111, 157, 65, 48, 49, 158, 159, 126, ++ 64, 65, 65, 87, 104, 105, 107, 108, 51, 55, ++ 89, 87, 95, 96, 103, 120, 142, 130, 79, 131, ++ 87, 182, 7, 8, 9, 10, 11, 12, 13, 132, ++ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, ++ 133, 26, 27, 28, 29, 30, 112, 149, 33, 34, ++ 154, 155, 107, 98, 162, -22, 169, 167, 163, 35, ++ 168, 170, -22, -107, 171, -22, 180, -22, 121, 172, ++ -22, 176, 7, 8, 9, 10, 11, 12, 13, 177, ++ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, ++ 183, 26, 27, 28, 29, 30, 184, 185, 33, 34, ++ 186, 5, 135, 122, 175, -22, 145, 73, 151, 35, ++ 0, 0, -22, -108, 0, -22, 0, -22, 6, 0, ++ -22, 144, 7, 8, 9, 10, 11, 12, 13, 14, ++ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, ++ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, ++ 0, 0, 0, 0, 0, -22, 0, 0, 0, 35, ++ 0, 0, -22, 0, 137, -22, 0, -22, 7, 8, ++ 9, 10, 11, 12, 13, 0, 15, 16, 17, 18, ++ 19, 20, 21, 22, 23, 24, 0, 26, 27, 28, ++ 29, 30, 0, 0, 33, 34, 0, 0, 0, 0, ++ -86, 0, 0, 0, 0, 35, 0, 0, 0, 173, ++ 0, 0, -86, 7, 8, 9, 10, 11, 12, 13, ++ 0, 15, 16, 17, 18, 19, 20, 21, 22, 23, ++ 24, 0, 26, 27, 28, 29, 30, 0, 0, 33, ++ 34, 0, 0, 0, 0, -86, 0, 0, 0, 0, ++ 35, 0, 0, 0, 178, 0, 0, -86, 7, 8, ++ 9, 10, 11, 12, 13, 0, 15, 16, 17, 18, ++ 19, 20, 21, 22, 23, 24, 0, 26, 27, 28, ++ 29, 30, 0, 0, 33, 34, 0, 0, 0, 0, ++ -86, 0, 0, 0, 0, 35, 0, 0, 0, 0, ++ 0, 0, -86, 7, 8, 9, 10, 11, 12, 13, ++ 0, 15, 16, 17, 18, 19, 20, 21, 22, 23, ++ 24, 0, 26, 27, 28, 29, 30, 0, 0, 33, ++ 34, 0, 0, 0, 0, 0, 124, 0, 0, 0, ++ 125, 0, 0, 0, 0, 0, 126, 0, 65, 7, + 8, 9, 10, 11, 12, 13, 0, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 0, 26, 27, +- 28, 29, 30, 0, 0, 33, 0, 0, 0, 0, +- 178, 0, 0, 0, 0, 34, 7, 8, 9, 10, +- 11, 12, 13, 0, 15, 16, 17, 18, 19, 20, +- 21, 22, 23, 24, 0, 26, 27, 28, 29, 30, +- 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, +- 0, 0, 34 ++ 28, 29, 30, 0, 0, 33, 34, 0, 0, 0, ++ 0, 181, 0, 0, 0, 0, 35, 7, 8, 9, ++ 10, 11, 12, 13, 0, 15, 16, 17, 18, 19, ++ 20, 21, 22, 23, 24, 0, 26, 27, 28, 29, ++ 30, 0, 0, 33, 34, 0, 0, 0, 0, 0, ++ 0, 0, 0, 0, 35 + }; + + #define yypact_value_is_default(yystate) \ +- ((yystate) == (-135)) ++ ((yystate) == (-140)) + + #define yytable_value_is_error(yytable_value) \ + YYID (0) + + static const yytype_int16 yycheck[] = + { +- 59, 38, 79, 3, 1, 8, 56, 37, 26, 37, +- 64, 31, 1, 147, 37, 18, 30, 1, 32, 109, +- 0, 111, 45, 51, 27, 23, 76, 44, 31, 51, +- 50, 37, 109, 63, 111, 53, 33, 91, 68, 57, +- 37, 100, 47, 177, 41, 51, 37, 33, 37, 86, +- 47, 48, 49, 37, 131, 37, 56, 41, 47, 48, +- 51, 47, 47, 47, 48, 47, 48, 33, 37, 37, +- 51, 33, 149, 41, 44, 45, 76, 44, 45, 47, +- 48, 47, 159, 160, 52, 47, 37, 37, 147, 37, +- 41, 45, 46, 41, 131, 44, 47, 48, 50, 47, +- 48, 159, 160, 46, 45, 49, 165, 1, 34, 49, +- 49, 5, 6, 7, 8, 9, 10, 11, 177, 13, +- 14, 15, 16, 17, 18, 19, 20, 21, 22, 52, +- 24, 25, 26, 27, 28, 34, 44, 31, 44, 46, +- 30, 44, 31, 37, 49, 49, 46, 41, 49, 36, +- 44, 45, 49, 47, 48, 1, 49, 34, 52, 5, +- 6, 7, 8, 9, 10, 11, 49, 13, 14, 15, +- 16, 17, 18, 19, 20, 21, 22, 49, 24, 25, +- 26, 27, 28, 49, 49, 31, 49, 49, 1, 165, +- 81, 37, 94, 149, 107, 41, 112, 49, 44, 45, +- -1, 47, 48, 1, -1, 103, 52, 5, 6, 7, +- 8, 9, 10, 11, -1, 13, 14, 15, 16, 17, +- 18, 19, 20, 21, 22, -1, 24, 25, 26, 27, +- 28, -1, -1, 31, -1, -1, -1, -1, 36, -1, +- 1, -1, -1, 41, 5, 6, 7, 8, 9, 10, +- 11, 49, 13, 14, 15, 16, 17, 18, 19, 20, +- 21, 22, -1, 24, 25, 26, 27, 28, -1, -1, +- 31, -1, -1, -1, -1, 36, -1, 1, -1, -1, +- 41, 5, 6, 7, 8, 9, 10, 11, 49, 13, +- 14, 15, 16, 17, 18, 19, 20, 21, 22, -1, +- 24, 25, 26, 27, 28, -1, -1, 31, -1, -1, +- -1, -1, 36, -1, -1, -1, -1, 41, -1, -1, +- -1, -1, 1, -1, -1, 49, 5, 6, 7, 8, +- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, +- 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, +- 29, 30, 31, -1, -1, -1, -1, -1, 37, -1, +- -1, -1, 41, -1, -1, 44, -1, -1, 47, 48, +- 5, 6, 7, 8, 9, 10, 11, -1, 13, 14, +- 15, 16, 17, 18, 19, 20, 21, 22, -1, 24, +- 25, 26, 27, 28, -1, -1, 31, -1, -1, -1, +- -1, -1, -1, -1, -1, -1, 41, -1, -1, -1, +- -1, -1, -1, 48, 49, 5, 6, 7, 8, 9, +- 10, 11, -1, 13, 14, 15, 16, 17, 18, 19, +- 20, 21, 22, -1, 24, 25, 26, 27, 28, -1, +- -1, 31, -1, -1, -1, -1, -1, 37, -1, -1, +- -1, 41, -1, -1, -1, -1, -1, 47, 48, 5, ++ 60, 60, 80, 1, 3, 8, 1, 31, 39, 87, ++ 65, 38, 57, 26, 153, 18, 38, 1, 38, 111, ++ 38, 113, 161, 34, 27, 52, 46, 51, 31, 0, ++ 52, 38, 77, 111, 52, 113, 34, 48, 93, 48, ++ 38, 54, 102, 38, 42, 58, 34, 42, 126, 127, ++ 48, 49, 50, 48, 38, 50, 87, 64, 57, 38, ++ 48, 34, 69, 42, 48, 30, 50, 23, 33, 48, ++ 48, 50, 38, 45, 53, 48, 42, 155, 77, 38, ++ 38, 38, 48, 42, 50, 45, 46, 126, 127, 48, ++ 48, 50, 50, 153, 46, 47, 45, 46, 52, 52, ++ 38, 161, 45, 47, 51, 46, 35, 49, 1, 49, ++ 170, 170, 5, 6, 7, 8, 9, 10, 11, 49, ++ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, ++ 49, 24, 25, 26, 27, 28, 53, 35, 31, 32, ++ 45, 47, 45, 30, 45, 38, 37, 49, 31, 42, ++ 49, 47, 45, 46, 49, 48, 35, 50, 1, 49, ++ 53, 49, 5, 6, 7, 8, 9, 10, 11, 49, ++ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, ++ 49, 24, 25, 26, 27, 28, 49, 49, 31, 32, ++ 49, 1, 96, 82, 155, 38, 109, 50, 114, 42, ++ -1, -1, 45, 46, -1, 48, -1, 50, 1, -1, ++ 53, 105, 5, 6, 7, 8, 9, 10, 11, 12, ++ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, ++ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, ++ -1, -1, -1, -1, -1, 38, -1, -1, -1, 42, ++ -1, -1, 45, -1, 1, 48, -1, 50, 5, 6, ++ 7, 8, 9, 10, 11, -1, 13, 14, 15, 16, ++ 17, 18, 19, 20, 21, 22, -1, 24, 25, 26, ++ 27, 28, -1, -1, 31, 32, -1, -1, -1, -1, ++ 37, -1, -1, -1, -1, 42, -1, -1, -1, 1, ++ -1, -1, 49, 5, 6, 7, 8, 9, 10, 11, ++ -1, 13, 14, 15, 16, 17, 18, 19, 20, 21, ++ 22, -1, 24, 25, 26, 27, 28, -1, -1, 31, ++ 32, -1, -1, -1, -1, 37, -1, -1, -1, -1, ++ 42, -1, -1, -1, 1, -1, -1, 49, 5, 6, ++ 7, 8, 9, 10, 11, -1, 13, 14, 15, 16, ++ 17, 18, 19, 20, 21, 22, -1, 24, 25, 26, ++ 27, 28, -1, -1, 31, 32, -1, -1, -1, -1, ++ 37, -1, -1, -1, -1, 42, -1, -1, -1, -1, ++ -1, -1, 49, 5, 6, 7, 8, 9, 10, 11, ++ -1, 13, 14, 15, 16, 17, 18, 19, 20, 21, ++ 22, -1, 24, 25, 26, 27, 28, -1, -1, 31, ++ 32, -1, -1, -1, -1, -1, 38, -1, -1, -1, ++ 42, -1, -1, -1, -1, -1, 48, -1, 50, 5, + 6, 7, 8, 9, 10, 11, -1, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, -1, 24, 25, +- 26, 27, 28, -1, -1, 31, -1, -1, -1, -1, +- 36, -1, -1, -1, -1, 41, 5, 6, 7, 8, +- 9, 10, 11, -1, 13, 14, 15, 16, 17, 18, +- 19, 20, 21, 22, -1, 24, 25, 26, 27, 28, +- -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, +- -1, -1, 41 ++ 26, 27, 28, -1, -1, 31, 32, -1, -1, -1, ++ -1, 37, -1, -1, -1, -1, 42, 5, 6, 7, ++ 8, 9, 10, 11, -1, 13, 14, 15, 16, 17, ++ 18, 19, 20, 21, 22, -1, 24, 25, 26, 27, ++ 28, -1, -1, 31, 32, -1, -1, -1, -1, -1, ++ -1, -1, -1, -1, 42 + }; + + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ + static const yytype_uint8 yystos[] = + { +- 0, 54, 55, 56, 0, 55, 1, 5, 6, 7, ++ 0, 55, 56, 57, 0, 56, 1, 5, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, +- 28, 29, 30, 31, 41, 57, 60, 64, 65, 66, +- 67, 68, 69, 73, 84, 99, 101, 44, 45, 37, +- 51, 96, 23, 37, 51, 87, 59, 37, 87, 47, +- 47, 44, 37, 47, 48, 61, 62, 63, 70, 74, +- 75, 66, 96, 37, 97, 98, 58, 87, 1, 64, +- 88, 89, 90, 60, 64, 87, 65, 37, 1, 74, +- 71, 72, 73, 44, 46, 74, 30, 32, 100, 33, +- 47, 50, 45, 46, 60, 44, 45, 37, 41, 47, +- 52, 70, 76, 77, 91, 92, 93, 94, 45, 1, +- 90, 74, 48, 49, 49, 49, 49, 73, 63, 95, +- 1, 65, 78, 79, 80, 81, 34, 45, 98, 94, +- 1, 37, 76, 34, 76, 95, 33, 47, 44, 46, +- 49, 44, 31, 50, 85, 86, 49, 37, 41, 47, +- 70, 82, 83, 49, 36, 46, 49, 49, 1, 78, +- 93, 34, 1, 41, 82, 82, 33, 47, 36, 81, +- 49, 49, 49, 49, 1, 78, 49, 49 ++ 28, 29, 30, 31, 32, 42, 58, 61, 65, 66, ++ 67, 68, 69, 70, 74, 85, 100, 102, 45, 46, ++ 38, 52, 97, 23, 38, 52, 88, 60, 38, 88, ++ 48, 48, 45, 38, 48, 50, 62, 63, 64, 71, ++ 75, 76, 67, 97, 38, 98, 99, 59, 88, 1, ++ 65, 89, 90, 91, 61, 65, 88, 66, 82, 38, ++ 1, 75, 72, 73, 74, 45, 47, 75, 30, 33, ++ 101, 34, 48, 51, 46, 47, 61, 45, 46, 38, ++ 42, 48, 53, 71, 77, 78, 92, 93, 94, 95, ++ 46, 1, 91, 75, 38, 42, 48, 71, 83, 84, ++ 49, 49, 49, 49, 74, 64, 96, 1, 79, 80, ++ 81, 82, 35, 46, 99, 95, 1, 38, 77, 35, ++ 77, 96, 34, 48, 45, 47, 1, 42, 83, 83, ++ 34, 48, 45, 31, 51, 86, 87, 49, 49, 37, ++ 47, 49, 49, 1, 79, 94, 49, 49, 1, 79, ++ 35, 37, 82, 49, 49, 49, 49 + }; + + #define yyerrok (yyerrstatus = 0) +@@ -890,17 +895,18 @@ static const yytype_uint8 yystos[] = + + #define YYRECOVERING() (!!yyerrstatus) + +-#define YYBACKUP(Token, Value) \ +-do \ +- if (yychar == YYEMPTY && yylen == 1) \ +- { \ +- yychar = (Token); \ +- yylval = (Value); \ +- YYPOPSTACK (1); \ +- goto yybackup; \ +- } \ +- else \ +- { \ ++#define YYBACKUP(Token, Value) \ ++do \ ++ if (yychar == YYEMPTY) \ ++ { \ ++ yychar = (Token); \ ++ yylval = (Value); \ ++ YYPOPSTACK (yylen); \ ++ yystate = *yyssp; \ ++ goto yybackup; \ ++ } \ ++ else \ ++ { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +@@ -995,6 +1001,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) + YYSTYPE const * const yyvaluep; + #endif + { ++ FILE *yyo = yyoutput; ++ YYUSE (yyo); + if (!yyvaluep) + return; + # ifdef YYPRINT +@@ -1246,12 +1254,12 @@ static int + yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) + { +- YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); ++ YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ +- const char *yyformat = 0; ++ const char *yyformat = YY_NULL; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per +@@ -1311,7 +1319,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + break; + } + yyarg[yycount++] = yytname[yyx]; +- yysize1 = yysize + yytnamerr (0, yytname[yyx]); ++ yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; +@@ -1463,7 +1471,7 @@ yyparse () + `yyss': related to states. + `yyvs': related to semantic values. + +- Refer to the stacks thru separate pointers, to allow yyoverflow ++ Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ +@@ -2346,7 +2354,7 @@ yyabortlab: + yyresult = 1; + goto yyreturn; + +-#if !defined(yyoverflow) || YYERROR_VERBOSE ++#if !defined yyoverflow || YYERROR_VERBOSE + /*-------------------------------------------------. + | yyexhaustedlab -- memory exhaustion comes here. | + `-------------------------------------------------*/ +diff --git a/scripts/genksyms/parse.tab.h_shipped b/scripts/genksyms/parse.tab.h_shipped +index 93240a3cdecc..a4737dec4532 100644 +--- a/scripts/genksyms/parse.tab.h_shipped ++++ b/scripts/genksyms/parse.tab.h_shipped +@@ -1,8 +1,8 @@ +-/* A Bison parser, made by GNU Bison 2.5. */ ++/* A Bison parser, made by GNU Bison 2.5.1. */ + + /* Bison interface for Yacc-like parsers in C + +- Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. ++ Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -66,18 +66,19 @@ + EXPORT_SYMBOL_KEYW = 284, + ASM_PHRASE = 285, + ATTRIBUTE_PHRASE = 286, +- BRACE_PHRASE = 287, +- BRACKET_PHRASE = 288, +- EXPRESSION_PHRASE = 289, +- CHAR = 290, +- DOTS = 291, +- IDENT = 292, +- INT = 293, +- REAL = 294, +- STRING = 295, +- TYPE = 296, +- OTHER = 297, +- FILENAME = 298 ++ TYPEOF_PHRASE = 287, ++ BRACE_PHRASE = 288, ++ BRACKET_PHRASE = 289, ++ EXPRESSION_PHRASE = 290, ++ CHAR = 291, ++ DOTS = 292, ++ IDENT = 293, ++ INT = 294, ++ REAL = 295, ++ STRING = 296, ++ TYPE = 297, ++ OTHER = 298, ++ FILENAME = 299 + }; + #endif + +diff --git a/scripts/genksyms/parse.y b/scripts/genksyms/parse.y +index 23c39998ad86..b9f4cf202302 100644 +--- a/scripts/genksyms/parse.y ++++ b/scripts/genksyms/parse.y +@@ -103,6 +103,7 @@ static void record_compound(struct string_list **keyw, + + %token ASM_PHRASE + %token ATTRIBUTE_PHRASE ++%token TYPEOF_PHRASE + %token BRACE_PHRASE + %token BRACKET_PHRASE + %token EXPRESSION_PHRASE +@@ -220,8 +221,8 @@ storage_class_specifier: + type_specifier: + simple_type_specifier + | cvar_qualifier +- | TYPEOF_KEYW '(' decl_specifier_seq '*' ')' +- | TYPEOF_KEYW '(' decl_specifier_seq ')' ++ | TYPEOF_KEYW '(' parameter_declaration ')' ++ | TYPEOF_PHRASE + + /* References to s/u/e's defined elsewhere. Rearrange things + so that it is easier to expand the definition fully later. */ +-- +2.11.0 + diff --git a/meta-fsl-extras/recipes/linux/linux-toradex_3.14.%.bbappend b/meta-fsl-extras/recipes/linux/linux-toradex_3.14.%.bbappend index 58c64de..eb6df6c 100644 --- a/meta-fsl-extras/recipes/linux/linux-toradex_3.14.%.bbappend +++ b/meta-fsl-extras/recipes/linux/linux-toradex_3.14.%.bbappend @@ -27,6 +27,11 @@ ## ############################################################################ +FILESEXTRAPATHS_append := "${THISDIR}/${PN}:" +SRC_URI += " \ + file://0001-genksyms-fix-typeof-handling.patch \ + " + # kernel image files are not needed in the image RDEPENDS_kernel-base = "" -- cgit v1.2.3-54-g00ecf