Received: by 10.223.164.202 with SMTP id h10csp1240114wrb; Wed, 8 Nov 2017 00:48:02 -0800 (PST) X-Google-Smtp-Source: ABhQp+QVeLHFzyYQKNMJnR6bM2k7M6BUdkeFhNdCd+oQatvSDmgLs0OaeUP/s2fxQOx5ljvMdgQL X-Received: by 10.101.64.133 with SMTP id t5mr1559597pgp.299.1510130882164; Wed, 08 Nov 2017 00:48:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510130882; cv=none; d=google.com; s=arc-20160816; b=O3geK0baoBk7l2AGl7B7RKE4SxK5KHLujKsfyZ33t2h1kmbjG3tJ7pJ7sWNbRaapCp ozhx88YztD2ztWgIhFuXjbdAm5SmVo+iT8z/EFmWtGg7oVyIhJvKGdQ4g5Idn3ga5ZCF IJLEdWFtTb11oaZhj893VsMbCMpAUvRrgTCbV4UJpMtrS6f6n8nwRvKYCH5XRisFq2BT h90HkE+C48ZR6DfNOAhlhCbAQyRF6h6HMkS8PBWscDu88vIdY7PHJkPjiURdMpUsfcOY w2pDw8Ux6uPXCulMT9zvXSa79tot39A8Pf7PH/qod7IkphbjmhslO/LA+419L2TTu3+E FWuw== 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 :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=78pINz+4uRSPJnfULIwIv3csWj4ZtszLk90NpL7vXaM=; b=yGF4PDG9Zek7vXcr3J4QoMlimLKSYbXdAXSmYbZqN5xMAltOnH8nV8qqTeVGjpoZnM A++1HZOms/Lbkh9bl1GzuP09T7ofo/C0wfSBIdMF43Kb22fG6/pUO2hoeKx0BvAaiQss jQ9675ewv4e53gzoSzcfD4QbqeyWpphj0WcxeNBwhhJEfVGzfemjnPGiB/lQHRM9ASbp mGY+VKwdXk4bJkhcuZZDBTwmZPUT4XOI7XwoayaP5uDum1oyItOjLV2vnI1FT0A4jFT8 j5i9Kk6v3sYOhUDTKKxoqtSFKIbKeb6zm/+x/3LeCqw+hq/6u2wzadbY7rolZF+qJ6xz F/Gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uhquns2I; 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=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w20si3427575plp.471.2017.11.08.00.47.49; Wed, 08 Nov 2017 00:48:02 -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=@gmail.com header.s=20161025 header.b=uhquns2I; 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=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751575AbdKHIrK (ORCPT + 91 others); Wed, 8 Nov 2017 03:47:10 -0500 Received: from mail-vk0-f67.google.com ([209.85.213.67]:43615 "EHLO mail-vk0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750760AbdKHIrH (ORCPT ); Wed, 8 Nov 2017 03:47:07 -0500 Received: by mail-vk0-f67.google.com with SMTP id o145so1244371vkd.0; Wed, 08 Nov 2017 00:47:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=78pINz+4uRSPJnfULIwIv3csWj4ZtszLk90NpL7vXaM=; b=uhquns2Iu7W0ZiuevgWgUjOHsgIbloJM3cSrazf7XOuDt+Yd10MJTXWDp1zB+i53aH YafolCf9OV7eWUH7p+jykeCiMmlfmY23CpyYR1PQL7pg7iQR+cUeEDZa6zAgOE+xgAmB UTMpYIIjXDI8l/9Cx9lRy9LzehCYky2ID+pYXpEMfhF0Poss/BqUuB1gkL9xsiMGyHSX 9rNktiy+sB6rMdK/l3W9a6/n43jh3ezuECpNiSatIKAlmwlsvxEdIJcFkukjPyh1aHfm EPijfMot2EaP3eX23NiCplSzjNIUuuROjIRqmtuA2TqMO6yaZhaH0krfBibSFHkFXIVQ w9gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=78pINz+4uRSPJnfULIwIv3csWj4ZtszLk90NpL7vXaM=; b=NqMB1EwfrX1G597sNaM0BTIy/CRVr65mi+5oKZ5S7KKbmh/2QlERjgJg72qMGbPAm5 /ktigW+AQj0Adw2j6nYZsvN6JNmv500iEU1ADAlXSvzR3Af0UjG6vkeeEFzOj399Fi3X c7YsaMlhuACryMTWwXiYseFbhn3qpc4ZS+RB2K0GZceYw/c3XOvrInYl39hWvq56VEma R2Zn38qNroG/aSkNDWB+Wt/yZG+tAINH3yx8t8S5/oQOHD01AUyPCQ0IDSfw3NsLVLbO Q87i3bJjqHdR8caiKIUEK+puIMleDE10PG7GLf7ZZJoG/nRFGXd3vKkddt3C3WXNTp18 hghg== X-Gm-Message-State: AJaThX4/Ygwn7wXZwbhkAbrilMYlNe17hzcshFqLsFew2Jw6tfZ3RPzR UB4hUlHpJgG70qBNfimZTxjJgXQLyd84eXhsGyA= X-Received: by 10.31.157.7 with SMTP id g7mr1240785vke.130.1510130826813; Wed, 08 Nov 2017 00:47:06 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.62.8 with HTTP; Wed, 8 Nov 2017 00:46:26 -0800 (PST) In-Reply-To: References: From: Greentime Hu Date: Wed, 8 Nov 2017 16:46:26 +0800 Message-ID: Subject: Re: [PATCH 05/31] nds32: MMU definitions To: Arnd Bergmann Cc: Greentime , Linux Kernel Mailing List , linux-arch , Thomas Gleixner , Jason Cooper , Marc Zyngier , Rob Herring , Networking , Vincent Chen 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 2017-11-08 16:36 GMT+08:00 Arnd Bergmann : > On Wed, Nov 8, 2017 at 6:54 AM, Greentime Hu wrote: > >> +/* >> + * The DMA mask corresponding to the maximum bus address allocatable >> + * using GFP_DMA. The default here places no restriction on DMA >> + * allocations. This must be the smallest DMA mask in the system, >> + * so a successful GFP_DMA allocation will always satisfy this. >> + */ >> +#ifndef ISA_DMA_THRESHOLD >> +#define ISA_DMA_THRESHOLD (0xffffffffULL) >> +#endif > > I see this one only in powerpc, I think it can be removed. Thanks. I will remove it in next version patch. > >> + >> +/* >> + * Optional device DMA address remapping. Do _not_ use directly! >> + * We should really eliminate virt_to_bus() here - it's deprecated. >> + */ >> +#define page_to_dma(dev, page) ((dma_addr_t)__virt_to_phys((unsigned long)page_address(page))) >> +#define dma_to_virt(dev, addr) ((void *)__phys_to_virt(addr)) >> +#define virt_to_dma(dev, addr) ((dma_addr_t)__virt_to_phys((unsigned long)(addr))) > > This looks like an older comment, I think we have eliminated them from the > mainline kernel in all drivers, so you should remove them here too. Thanks. I will remove it in next version patch. >> diff --git a/arch/nds32/include/asm/shmparam.h b/arch/nds32/include/asm/shmparam.h >> new file mode 100644 >> index 0000000..5679648 >> --- /dev/null >> +++ b/arch/nds32/include/asm/shmparam.h > >> + >> +/* >> + * This should be the size of the virtually indexed cache/ways, >> + * whichever is greater since the cache aliases every size/ways >> + * bytes. >> + */ >> +#define SHMLBA (4 * PAGE_SIZE) /* attach addr a multiple of this */ >> +#define REALSHMLBA SHMLBA > > I don't see REALSHMLBA anywhere in the kernel, do you need it? > > For SHMLBA, I think it should be defined as an absolute number, using > the maximum > that you might need for any possible value of PAGE_SIZE. Otherwise user space > has a much harder time figuring out what it should use. Thanks. I will remove REALSHMLBA. I will consider to use 8KB or larger page size in the next version patch. From 1583486353382424213@xxx Wed Nov 08 08:37:45 +0000 2017 X-GM-THRID: 1583483539373154183 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread