From patchwork Tue Jun 12 15:36:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 928385 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Kw4Vzuk4"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 414v8V1PPqz9s0w for ; Wed, 13 Jun 2018 01:35:06 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C6B16C21D83; Tue, 12 Jun 2018 15:34:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 0D950C21D74; Tue, 12 Jun 2018 15:32:04 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 95E92C21E2F; Tue, 12 Jun 2018 15:31:43 +0000 (UTC) Received: from mail-it0-f65.google.com (mail-it0-f65.google.com [209.85.214.65]) by lists.denx.de (Postfix) with ESMTPS id 563DCC21DDC for ; Tue, 12 Jun 2018 15:31:39 +0000 (UTC) Received: by mail-it0-f65.google.com with SMTP id m194-v6so15092397itg.2 for ; Tue, 12 Jun 2018 08:31:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=N1kyw/qPW02a77shdfvy2HmUFk+UoaY0Opthc28D+XE=; b=Kw4Vzuk4DrkQl3Pnq9P18zbooUTR7g4Vq8C/0E8iTBPC2QHEayonBJ25GhCUoOaY6m B7V2v2iw7LKhwOgkTsHeiJJGfY1/Nd20K9HwlF0pn0pz3hvs/OjeWMdi/v4LmD5sJiOI 7JolAVUoi9rMSz7OHZ9rQjCQVJQKqXFQrgRF6gnghUy7u5aydpVUaklMkTGPzf9/gdFk uWmMlQqStimt5gJk30D2DMfsSg6qDajZff2CoSUM6cPw0jfbC9gVRLAyA5UW7+6Cv60R PYTqEiuBshBiTdmKkQ4liML8jAiB1IWLU9ZNSOUCdDkM4x1NF1jJmY1WMc3hNB6JzcG+ fqFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=N1kyw/qPW02a77shdfvy2HmUFk+UoaY0Opthc28D+XE=; b=aEahGowq6bqDF6joX2mXzvdPXdjOSnjXJn2eQjTra33G5RSShlaHdvk5y4MjJCig1A np7B3DNuY2fDKd3DSguOyTyNj51blM4XWsirZBD3/kvSVQFKNrCl2Lg3Ffkdohypsiu3 Cp/bPvGKvlnCq1m+iH7vgdjJrrVU8GQBNPZqp+Lc8/Zk2z3e8pCb2dPN9w6Zk/Yqhrus F+xNCnyPtvfASK4lFwWPBam0x0L08+2eEI/04bCHQvt4xpIghzvpMfNJ6vJpXVCBZUKn 1KotVpXngYwKtqgBcIyTsHBmVkczjwV99UPgHnpXyS1uOqw/v8+hNuWCLpHB0q31Wwqd lEDw== X-Gm-Message-State: APt69E0fOBnOIxxkof/UasZec32c3QD7k2/xKjvrvjQBrMij1j+bSzY1 m8xuwNU8skUhkFe7+M1UXXk= X-Google-Smtp-Source: ADUXVKIcj4Tkly0fNFeQJcsMjUsu7xYMU8VckpFkRuRWi9v7E0ZC2BPuVCa98T59MVGXvYkb0UJhcw== X-Received: by 2002:a24:2109:: with SMTP id e9-v6mr950735ita.39.1528817498327; Tue, 12 Jun 2018 08:31:38 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id l82-v6sm369743itl.25.2018.06.12.08.31.36 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 12 Jun 2018 08:31:37 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Tue, 12 Jun 2018 08:36:15 -0700 Message-Id: <1528817785-20208-4-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528817785-20208-1-git-send-email-bmeng.cn@gmail.com> References: <1528817785-20208-1-git-send-email-bmeng.cn@gmail.com> Cc: Alexander Graf Subject: [U-Boot] [PATCH v2 03/13] x86: Change __kernel_size_t conditionals to use compiler provided defines X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Since commit bb0bb91cf0aa ("efi_stub: Use efi_uintn_t"), EFI x86 64-bit payload does not work anymore. The call to GetMemoryMap() in efi_stub.c fails with return code EFI_INVALID_PARAMETER. Since the payload itself is still 32-bit U-Boot, efi_uintn_t gets wrongly interpreted as int, but it should actually be long in a 64-bit EFI environment. This changes the x86 __kernel_size_t conditionals to use compiler provided defines instead. That way we always adhere to the build environment we're in and the definitions adjust automatically. Fixes: bb0bb91cf0aa ("efi_stub: Use efi_uintn_t") Signed-off-by: Bin Meng Reviewed-by: Alexander Graf --- Changes in v2: - new patch to "change __kernel_size_t conditionals to use compiler provided defines" arch/x86/include/asm/posix_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/posix_types.h b/arch/x86/include/asm/posix_types.h index 717f6cb..a19f1a0 100644 --- a/arch/x86/include/asm/posix_types.h +++ b/arch/x86/include/asm/posix_types.h @@ -16,7 +16,7 @@ typedef int __kernel_pid_t; typedef unsigned short __kernel_ipc_pid_t; typedef unsigned short __kernel_uid_t; typedef unsigned short __kernel_gid_t; -#if CONFIG_IS_ENABLED(X86_64) +#if defined __x86_64__ typedef unsigned long __kernel_size_t; typedef long __kernel_ssize_t; #else