All of lore.kernel.org
 help / color / mirror / Atom feed
From: cliff white <cliffw@osdl.org>
To: Jesper Juhl <juhl-lkml@dif.dk>
Cc: "Andrew Morton" <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, "ério Brito" <rbrito@ime.usp.br>,
	linuxppc-dev@ozlabs.org
Subject: Re: 2.6.12-rc3-mm2: ppc pte_offset_map()
Date: Tue, 3 May 2005 15:04:48 -0700	[thread overview]
Message-ID: <20050503150448.651bf748@es175> (raw)
In-Reply-To: <Pine.LNX.4.62.0505020054351.2488@dragon.hyggekrogen.localhost>

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

WARNING: multiple messages have this Message-ID (diff)
From: cliff white <cliffw@osdl.org>
To: Jesper Juhl <juhl-lkml@dif.dk>
Cc: "Andrew Morton" <akpm@osdl.org>,
	sneakums@zork.net, linux-kernel@vger.kernel.org,
	linuxppc-dev@ozlabs.org, "Rogério Brito" <rbrito@ime.usp.br>
Subject: Re: 2.6.12-rc3-mm2: ppc pte_offset_map()
Date: Tue, 3 May 2005 15:04:48 -0700	[thread overview]
Message-ID: <20050503150448.651bf748@es175> (raw)
In-Reply-To: <Pine.LNX.4.62.0505020054351.2488@dragon.hyggekrogen.localhost>

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

  reply	other threads:[~2005-05-03 22:05 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-30 23:43 2.6.12-rc3-mm2 Andrew Morton
2005-05-01  0:27 ` 2.6.12-rc3-mm2 Benoit Boissinot
2005-05-01  0:37   ` 2.6.12-rc3-mm2 Andrew Morton
     [not found]     ` <40f323d00504301753140a7ef4@mail.gmail.com>
2005-05-01  1:12       ` 2.6.12-rc3-mm2 Benoit Boissinot
2005-05-01  2:32 ` 2.6.12-rc3-mm2 - /proc/ide/sr0/model: No such file or directory Jesper Juhl
2005-05-03  3:11   ` Greg KH
2005-05-03  3:18     ` Andrew Morton
2005-05-03  4:48       ` Greg KH
2005-05-03  7:11         ` Bartlomiej Zolnierkiewicz
2005-05-03 18:27           ` Greg KH
2005-05-01  3:30 ` [patch] alternative fix for VFS race (was Re: 2.6.12-rc3-mm2) Nick Piggin
     [not found] ` <20050430164303.6538f47c.akpm-3NddpPZAyC0@public.gmane.org>
2005-05-01 12:56   ` 2.6.12-rc3-mm2: ACPI problems Rafael J. Wysocki
2005-05-01 12:56     ` Rafael J. Wysocki
     [not found]     ` <200505011456.38744.rjw-KKrjLPT3xs0@public.gmane.org>
2005-05-01 13:41       ` Brice Goglin
2005-05-01 13:41         ` Brice Goglin
     [not found]         ` <4274DC95.6080208-vYW+cPY1g1pg9hUCZPvPmw@public.gmane.org>
2005-05-26  7:08           ` Andrew Morton
     [not found]             ` <20050526000800.66c42b6b.akpm-3NddpPZAyC0@public.gmane.org>
2005-05-26  7:22               ` Brice Goglin
2005-05-01 15:07 ` 2.6.12-rc3-mm2 - kswapd0 keeps running Damir Perisa
2005-05-01 22:06   ` Andrew Morton
2005-05-02  6:01     ` Damir Perisa
2005-05-02 15:31       ` Damir Perisa
2005-05-02 18:14         ` Andrew Morton
2005-05-02 21:30           ` Damir Perisa
2005-05-06 18:07           ` Damir Perisa
2005-05-04 19:12   ` Cameron Harris
2005-05-04 21:47     ` Damir Perisa
2005-05-01 15:08 ` 2.6.12-rc3-mm2: ppc pte_offset_map() Sean Neakums
2005-05-01 15:08   ` Sean Neakums
2005-05-01 15:50   ` Jesper Juhl
2005-05-01 15:50     ` Jesper Juhl
2005-05-01 22:46     ` Andrew Morton
2005-05-01 22:46       ` Andrew Morton
2005-05-01 23:01       ` Jesper Juhl
2005-05-01 23:01         ` Jesper Juhl
2005-05-03 22:04         ` cliff white [this message]
2005-05-03 22:04           ` cliff white
2005-05-02 10:14       ` Hugh Dickins
2005-05-02 10:14         ` Hugh Dickins
2005-05-01 22:29 ` 2.6.12-rc3-mm2: fs/proc/task_mmu.c warnings Adrian Bunk
2005-05-02 22:30   ` Mauricio Lin
2005-05-02 23:35     ` Mauricio Lin
2005-05-02 23:45       ` Andrew Morton
2005-05-02 23:56         ` Mauricio Lin
2005-05-03 20:16           ` cliff white
2005-05-03 22:12             ` Mauricio Lin
2005-05-03 18:02         ` Cliff White
2005-05-02  5:07 ` 2.6.12-rc3-mm2 James Cloos
2005-05-02  5:26   ` 2.6.12-rc3-mm2 Andrew Morton
2005-04-30 21:34     ` 2.6.12-rc3-mm2 Diego Calleja
2005-05-03 16:08     ` 2.6.12-rc3-mm2 Bill Davidsen
2005-05-03 13:37 ` 2.6.12-rc3-mm2 Barry K. Nathan
2005-05-04 15:12   ` 2.6.12-rc3-mm2 Christoph Hellwig

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=20050503150448.651bf748@es175 \
    --to=cliffw@osdl.org \
    --cc=akpm@osdl.org \
    --cc=juhl-lkml@dif.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=rbrito@ime.usp.br \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.