Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4596684imu; Tue, 29 Jan 2019 04:25:17 -0800 (PST) X-Google-Smtp-Source: ALg8bN60G8C9342moTzF2BcdjjI4WZN5khdr2+aKJU1mU0uGKq9GG/o3wHcla2DLLGY3NNkOlnFl X-Received: by 2002:a63:94:: with SMTP id 142mr22994109pga.74.1548764717784; Tue, 29 Jan 2019 04:25:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548764717; cv=none; d=google.com; s=arc-20160816; b=iwGhnY1bXGEuGLSw7n4tGXDwRBlxXNWrb1YDEJb4gLpums+vcLg19NmAbjYAZtbkJZ admSC05b5ycO3xfCeY2dtZZaJWMO0A1BIF+/+BJIvEFnY6DeessAc/8qnxdIopm72yuj 3dI4uB4HenGWmoVSrq+D9hIm2Ir7gF6nW1sV+zuwkWylFxauzVQcJz9+MZIz3ZWz8/vc fbkQgwA+cvs57P8eAm8gQaCms3VBCbsXz3WXGtNAisoOkGS8dX7IFD9BSL1aJiZ9c2Fm EWvGve7m4V3tRZe9Q44mgxAKS7Xlg4XDdl/MQmJQI3Jl4mxpp69rkim1TaeTj1bN0GVk pRXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=GaMRrOITedjUuvzDNi47Wdi1f6Q+OBA37Sz9CN8Tzvg=; b=T01T/VGV3xRXb+6FYbHD+Jx3NdBuSaytbI2nBIZmk2wyTYTkSEOo1Nyvp497nKo6Qp ukVZ2e9/i0tdwFSJURe68nMsTtdpHkNAFkyhD89exxbaz4MWMbTWHPGLjd/UIWkiZ/Hz A0+Tks6rv+rEGwcr3vyOvwSyt6zo+Ycf3D8fWvMQyS0Uk8cWKFZeymeElzvmG9Y+7xz/ SBC1iwhnJco36ja8qGXEj/8vgrlsfRq7RbS+cqiO8UcwwlLq/BETcE+9UnngLafOo7Dj v5l5kPZAuqgmBUggLG9FCf7gOSiX6OhdX1pNTTl0l5iQSprXkZHQTMtdcz/Bx17/xI0T x/MQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=otqx39PE; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v185si4982361pfb.65.2019.01.29.04.25.01; Tue, 29 Jan 2019 04:25:17 -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=@kernel.org header.s=default header.b=otqx39PE; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728727AbfA2MYw (ORCPT + 99 others); Tue, 29 Jan 2019 07:24:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:35766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727593AbfA2MYv (ORCPT ); Tue, 29 Jan 2019 07:24:51 -0500 Received: from localhost.localdomain (unknown [60.186.218.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8D43820870; Tue, 29 Jan 2019 12:24:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548764690; bh=YHyF8g71Qi4NVNMhmCLc3E+MIekNiLMLzpdE4G7qD3w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=otqx39PE03e3RAUJ43EyUOBM8jcvSXmZH5Ux9FY7tz6GPnEK0zAM5cyahp1D+wNpr mEH24iCAdKPS0664O3njSexuaeR99CD3WBooZLIc//7z1pMFbqnb1p1YTPfC4ffCyy zlXue6Yfd1MOvwT6Ip2vK0y2cSd0X8i/vR15QxQ8= From: guoren@kernel.org To: arnd@arndb.de, robh+dt@kernel.org, marc.zyngier@arm.com Cc: linux-kernel@vger.kernel.org, guoren@kernel.org, linux-arch@vger.kernel.org, Guo Ren Subject: [PATCH 03/10] csky: Fixup _PAGE_GLOBAL bit for 610 tlb entry Date: Tue, 29 Jan 2019 20:24:22 +0800 Message-Id: <1548764669-16656-3-git-send-email-guoren@kernel.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548764669-16656-1-git-send-email-guoren@kernel.org> References: <1548764669-16656-1-git-send-email-guoren@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guo Ren C-SKY CPU 8xx's _PAGE_GLOBAL is BIT(0), but 610's _PAGE_GLOBAL is BIT(6). Use _PAGE_GLOBAL macro instead of bad magic number. Signed-off-by: Guo Ren --- arch/csky/include/asm/pgtable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/csky/include/asm/pgtable.h b/arch/csky/include/asm/pgtable.h index edfcbb2..af7a7fa 100644 --- a/arch/csky/include/asm/pgtable.h +++ b/arch/csky/include/asm/pgtable.h @@ -45,8 +45,8 @@ ((pte_t *)page_address(pmd_page(*(dir))) + __pte_offset_t(address)) #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) #define pte_clear(mm, addr, ptep) set_pte((ptep), \ - (((unsigned int)addr&0x80000000)?__pte(1):__pte(0))) -#define pte_none(pte) (!(pte_val(pte)&0xfffffffe)) + (((unsigned int) addr & PAGE_OFFSET) ? __pte(_PAGE_GLOBAL) : __pte(0))) +#define pte_none(pte) (!(pte_val(pte) & ~_PAGE_GLOBAL)) #define pte_present(pte) (pte_val(pte) & _PAGE_PRESENT) #define pte_pfn(x) ((unsigned long)((x).pte_low >> PAGE_SHIFT)) #define pfn_pte(pfn, prot) __pte(((unsigned long long)(pfn) << PAGE_SHIFT) \ -- 2.7.4