From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Vladimir Isaev <Vladimir.Isaev@synopsys.com>,
"linux-snps-arc@lists.infradead.org"
<linux-snps-arc@lists.infradead.org>
Cc: "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"rppt@linux.ibm.com" <rppt@linux.ibm.com>,
Arnd Bergmann <arnd@kernel.org>
Subject: Re: [PATCH] ARC: Use 40-bit physical page mask for PAE
Date: Mon, 26 Apr 2021 17:16:01 +0000 [thread overview]
Message-ID: <977ba565-6fb4-b0b0-b982-fa3ecc478563@synopsys.com> (raw)
In-Reply-To: <BY5PR12MB4131E059EA9C630661349A0EDF429@BY5PR12MB4131.namprd12.prod.outlook.com>
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
prev parent reply other threads:[~2021-04-26 17:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 10:08 Vladimir Isaev
2021-04-26 14:39 ` kernel test robot
2021-04-26 16:29 ` Vineet Gupta
2021-04-26 16:43 ` Vladimir Isaev
2021-04-26 17:16 ` Vineet Gupta [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=977ba565-6fb4-b0b0-b982-fa3ecc478563@synopsys.com \
--to=vineet.gupta1@synopsys.com \
--cc=Vladimir.Isaev@synopsys.com \
--cc=arnd@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-snps-arc@lists.infradead.org \
--cc=rppt@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox