* RE: Problems with mm on Alpha...
[not found] <20020508145454.A2394@jurassic.park.msu.ru>
@ 2002-05-22 10:10 ` Oliver Pitzeier
0 siblings, 0 replies; 2+ messages in thread
From: Oliver Pitzeier @ 2002-05-22 10:10 UTC (permalink / raw)
Cc: axp-kernel-list
Hi Ivan!
Can you remember... You sent me this patch some time ago...
(8th of May as you can see). Now kernel 2.5.17 is ready, but
the problem is still the same. It also was with 2.5.15. Your
patch works fine with 2.5.15/17. But can Andrea or someone please
add it!?
Thanks a lot,
Oliver
PS: This mail also goes to the AXP-Kernel-List. Maybe
someone is interessted!?
> -----Original Message-----
> From: Ivan Kokshaysky [mailto:ink@jurassic.park.msu.ru]
> Sent: Wednesday, May 08, 2002 12:55 PM
> To: Oliver Pitzeier
> Cc: Richard Henderson; 'linux-kernel'
> Subject: Re: Problems with mm on Alpha...
>
>
> On Wed, May 08, 2002 at 11:46:28AM +0200, Oliver Pitzeier wrote:
> > memory.c:80: warning: implicit declaration of function `pte_pfn'
> > memory.c:81: warning: implicit declaration of function `pfn_valid'
> > memory.c:83: warning: implicit declaration of function `pfn_to_page'
>
> New pte/pfn/page macros are defined only for i386 as yet.
> Patch appended. However, CONFIG_DISCONTIGMEM is still broken in 2.5.
> I hope Andrea will take a look into this some day.
>
> Ivan.
>
> --- 2.5.14/include/asm-alpha/page.h Fri May 3 04:22:55 2002
> +++ linux/include/asm-alpha/page.h Tue May 7 13:47:53 2002
> @@ -95,8 +95,12 @@ extern __inline__ int get_order(unsigned
> #define __pa(x) ((unsigned long) (x) -
> PAGE_OFFSET)
> #define __va(x) ((void *)((unsigned
> long) (x) + PAGE_OFFSET))
> #ifndef CONFIG_DISCONTIGMEM
> -#define virt_to_page(kaddr) (mem_map + (__pa(kaddr) >> PAGE_SHIFT))
> -#define VALID_PAGE(page) (((page) - mem_map) < max_mapnr)
> +#define pfn_to_page(pfn) (mem_map + (pfn))
> +#define page_to_pfn(page) ((unsigned long)((page) - mem_map))
> +#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
> +
> +#define pfn_valid(pfn) ((pfn) < max_mapnr)
> +#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr)
> >> PAGE_SHIFT)
> #endif /* CONFIG_DISCONTIGMEM */
>
> #define VM_DATA_DEFAULT_FLAGS (VM_READ |
> VM_WRITE | VM_EXEC | \
> --- 2.5.14/include/asm-alpha/pgtable.h Fri May 3 04:22:46 2002
> +++ linux/include/asm-alpha/pgtable.h Wed May 8 14:44:22 2002
> @@ -179,11 +179,12 @@ extern unsigned long __zero_page(void);
> #endif
> #if defined(CONFIG_ALPHA_GENERIC) || \
> (defined(CONFIG_ALPHA_EV6) && !defined(USE_48_BIT_KSEG))
> -#define PHYS_TWIDDLE(phys) \
> - ((((phys) & 0xc0000000000UL) == 0x40000000000UL) \
> - ? ((phys) ^= 0xc0000000000UL) : (phys))
> +#define KSEG_PFN (0xc0000000000UL >> PAGE_SHIFT)
> +#define PHYS_TWIDDLE(pfn) \
> + ((((pfn) & KSEG_PFN) == (0x40000000000UL >> PAGE_SHIFT)) \
> + ? ((pfn) ^= KSEG_PFN) : (pfn))
> #else
> -#define PHYS_TWIDDLE(phys) (phys)
> +#define PHYS_TWIDDLE(pfn) (pfn)
> #endif
>
> /*
> @@ -199,12 +200,13 @@ extern unsigned long __zero_page(void);
> #endif
>
> #ifndef CONFIG_DISCONTIGMEM
> +#define pte_pfn(pte) (pte_val(pte) >> 32)
> +#define pte_page(pte) pfn_to_page(pte_pfn(pte))
> #define mk_pte(page, pgprot)
> \
> ({
> \
> pte_t pte;
> \
>
> \
> - pte_val(pte) = ((unsigned long)(page - mem_map) << 32)
> | \
> - pgprot_val(pgprot);
> \
> + pte_val(pte) = (page_to_pfn(page) << 32) |
> pgprot_val(pgprot); \
> pte;
> \
> })
> #else
> @@ -221,8 +223,8 @@ extern unsigned long __zero_page(void);
> })
> #endif
>
> -extern inline pte_t mk_pte_phys(unsigned long physpage,
> pgprot_t pgprot)
> -{ pte_t pte; pte_val(pte) = (PHYS_TWIDDLE(physpage) <<
> (32-PAGE_SHIFT)) | pgprot_val(pgprot); return pte; }
> +extern inline pte_t pfn_pte(unsigned long physpfn, pgprot_t pgprot)
> +{ pte_t pte; pte_val(pte) = (PHYS_TWIDDLE(physpfn) << 32) |
> pgprot_val(pgprot); return pte; }
>
> extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
> { pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) |
> pgprot_val(newprot); return pte; }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: Problems with mm on Alpha...
@ 2002-05-22 10:38 Oliver Pitzeier
0 siblings, 0 replies; 2+ messages in thread
From: Oliver Pitzeier @ 2002-05-22 10:38 UTC (permalink / raw)
Cc: axp-kernel-list
Hi Ivan!
I was wrong. The patch doesn't work with 2.5.17...
I get the following error:
[ ... ]
gcc -D__KERNEL__ -I/root/linux-2.5.17/include -Wall -Wstrict-prototypes
-Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
-pipe -mno-fp-regs -ffixed-8 -mcpu=ev5 -Wa,-mev6 -DKBUILD_BASENAME=math
-c -o math.o math.c
math.c: In function `alpha_fp_emul':
math.c:204: warning: right shift count is negative
math.c:204: warning: left shift count >= width of type
math.c:220: warning: left shift count is negative
math.c:238: warning: statement with no effect
math.c:258: warning: right shift count >= width of type
math.c:258: warning: right shift count >= width of type
math.c:262: warning: right shift count >= width of type
math.c:262: warning: right shift count >= width of type
math.c:270: warning: statement with no effect
math.c:270: warning: statement with no effect
math.c:270: warning: statement with no effect
math.c:277: warning: statement with no effect
math.c:277: warning: statement with no effect
math.c:277: warning: statement with no effect
math.c:99: warning: `SR_f' might be used uninitialized in this function
math.c:100: warning: `DR_f' might be used uninitialized in this function
ld -r -o math-emu.o math.o qrnnd.o
make[1]: Leaving directory `/root/linux-2.5.17/arch/alpha/math-emu'
ld -static -T arch/alpha/vmlinux.lds -N arch/alpha/kernel/head.o
init/init.o \
--start-group \
arch/alpha/kernel/kernel.o arch/alpha/mm/mm.o kernel/kernel.o
mm/mm.o fs/fs.o ipc/ipc.o arch/alpha/math-emu/math-emu.o \
/root/linux-2.5.17/arch/alpha/lib/lib.a
/root/linux-2.5.17/lib/lib.a /root/linux-2.5.17/arch/alpha/lib/lib.a \
drivers/pci/driver.o drivers/base/base.o drivers/char/char.o
drivers/block/block.o drivers/misc/misc.o drivers/net/net.o
drivers/media/media.o drivers/ide/idedriver.o drivers/scsi/scsidrv.o
drivers/cdrom/driver.o drivers/pnp/pnp.o drivers/video/video.o \
net/network.o \
--end-group \
-o vmlinux
mm/mm.o: In function `clear_page_tables':
mm/mm.o(.text+0x144): undefined reference to `pte_free_tlb'
mm/mm.o(.text+0x148): undefined reference to `pte_free_tlb'
mm/mm.o(.text+0x170): undefined reference to `pmd_free_tlb'
mm/mm.o(.text+0x174): undefined reference to `pmd_free_tlb'
mm/mm.o: In function `zap_pte_range':
mm/mm.o(.text+0x840): undefined reference to `tlb_remove_tlb_entry'
mm/mm.o(.text+0x844): undefined reference to `tlb_remove_tlb_entry'
mm/mm.o: In function `unmap_page_range':
mm/mm.o(.text+0xae8): undefined reference to `tlb_start_vma'
mm/mm.o(.text+0xaec): undefined reference to `tlb_start_vma'
mm/mm.o(.text+0xb38): undefined reference to `tlb_end_vma'
mm/mm.o(.text+0xb3c): undefined reference to `tlb_end_vma'
mm/mm.o: In function `zap_page_range':
mm/mm.o(.text+0xbf4): undefined reference to `tlb_flush'
mm/mm.o(.text+0xbf8): undefined reference to `tlb_flush'
mm/mm.o: In function `unmap_region':
mm/mm.o(.text+0x4144): undefined reference to `tlb_flush'
mm/mm.o(.text+0x4148): undefined reference to `tlb_flush'
mm/mm.o: In function `exit_mmap':
mm/mm.o(.text+0x4a6c): undefined reference to `tlb_flush'
mm/mm.o(.text+0x4a70): more undefined references to `tlb_flush' follow
make: *** [vmlinux] Error 1
> -----Original Message-----
> From: Oliver Pitzeier [mailto:o.pitzeier@uptime.at]
> Sent: Wednesday, May 22, 2002 12:10 PM
> To: 'Ivan Kokshaysky'
> Cc: 'axp-kernel-list@redhat.com'
> Subject: RE: Problems with mm on Alpha...
>
>
> Hi Ivan!
>
> Can you remember... You sent me this patch some time ago...
> (8th of May as you can see). Now kernel 2.5.17 is ready, but
> the problem is still the same. It also was with 2.5.15. Your
> patch works fine with 2.5.15/17. But can Andrea or someone please
> add it!?
[ ... ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-05-22 10:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20020508145454.A2394@jurassic.park.msu.ru>
2002-05-22 10:10 ` Problems with mm on Alpha Oliver Pitzeier
2002-05-22 10:38 Oliver Pitzeier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox