[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <977ba565-6fb4-b0b0-b982-fa3ecc478563@synopsys.com>
Date: Mon, 26 Apr 2021 17:16:01 +0000
From: Vineet Gupta <Vineet.Gupta1@...opsys.com>
To: Vladimir Isaev <Vladimir.Isaev@...opsys.com>,
"linux-snps-arc@...ts.infradead.org"
<linux-snps-arc@...ts.infradead.org>
CC: "linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"rppt@...ux.ibm.com" <rppt@...ux.ibm.com>,
Arnd Bergmann <arnd@...nel.org>
Subject: Re: [PATCH] ARC: Use 40-bit physical page mask for PAE
On 4/26/21 9:43 AM, Vladimir Isaev wrote:
> Hi,
>
> On Monday, April 26, 2021 7:30 PM, Vineet Gupta wrote:
>> On 4/26/21 3:08 AM, Vladimir Isaev wrote:
>>
>>> #endif /* _UAPI__ASM_ARC_PAGE_H */
>>> diff --git a/arch/arc/mm/ioremap.c b/arch/arc/mm/ioremap.c
>>> index fac4adc90204..eb109d57d544 100644
>>> --- a/arch/arc/mm/ioremap.c
>>> +++ b/arch/arc/mm/ioremap.c
>>> @@ -71,8 +71,8 @@ void __iomem *ioremap_prot(phys_addr_t paddr,
>> unsigned long size,
>>> prot = pgprot_noncached(prot);
>>>
>>> /* Mappings have to be page-aligned */
>>> - off = paddr & ~PAGE_MASK;
>> This is offset *within* a page so upper bits must not matter. In fact,
>> with this a bogus offset like 0xFF_FFFFFFFF can turn into something
>> weird such as 0xFF_00000000
> I understand, but idea here is to use PHYSICAL_PAGE_MASK/PAGE_MASK_PHYS
> for any phys_addr_t variable without thinking. So if off is actually offset for
> virtual address we can use unsigned long for it.
@off here is for a physical address, but is it intra-page still so
doesn't matter if virtual or phy. Indeed it is a good idea to fix it to
be unsigned int (not long since that is 64-bit attuned)
-Vineet
Powered by blists - more mailing lists