Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp872386ybh; Wed, 22 Jul 2020 15:52:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSoWOPN1h3HWd4AfA0vDSWhEdYPBgyvA1Ld82pMFB2Pi1kfB5TglDBfeirlQygy3xO+Kar X-Received: by 2002:a17:906:4dd4:: with SMTP id f20mr1824143ejw.170.1595458354192; Wed, 22 Jul 2020 15:52:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595458354; cv=none; d=google.com; s=arc-20160816; b=rlhHlhK983Gr/BcivVpGha+05GQ7SYJ947fRJwVIxbMvn1ZsXTNigHDqR/xVYkWYtj O3xPedEOwPIaPw3nK43qcqNceYfXK7YblnF+czb9SvoF+zZsc39DiCv7PG7PLiuIQK+u KK7PIYYHPVJEBgZFrQgjr0WkQpqALGM4Fsnonh/xYdGL2c/mGtuueCE02pTFKPN/qpEC sQUwChNuGOg7IqihLl0+PF0+B32Wac2lxfMnZmGB+Isa0x6ZJOQsLl59FXBYHj+WaVsF 8kIEELWmJrv+/D8qhcBtZ+BQ74xpHEe3daIhAxil2pYxdenqXPaIb6rt57NkFXhPaC9o /qqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:dkim-signature :dkim-signature:date; bh=KpuPKpoMQ1vXCI/YK6JtR2eQJ1NuqlHho8RvYGCQ3Rs=; b=GGz5MOM96itgwpfGNWxfZOz3W4GrUAkZwZzaDeb5QNjS49gkFdyTwN3k0pW9IrwUwF exOHxtfn70Io++Z9qosJY0OIblrMGXnAwNyL3pn2cBHjoNPE6J62x6oQsnX0tmY+5RnN CsY6IJWCLWNYFxPn0m68zKNOWFzTpnOk4rhf8th7MMFDUPQ/hnYHG57Y3tTIGYmLMg5A hiY5dxOWRyasrJP9IJ8/AChB0AtOFB17QVFUY835cahawXqMQS7C0C3me5lkagjx9j8n +rF8DS5VscsqX3kljMW02eT5UhVSDtaTBp+GglDT8PB13uaTEUIvNEllDTcXzr0s9Fd6 723g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b="CpdgH2q/"; dkim=neutral (no key) header.i=@linutronix.de header.b=7nAtu0OG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v25si815827ejx.496.2020.07.22.15.52.11; Wed, 22 Jul 2020 15:52:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b="CpdgH2q/"; dkim=neutral (no key) header.i=@linutronix.de header.b=7nAtu0OG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733191AbgGVWtB (ORCPT + 99 others); Wed, 22 Jul 2020 18:49:01 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:52898 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732755AbgGVWso (ORCPT ); Wed, 22 Jul 2020 18:48:44 -0400 Date: Wed, 22 Jul 2020 22:48:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1595458122; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KpuPKpoMQ1vXCI/YK6JtR2eQJ1NuqlHho8RvYGCQ3Rs=; b=CpdgH2q/g9V2zXTI7r9ATp/BkYvMhAz5AnCbVikN14g0+f2RNZtghfrwsCx5/EVMswSV7n 9aoj0sy/3lrFeOASOaIo0abrVxTmmAOFNma7PLW14SmkzmYBQ7LzHK7HsB6u7jhN3AQz67 9qF2coAOKf/eHa3XyWRKMnW2sT5oqZm1wa8D2odSqExiteJdwRW3zcS/dWsVJlLOkoWXWc gOVEhQ+6vY3VgMY8vNub9jedRyTh3C/YziOi3loJAfsvMMv2b0vCOuQUwt8gmuK9xbD+YY BIMV0oQa33J7kNhruNp3Yq52hH3M+RsKycchpjiTsW6dZET6VA9stV1QA38WIQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1595458122; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KpuPKpoMQ1vXCI/YK6JtR2eQJ1NuqlHho8RvYGCQ3Rs=; b=7nAtu0OGf+WFex1IEHLDF/Zjy0QbRc4Xea+bEofv9I3qPG1E1BX/Ycwh0mIYEl7kHCDlKV c0mwEpyspZVRGKCA== From: "tip-bot2 for Atish Patra" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: efi/urgent] efi/libstub: Fix gcc error around __umoddi3 for 32 bit builds Cc: Atish Patra , Ard Biesheuvel , x86 , LKML In-Reply-To: <20200625234516.31406-2-atish.patra@wdc.com> References: <20200625234516.31406-2-atish.patra@wdc.com> MIME-Version: 1.0 Message-ID: <159545812117.4006.8365184793527804218.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the efi/urgent branch of tip: Commit-ID: 950accbabd4cfa83519fa920f99428bcc131c3c9 Gitweb: https://git.kernel.org/tip/950accbabd4cfa83519fa920f99428bcc131c3c9 Author: Atish Patra AuthorDate: Thu, 25 Jun 2020 16:45:06 -07:00 Committer: Ard Biesheuvel CommitterDate: Thu, 09 Jul 2020 09:45:09 +03:00 efi/libstub: Fix gcc error around __umoddi3 for 32 bit builds 32bit gcc doesn't support modulo operation on 64 bit data. It results in a __umoddi3 error while building EFI for 32 bit. Use bitwise operations instead of modulo operations to fix the issue. Signed-off-by: Atish Patra Link: https://lore.kernel.org/r/20200625234516.31406-2-atish.patra@wdc.com Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/libstub/alignedmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/firmware/efi/libstub/alignedmem.c b/drivers/firmware/efi/libstub/alignedmem.c index cc89c4d..1de9878 100644 --- a/drivers/firmware/efi/libstub/alignedmem.c +++ b/drivers/firmware/efi/libstub/alignedmem.c @@ -44,7 +44,7 @@ efi_status_t efi_allocate_pages_aligned(unsigned long size, unsigned long *addr, *addr = ALIGN((unsigned long)alloc_addr, align); if (slack > 0) { - int l = (alloc_addr % align) / EFI_PAGE_SIZE; + int l = (alloc_addr & (align - 1)) / EFI_PAGE_SIZE; if (l) { efi_bs_call(free_pages, alloc_addr, slack - l + 1);