Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1375550ybf; Thu, 27 Feb 2020 09:45:58 -0800 (PST) X-Google-Smtp-Source: APXvYqxTEsCt5ZItk5Dib5snEBKh544KAQf7oysqSpJNeVXBIlN5J6pfCq9j8xq82knp5+mEM9/R X-Received: by 2002:aca:554d:: with SMTP id j74mr175283oib.92.1582825558639; Thu, 27 Feb 2020 09:45:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582825558; cv=none; d=google.com; s=arc-20160816; b=BSt/cByFN4yrrGz5qh26JsndHqie5ozwWBgIJLMeDqyNXBMDuyCr813WyRN/NYSGEu 7nO/wTj11Zsv/vwyEjOytpOxqY7PdgcqVgpHmbbBWVK7dUgAyjDLJ50MENOimEZOFmEZ 6uywtOU5m08ehfsSQFu448whBKgmOlVLRh/UGRPkmLhYxXe3ztJfEs4RHBp2J1mLDZop wXLQVme8yyExQnpX7vLgfYLRzcqnB8PpO1uTBO/e0r1EY/U0DzqGdhOxSitno7WVf9DI iwTVUcHpwg2O9F5n60FwKXgc2i0PFpJWPjqoXYJW4+OOz0obIWWUZVZb/CyE4eVL5Ep6 9jtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=WixaM9tNI8jnTh9C4+zTeTZp1lxDIM/c/EPF+3v0ZBE=; b=Z1h1KYDocWQkAR49MGeh9wz/hglqHEDFOIogz4rT9JVVRhV0lGQtjKmsTWB5+egnoH Eu7pifuzHXGOdASYeK3Za3iyPyFLLQmjM2M3Ns2IVpei5pIdD/mEQ3f5Jj5W3gjau3Ba uu/MCvxkEYBzsPXAFrlpFvH+gxkfQ62ojGfc4AwC+wrqAkeiVietyGtkZOADo+n2Z5fQ M38B0u+o0T8yZ6mhHeOvqGZeQas2vq02u2pTA13zLjTSDtYQ7ZNf4JprsCuzJastWazP 1QvzLTbL95VsI9kUBFNWvNQOa6Wzhc2Lr+HTUDx++QxqUM0GrtZRTIReW0MyfHRlVqNv uuCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=KDUCet3q; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h6si2162470otk.276.2020.02.27.09.45.46; Thu, 27 Feb 2020 09:45:58 -0800 (PST) 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=pass header.i=@google.com header.s=20161025 header.b=KDUCet3q; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730801AbgB0RpK (ORCPT + 99 others); Thu, 27 Feb 2020 12:45:10 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:34133 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729710AbgB0RpJ (ORCPT ); Thu, 27 Feb 2020 12:45:09 -0500 Received: by mail-wr1-f65.google.com with SMTP id z15so4545974wrl.1 for ; Thu, 27 Feb 2020 09:45:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WixaM9tNI8jnTh9C4+zTeTZp1lxDIM/c/EPF+3v0ZBE=; b=KDUCet3qoAEaSacVzuXwe3JXolr9HmgHhC00ZjEyN12KdAZzPjkwxMYSF3VaIUHJoM bpu5F79pIc91/TImFBOK34U/6TrFa0dvkKANTi4aZL8uJpMsvb1t/ywuXH8nUdEIvLmO XlGtPRbZi9RWArB5f43EpVdrrn3vhnykxhPXDhT/jLvH/+smjUGkohWMJfAoZFO31hcM tKc7ABcXYFEC2ysVSQRGKuCZyrBbMnW/Joy9VqtMH5/FFljEqQaxq7FioaRIcR/HcbWc 86CYOefkozOo91gDg/8hiBPn4UeCJSH/ZxIDDxJH7FxuFAaRUGBY037M5wjHACD545C0 TQJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WixaM9tNI8jnTh9C4+zTeTZp1lxDIM/c/EPF+3v0ZBE=; b=p9q1YN2pfwllTqw5J6cnoshKN1tPIpOprZv3a9QbE1dJwRNNa8butffxljOmq1S/1q /4N+8HBWhi1rgUTPxMcLjpqQYae7ZSopdA0XVDUxUWqPU6RHtNt7LFYiIqtPeduX7mKM 9L20HX/hRb0rqnjL6mTMI3+TLL/Eee1Qrt7yVuohCOhhXLT0DngzrmUMjdJfksUXlS1b 6OZV5BuplM2I5AjqTAGJkY3AtrP8RJs7CqZccFT56xNv9BCbDlTkX4ta+krEYr/TI5v4 78DoXqQcOatxZtNeYzt0dY38Dcs9M29l3C+xF3ZrX1NbiXlLbGpVupCNi5VQOoRMrCOM 7zHw== X-Gm-Message-State: APjAAAWHOB/9F+BaNA1o/bAnGNK5VXKqkavusV508PpUBaR43ifGT4zv lAKW37GGX6Io4rDEsyCgH4iZuC19ZgiN0Witlcmv3g== X-Received: by 2002:a5d:674d:: with SMTP id l13mr8276wrw.11.1582825505785; Thu, 27 Feb 2020 09:45:05 -0800 (PST) MIME-Version: 1.0 References: <20200227151143.6a6edaf9@canb.auug.org.au> In-Reply-To: From: Arjun Roy Date: Thu, 27 Feb 2020 09:44:54 -0800 Message-ID: Subject: Re: linux-next: build failure after merge of the akpm tree To: Geert Uytterhoeven Cc: Stephen Rothwell , Andrew Morton , Linux Next Mailing List , Linux Kernel Mailing List , David Miller , Soheil Hassas Yeganeh Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 27, 2020 at 9:13 AM Arjun Roy wrote: > > On Thu, Feb 27, 2020 at 1:03 AM Geert Uytterhoeven wrote: > > > > Hi Stephen et al, > > > > On Thu, Feb 27, 2020 at 5:12 AM Stephen Rothwell wrote: > > > After merging the akpm tree, today's linux-next build (sparc defconfig) > > > failed like this: > > > > > > In file included from include/linux/list.h:9:0, > > > from include/linux/smp.h:12, > > > from include/linux/kernel_stat.h:5, > > > from mm/memory.c:42: > > > mm/memory.c: In function 'insert_pages': > > > mm/memory.c:1523:41: error: implicit declaration of function 'pte_index'; did you mean 'page_index'? [-Werror=implicit-function-declaration] > > > remaining_pages_total, PTRS_PER_PTE - pte_index(addr)); > > > ^ > > > include/linux/kernel.h:842:40: note: in definition of macro '__typecheck' > > > (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) > > > ^ > > > include/linux/kernel.h:866:24: note: in expansion of macro '__safe_cmp' > > > __builtin_choose_expr(__safe_cmp(x, y), \ > > > ^~~~~~~~~~ > > > include/linux/kernel.h:934:27: note: in expansion of macro '__careful_cmp' > > > #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <) > > > ^~~~~~~~~~~~~ > > > mm/memory.c:1522:26: note: in expansion of macro 'min_t' > > > pages_to_write_in_pmd = min_t(unsigned long, > > > ^~~~~ > > > > Same issue on m68k, as per a report from kisskb. > > > > > Caused by patch > > > > > > "mm/memory.c: add vm_insert_pages()" > > > > > > sparc32 does not implement pte_index at all :-( > > > > Seems like about only half of the architectures do. > > > > :/ I begin to suspect the only sane way to make this work is to have a > per-arch header defined method, returning a bool saying whether > pte_index() is meaningful or not on that arch, and early on in > vm_insert_pages() if that bool returns true, to just call > vm_insert_page() in a loop. > So, here is what I propose: something like the following macro in a per-arch header: #define PTE_INDEX_DEFINED 1 // or 0 if it is not In mm/memory.c, another macro: #ifndef PTE_INDEX_DEFINED #define PTE_INDEX_DEFINED 0 #endifndef And inside vm_insert_pages: int vm_insert_pages() { #if PTE_INDEX_DEFINED // The existing method #else for (i=0; i -Arjun > > > Gr{oetje,eeting}s, > > > > Geert > > > > -- > > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > > > In personal conversations with technical people, I call myself a hacker. But > > when I'm talking to journalists I just say "programmer" or something like that. > > -- Linus Torvalds