[{"id":1768995,"web_url":"http://patchwork.ozlabs.org/comment/1768995/","msgid":"<f5e68e73-40a8-b78d-d607-1cd4f5da8154@gmail.com>","list_archive_url":null,"date":"2017-09-15T07:35:38","subject":"Re: [U-Boot] [PATCH v2 01/13] Provide a generic io.h & address\n\tmapping functions","submitter":{"id":15030,"url":"http://patchwork.ozlabs.org/api/people/15030/","name":"Daniel Schwierzeck","email":"daniel.schwierzeck@gmail.com"},"content":"Am 15.09.2017 um 00:05 schrieb Paul Burton:\n> Most architectures currently supported by U-Boot use trivial\n> implementations of map_to_physmem & virt_to_phys which simply cast a\n> physical address to a pointer for use a virtual address & vice-versa.\n> This results in a lot of duplicate implementations of these mapping\n> functions.\n> \n> The set of functions provided by different architectures also differs,\n> with some having implementations of phys_to_virt & others not. A later\n> patch will make use of phys_to_virt in architecture-neutral code, and so\n> requires that it be provided for all architectures.\n> \n> This patch introduces an asm-generic/io.h which provides generic\n> implementations of address mapping functions, allowing the duplication\n> of them between architectures to be removed. Once architectures are\n> converted to make use of this generic header it will also ensure that\n> all of phys_to_virt, virt_to_phys, map_physmem & unmap_physmem are\n> provided. The 2 families of functions differ in that map_physmem may\n> create dynamic mappings whilst phys_to_virt may not & therefore is more\n> limited in scope but doesn't require information such as a length &\n> flags.\n> \n> This patch doesn't convert any architectures to make use of this generic\n> header - later patches in the series will do so.\n> \n> Signed-off-by: Paul Burton <paul.burton@imgtec.com>\n> Cc: Albert Aribaud <albert.u.boot@aribaud.net>\n> Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>\n> Cc: Angelo Dureghello <angelo@sysam.it>\n> Cc: Bin Meng <bmeng.cn@gmail.com>\n> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>\n> Cc: Macpaul Lin <macpaul@andestech.com>\n> Cc: Michal Simek <monstr@monstr.eu>\n> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>\n> Cc: Thomas Chou <thomas@wytron.com.tw>\n> Cc: Wolfgang Denk <wd@denx.de>\n> Acked-by: Angelo Dureghello <angelo@sysam.it>\n> Tested-by: Angelo Dureghello <angelo@sysam.it>\n> Reviewed-by: Simon Glass <sjg@chromium.org>\n> \n\nReviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"JGTHd5uH\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xtnJ76d0vz9t2f\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 17:35:50 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 46C9DC21F26; Fri, 15 Sep 2017 07:35:46 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 4E2D5C21DCB;\n\tFri, 15 Sep 2017 07:35:43 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 01FF6C21DCB; Fri, 15 Sep 2017 07:35:41 +0000 (UTC)","from mail-wm0-f67.google.com (mail-wm0-f67.google.com\n\t[74.125.82.67])\n\tby lists.denx.de (Postfix) with ESMTPS id 70834C21DAA\n\tfor <u-boot@lists.denx.de>; Fri, 15 Sep 2017 07:35:41 +0000 (UTC)","by mail-wm0-f67.google.com with SMTP id i131so2013486wma.1\n\tfor <u-boot@lists.denx.de>; Fri, 15 Sep 2017 00:35:41 -0700 (PDT)","from [192.168.10.30] (p4FCC85E0.dip0.t-ipconnect.de.\n\t[79.204.133.224])\n\tby smtp.gmail.com with ESMTPSA id 69sm413744wmi.0.2017.09.15.00.35.39\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 15 Sep 2017 00:35:39 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:to:references:from:openpgp:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=YeU3R/dpzLOlGrKAeVmh4NwgFHZwQHtjyIOy+1suukg=;\n\tb=JGTHd5uHlfcxuHITIbzfcw1K2n21T5CJDcF0HgCaNRHyZOiDaCcj5Fkg/1XbdwMrwf\n\tWwo9Kc3Y/SrQ3UyD1kHYWeUFqnoRWhjJO2lkEf2M5TEViXXnSdLi2U67pDnQA2yk5JOO\n\tquwXq1SZJwWN9wxvmlIMnq7t9rKUgavDZN8ejdE3Kya3qo7z75ALHwxhx5nO5kupAWws\n\tdXo9KmG4b/IQCEngIoDbd97qZOrQPNscdP770ZknVH+I37aKydupwXgLjtheTxYUkJAs\n\t7UgcoT0rnU9+yHLsn2lrU8gJVxNOWqELyOQnex8H/c/BMV8nqUzxrQC7S4RauwDjm4vx\n\tWkzQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:from:openpgp:message-id\n\t:date:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=YeU3R/dpzLOlGrKAeVmh4NwgFHZwQHtjyIOy+1suukg=;\n\tb=aSE0dHB9qDSqbjd1AOJdd44lI/7pdcg0/U+CS5nL/vA6ZBHi32K0PklMJi8wImxutQ\n\tDPdBFxpV3sNGnoT+xUO/BKwBnA4fAh4LBsGhvRtvL6qDPgUcfdc3XPpTMP3brgNcJNbZ\n\tF5KQ/RDEzFC2RItxJcFNqU83vgrLBUqvSZXK6zQBGSwTbTP1sgBiF+OgJ0k0TgkEoBxO\n\t+6kcqS6/R4/kROkkLGi3+SahUONz3ilyz6iUQvzHnq94TmIvICF7z8C9H8HEnsAxT34E\n\tdmmHrrKn+hN34gNrNOGdnMfEZjeGQxagCTXoMX7VZ47OAdGOKERP1QuAMxfhj1LvbXzR\n\to+7A==","X-Gm-Message-State":"AHPjjUjbvGV3bn8v+FZRr5ztwbvPfPHpq/nDldG+ip4aLI08+VJPyNEP\n\tkVgt47t6wuVQ/w==","X-Google-Smtp-Source":"AOwi7QDPZwzATyGliAl2I3H0LSiEskLagO2/OwvWax57iS8PqHKXMm4W5LyIkUyXoS551LaWTptJag==","X-Received":"by 10.28.193.5 with SMTP id r5mr2037713wmf.153.1505460940921;\n\tFri, 15 Sep 2017 00:35:40 -0700 (PDT)","To":"Paul Burton <paul.burton@imgtec.com>, u-boot@lists.denx.de","References":"<20170914220513.9359-1-paul.burton@imgtec.com>\n\t<20170914220513.9359-2-paul.burton@imgtec.com>","From":"Daniel Schwierzeck <daniel.schwierzeck@gmail.com>","Openpgp":"id=8C4E22B0E9754D7137265F81A90C48903C7DBE56","Message-ID":"<f5e68e73-40a8-b78d-d607-1cd4f5da8154@gmail.com>","Date":"Fri, 15 Sep 2017 09:35:38 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170914220513.9359-2-paul.burton@imgtec.com>","Content-Language":"en-GB","Subject":"Re: [U-Boot] [PATCH v2 01/13] Provide a generic io.h & address\n\tmapping functions","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1778940,"web_url":"http://patchwork.ozlabs.org/comment/1778940/","msgid":"<20171003125219.GM22973@bill-the-cat>","list_archive_url":null,"date":"2017-10-03T12:52:19","subject":"Re: [U-Boot] [U-Boot, v2,\n\t01/13] Provide a generic io.h & address mapping functions","submitter":{"id":65875,"url":"http://patchwork.ozlabs.org/api/people/65875/","name":"Tom Rini","email":"trini@konsulko.com"},"content":"On Thu, Sep 14, 2017 at 03:05:01PM -0700, Paul Burton wrote:\n\n> Most architectures currently supported by U-Boot use trivial\n> implementations of map_to_physmem & virt_to_phys which simply cast a\n> physical address to a pointer for use a virtual address & vice-versa.\n> This results in a lot of duplicate implementations of these mapping\n> functions.\n> \n> The set of functions provided by different architectures also differs,\n> with some having implementations of phys_to_virt & others not. A later\n> patch will make use of phys_to_virt in architecture-neutral code, and so\n> requires that it be provided for all architectures.\n> \n> This patch introduces an asm-generic/io.h which provides generic\n> implementations of address mapping functions, allowing the duplication\n> of them between architectures to be removed. Once architectures are\n> converted to make use of this generic header it will also ensure that\n> all of phys_to_virt, virt_to_phys, map_physmem & unmap_physmem are\n> provided. The 2 families of functions differ in that map_physmem may\n> create dynamic mappings whilst phys_to_virt may not & therefore is more\n> limited in scope but doesn't require information such as a length &\n> flags.\n> \n> This patch doesn't convert any architectures to make use of this generic\n> header - later patches in the series will do so.\n> \n> Signed-off-by: Paul Burton <paul.burton@imgtec.com>\n> Cc: Albert Aribaud <albert.u.boot@aribaud.net>\n> Cc: Alexey Brodkin <alexey.brodkin@synopsys.com>\n> Cc: Angelo Dureghello <angelo@sysam.it>\n> Cc: Bin Meng <bmeng.cn@gmail.com>\n> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>\n> Cc: Macpaul Lin <macpaul@andestech.com>\n> Cc: Michal Simek <monstr@monstr.eu>\n> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>\n> Cc: Thomas Chou <thomas@wytron.com.tw>\n> Cc: Wolfgang Denk <wd@denx.de>\n> Acked-by: Angelo Dureghello <angelo@sysam.it>\n> Tested-by: Angelo Dureghello <angelo@sysam.it>\n> Reviewed-by: Simon Glass <sjg@chromium.org>\n> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>\n\nApplied to u-boot/master, thanks!","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=konsulko.com header.i=@konsulko.com\n\theader.b=\"O5pl+wm9\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3y5zjJ1BBmz9s03\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed,  4 Oct 2017 00:03:00 +1100 (AEDT)","by lists.denx.de (Postfix, from userid 105)\n\tid E25B6C21F61; Tue,  3 Oct 2017 12:54:52 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id C5BCFC21F35;\n\tTue,  3 Oct 2017 12:54:17 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 37259C21E3D; Tue,  3 Oct 2017 12:52:29 +0000 (UTC)","from mail-qt0-f179.google.com (mail-qt0-f179.google.com\n\t[209.85.216.179])\n\tby lists.denx.de (Postfix) with ESMTPS id 66E16C21D63\n\tfor <u-boot@lists.denx.de>; Tue,  3 Oct 2017 12:52:23 +0000 (UTC)","by mail-qt0-f179.google.com with SMTP id 6so3648950qtw.3\n\tfor <u-boot@lists.denx.de>; Tue, 03 Oct 2017 05:52:23 -0700 (PDT)","from bill-the-cat ([2606:a000:1401:811b:cc53:5bbf:ba3c:c35])\n\tby smtp.gmail.com with ESMTPSA id\n\tz77sm5317901ywd.31.2017.10.03.05.52.21\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 03 Oct 2017 05:52:21 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no\n\tversion=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com;\n\ts=google; \n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=bK2XeKslaoYcPajrtZSnah1VTKwIi6Va13PuzJgOMNM=;\n\tb=O5pl+wm9POVt6PnaDCOvw4siMSGZzFUHvbcp7kkPympyEsDBJmOvR0kwp2xlhDBiZd\n\torOrsoVOBQDd7a4GUrHQDJNGtwcF4HW74E0nMIFLPGsl+LhSjawPgGec+OfBUZoppx+i\n\t1q9oQRaqT9N3ek79VF0vGjshhvv9rpQuQPK2M=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=bK2XeKslaoYcPajrtZSnah1VTKwIi6Va13PuzJgOMNM=;\n\tb=pa2zI4DY7A5N/NZsNF580T/09W5nMbeKYlBDdbKQ5JnxX0W/5+OW8LCqpJD8S9qOE0\n\t9JbBMaN0f39TpgoJCGmgCuqxkJf6j7Uc40djjGwN8ksuDF1tn/faey1UkngPqbA8T4Vy\n\tYQ08+eq9AQpQMblpnNtuiy1nnzdyYZxrEhtcQzWUzNHxNEgbsWwJl4vq/kr83Q4rjmME\n\t1V7d3puHM6Gv7QxZkw4Yeo+7xJUamDa3n927cVwP5nFsjZvxa8blFuY7lfpbUu6uo/K2\n\t5e32gXKuiNdjCGTa3U40+1eKSH+vjkjncVbI7TqJK7xo4czB6Y1woYid2daGmO6Z5APp\n\tPc+A==","X-Gm-Message-State":"AMCzsaXtA9Jh2BUgDjZG3Gr9/rXQ7avoawJU213fjzoYvs0tWUiJy7Rh\n\t/7oJYQNdzD/muVtmyZocqyYr7w==","X-Google-Smtp-Source":"AOwi7QDiBFNNOJPfRK+7PyR+smSSPyULG7sS5wVvMhh7q6UjtOF7lRbKI/YV2X1DW7V0CTlyInsKhQ==","X-Received":"by 10.37.27.8 with SMTP id b8mr1203462ybb.471.1507035142262;\n\tTue, 03 Oct 2017 05:52:22 -0700 (PDT)","Date":"Tue, 3 Oct 2017 08:52:19 -0400","From":"Tom Rini <trini@konsulko.com>","To":"Paul Burton <paul.burton@imgtec.com>","Message-ID":"<20171003125219.GM22973@bill-the-cat>","References":"<20170914220513.9359-2-paul.burton@imgtec.com>","MIME-Version":"1.0","In-Reply-To":"<20170914220513.9359-2-paul.burton@imgtec.com>","User-Agent":"Mutt/1.5.24 (2015-08-30)","Cc":"u-boot@lists.denx.de, Angelo Dureghello <angelo@sysam.it>,\n\tAlexey Brodkin <alexey.brodkin@synopsys.com>,\n\tMacpaul Lin <macpaul@andestech.com>","Subject":"Re: [U-Boot] [U-Boot, v2,\n\t01/13] Provide a generic io.h & address mapping functions","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"multipart/mixed;\n\tboundary=\"===============0689563961300582201==\"","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]