From patchwork Thu Oct 20 11:21:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 78482 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp726129qge; Thu, 20 Oct 2016 04:23:26 -0700 (PDT) X-Received: by 10.98.68.218 with SMTP id m87mr393925pfi.20.1476962605972; Thu, 20 Oct 2016 04:23:25 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id m8si44586682pfa.203.2016.10.20.04.23.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Oct 2016 04:23:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bxBQe-0006mL-Fj; Thu, 20 Oct 2016 11:22:32 +0000 Received: from mail-lf0-x236.google.com ([2a00:1450:4010:c07::236]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bxBQC-0006fB-U3 for linux-arm-kernel@lists.infradead.org; Thu, 20 Oct 2016 11:22:06 +0000 Received: by mail-lf0-x236.google.com with SMTP id l131so74456442lfl.2 for ; Thu, 20 Oct 2016 04:21:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ld1+cRbewmEOGKruwtwewl9ZLt9yQO6UmNgYXNvzOnw=; b=kVS1EZeSgXcUfWdy2ehsGMBueonhULh3/gZKIMzoxYbdCT9hgR5xVsmwRs1+G0qIVS a1x/YHVLtZSy8NOP1T3abkYpZQ6hIXpry5EadSkB17uoqjCyEuXdrkdTAyY6TKobtBiD b5uZmMAxHp782lFDJWnkLYAbgCnU66It93tyo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ld1+cRbewmEOGKruwtwewl9ZLt9yQO6UmNgYXNvzOnw=; b=JxqbIz+bu1pklxGKxkts9O3Jae7CMJIpp+0fSk2NE/Lfb9ziYauV3WLsu1ee1YfaLl ULiTUY8psT03xoK8rwCaOWAA2sqYuo/UXO21csdbqCSnpvD8r8Cy2YbqOBraVAMgpIcN kPCJRnSBiHQG/LXkZ1d5CttULgTzw0Cn5qxgn4NKPE+W8kFpffGByzwg6ZvANiitxc6/ 36y96k7AvGsM1fNmGqlW6AZ3UQrZiIPH3tS25U6DXn7T/KSwOMimiQqQSJHhSpjPQsUa Y7oozD4zZEopz2/q4WjT/2IwxulmV7G30l8QViMRk6cdNLC8+PeRXTcg2XG4PV+cnoP8 umUg== X-Gm-Message-State: AA6/9RmtE0RoISkADaYHtft34XyxOU46JtubGclr7TauVAm3izrr2G8gtTJhfNUSBH5FWC6b X-Received: by 10.28.29.68 with SMTP id d65mr5799894wmd.91.1476962502590; Thu, 20 Oct 2016 04:21:42 -0700 (PDT) Received: from localhost.localdomain ([196.66.89.52]) by smtp.gmail.com with ESMTPSA id e2sm77893018wjw.14.2016.10.20.04.21.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 20 Oct 2016 04:21:42 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, mark.rutland@arm.com, matt@codeblueprint.co.uk, keescook@chromium.org Subject: [PATCH v2 2/3] efi/libstub: add random.c to ARM build Date: Thu, 20 Oct 2016 12:21:25 +0100 Message-Id: <1476962486-18368-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476962486-18368-1-git-send-email-ard.biesheuvel@linaro.org> References: <1476962486-18368-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161020_042205_256970_23F91EE8 X-CRM114-Status: GOOD ( 11.88 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c07:0:0:0:236 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tytso@mit.edu, Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Make random.c build for ARM by moving the fallback definition of EFI_ALLOC_ALIGN to efistub.h Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/libstub/Makefile | 4 ++-- drivers/firmware/efi/libstub/efi-stub-helper.c | 9 --------- drivers/firmware/efi/libstub/efistub.h | 9 +++++++++ 3 files changed, 11 insertions(+), 11 deletions(-) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile index c06945160a41..40ddf8f763a8 100644 --- a/drivers/firmware/efi/libstub/Makefile +++ b/drivers/firmware/efi/libstub/Makefile @@ -36,11 +36,11 @@ arm-deps := fdt_rw.c fdt_ro.c fdt_wip.c fdt.c fdt_empty_tree.c fdt_sw.c sort.c $(obj)/lib-%.o: $(srctree)/lib/%.c FORCE $(call if_changed_rule,cc_o_c) -lib-$(CONFIG_EFI_ARMSTUB) += arm-stub.o fdt.o string.o \ +lib-$(CONFIG_EFI_ARMSTUB) += arm-stub.o fdt.o string.o random.o \ $(patsubst %.c,lib-%.o,$(arm-deps)) lib-$(CONFIG_ARM) += arm32-stub.o -lib-$(CONFIG_ARM64) += arm64-stub.o random.o +lib-$(CONFIG_ARM64) += arm64-stub.o CFLAGS_arm64-stub.o := -DTEXT_OFFSET=$(TEXT_OFFSET) # diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c index aded10662020..3c2fe209bbfe 100644 --- a/drivers/firmware/efi/libstub/efi-stub-helper.c +++ b/drivers/firmware/efi/libstub/efi-stub-helper.c @@ -32,15 +32,6 @@ static unsigned long __chunk_size = EFI_READ_CHUNK_SIZE; -/* - * Allow the platform to override the allocation granularity: this allows - * systems that have the capability to run with a larger page size to deal - * with the allocations for initrd and fdt more efficiently. - */ -#ifndef EFI_ALLOC_ALIGN -#define EFI_ALLOC_ALIGN EFI_PAGE_SIZE -#endif - #define EFI_MMAP_NR_SLACK_SLOTS 8 struct file_info { diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h index ee49cd23ee63..fe1f22584c69 100644 --- a/drivers/firmware/efi/libstub/efistub.h +++ b/drivers/firmware/efi/libstub/efistub.h @@ -15,6 +15,15 @@ */ #undef __init +/* + * Allow the platform to override the allocation granularity: this allows + * systems that have the capability to run with a larger page size to deal + * with the allocations for initrd and fdt more efficiently. + */ +#ifndef EFI_ALLOC_ALIGN +#define EFI_ALLOC_ALIGN EFI_PAGE_SIZE +#endif + void efi_char16_printk(efi_system_table_t *, efi_char16_t *); efi_status_t efi_open_volume(efi_system_table_t *sys_table_arg, void *__image,