linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: pte_val(*pte) as lvalue
       [not found] <9LUWoC.A.W3G.sIQQ7@dinero.interactivesi.com.suse.lists.linux.kernel>
@ 2001-07-02 23:33 ` Andi Kleen
  2001-07-03 19:55   ` eCos Matthew M. DeLoera
  2001-07-03 18:32 ` pte_val(*pte) as lvalue Timur Tabi
  1 sibling, 1 reply; 6+ messages in thread
From: Andi Kleen @ 2001-07-02 23:33 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linux-kernel

Timur Tabi <ttabi@interactivesi.com> writes:

> 
> What is the accepted way to assign an integer to a pte that works in 2.2 and
> 2.4?

set_pte(pte, mk_pte( ... )) 


-Andi


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pte_val(*pte) as lvalue
       [not found] <9LUWoC.A.W3G.sIQQ7@dinero.interactivesi.com.suse.lists.linux.kernel>
  2001-07-02 23:33 ` pte_val(*pte) as lvalue Andi Kleen
@ 2001-07-03 18:32 ` Timur Tabi
  2001-07-03 18:43   ` Russell King
  1 sibling, 1 reply; 6+ messages in thread
From: Timur Tabi @ 2001-07-03 18:32 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel

** Reply to message from Andi Kleen <ak@suse.de> on 03 Jul 2001 01:33:42 +0200

> Timur Tabi <ttabi@interactivesi.com> writes:
> 
> > 
> > What is the accepted way to assign an integer to a pte that works in 2.2 and
> > 2.4?
> 
> set_pte(pte, mk_pte( ... )) 

I'm not sure how to use mk_pte.  The first parameter is a struct page *, which
I don't have.  All I'm doing is modifying the PTE value.  I don't want to "make"
another one.


-- 
Timur Tabi - ttabi@interactivesi.com
Interactive Silicon - http://www.interactivesi.com


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pte_val(*pte) as lvalue
  2001-07-03 18:32 ` pte_val(*pte) as lvalue Timur Tabi
@ 2001-07-03 18:43   ` Russell King
  2001-07-03 18:50     ` Timur Tabi
  0 siblings, 1 reply; 6+ messages in thread
From: Russell King @ 2001-07-03 18:43 UTC (permalink / raw)
  To: Timur Tabi; +Cc: Andi Kleen, linux-kernel

On Tue, Jul 03, 2001 at 01:32:36PM -0500, Timur Tabi wrote:
> ** Reply to message from Andi Kleen <ak@suse.de> on 03 Jul 2001 01:33:42 +0200
> > set_pte(pte, mk_pte( ... )) 
> 
> I'm not sure how to use mk_pte.  The first parameter is a struct page *,
> which I don't have.  All I'm doing is modifying the PTE value.  I don't
> want to "make" another one.

set_pte is the only way you can guarantee that the architecture
implementation gets to do what it needs to do with the PTE value
before stuffing it into the PTE tables.

Can I ask what the nature of the PTE modification is, and where you
are making this modification?

--
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pte_val(*pte) as lvalue
  2001-07-03 18:43   ` Russell King
@ 2001-07-03 18:50     ` Timur Tabi
  2001-07-03 19:11       ` Russell King
  0 siblings, 1 reply; 6+ messages in thread
From: Timur Tabi @ 2001-07-03 18:50 UTC (permalink / raw)
  To: linux-kernel

Russell King wrote:

>Can I ask what the nature of the PTE modification is, and where you
>are making this modification?
>
I've written a hack which enables PAT (Page Address Translation) for a 
particular page:

void set_pte_pat(pte_t *pte, unsigned long pat_index)
{
    unsigned long p = pte_val(*pte);

    p &= ~(_PAGE_PROTNONE | _PAGE_PCD | _PAGE_PWT);    // zero-out the 
relevant bits

    if (pat_index & 4)
    p |= _PAGE_PROTNONE;

    if (pat_index & 2)
    p |= _PAGE_PCD;

    if (pat_index & 1)
    p |= _PAGE_PWT;

#if CONFIG_X86_PAE
    pte->pte_high = 0;
    pte->pte_low = p;
#else
    pte_val(*pte) = p;
#endif

-- 
Timur Tabi
Interactive Silicon




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: pte_val(*pte) as lvalue
  2001-07-03 18:50     ` Timur Tabi
@ 2001-07-03 19:11       ` Russell King
  0 siblings, 0 replies; 6+ messages in thread
From: Russell King @ 2001-07-03 19:11 UTC (permalink / raw)
  To: Timur Tabi; +Cc: linux-kernel

On Tue, Jul 03, 2001 at 01:50:05PM -0500, Timur Tabi wrote:
> Russell King wrote:
> >Can I ask what the nature of the PTE modification is, and where you
> >are making this modification?
> >
> I've written a hack which enables PAT (Page Address Translation) for a 
> particular page:

Firstly, I'll say I'm no x86 expert by any means.  However, it may be
better to extend the pte bit handling functions in
include/asm-i386/pgtable.h to include the bits you need to handle.
(eg, see how pte_mkwrite and pte_wrprotect are implemented.)  This is
probably the cleanest way of handling these bits.

--
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* eCos
  2001-07-02 23:33 ` pte_val(*pte) as lvalue Andi Kleen
@ 2001-07-03 19:55   ` Matthew M. DeLoera
  0 siblings, 0 replies; 6+ messages in thread
From: Matthew M. DeLoera @ 2001-07-03 19:55 UTC (permalink / raw)
  To: linux-kernel

Does anyone on the list use eCos (RedHat's embedded Linux)?

I'm having some build and other general problems, and I'd like to ask
someone about them off-list.

Thanks...
- Matt

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-07-03 19:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <9LUWoC.A.W3G.sIQQ7@dinero.interactivesi.com.suse.lists.linux.kernel>
2001-07-02 23:33 ` pte_val(*pte) as lvalue Andi Kleen
2001-07-03 19:55   ` eCos Matthew M. DeLoera
2001-07-03 18:32 ` pte_val(*pte) as lvalue Timur Tabi
2001-07-03 18:43   ` Russell King
2001-07-03 18:50     ` Timur Tabi
2001-07-03 19:11       ` Russell King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).