* 2.6.12-rc3-mm2: ppc pte_offset_map() [not found] <20050430164303.6538f47c.akpm@osdl.org> @ 2005-05-01 15:08 ` Sean Neakums 2005-05-01 15:50 ` Jesper Juhl 0 siblings, 1 reply; 6+ messages in thread From: Sean Neakums @ 2005-05-01 15:08 UTC (permalink / raw) To: Andrew Morton; +Cc: linuxppc-dev, linux-kernel On my Mackertosh (PowerBook5.4), build fails with the following: fs/proc/task_mmu.c: In function `smaps_pte_range': fs/proc/task_mmu.c:177: warning: implicit declaration of function `kmap_atomic' fs/proc/task_mmu.c:177: error: `KM_PTE0' undeclared (first use in this function) fs/proc/task_mmu.c:177: error: (Each undeclared identifier is reported only once fs/proc/task_mmu.c:177: error: for each function it appears in.) fs/proc/task_mmu.c:207: warning: implicit declaration of function `kunmap_atomic' With the naive patch below, it builds with this warning and everything works. fs/proc/task_mmu.c: In function `smaps_pte_range': fs/proc/task_mmu.c:208: warning: passing arg 1 of `kunmap_atomic' makes pointer from integer without a cast I tried including linux/highmem.h in asm-ppc/pgtable.h (smaps_pte_range() -> pte_offset_map() -> kmap_atomic()), but that doesn't work. --- S12-rc3-mm2/fs/proc/task_mmu.c~ 2005-05-01 15:52:55.000000000 +0100 +++ S12-rc3-mm2/fs/proc/task_mmu.c 2005-05-01 15:23:22.000000000 +0100 @@ -1,4 +1,5 @@ #include <linux/mm.h> +#include <linux/highmem.h> #include <linux/hugetlb.h> #include <linux/mount.h> #include <linux/seq_file.h> -- Dag vijandelijk luchtschip de huismeester is dood ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 2.6.12-rc3-mm2: ppc pte_offset_map() 2005-05-01 15:08 ` 2.6.12-rc3-mm2: ppc pte_offset_map() Sean Neakums @ 2005-05-01 15:50 ` Jesper Juhl 2005-05-01 22:46 ` Andrew Morton 0 siblings, 1 reply; 6+ messages in thread From: Jesper Juhl @ 2005-05-01 15:50 UTC (permalink / raw) To: Sean Neakums; +Cc: Andrew Morton, linuxppc-dev, linux-kernel On Sun, 1 May 2005, Sean Neakums wrote: > On my Mackertosh (PowerBook5.4), build fails with the following: > > fs/proc/task_mmu.c: In function `smaps_pte_range': > fs/proc/task_mmu.c:177: warning: implicit declaration of function `kmap_atomic' > fs/proc/task_mmu.c:177: error: `KM_PTE0' undeclared (first use in this function) > fs/proc/task_mmu.c:177: error: (Each undeclared identifier is reported only once > fs/proc/task_mmu.c:177: error: for each function it appears in.) > fs/proc/task_mmu.c:207: warning: implicit declaration of function `kunmap_atomic' > > With the naive patch below, it builds with this warning and everything works. > > fs/proc/task_mmu.c: In function `smaps_pte_range': > fs/proc/task_mmu.c:208: warning: passing arg 1 of `kunmap_atomic' makes pointer from integer without a cast > Try this patch : Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> --- linux-2.6.12-rc3-mm2-orig/fs/proc/task_mmu.c 2005-05-01 04:04:25.000000000 +0200 +++ linux-2.6.12-rc3-mm2/fs/proc/task_mmu.c 2005-05-01 17:49:14.000000000 +0200 @@ -2,6 +2,7 @@ #include <linux/hugetlb.h> #include <linux/mount.h> #include <linux/seq_file.h> +#include <linux/highmem.h> #include <asm/elf.h> #include <asm/uaccess.h> @@ -204,7 +205,7 @@ static void smaps_pte_range(pmd_t *pmd, } } } while (address < end); - pte_unmap(pte); + pte_unmap((void *)pte); } static void smaps_pmd_range(pud_t *pud, ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 2.6.12-rc3-mm2: ppc pte_offset_map() 2005-05-01 15:50 ` Jesper Juhl @ 2005-05-01 22:46 ` Andrew Morton 2005-05-01 23:01 ` Jesper Juhl 2005-05-02 10:14 ` Hugh Dickins 0 siblings, 2 replies; 6+ messages in thread From: Andrew Morton @ 2005-05-01 22:46 UTC (permalink / raw) To: Jesper Juhl; +Cc: linuxppc-dev, linux-kernel Jesper Juhl <juhl-lkml@dif.dk> wrote: > > On Sun, 1 May 2005, Sean Neakums wrote: > > > On my Mackertosh (PowerBook5.4), build fails with the following: > > > > fs/proc/task_mmu.c: In function `smaps_pte_range': > > fs/proc/task_mmu.c:177: warning: implicit declaration of function `kmap_atomic' > > fs/proc/task_mmu.c:177: error: `KM_PTE0' undeclared (first use in this function) > > fs/proc/task_mmu.c:177: error: (Each undeclared identifier is reported only once > > fs/proc/task_mmu.c:177: error: for each function it appears in.) > > fs/proc/task_mmu.c:207: warning: implicit declaration of function `kunmap_atomic' > > > > With the naive patch below, it builds with this warning and everything works. > > > > fs/proc/task_mmu.c: In function `smaps_pte_range': > > fs/proc/task_mmu.c:208: warning: passing arg 1 of `kunmap_atomic' makes pointer from integer without a cast > > > > Try this patch : > > Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> > > --- linux-2.6.12-rc3-mm2-orig/fs/proc/task_mmu.c 2005-05-01 04:04:25.000000000 +0200 > +++ linux-2.6.12-rc3-mm2/fs/proc/task_mmu.c 2005-05-01 17:49:14.000000000 +0200 > @@ -2,6 +2,7 @@ > #include <linux/hugetlb.h> > #include <linux/mount.h> > #include <linux/seq_file.h> > +#include <linux/highmem.h> > > #include <asm/elf.h> > #include <asm/uaccess.h> > @@ -204,7 +205,7 @@ static void smaps_pte_range(pmd_t *pmd, > } > } > } while (address < end); > - pte_unmap(pte); > + pte_unmap((void *)pte); > } Should be pte_unmap(ptep); ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 2.6.12-rc3-mm2: ppc pte_offset_map() 2005-05-01 22:46 ` Andrew Morton @ 2005-05-01 23:01 ` Jesper Juhl 2005-05-03 22:04 ` cliff white 2005-05-02 10:14 ` Hugh Dickins 1 sibling, 1 reply; 6+ messages in thread From: Jesper Juhl @ 2005-05-01 23:01 UTC (permalink / raw) To: Andrew Morton; +Cc: Rogério Brito, linuxppc-dev, linux-kernel On Sun, 1 May 2005, Andrew Morton wrote: > Jesper Juhl <juhl-lkml@dif.dk> wrote: > > > > On Sun, 1 May 2005, Sean Neakums wrote: > > > > > On my Mackertosh (PowerBook5.4), build fails with the following: > > > > > > fs/proc/task_mmu.c: In function `smaps_pte_range': > > > fs/proc/task_mmu.c:177: warning: implicit declaration of function `kmap_atomic' > > > fs/proc/task_mmu.c:177: error: `KM_PTE0' undeclared (first use in this function) > > > fs/proc/task_mmu.c:177: error: (Each undeclared identifier is reported only once > > > fs/proc/task_mmu.c:177: error: for each function it appears in.) > > > fs/proc/task_mmu.c:207: warning: implicit declaration of function `kunmap_atomic' > > > > > > With the naive patch below, it builds with this warning and everything works. > > > > > > fs/proc/task_mmu.c: In function `smaps_pte_range': > > > fs/proc/task_mmu.c:208: warning: passing arg 1 of `kunmap_atomic' makes pointer from integer without a cast > > > > > > > Try this patch : > > > > Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> > > > > --- linux-2.6.12-rc3-mm2-orig/fs/proc/task_mmu.c 2005-05-01 04:04:25.000000000 +0200 > > +++ linux-2.6.12-rc3-mm2/fs/proc/task_mmu.c 2005-05-01 17:49:14.000000000 +0200 > > @@ -2,6 +2,7 @@ > > #include <linux/hugetlb.h> > > #include <linux/mount.h> > > #include <linux/seq_file.h> > > +#include <linux/highmem.h> > > > > #include <asm/elf.h> > > #include <asm/uaccess.h> > > @@ -204,7 +205,7 @@ static void smaps_pte_range(pmd_t *pmd, > > } > > } > > } while (address < end); > > - pte_unmap(pte); > > + pte_unmap((void *)pte); > > } > > Should be > > pte_unmap(ptep); > Of course, stupid me. I should have seen the [...] ptep = pte_offset_map(pmd, address); [...] pte = *ptep; address += PAGE_SIZE; ptep++; [...] bit a few lines above. Guess I should have spend more than 2min creating the patch. Thanks. Here's an updated patch. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> --- linux-2.6.12-rc3-mm2-orig/fs/proc/task_mmu.c 2005-05-01 04:04:25.000000000 +0200 +++ linux-2.6.12-rc3-mm2/fs/proc/task_mmu.c 2005-05-02 00:59:11.000000000 +0200 @@ -2,6 +2,7 @@ #include <linux/hugetlb.h> #include <linux/mount.h> #include <linux/seq_file.h> +#include <linux/highmem.h> #include <asm/elf.h> #include <asm/uaccess.h> @@ -204,7 +205,7 @@ static void smaps_pte_range(pmd_t *pmd, } } } while (address < end); - pte_unmap(pte); + pte_unmap(ptep); } static void smaps_pmd_range(pud_t *pud, ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 2.6.12-rc3-mm2: ppc pte_offset_map() 2005-05-01 23:01 ` Jesper Juhl @ 2005-05-03 22:04 ` cliff white 0 siblings, 0 replies; 6+ messages in thread From: cliff white @ 2005-05-03 22:04 UTC (permalink / raw) To: Jesper Juhl; +Cc: Andrew Morton, linux-kernel, ério Brito, linuxppc-dev On Mon, 2 May 2005 01:01:11 +0200 (CEST) Jesper Juhl <juhl-lkml@dif.dk> wrote: > On Sun, 1 May 2005, Andrew Morton wrote: > > > Jesper Juhl <juhl-lkml@dif.dk> wrote: > > > > > > On Sun, 1 May 2005, Sean Neakums wrote: > > > > > > > On my Mackertosh (PowerBook5.4), build fails with the following: > > > > > > > > fs/proc/task_mmu.c: In function `smaps_pte_range': > > > > fs/proc/task_mmu.c:177: warning: implicit declaration of function `kmap_atomic' > > > > fs/proc/task_mmu.c:177: error: `KM_PTE0' undeclared (first use in this function) > > > > fs/proc/task_mmu.c:177: error: (Each undeclared identifier is reported only once > > > > fs/proc/task_mmu.c:177: error: for each function it appears in.) > > > > fs/proc/task_mmu.c:207: warning: implicit declaration of function `kunmap_atomic' > > > > > > > > With the naive patch below, it builds with this warning and everything works. > > > > > > > > fs/proc/task_mmu.c: In function `smaps_pte_range': > > > > fs/proc/task_mmu.c:208: warning: passing arg 1 of `kunmap_atomic' makes pointer from integer without a cast > > > > > > > > > > Try this patch : > > > > > > Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> > > > > > > --- linux-2.6.12-rc3-mm2-orig/fs/proc/task_mmu.c 2005-05-01 04:04:25.000000000 +0200 > > > +++ linux-2.6.12-rc3-mm2/fs/proc/task_mmu.c 2005-05-01 17:49:14.000000000 +0200 > > > @@ -2,6 +2,7 @@ > > > #include <linux/hugetlb.h> > > > #include <linux/mount.h> > > > #include <linux/seq_file.h> > > > +#include <linux/highmem.h> > > > > > > #include <asm/elf.h> > > > #include <asm/uaccess.h> > > > @@ -204,7 +205,7 @@ static void smaps_pte_range(pmd_t *pmd, > > > } > > > } > > > } while (address < end); > > > - pte_unmap(pte); > > > + pte_unmap((void *)pte); > > > } > > > > Should be > > > > pte_unmap(ptep); > > > Of course, stupid me. I should have seen the > [...] > ptep = pte_offset_map(pmd, address); > [...] > pte = *ptep; > address += PAGE_SIZE; > ptep++; > [...] > bit a few lines above. Guess I should have spend more than 2min creating > the patch. > > Thanks. > > Here's an updated patch. Works for me on iBook, G4. Compiles fine and boots. No performance info yet. Thanks bunches cliffw > > Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> > > --- linux-2.6.12-rc3-mm2-orig/fs/proc/task_mmu.c 2005-05-01 04:04:25.000000000 +0200 > +++ linux-2.6.12-rc3-mm2/fs/proc/task_mmu.c 2005-05-02 00:59:11.000000000 +0200 > @@ -2,6 +2,7 @@ > #include <linux/hugetlb.h> > #include <linux/mount.h> > #include <linux/seq_file.h> > +#include <linux/highmem.h> > > #include <asm/elf.h> > #include <asm/uaccess.h> > @@ -204,7 +205,7 @@ static void smaps_pte_range(pmd_t *pmd, > } > } > } while (address < end); > - pte_unmap(pte); > + pte_unmap(ptep); > } > > static void smaps_pmd_range(pud_t *pud, > > > - > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > -- "Ive always gone through periods where I bolt upright at four in the morning; now at least theres a reason." -Michael Feldman ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: 2.6.12-rc3-mm2: ppc pte_offset_map() 2005-05-01 22:46 ` Andrew Morton 2005-05-01 23:01 ` Jesper Juhl @ 2005-05-02 10:14 ` Hugh Dickins 1 sibling, 0 replies; 6+ messages in thread From: Hugh Dickins @ 2005-05-02 10:14 UTC (permalink / raw) To: Andrew Morton; +Cc: rbrito, linuxppc-dev, Jesper Juhl, linux-kernel On Sun, 1 May 2005, Andrew Morton wrote: > Jesper Juhl <juhl-lkml@dif.dk> wrote: > > > > --- linux-2.6.12-rc3-mm2-orig/fs/proc/task_mmu.c 2005-05-01 04:04:25.000000000 +0200 > > +++ linux-2.6.12-rc3-mm2/fs/proc/task_mmu.c 2005-05-01 17:49:14.000000000 +0200 > > @@ -2,6 +2,7 @@ > > #include <linux/hugetlb.h> > > #include <linux/mount.h> > > #include <linux/seq_file.h> > > +#include <linux/highmem.h> > > > > #include <asm/elf.h> > > #include <asm/uaccess.h> > > @@ -204,7 +205,7 @@ static void smaps_pte_range(pmd_t *pmd, > > } > > } > > } while (address < end); > > - pte_unmap(pte); > > + pte_unmap((void *)pte); > > } > > Should be > > pte_unmap(ptep); Almost. Should be pte_unmap(ptep - 1); ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-05-03 22:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20050430164303.6538f47c.akpm@osdl.org>
2005-05-01 15:08 ` 2.6.12-rc3-mm2: ppc pte_offset_map() Sean Neakums
2005-05-01 15:50 ` Jesper Juhl
2005-05-01 22:46 ` Andrew Morton
2005-05-01 23:01 ` Jesper Juhl
2005-05-03 22:04 ` cliff white
2005-05-02 10:14 ` Hugh Dickins
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).