From patchwork Tue Sep 18 23:07:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Stanley X-Patchwork-Id: 146947 Delivered-To: patch@linaro.org Received: by 2002:aa7:da13:0:0:0:0:0 with SMTP id r19-v6csp38595eds; Tue, 18 Sep 2018 16:08:17 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbCARnygZLrt7nOPFqZ1lEPDW9g+GORCtgtitx4amuFb0UH2c+jhKBf2oOx3q2DrsboRi2B X-Received: by 2002:a17:902:8a92:: with SMTP id p18-v6mr31290805plo.148.1537312097616; Tue, 18 Sep 2018 16:08:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537312097; cv=none; d=google.com; s=arc-20160816; b=SzxbNBpq2/j468pHIz6mmpoCgaOxI/O7VhY7T8AyFBeaJbFbm2Hl/SLnjVUsbW7s4N nLUipQRmk10J6D08ljP19ocKhC+E0VxyGZJsfe3wFP4DHP+SKJpD7lPyHRizM9HGC1tA QbIhKKpF1navp8Y57AabVLvxWezNGT5pMpWIZ25TiWZUY9hAXQVNI8n7meXbpCzGvZbN w1FE+ad8vb7XgsFR7arYUY2LhuQk+s4v46W2/M8UzUOb0qojBxUsRNWsn4sxYylt4pOF f136/d+R7pM155ZiTvc71277mbiH77oq8eZ+PRkMTHmDqNkLhUUKH37FTHKHQV24feaW OOVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=8Y0bXWSSCROkEHayosBp2ltVkICRjdmC0LG3AIht8mE=; b=q4eiCprjttlVviiUIHOk1EmXugbNaC1HC8BONgjW4ZzbKE4BERuBqPLBmTnT6cbZWo DmvsDm8A47uTR7+ZpoBXXjNMvA9L/mxCYuKpeCCsOeeeRudeotdhoWYKVIggzjlL1VDe PvdwyQ9ScSMh1Ewa9dAJ+crhgLIkUXUK6hWMBbBmNUibTW+ICUrliaRzWGTfk31076pP wydn9t6xcs56PbpW7KvzRetu1bc2adgyihpUL//Di59Zbx66t/vKqm5SXoFJi2GZFGcB z+X6KWhkgadq0XuSAO779d0wIUYlCoTqATofngW/DQoV/Ts5Ha/2ZoHcLWJ4bIpfRdmN xKUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ucCpO9Hr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i2-v6si18606690pgh.565.2018.09.18.16.08.17; Tue, 18 Sep 2018 16:08:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=ucCpO9Hr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730619AbeISEnF (ORCPT + 32 others); Wed, 19 Sep 2018 00:43:05 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42083 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725873AbeISEnE (ORCPT ); Wed, 19 Sep 2018 00:43:04 -0400 Received: by mail-pf1-f193.google.com with SMTP id l9-v6so1715713pff.9 for ; Tue, 18 Sep 2018 16:08:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=8Y0bXWSSCROkEHayosBp2ltVkICRjdmC0LG3AIht8mE=; b=ucCpO9Hr6vunnYYWcNZvxT/3XR6RJgJPlI1WmJ1LT4Gzh4dzJtQ1Id+5iE74Ymy1Cn 2p1yidyyXgC5IZZSpfBO3M+jCw+jROkmU2d/EFz1xnsiPFkq5n+iUDaABmKXNLHqF4ph QhNcahv7MFJwtAugq6duqO3Qhv/K4sYJ/lhHCclhzLwwuVlwPpSIeAPxdnLVLqZ30sog GhKRjJOe6iNQetjS+JlTdYgdifVoFkiNIPvgFzbnQbyiKcunZUcRtST00fvW0yZTmSOb tgVCmGINAVUggnZDNw5t/iyGdPBUW5mHtVO3T5vLufSOqTiRhK8YGXRW1+Eb8VRbzWos V5Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=8Y0bXWSSCROkEHayosBp2ltVkICRjdmC0LG3AIht8mE=; b=ByDtCf6TGJD1QubpbfDs2JNGLnGu/vlL0uPvwjltjV6PnT48a3EJb1rB77e7e9PjbD QlU8ITuwyAbealRbjfZGHkRmjT08/W4kY+oMSY8C22el4hgoe71/BpnQpid8xBuq0ZTb wI0rKrj74CghbfUBGgOBoyPO0J4dMGU+UuWisuuTQLdRv2iu8qXeV562+3XQMkWViqY+ 8HHV4MEuf1eB2CJ/FSG9vPt0XY4bG0Zui/+RagCD6wl1NzxQXCZOFPs6RF7A61xnxGxG Iohme8khlC/KUyxRFK1jwTddhWs5ziKPEUKkjvCSiBDDAKSbEHXriYAZ/S6bhzkodMXH rpbA== X-Gm-Message-State: APzg51ATIVxr4AvneesjbjfN1DRRYmN8XUYid24/H6yfypHWfTNcAeoK PREEMzJv2iDYVz04LgWtTQY= X-Received: by 2002:a62:a65a:: with SMTP id t87-v6mr32754651pfe.225.1537312093491; Tue, 18 Sep 2018 16:08:13 -0700 (PDT) Received: from aurora.jms.id.au ([45.124.203.19]) by smtp.gmail.com with ESMTPSA id g11-v6sm24512769pgi.90.2018.09.18.16.08.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Sep 2018 16:08:12 -0700 (PDT) Received: by aurora.jms.id.au (sSMTP sendmail emulation); Wed, 19 Sep 2018 08:38:05 +0930 From: Joel Stanley To: Krzysztof Kozlowski Cc: Herbert Xu , linux-kernel@vger.kernel.org, Michael Ellerman , Oliver O'Halloran , linuxppc-dev@lists.ozlabs.org Subject: [PATCH] lib/xz: Fix powerpc build with KERNEL_XZ Date: Wed, 19 Sep 2018 08:37:56 +0930 Message-Id: <20180918230756.26035-1-joel@jms.id.au> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This partially reverts faa16bc404d72a5 ("lib: Use existing define with polynomial"). The cleanup added a dependency on include/linux, which broke the PowerPC boot wrapper/decompresser when KERNEL_XZ is enabled: BOOTCC arch/powerpc/boot/decompress.o In file included from arch/powerpc/boot/../../../lib/decompress_unxz.c:233, from arch/powerpc/boot/decompress.c:42: arch/powerpc/boot/../../../lib/xz/xz_crc32.c:18:10: fatal error: linux/crc32poly.h: No such file or directory #include ^~~~~~~~~~~~~~~~~~~ The powerpc decompressor is a hairy corner of the kernel. Even while building a 64-bit kernel it needs to build a 32-bit binary and therefore avoid including files from include/linux. Fixes: faa16bc404d7 ("lib: Use existing define with polynomial") Signed-off-by: Joel Stanley --- We need to clean up the powerpc boot decompresser but that work will be more involved than we would include in a late -rc. Please consider merging this fix for 4.19. Thanks! lib/xz/xz_crc32.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.17.1 diff --git a/lib/xz/xz_crc32.c b/lib/xz/xz_crc32.c index 25a5d87e2e4c..34532d14fd4c 100644 --- a/lib/xz/xz_crc32.c +++ b/lib/xz/xz_crc32.c @@ -15,7 +15,6 @@ * but they are bigger and use more memory for the lookup table. */ -#include #include "xz_private.h" /* @@ -30,7 +29,7 @@ STATIC_RW_DATA uint32_t xz_crc32_table[256]; XZ_EXTERN void xz_crc32_init(void) { - const uint32_t poly = CRC32_POLY_LE; + const uint32_t poly = 0xEDB88320; uint32_t i; uint32_t j;