From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBF74C433FE for ; Mon, 31 Jan 2022 10:55:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 73DEE6B0074; Mon, 31 Jan 2022 05:55:43 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6EC696B0073; Mon, 31 Jan 2022 05:55:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5B47B6B0074; Mon, 31 Jan 2022 05:55:43 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0197.hostedemail.com [216.40.44.197]) by kanga.kvack.org (Postfix) with ESMTP id 4C5506B0071 for ; Mon, 31 Jan 2022 05:55:43 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id EE6BC2FD72 for ; Mon, 31 Jan 2022 10:55:42 +0000 (UTC) X-FDA: 79090276524.28.18390DA Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by imf10.hostedemail.com (Postfix) with ESMTP id 9CD8AC0005 for ; Mon, 31 Jan 2022 10:55:42 +0000 (UTC) Received: by mail-lf1-f48.google.com with SMTP id z19so25880308lfq.13 for ; Mon, 31 Jan 2022 02:55:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=o12ziMwfhRAv4Y8yIpDTd9CVii+Lz/UC4YUFGN0mD+4=; b=kZGVV9YswfPgPJXnCV8na0vQVbzhjWz64FS0Z/ItOVhkij8oOXcS8yJSCeBpgUnmLV Un4eW5RA//kdu0yVyzyWHbjXzBkHW6Srz7OhDfw+rsLcZtOelJkUJtuJYXYDmRn9zfAs 13+c5JrelzeJ5ewR/yzgNRAu09EPURxnmaq5BtySmTMSnGgW5lGf8g7OMTWV0pm6BhG0 uRkxbX2Nj45jl/SviekcXZCznismFZl40uDN9b5OLMXF30SYtNqlp9dw6XY+CuXOTW/0 PweiY/KSCEMxee93W+5Vzh9p06mZdKS31g4Jg50KyltEvdJVNhw5oEQmtblWu8XEPUK7 ochg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=o12ziMwfhRAv4Y8yIpDTd9CVii+Lz/UC4YUFGN0mD+4=; b=LOu3TcCVHo07T7VomtkE2BAb37eqtRxoFU7w8eXx0FofklytCMFHlg19+AAynKJt2c 1ix1xUNCKyqGiav51Aj2XuJo/MeTqVcHxN8lnxWFPF164KVYOW/XlAOOc61E4+GfWXNV PtHpanhJoqylM+CcsTChPhqcG+Fz1BfjoEBaDL+J3CVrgaZsUHG2J8Lp5J2EmFKam2LN JVvH66Oc9BYdkrlIXt2Gi5k+0SRYjN6RZ8nu6V3JPRF8nrEvEh2d1d2KvjSk0YBTAI+q yuq0zF3tvG9rqc1DdyNbfD2wFgY19T8SxRP9SrCakl+uvra1TxoJPnor2rMjY6OUy3FJ GIYQ== X-Gm-Message-State: AOAM5309oeOxg6p0fTH0g3AWnIf5R3jb0HX//SuZnY2IwY/+4WJBoBAL GilVGBA1Lig5J7z35t8EVlI= X-Google-Smtp-Source: ABdhPJyXyc71R0pt5d2tCiK1t2yweLeVbKbv1Qos9KZ7zi3zkvx28nqtZgxGllxcVdFhy54suXkWvA== X-Received: by 2002:a05:6512:2283:: with SMTP id f3mr14941442lfu.198.1643626541085; Mon, 31 Jan 2022 02:55:41 -0800 (PST) Received: from [192.168.50.104] (staticline-31-183-164-222.toya.net.pl. [31.183.164.222]) by smtp.gmail.com with ESMTPSA id h19sm1783458ljh.29.2022.01.31.02.55.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jan 2022 02:55:40 -0800 (PST) Message-ID: <5e2c456af89b60c845db2232664f6f9694aa9840.camel@gmail.com> Subject: Re: [PATCH 07/16] tools/include: Add io.h stub From: Karolina Drobnik To: Matthew Wilcox Cc: linux-mm@kvack.org, akpm@linux-foundation.org, mike.rapoport@gmail.com, linux-kernel@vger.kernel.org, Arnd Bergmann Date: Mon, 31 Jan 2022 11:55:39 +0100 In-Reply-To: References: <2d9aa000afe81b45157617664134b871207c2067.1643206612.git.karolinadrobnik@gmail.com> <48499a57afb3d27df26b39aa4255b4ba583c1148.camel@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 9CD8AC0005 X-Stat-Signature: w8ef1ujowkhmu3kdwanufjqfycj9yszr X-Rspam-User: nil Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=kZGVV9Ys; spf=pass (imf10.hostedemail.com: domain of karolinadrobnik@gmail.com designates 209.85.167.48 as permitted sender) smtp.mailfrom=karolinadrobnik@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1643626542-457206 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Matthew, On Sun, 2022-01-30 at 17:53 +0000, Matthew Wilcox wrote: > I think I found a deeper problem which is masked due to our maze of > header files: >=20 > include/asm-generic/io.h:#ifndef virt_to_phys > include/asm-generic/io.h:#define virt_to_phys virt_to_phys >=20 > so there's an assumption that defines virt_to_phys(). > You can see that in a number of architectures, eg: >=20 > arch/alpha/include/asm/io.h:static inline unsigned long > virt_to_phys(volatile void *address) > arch/ia64/include/asm/io.h:#define virt_to_phys virt_to_phys > arch/mips/include/asm/io.h:#define virt_to_phys virt_to_phys > arch/nios2/include/asm/io.h:#define virt_to_phys(vaddr) \ > arch/parisc/include/asm/io.h:#define virt_to_phys(a) ((unsigned > long)__pa(a)) > arch/powerpc/include/asm/io.h:#define virt_to_phys virt_to_phys > arch/sh/include/asm/io.h:#define virt_to_phys(address)=C2=A0 ((unsigned > long)(address)) > arch/x86/include/asm/io.h:#define virt_to_phys virt_to_phys >=20 > That's clearly not the right place to define it.=C2=A0 Two architecture= s > put it in asm/memory.h: >=20 > arch/arm/include/asm/memory.h:#define virt_to_phys virt_to_phys > arch/arm64/include/asm/memory.h:#define virt_to_phys virt_to_phys >=20 > then: >=20 > arch/m68k/include/asm/virtconvert.h:#define virt_to_phys virt_to_phys > arch/sparc/include/asm/page_32.h:#define virt_to_phys=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 __pa > arch/sparc/include/asm/page_64.h:#define virt_to_phys __pa Oh, that's a lot...thank you for checking it. The simulator has its own mm stubs, so it shouldn't be impacted by such a clean up, correct? > This needs to be properly sorted out, but I don't want to tell > Karolina that's now her job as a prerequisite for merging this > patchset; that would be unfair. Thanks. Also, I think I'm not be the best person to (efficiently) sort this out :) All the best, Karolina