* Memory Management HAndling
@ 2005-03-11 5:25 Rishabh
2005-03-11 5:25 ` Rishabh
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Rishabh @ 2005-03-11 5:25 UTC (permalink / raw)
To: linux-mips
[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]
Hi,
I have been working on MMU of Linux Port of 2.4.20 kernel for MIPS Port.
I have found that MACROS like
#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
These macros can handle memory pages in KSEG0. Any suggestions on how
can they be changed for addressing memory present in HIGHMEM. Since VA
will not be in linear relation with mem_map.
Rishabh Kumar Goel
Software Engineer
SoCrates Software India Pvt. Ltd.
a TOSHIBA Group Company
#10, Industrial Layout,
Prestige Atlanta,
III Block, Koramangala,
Bangalore - 560034
Ph. 080-51101669
The information contained in this e-mail message and in any annexure is
confidential to the recipient and may contain privileged information. If you are not
the intended recipient, please notify the sender and delete the message along with
any annexure. You should not disclose, copy or otherwise use the information contained
in the message or any annexure. Any views expressed in this e-mail are those of the
individual sender except where the sender specifically states them to be the views of
SoCrates Software India Pvt Ltd., Bangalore.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Rishabh Kumar Goel.vcf --]
[-- Type: text/x-vcard; name="Rishabh Kumar Goel.vcf", Size: 544 bytes --]
BEGIN:VCARD
VERSION:2.1
N:Goel;Rishabh Kumar
FN:Rishabh Kumar Goel
ORG:Socrates Software India Pvt Ltd.;OS & DD
TITLE:SE
TEL;WORK;VOICE:51101669 Ext:2669
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;Socrates Software India Pvt. Ltd.;10 Bride Street, =0D=0ALangford Town;Bang=
alore;Karnataka;560025;INDIA
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Socrates Software India Pvt. Ltd.=0D=0A10 Bride Street, =0D=0ALangford Town=
=0D=0ABangalore, Karnataka 560025=0D=0AINDIA
EMAIL;PREF;INTERNET:Rishabh@soc-soft.com
REV:20050217T060842Z
END:VCARD
^ permalink raw reply [flat|nested] 7+ messages in thread* Memory Management HAndling
2005-03-11 5:25 Memory Management HAndling Rishabh
@ 2005-03-11 5:25 ` Rishabh
2005-03-11 13:36 ` Alan Cox
2005-03-11 15:58 ` Ralf Baechle
2 siblings, 0 replies; 7+ messages in thread
From: Rishabh @ 2005-03-11 5:25 UTC (permalink / raw)
To: linux-mips
[-- Attachment #1: Type: text/plain, Size: 1266 bytes --]
Hi,
I have been working on MMU of Linux Port of 2.4.20 kernel for MIPS Port.
I have found that MACROS like
#define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
#define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
These macros can handle memory pages in KSEG0. Any suggestions on how
can they be changed for addressing memory present in HIGHMEM. Since VA
will not be in linear relation with mem_map.
Rishabh Kumar Goel
Software Engineer
SoCrates Software India Pvt. Ltd.
a TOSHIBA Group Company
#10, Industrial Layout,
Prestige Atlanta,
III Block, Koramangala,
Bangalore - 560034
Ph. 080-51101669
The information contained in this e-mail message and in any annexure is
confidential to the recipient and may contain privileged information. If you are not
the intended recipient, please notify the sender and delete the message along with
any annexure. You should not disclose, copy or otherwise use the information contained
in the message or any annexure. Any views expressed in this e-mail are those of the
individual sender except where the sender specifically states them to be the views of
SoCrates Software India Pvt Ltd., Bangalore.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Rishabh Kumar Goel.vcf --]
[-- Type: text/x-vcard; name="Rishabh Kumar Goel.vcf", Size: 544 bytes --]
BEGIN:VCARD
VERSION:2.1
N:Goel;Rishabh Kumar
FN:Rishabh Kumar Goel
ORG:Socrates Software India Pvt Ltd.;OS & DD
TITLE:SE
TEL;WORK;VOICE:51101669 Ext:2669
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;Socrates Software India Pvt. Ltd.;10 Bride Street, =0D=0ALangford Town;Bang=
alore;Karnataka;560025;INDIA
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Socrates Software India Pvt. Ltd.=0D=0A10 Bride Street, =0D=0ALangford Town=
=0D=0ABangalore, Karnataka 560025=0D=0AINDIA
EMAIL;PREF;INTERNET:Rishabh@soc-soft.com
REV:20050217T060842Z
END:VCARD
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Memory Management HAndling
2005-03-11 5:25 Memory Management HAndling Rishabh
2005-03-11 5:25 ` Rishabh
@ 2005-03-11 13:36 ` Alan Cox
2005-03-11 15:59 ` Ralf Baechle
2005-03-11 15:58 ` Ralf Baechle
2 siblings, 1 reply; 7+ messages in thread
From: Alan Cox @ 2005-03-11 13:36 UTC (permalink / raw)
To: Rishabh; +Cc: linux-mips
On Gwe, 2005-03-11 at 05:25, Rishabh@soc-soft.com wrote:
> These macros can handle memory pages in KSEG0. Any suggestions on how
> can they be changed for addressing memory present in HIGHMEM. Since VA
> will not be in linear relation with mem_map.
Take a look at how kmap() works on x86 and how the mappings are used.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Memory Management HAndling
2005-03-11 13:36 ` Alan Cox
@ 2005-03-11 15:59 ` Ralf Baechle
2005-03-11 17:06 ` Manish Lachwani
0 siblings, 1 reply; 7+ messages in thread
From: Ralf Baechle @ 2005-03-11 15:59 UTC (permalink / raw)
To: Alan Cox; +Cc: Rishabh, linux-mips
On Fri, Mar 11, 2005 at 01:36:31PM +0000, Alan Cox wrote:
> On Gwe, 2005-03-11 at 05:25, Rishabh@soc-soft.com wrote:
> > These macros can handle memory pages in KSEG0. Any suggestions on how
> > can they be changed for addressing memory present in HIGHMEM. Since VA
> > will not be in linear relation with mem_map.
>
> Take a look at how kmap() works on x86 and how the mappings are used.
Highmem is supported for MIPS since ~ 2.4.18 or so.
Ralf
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Memory Management HAndling
2005-03-11 15:59 ` Ralf Baechle
@ 2005-03-11 17:06 ` Manish Lachwani
2005-03-11 17:22 ` Ralf Baechle
0 siblings, 1 reply; 7+ messages in thread
From: Manish Lachwani @ 2005-03-11 17:06 UTC (permalink / raw)
To: Ralf Baechle; +Cc: Alan Cox, Rishabh, linux-mips
Ralf Baechle wrote:
>On Fri, Mar 11, 2005 at 01:36:31PM +0000, Alan Cox wrote:
>
>
>
>>On Gwe, 2005-03-11 at 05:25, Rishabh@soc-soft.com wrote:
>>
>>
>>>These macros can handle memory pages in KSEG0. Any suggestions on how
>>>can they be changed for addressing memory present in HIGHMEM. Since VA
>>>will not be in linear relation with mem_map.
>>>
>>>
>>Take a look at how kmap() works on x86 and how the mappings are used.
>>
>>
>
>Highmem is supported for MIPS since ~ 2.4.18 or so.
>
> Ralf
>
>
>
Right, I had the 2.4.21 HIGHMEM working on PMC-Sierra Yosemite. Also, at
that time, Sibyte supported HIGHMEM.
Thanks
Manish Lachwani
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Memory Management HAndling
2005-03-11 5:25 Memory Management HAndling Rishabh
2005-03-11 5:25 ` Rishabh
2005-03-11 13:36 ` Alan Cox
@ 2005-03-11 15:58 ` Ralf Baechle
2 siblings, 0 replies; 7+ messages in thread
From: Ralf Baechle @ 2005-03-11 15:58 UTC (permalink / raw)
To: Rishabh; +Cc: linux-mips
On Fri, Mar 11, 2005 at 10:55:43AM +0530, Rishabh@soc-soft.com wrote:
> I have been working on MMU of Linux Port of 2.4.20 kernel for MIPS Port.
You may want to change to a kernel that has less than 52 months worth of
bugs and security holes.
> I have found that MACROS like
>
> #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET)
> #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET))
> #define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
>
>
> These macros can handle memory pages in KSEG0. Any suggestions on how
> can they be changed for addressing memory present in HIGHMEM. Since VA
> will not be in linear relation with mem_map.
That's normal for highmem. These macros will only work for lowmem.
Ralf
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-03-11 17:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-11 5:25 Memory Management HAndling Rishabh
2005-03-11 5:25 ` Rishabh
2005-03-11 13:36 ` Alan Cox
2005-03-11 15:59 ` Ralf Baechle
2005-03-11 17:06 ` Manish Lachwani
2005-03-11 17:22 ` Ralf Baechle
2005-03-11 15:58 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox