From patchwork Tue Dec 5 16:29:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael McElroy X-Patchwork-Id: 10093335 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DB1286035E for ; Tue, 5 Dec 2017 16:29:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA909291D2 for ; Tue, 5 Dec 2017 16:29:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE98729259; Tue, 5 Dec 2017 16:29:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0409F291D2 for ; Tue, 5 Dec 2017 16:29:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752252AbdLEQ3O (ORCPT ); Tue, 5 Dec 2017 11:29:14 -0500 Received: from mail-ua0-f194.google.com ([209.85.217.194]:35373 "EHLO mail-ua0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752209AbdLEQ3N (ORCPT ); Tue, 5 Dec 2017 11:29:13 -0500 Received: by mail-ua0-f194.google.com with SMTP id l2so646088uak.2 for ; Tue, 05 Dec 2017 08:29:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=QWUJ8F+BzFMI5yvttlCQwaAY7fihPotpTqZAld1Ub4I=; b=g9A1aNdwK1ZBXIGENeoYGvkddW4qbYzYI5D5KJLfyvjYZHwpuzGMHq1Oq96gBExBju VAwSnnuvWroSHSSlaDUwfNkIADcZ2/TCkX6N8p9mjttvHMZGFQDOwPIOv8HTZd0EocH8 8xOqx30Z1BzkBlqpWjljvQy/QL3DIHNymh9j0pF4clJ+lSHDeYcgmck1qu5nIcUlQXnf 2bMcByZxs+O/xJVaddgMZg6PjexDYuLdulkv+NswG8UiaJwcxHcE4jmXjRsDRhwjZgNo S57ZEwiEhqqLB7IBz3JgquAQ/Sw+pmbH3TN18ARADFmDpSBgaWgHDw8ZE7C0fK9St6f3 bVCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=QWUJ8F+BzFMI5yvttlCQwaAY7fihPotpTqZAld1Ub4I=; b=XvRCqqiYz7fxMJ9Ouh30dwH/0c5JGLlAkWOsjJh7iBn63+mVCCq1DyuKWeJ9E64CwO T8J82s6NUFFskbUfM2FWopATB5XQzHkN3CJFNg6NZiVwKlTGvmd8PrKNH/KjwcME9/gq VvC/b1bIc5E7dGyXzQe5aCd+9q9g/oQBC5Ki6ESQz62qGj3uzLfAWmOSrHarbpH/ELjI igcjKNRoGx8JQJowy57kBA5AG04a6AxuwIZT8VyUgQ1g45EGtE4RBcRxpgXHwmTN/lrR 0y3oRmxXnLfAZXXxQx8+MY99dJfZdB51a/Sl9sFsxueGOdwPXXZ5+rzLP14XzOIbkFcc 6YYQ== X-Gm-Message-State: AKGB3mLT0CmwhsmKxIMy8gnM3H6W/+dh/4jDIxMrYDKpFmTt2SGIF3uE kX5CEGb/CJvBQGYrIWEOKF9kEKJhFcEaMu48pNtHXQ== X-Google-Smtp-Source: AGs4zMaWb4JvMGdEFBHOWe9lPl01vETrNGZMTKcHtUSwyv6JGlRQjyGLul8QKwHvoNggjC3rjsMQeLcm4+3c12U4IhQ= X-Received: by 10.176.21.230 with SMTP id j35mr4759482uae.113.1512491352743; Tue, 05 Dec 2017 08:29:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.31.110.5 with HTTP; Tue, 5 Dec 2017 08:29:12 -0800 (PST) From: Michael McElroy Date: Tue, 5 Dec 2017 11:29:12 -0500 Message-ID: Subject: Errors backporting to 3.4 To: backports@vger.kernel.org Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I have been following the thread on the genl-const.cocci parse error. I had the same problem and found the information very helpful. I had been killing the gentree build because I thought it was hung applying SmPL patch 0079-netdev-destructor.cocci. On my system, a 4 processor Intel(R) Core(TM) i7-3740QM CPU @ 2.70GHz machine, that patch takes about an hour and 20 minutes with the system at 100% for about an hour. After reading your discussion, I stopped killing it and it ran successfully. I am backporting to 3.4 and ran into a couple of other problems. There were 2 problems building the output against a 3.4 kernel. I wasn't sure that my kernel was the problem, so I built against the 3.4 branch of linux-stable. The first problem was caused by commit 8cdd85766293018fea01512959320a 05269e97b4. Author: Johannes Berg Date: Fri Oct 13 10:48:42 2017 +0200 backports: add netdev_upper_dev_link() extack argument But make it optional (using magic.h) to let this still work on kernels that didn't change the argument. Signed-off-by: Johannes Berg In file included from /home/mike/linux-backport/compat/compat-3.8.c:18: /home/mike/linux-backport/backport-include/linux/netdevice.h:341: error: implicit declaration of function 'netdev_upper_dev_link' /home/mike/linux-backport/backport-include/linux/netdevice.h: In function '_bp_netdev_upper_dev_ +#if LINUX_VERSION_IS_LESS(4,14,0) +static inline int _bp_netdev_upper_dev_link(struct net_device *dev, + struct net_device *upper_dev) +{ + return netdev_upper_dev_link(dev, upper_dev); +} +#define netdev_upper_dev_link3(dev, upper, extack) \ + netdev_upper_dev_link(dev, upper) +#define netdev_upper_dev_link2(dev, upper) \ + netdev_upper_dev_link(dev, upper) +#define netdev_upper_dev_link(...) \ + macro_dispatcher(netdev_upper_dev_link, __VA_ARGS__)(__VA_ARGS__) +#endif + I tried building against various kernels and didn't find netdev_upper_dev_link' defined until 3, so anything less that that probably has this error. I didn't know exactly what to use here so I just did an #if 0 around that section and resolved the problem for me. The second problem is in commit 2ebca7b7d087be04e25b1fc50cf08137d423af3d. Author: Luca Coelho Date: Tue Apr 19 22:13:11 2016 +0300 backport: add pm_runtime_active() implementation for < 3.9 kernels The pm_runtime_active() helper function was introduced in kernel 3.9. In order to use it in earlier kernels, we need to add its implementation to the backports. Signed-off-by: Luca Coelho [add LINUX_BACKPORT() protection] Signed-off-by: Hauke Mehrtens /home/mike/linux-backport/backport-include/linux/pm_runtime.h: In function 'backport_pm_runtime_active': /home/mike/linux-backport/backport-include/linux/pm_runtime.h:10: error: 'struct dev_pm_info' has no member named 'runtime_status' /home/mike/linux-backport/backport-include/linux/pm_runtime.h:11: error: 'struct dev_pm_info' has no member named 'disable_depth' make[6]: *** [/home/mike/linux-backport/compat/backport-4.8.o] Error 1 In linux/pm.h, those members addition to the struct are controlled by CONFIG_PM_RUNTIME, not CONFIG_PM. I changed pm_runtime.h to use CONFIG_PM_RUNTIME and that resolved the problem. Thanks for this amazing product, Mike McElroy --- To unsubscribe from this list: send the line "unsubscribe backports" in diff --git a/backport/backport-include/linux/pm_runtime.h b/backport/backport-include/linu new file mode 100644 index 0000000..16d2a80 --- /dev/null +++ b/backport/backport-include/linux/pm_runtime.h @@ -0,0 +1,19 @@ +#ifndef __BACKPORT_PM_RUNTIME_H +#define __BACKPORT_PM_RUNTIME_H +#include_next + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) +#define pm_runtime_active LINUX_BACKPORT(pm_runtime_active) +#ifdef CONFIG_PM +static inline bool pm_runtime_active(struct device *dev) +{ + return dev->power.runtime_status == RPM_ACTIVE + || dev->power.disable_depth; +} +#else +static inline bool pm_runtime_active(struct device *dev) { return true; } +#endif /* CONFIG_PM */ + +#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) */ + +#endif /* __BACKPORT_PM_RUNTIME_H */