Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1201025ybv; Thu, 20 Feb 2020 15:22:39 -0800 (PST) X-Google-Smtp-Source: APXvYqx35KaM0NN23FlISOfQwqQAY9j+yBKcCDxu9yjWnhkuWKOXHXME8d6W1Yk19RQttqVJfy7+ X-Received: by 2002:aca:3017:: with SMTP id w23mr3780941oiw.152.1582240959223; Thu, 20 Feb 2020 15:22:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582240959; cv=none; d=google.com; s=arc-20160816; b=IU2v/u5EflGDM8tuYcV4DrePDTY4XNrnXwNT5+4AzB0W4xNVwsMKtEdDGbVc1bKtVS bmHOCwMQvlrpSH0tkRRH+bHdt79wul2SnnX96WrbHf6V+bdGsh8a9s16KSCMxaRVvltm SKplnm12vYF4sQqJs8PseQnk2p3mFeYzGXhqsjGnnfHwr8r96tbf84GlQNgFrm22xHJb iuJ9bDHCkn/qeBHAsEBjSpI6WKJjvMScjeh1bn3WYCZxdFzIoG9+/ovw/JH4Oh51h8uP 2MXSpZJdDYPBNScyKV3WVkRGiguF8Q5Ub1yRm7C4Stj2hT+FxUfb2alIK5xTznSfIN2P LSyw== 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=lAGe+i3LubNXS3mS7OrXMjcEN50SIJqaNo7uJEQXNWE=; b=HadWG3b8Bc+8+78p3/woyra7m7CORnlw/0YXZqwW3xDQALDeQtLVGL4iKHrAfWP21j 45f+pxMGLFVagIi1ThWC7mnfr+EEeXZsR8bCzkw/yPh24R20jKRdNARmf7zKzCIAXuAq 4uZhAUYMNY/d5doFfByEhoXMxgF30UhCkmJtBhsRUpK9QpFeWdjLuNfODIhGg9wEWwhi coCHwDPWXAP43lgbOr/qhlZiUZ9VDvxbZlm+hq7DjwdrdrVNXbosFIHLLjcn4wP2OPHt NE4x31rRWR2yC2i/6aCwyAWp+HFHVrcd/zfKmLui/z14umtCuOobZKX0xRw2t+lfWmZ4 +fAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=h7MnYZvE; 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 h9si493668oti.155.2020.02.20.15.22.26; Thu, 20 Feb 2020 15:22:39 -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=h7MnYZvE; 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 S1729279AbgBTXWS (ORCPT + 99 others); Thu, 20 Feb 2020 18:22:18 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:50459 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729027AbgBTXWS (ORCPT ); Thu, 20 Feb 2020 18:22:18 -0500 Received: by mail-wm1-f65.google.com with SMTP id a5so339026wmb.0 for ; Thu, 20 Feb 2020 15:22:16 -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=lAGe+i3LubNXS3mS7OrXMjcEN50SIJqaNo7uJEQXNWE=; b=h7MnYZvECmHl3d29/SfmjKEd2LO8J5IoeA+e1M3u9qBoVgt/hMmnLnnjXNhCldskHc N3OAUX5vmVPJwhJ7mWSTCmnQvav8xtNMCiGPHayj/pYGaIK+eTMZ6LM+f0YSJZcVR/Eh yhwPl/cjAtvlV3sa8TMz5OjHPoBeGFlsK78OPR7u4O2ooTwW2J+ceuyxZcJcF0Hvuiyt XRMlrhyYAWDgQUon2AWvtHTVHdEKp4CzcQtYmwIfQPMgpBgaJOuz0pejKhf8PPeoYcs8 mz3Uvn1gCW3kOO43eH10vmM0Q/fGvZfp/1Q1DIQ60zTvSvUZJJbkRL5euHkz5TvS6TDo En1Q== 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=lAGe+i3LubNXS3mS7OrXMjcEN50SIJqaNo7uJEQXNWE=; b=VuUXLjRHI0enJJF+Pv67YaYxdB/IOuz3tTLul7xL1aR8UiVz5ytioox9dbcAvw9yeA 7EVjFmUOIK+uOBIs7VMomhbquBjev5EoOvHQvyXg19BmqVzlLYG3/rdIvZcMElkVHP3G ldOTyAAff1E3PKMb9kOXic2OXqgrR1UdV+WrWW0Cyoo2ns7A01q0PCBzOmVtTHonxUCb WGE/calWpUSeQGLFh0QPe7jQh6SCA23uZREZuZF5gsbq/i3bp6uUGEcQR43g2RmCzAeC 5q12oeFcKRALKsKW++i1snPiI+e9yszoxIpah4MmEUYC5rZMnuX3nvJifxJZkkNlYY+Q L2nA== X-Gm-Message-State: APjAAAU+fulmJX3jsBhB7fRRjAvFP+3hwKOtQfN9vSwxQ8/QdQk1q3HM 7tHEbuel0TVxDuNXd6/a+b8YXr+3mJRVkNduSsv6Bg== X-Received: by 2002:a1c:9ad6:: with SMTP id c205mr6672584wme.78.1582240935818; Thu, 20 Feb 2020 15:22:15 -0800 (PST) MIME-Version: 1.0 References: <20200217145711.4af495a3@canb.auug.org.au> <20200221101845.21c0c8c5@canb.auug.org.au> In-Reply-To: <20200221101845.21c0c8c5@canb.auug.org.au> From: Arjun Roy Date: Thu, 20 Feb 2020 15:22:04 -0800 Message-ID: Subject: Re: linux-next: build failure after merge of the akpm tree To: Stephen Rothwell Cc: Andrew Morton , Linux Next Mailing List , Linux Kernel Mailing List , David Miller 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 20, 2020 at 3:18 PM Stephen Rothwell wrote: > > Hi all, > > On Sun, 16 Feb 2020 22:45:35 -0800 Arjun Roy wrote: > > > > On Sun, Feb 16, 2020 at 8:12 PM Arjun Roy wrote: > > > > > > On Sun, Feb 16, 2020 at 7:57 PM Stephen Rothwell wrote: > > > > > > > > After merging the akpm tree, today's linux-next build (sparc64 defconfig) > > > > failed like this: > > > > > > > > mm/memory.c: In function 'insert_pages': > > > > mm/memory.c:1523:56: error: macro "pte_index" requires 2 arguments, but only 1 given > > > > remaining_pages_total, PTRS_PER_PTE - pte_index(addr)); > > > > ^ > > > > > > > > Caused by commit > > > > > > > > 366142f0b000 ("mm/memory.c: add vm_insert_pages()") > > > > > > > > This is the first use of pte_index() outside arch specific code and the > > > > sparc64 version of pte_index() nas an extra argument. > > > > > > Looks like this happens for sparc, and also metag. Other platforms > > > just take the addr parameter based on a quick search. > > > > And actually I guess there's no metag anyways now. > > Looking further, then, it looks like in every non-sparc pte_index() is > > an actual numerical index, while on sparc it goes a step further to > > yield a pte_t *. > > As far as I can tell, the sparc incarnation of this is only used by > > the pte_offset_(kernel/map) macros. > > > > So I think a possibly sane way to fix this would be: > > 1. Define pte_index() to be a numerical index, like the other architectures, > > 2. Define something like pte_entry() that uses pte_index(), and > > 3. Have pte_offset_(kernel/map) be defined as pte_entry() instead. > > > > Then pte_index would be operating on just an address for all > > platforms, and the reverted patchset would work without any changes. > > > > If this sounds acceptable, I can send a patch. > > > > > > I have reverted these commits for today: > > > > > > > > 219ae14a9686 ("net-zerocopy-use-vm_insert_pages-for-tcp-rcv-zerocopy-fix") > > > > cb912fdf96bf ("net-zerocopy: use vm_insert_pages() for tcp rcv zerocopy") > > > > 72c684430b94 ("add missing page_count() check to vm_insert_pages().") > > > > dbd9553775f3 ("mm-add-vm_insert_pages-fix") > > > > 366142f0b000 ("mm/memory.c: add vm_insert_pages()") > > > > > > > > > > In terms of fixing this; passing in an appropriate dir parameter is > > > not really a problem, but what is concerning that it seems messy to > > > have a per-platform ifdef to pass it either two arguments or one in > > > this case. But it seems like either that would be one way to fix it, > > > or having some arch method across all arches that takes two arguments > > > (and ignores one of them for most arches). > > > > > > Is there a general preference for the right way forward, in this case? > > Has there been any progress with this? I am still reverting the above > commits, so they are not getting any linux-next testing ... > I have a possible solution in mind, but it would involve a slight change in the SPARC macro (to be more inline with the semantics of the other platforms). If you're open to such a change, I can send it out. Thanks, -Arjun > -- > Cheers, > Stephen Rothwell