All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Qemu-devel] [PATCH] monitor: refactor whitespace and optional argument parsing
From: Markus Armbruster @ 2011-10-24  8:49 UTC (permalink / raw)
  To: Alon Levy; +Cc: qemu-devel
In-Reply-To: <1319136227-7520-1-git-send-email-alevy@redhat.com>

Alon Levy <alevy@redhat.com> writes:

> Takes out the optional ('?') message parsing from the main switch loop
> in monitor_parse_command. Adds optional argument option for boolean parameters.
>
> Signed-off-by: Alon Levy <alevy@redhat.com>
> ---
> Previous patch used qemu_free (that's how old it is), fixed.
>
>  monitor.c |   79 +++++++++++++++++++++++-------------------------------------
>  1 files changed, 30 insertions(+), 49 deletions(-)
>
> diff --git a/monitor.c b/monitor.c
> index ffda0fe..a482705 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -3976,6 +3976,29 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
>              break;
>          c = *typestr;
>          typestr++;
> +        while (qemu_isspace(*p)) {
> +            p++;
> +        }
> +        /* take care of optional arguments */
> +        switch (c) {
> +        case 's':
> +        case 'i':
> +        case 'l':
> +        case 'M':
> +        case 'o':
> +        case 'T':
> +        case 'b':
> +            if (*typestr == '?') {
> +                typestr++;
> +                if (*p == '\0') {
> +                    /* missing optional argument: NULL argument */
> +                    g_free(key);
> +                    key = NULL;
> +                    continue;
> +                }
> +            }
> +            break;
> +        }
>          switch(c) {
>          case 'F':
>          case 'B':
> @@ -3983,15 +4006,6 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
>              {
>                  int ret;
>  
> -                while (qemu_isspace(*p))
> -                    p++;
> -                if (*typestr == '?') {
> -                    typestr++;
> -                    if (*p == '\0') {
> -                        /* no optional string: NULL argument */
> -                        break;
> -                    }
> -                }
>                  ret = get_str(buf, sizeof(buf), &p);
>                  if (ret < 0) {
>                      switch(c) {

This is cases 'F', 'B' and 's'.  I'm afraid your new code covers only
's'.

> @@ -4021,9 +4035,6 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
>                  if (!opts_list || opts_list->desc->name) {
>                      goto bad_type;
>                  }
> -                while (qemu_isspace(*p)) {
> -                    p++;
> -                }
>                  if (!*p)
>                      break;
>                  if (get_str(buf, sizeof(buf), &p) < 0) {
> @@ -4041,8 +4052,6 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
>              {
>                  int count, format, size;
>  
> -                while (qemu_isspace(*p))
> -                    p++;
>                  if (*p == '/') {
>                      /* format found */
>                      p++;
> @@ -4122,23 +4131,15 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
>              {
>                  int64_t val;
>  
> -                while (qemu_isspace(*p))
> -                    p++;
> -                if (*typestr == '?' || *typestr == '.') {
> -                    if (*typestr == '?') {
> -                        if (*p == '\0') {
> -                            typestr++;
> -                            break;
> -                        }
> -                    } else {
> -                        if (*p == '.') {
> +                if (*typestr == '.') {
> +                    if (*p == '.') {
> +                        p++;
> +                        while (qemu_isspace(*p)) {
>                              p++;
> -                            while (qemu_isspace(*p))
> -                                p++;
> -                        } else {
> -                            typestr++;
> -                            break;
>                          }
> +                    } else {
> +                        typestr++;
> +                        break;
>                      }
>                      typestr++;
>                  }
> @@ -4160,15 +4161,6 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
>                  int64_t val;
>                  char *end;
>  
> -                while (qemu_isspace(*p)) {
> -                    p++;
> -                }
> -                if (*typestr == '?') {
> -                    typestr++;
> -                    if (*p == '\0') {
> -                        break;
> -                    }
> -                }
>                  val = strtosz(p, &end);
>                  if (val < 0) {
>                      monitor_printf(mon, "invalid size\n");
> @@ -4182,14 +4174,6 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
>              {
>                  double val;
>  
> -                while (qemu_isspace(*p))
> -                    p++;
> -                if (*typestr == '?') {
> -                    typestr++;
> -                    if (*p == '\0') {
> -                        break;
> -                    }
> -                }
>                  if (get_double(mon, &val, &p) < 0) {
>                      goto fail;
>                  }
> @@ -4215,9 +4199,6 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
>                  const char *beg;
>                  int val;
>  
> -                while (qemu_isspace(*p)) {
> -                    p++;
> -                }
>                  beg = p;
>                  while (qemu_isgraph(*p)) {
>                      p++;

Could be split into parts:

1. Hoist the space skip out of the switch

2. Hoist handling of '?' out of the switch

3. Permit optional boolean parameters

I'd delay the third part until there's a user.

^ permalink raw reply

* Re: Building for TI 8148 EVM
From: Rainer Koenig @ 2011-10-24  8:48 UTC (permalink / raw)
  To: Koen Kooi; +Cc: meta-ti@yoctoproject.org
In-Reply-To: <2599D0DD-7A48-409A-95A5-CDA103E7E974@dominion.thruhere.net>

Koen,

Am 21.10.2011 11:14, schrieb Koen Kooi:

>> I'm currently trying to build an image for the TI 8148 EVM board. For
>> that I added the meta-ti layer to the standard Yocto/Edison environment.
> 
> Please follow the instructions detailed in the meta-ti README: http://git.angstrom-distribution.org/cgi-bin/cgit.cgi/meta-texasinstruments/tree/README
> 
> Yocto/Poky lacks support for various meta-ti (and OE-classic) constructs needed for a successfull build. Following the instructions above you will get a proper setup.

Tried this over the weekend on my home PC. Yes, works. But I was just
able to build a console image. The build of systemd-gnome-image fails
with the error that nothing provides "DRI". MACHINE=dm8148-evm.

Regards
Rainer
-- 
Dipl.-Inf. (FH) Rainer Koenig
Project Manager Linux Clients
Dept. PDG WPS R&D SW OSE

Fujitsu Technology Solutions
Bürgermeister-Ullrich-Str. 100
86199 Augsburg
Germany

Telephone: +49-821-804-3321
Telefax:   +49-821-804-2131
Mail:      mailto:Rainer.Koenig@ts.fujitsu.com

Internet         ts.fujtsu.com
Company Details  ts.fujitsu.com/imprint.html


^ permalink raw reply

* Re: [Qemu-devel] [PATCH 0/2] block: Write out internal caches even with cache=unsafe
From: Paolo Bonzini @ 2011-10-24  8:47 UTC (permalink / raw)
  To: Kevin Wolf; +Cc: Alexander Graf, qemu-devel, avi
In-Reply-To: <4EA51F16.3030700@redhat.com>

On 10/24/2011 10:17 AM, Kevin Wolf wrote:
> >  I think it's not about "why is it there", but rather about "what is it
> >  useful for".  My interpretation of it is "I do not need the image
> >  anymore unless the command exits cleanly": VM installations, qemu-img
> >  conversions, BDRV_O_SNAPSHOT (doesn't do it yet, but it could).  Even
> >  SIGINT and SIGTERM would be excluded from this definition, but they cost
> >  nothing so it's nice to include them.
>
> I think another common interpretation is: "I don't run this VM in
> production but for development. I want the VM to go faster and I can
> recreate the image in the unlikely event that power fails during my
> work. But it certainly would be nasty."

Fair enough.

> But I think that starting to make exceptions for single block drivers
> isn't a good idea anyway. If we want bdrv_flush() to write out all
> metadata internal to qemu, I think the approach with checking the flag
> in drivers calling things like fsync() is better. The common thing is to
> do the flush.

I don't know... checking BDRV_O_NO_FLUSH in the drivers rather than in 
the generic code sounds like a layering violation.  Perhaps what you're 
after is a separation of bdrv_co_flush from bdrv_{,co_,aio_}fsync?  Then 
BDRV_O_NO_FLUSH (better renamed to BDRV_O_NO_FSYNC...) would only 
inhibit the latter.

Paolo

^ permalink raw reply

* Re: HYBRID: (PV in HVM) update
From: Ian Campbell @ 2011-10-24  8:47 UTC (permalink / raw)
  To: Mukesh Rathor; +Cc: Xen-devel@lists.xensource.com, Keir Fraser
In-Reply-To: <20111020161709.42a56c27@mantra.us.oracle.com>

On Fri, 2011-10-21 at 00:17 +0100, Mukesh Rathor wrote:
> On Thu, 18 Aug 2011 15:54:14 -0700
> Mukesh Rathor <mukesh.rathor@oracle.com> wrote:
> > 
> > JFYI... So I had a third type is_hybrid in my prototype, that I
> > thought I could get rid of, and hide things under is_hvm check. But
> > that just touches too much code, and things get ugly a bit all over.
> > 
> > It seems I could just mark the guest PV if not EPT and using PV
> > paging, and mark it HVM if EPT enabled to keep changes minimum, and
> > just check for hybrid where needed (so add is_hybrid back in). Trying
> > that now....
> > 
> > thanks
> > Mukesh
> > 
> 
> 
> YEAY guys!!! I now have PV in HVM guest running with EPT! 

That's awesome news!

> I'll clean up the code (tons of debug stuff right now), and post
> it for anyone to look at. 

> Next and final frontier after that, running it as dom0.

Whee!

Ian.

^ permalink raw reply

* RE: [GIT PULL for v3.2] OMAP_VOUT: Few cleaups and feature addition
From: Hiremath, Vaibhav @ 2011-10-24  8:46 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media@vger.kernel.org, mchehab@redhat.com
In-Reply-To: <201110241046.14485.laurent.pinchart@ideasonboard.com>

> -----Original Message-----
> From: Laurent Pinchart [mailto:laurent.pinchart@ideasonboard.com]
> Sent: Monday, October 24, 2011 2:16 PM
> To: Hiremath, Vaibhav
> Cc: linux-media@vger.kernel.org; mchehab@redhat.com
> Subject: Re: [GIT PULL for v3.2] OMAP_VOUT: Few cleaups and feature
> addition
> 
> Hi Vaibhav,
> 
> On Monday 24 October 2011 10:18:32 Hiremath, Vaibhav wrote:
> > On Monday, October 24, 2011 12:53 PM Laurent Pinchart wrote:
> > > On Saturday 22 October 2011 14:06:24 hvaibhav@ti.com wrote:
> > > > Hi Mauro,
> > > >
> > > > The following changes since commit
> > > >
> > > > 35a912455ff5640dc410e91279b03e04045265b2: Mauro Carvalho Chehab (1):
> > > >         Merge branch 'v4l_for_linus' into staging/for_v3.2
> > > >
> > > > are available in the git repository at:
> > > >   git://arago-project.org/git/people/vaibhav/ti-psp-omap-video.git
> > > >
> > > > for-linux-media
> > > >
> > > > Archit Taneja (5):
> > > >       OMAP_VOUT: Fix check in reqbuf for buf_size allocation
> > > >       OMAP_VOUT: CLEANUP: Remove redundant code from omap_vout_isr
> > > >       OMAP_VOUT: Fix VSYNC IRQ handling in omap_vout_isr
> > > >       OMAP_VOUT: Add support for DSI panels
> > > >       OMAP_VOUT: Increase MAX_DISPLAYS to a larger value
> > >
> > > What about http://patchwork.linuxtv.org/patch/299/ ? Do you plan to
> push
> > > it
> > > through your tree, or should I push it through mine ?
> >
> > Oops,
> >
> > Missed it... Thanks for reminding me.
> 
> No worries.
> 
> > If you are about to send pull request then go ahead and merge it with
> your
> > patch-sets. OR I can also send another request for this patch alone.
> 
> I've got omap3-isp patches I'm about to send a pull request for, I'll add
> the
> omap_vout patch to the set.
> 

Thanks

Regards,
Vaibhav

> --
> Regards,
> 
> Laurent Pinchart

^ permalink raw reply

* Re: [GIT PULL for v3.2] OMAP_VOUT: Few cleaups and feature addition
From: Laurent Pinchart @ 2011-10-24  8:46 UTC (permalink / raw)
  To: Hiremath, Vaibhav; +Cc: linux-media@vger.kernel.org, mchehab@redhat.com
In-Reply-To: <19F8576C6E063C45BE387C64729E739406C1010164@dbde02.ent.ti.com>

Hi Vaibhav,

On Monday 24 October 2011 10:18:32 Hiremath, Vaibhav wrote:
> On Monday, October 24, 2011 12:53 PM Laurent Pinchart wrote:
> > On Saturday 22 October 2011 14:06:24 hvaibhav@ti.com wrote:
> > > Hi Mauro,
> > > 
> > > The following changes since commit
> > > 
> > > 35a912455ff5640dc410e91279b03e04045265b2: Mauro Carvalho Chehab (1):
> > >         Merge branch 'v4l_for_linus' into staging/for_v3.2
> > > 
> > > are available in the git repository at:
> > >   git://arago-project.org/git/people/vaibhav/ti-psp-omap-video.git
> > > 
> > > for-linux-media
> > > 
> > > Archit Taneja (5):
> > >       OMAP_VOUT: Fix check in reqbuf for buf_size allocation
> > >       OMAP_VOUT: CLEANUP: Remove redundant code from omap_vout_isr
> > >       OMAP_VOUT: Fix VSYNC IRQ handling in omap_vout_isr
> > >       OMAP_VOUT: Add support for DSI panels
> > >       OMAP_VOUT: Increase MAX_DISPLAYS to a larger value
> > 
> > What about http://patchwork.linuxtv.org/patch/299/ ? Do you plan to push
> > it
> > through your tree, or should I push it through mine ?
> 
> Oops,
> 
> Missed it... Thanks for reminding me.

No worries.

> If you are about to send pull request then go ahead and merge it with your
> patch-sets. OR I can also send another request for this patch alone.

I've got omap3-isp patches I'm about to send a pull request for, I'll add the 
omap_vout patch to the set.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply

* Re: lvs-users mailing list and archive dead?
From: Tomasz Chmielewski @ 2011-10-24  8:45 UTC (permalink / raw)
  To: Graeme Fowler; +Cc: lvs-devel
In-Reply-To: <1319445137.12559.0.camel@localhost>

On 24.10.2011 10:32, Graeme Fowler wrote:
> On Sun, 2011-10-23 at 21:52 +0200, Tomasz Chmielewski wrote:
>> I'm not able to resolve names from it from a largish German hosting
>> provider, Hetzner.
>
> Can you please tell me which IP netblock these queries are originating
> from? I smell a previously unallocated (to an RIR) block which is in my
> bogons list.

I.e. 178.63.195.*, 178.63.11.*, 46.4.130.*, 46.4.96.124, 46.4.115.*, 
176.9.54.*.


-- 
Tomasz Chmielewski
http://wpkg.org

^ permalink raw reply

* [Qemu-devel] [PATCH] hw/9pfs: Make VirtTFS work correctly
From: Aneesh Kumar K.V @ 2011-10-24  8:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, Aneesh Kumar K.V

From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>

this patch fix multiple issues with VitFS tracing.
a) Add tracepoint to the correct code path. We handle error in complete_pdu
b) Fix indentation in python script
c) Fix variable naming issue in python script

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 hw/9pfs/virtio-9p.c               |   60 +++++++-------
 scripts/analyse-9p-simpletrace.py |  164 ++++++++++++++++++------------------
 trace-events                      |    2 +-
 3 files changed, 112 insertions(+), 114 deletions(-)

diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index aab3beb..8b6813f 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -969,7 +969,7 @@ static void complete_pdu(V9fsState *s, V9fsPDU *pdu, ssize_t len)
         if (s->proto_version == V9FS_PROTO_2000L) {
             id = P9_RLERROR;
         }
-        trace_complete_pdu(pdu->tag, pdu->id, err); /* Trace ERROR */
+        trace_v9fs_rerror(pdu->tag, pdu->id, err); /* Trace ERROR */
     }
 
     /* fill out the header */
@@ -1332,11 +1332,11 @@ static void v9fs_attach(void *opaque)
     }
     offset += pdu_marshal(pdu, offset, "Q", &qid);
     err = offset;
+    trace_v9fs_attach_return(pdu->tag, pdu->id,
+                             qid.type, qid.version, qid.path);
 out:
     put_fid(pdu, fidp);
 out_nofid:
-    trace_v9fs_attach_return(pdu->tag, pdu->id,
-                             qid.type, qid.version, qid.path);
     complete_pdu(s, pdu, err);
     v9fs_string_free(&uname);
     v9fs_string_free(&aname);
@@ -1371,13 +1371,12 @@ static void v9fs_stat(void *opaque)
     }
     offset += pdu_marshal(pdu, offset, "wS", 0, &v9stat);
     err = offset;
+    trace_v9fs_stat_return(pdu->tag, pdu->id, v9stat.mode,
+                           v9stat.atime, v9stat.mtime, v9stat.length);
     v9fs_stat_free(&v9stat);
 out:
     put_fid(pdu, fidp);
 out_nofid:
-    trace_v9fs_stat_return(pdu->tag, pdu->id, v9stat.mode,
-                           v9stat.atime, v9stat.mtime, v9stat.length);
-
     complete_pdu(s, pdu, err);
 }
 
@@ -1421,13 +1420,12 @@ static void v9fs_getattr(void *opaque)
     }
     retval = offset;
     retval += pdu_marshal(pdu, offset, "A", &v9stat_dotl);
-out:
-    put_fid(pdu, fidp);
-out_nofid:
     trace_v9fs_getattr_return(pdu->tag, pdu->id, v9stat_dotl.st_result_mask,
                               v9stat_dotl.st_mode, v9stat_dotl.st_uid,
                               v9stat_dotl.st_gid);
-
+out:
+    put_fid(pdu, fidp);
+out_nofid:
     complete_pdu(s, pdu, retval);
 }
 
@@ -1605,6 +1603,7 @@ static void v9fs_walk(void *opaque)
         v9fs_path_copy(&newfidp->path, &path);
     }
     err = v9fs_walk_marshal(pdu, nwnames, qids);
+    trace_v9fs_walk_return(pdu->tag, pdu->id, nwnames, qids);
 out:
     put_fid(pdu, fidp);
     if (newfidp) {
@@ -1613,7 +1612,6 @@ out:
     v9fs_path_free(&dpath);
     v9fs_path_free(&path);
 out_nofid:
-    trace_v9fs_walk_return(pdu->tag, pdu->id, nwnames, qids);
     complete_pdu(s, pdu, err);
     if (nwnames && nwnames <= P9_MAXWELEM) {
         for (name_idx = 0; name_idx < nwnames; name_idx++) {
@@ -1648,10 +1646,10 @@ static int32_t get_iounit(V9fsPDU *pdu, V9fsPath *path)
 static void v9fs_open(void *opaque)
 {
     int flags;
-    int iounit;
     int32_t fid;
     int32_t mode;
     V9fsQID qid;
+    int iounit = 0;
     ssize_t err = 0;
     size_t offset = 7;
     struct stat stbuf;
@@ -1709,11 +1707,11 @@ static void v9fs_open(void *opaque)
         offset += pdu_marshal(pdu, offset, "Qd", &qid, iounit);
         err = offset;
     }
+    trace_v9fs_open_return(pdu->tag, pdu->id,
+                           qid.type, qid.version, qid.path, iounit);
 out:
     put_fid(pdu, fidp);
 out_nofid:
-    trace_v9fs_open_return(pdu->tag, pdu->id,
-                           qid.type, qid.version, qid.path, iounit);
     complete_pdu(s, pdu, err);
 }
 
@@ -1759,11 +1757,11 @@ static void v9fs_lcreate(void *opaque)
     stat_to_qid(&stbuf, &qid);
     offset += pdu_marshal(pdu, offset, "Qd", &qid, iounit);
     err = offset;
+    trace_v9fs_lcreate_return(pdu->tag, pdu->id,
+                              qid.type, qid.version, qid.path, iounit);
 out:
     put_fid(pdu, fidp);
 out_nofid:
-    trace_v9fs_lcreate_return(pdu->tag, pdu->id,
-                              qid.type, qid.version, qid.path, iounit);
     complete_pdu(pdu->s, pdu, err);
     v9fs_string_free(&name);
 }
@@ -1978,10 +1976,10 @@ static void v9fs_read(void *opaque)
     } else {
         err = -EINVAL;
     }
+    trace_v9fs_read_return(pdu->tag, pdu->id, count, err);
 out:
     put_fid(pdu, fidp);
 out_nofid:
-    trace_v9fs_read_return(pdu->tag, pdu->id, count, err);
     complete_pdu(s, pdu, err);
 }
 
@@ -2090,10 +2088,10 @@ static void v9fs_readdir(void *opaque)
     retval = offset;
     retval += pdu_marshal(pdu, offset, "d", count);
     retval += count;
+    trace_v9fs_readdir_return(pdu->tag, pdu->id, count, retval);
 out:
     put_fid(pdu, fidp);
 out_nofid:
-    trace_v9fs_readdir_return(pdu->tag, pdu->id, count, retval);
     complete_pdu(s, pdu, retval);
 }
 
@@ -2202,10 +2200,10 @@ static void v9fs_write(void *opaque)
     } while (total < count && len > 0);
     offset += pdu_marshal(pdu, offset, "d", total);
     err = offset;
+    trace_v9fs_write_return(pdu->tag, pdu->id, total, err);
 out:
     put_fid(pdu, fidp);
 out_nofid:
-    trace_v9fs_write_return(pdu->tag, pdu->id, total, err);
     complete_pdu(s, pdu, err);
 }
 
@@ -2362,11 +2360,11 @@ static void v9fs_create(void *opaque)
     stat_to_qid(&stbuf, &qid);
     offset += pdu_marshal(pdu, offset, "Qd", &qid, iounit);
     err = offset;
+    trace_v9fs_create_return(pdu->tag, pdu->id,
+                             qid.type, qid.version, qid.path, iounit);
 out:
     put_fid(pdu, fidp);
 out_nofid:
-   trace_v9fs_create_return(pdu->tag, pdu->id,
-                            qid.type, qid.version, qid.path, iounit);
    complete_pdu(pdu->s, pdu, err);
    v9fs_string_free(&name);
    v9fs_string_free(&extension);
@@ -2401,11 +2399,11 @@ static void v9fs_symlink(void *opaque)
     stat_to_qid(&stbuf, &qid);
     offset += pdu_marshal(pdu, offset, "Q", &qid);
     err = offset;
+    trace_v9fs_symlink_return(pdu->tag, pdu->id,
+                              qid.type, qid.version, qid.path);
 out:
     put_fid(pdu, dfidp);
 out_nofid:
-    trace_v9fs_symlink_return(pdu->tag, pdu->id,
-                              qid.type, qid.version, qid.path);
     complete_pdu(pdu->s, pdu, err);
     v9fs_string_free(&name);
     v9fs_string_free(&symname);
@@ -2950,10 +2948,11 @@ static void v9fs_mknod(void *opaque)
     stat_to_qid(&stbuf, &qid);
     err = offset;
     err += pdu_marshal(pdu, offset, "Q", &qid);
+    trace_v9fs_mknod_return(pdu->tag, pdu->id,
+                            qid.type, qid.version, qid.path);
 out:
     put_fid(pdu, fidp);
 out_nofid:
-    trace_v9fs_mknod_return(pdu->tag, pdu->id, qid.type, qid.version, qid.path);
     complete_pdu(s, pdu, err);
     v9fs_string_free(&name);
 }
@@ -3049,12 +3048,11 @@ static void v9fs_getlock(void *opaque)
                           glock->start, glock->length, glock->proc_id,
                           &glock->client_id);
     err = offset;
+    trace_v9fs_getlock_return(pdu->tag, pdu->id, glock->type, glock->start,
+                              glock->length, glock->proc_id);
 out:
     put_fid(pdu, fidp);
 out_nofid:
-    trace_v9fs_getlock_return(pdu->tag, pdu->id, glock->type, glock->start,
-                              glock->length, glock->proc_id);
-
     complete_pdu(s, pdu, err);
     v9fs_string_free(&glock->client_id);
     g_free(glock);
@@ -3089,11 +3087,11 @@ static void v9fs_mkdir(void *opaque)
     stat_to_qid(&stbuf, &qid);
     offset += pdu_marshal(pdu, offset, "Q", &qid);
     err = offset;
+    trace_v9fs_mkdir_return(pdu->tag, pdu->id,
+                            qid.type, qid.version, qid.path, err);
 out:
     put_fid(pdu, fidp);
 out_nofid:
-    trace_v9fs_mkdir_return(pdu->tag, pdu->id,
-                            qid.type, qid.version, qid.path, err);
     complete_pdu(pdu->s, pdu, err);
     v9fs_string_free(&name);
 }
@@ -3183,13 +3181,13 @@ static void v9fs_xattrwalk(void *opaque)
         offset += pdu_marshal(pdu, offset, "q", size);
         err = offset;
     }
+    trace_v9fs_xattrwalk_return(pdu->tag, pdu->id, size);
 out:
     put_fid(pdu, file_fidp);
     if (xattr_fidp) {
         put_fid(pdu, xattr_fidp);
     }
 out_nofid:
-    trace_v9fs_xattrwalk_return(pdu->tag, pdu->id, size);
     complete_pdu(s, pdu, err);
     v9fs_string_free(&name);
 }
@@ -3260,11 +3258,11 @@ static void v9fs_readlink(void *opaque)
     }
     offset += pdu_marshal(pdu, offset, "s", &target);
     err = offset;
+    trace_v9fs_readlink_return(pdu->tag, pdu->id, target.data);
     v9fs_string_free(&target);
 out:
     put_fid(pdu, fidp);
 out_nofid:
-    trace_v9fs_readlink_return(pdu->tag, pdu->id, target.data);
     complete_pdu(pdu->s, pdu, err);
 }
 
diff --git a/scripts/analyse-9p-simpletrace.py b/scripts/analyse-9p-simpletrace.py
index 4358d6b..b6d58fd 100755
--- a/scripts/analyse-9p-simpletrace.py
+++ b/scripts/analyse-9p-simpletrace.py
@@ -7,11 +7,11 @@
 import simpletrace
 
 class VirtFSRequestTracker(simpletrace.Analyzer):
-	def begin(self):
-		print "Pretty printing 9p simpletrace log ..."
+        def begin(self):
+                print "Pretty printing 9p simpletrace log ..."
 
-        def complete_pdu(self, tag, id, err):
-                print "ERROR (tag =", tag, ", id =", id, ",err =", err, ")"
+        def v9fs_rerror(self, tag, id, err):
+                print "RERROR (tag =", tag, ", id =", id, ",err =", err, ")"
 
         def v9fs_version(self, tag, id, msize, version):
                 print "TVERSION (tag =", tag, ", msize =", msize, ", version =", version, ")"
@@ -22,121 +22,121 @@ class VirtFSRequestTracker(simpletrace.Analyzer):
         def v9fs_attach(self, tag, id, fid, afid, uname, aname):
                 print "TATTACH (tag =", tag, ", fid =", fid, ", afid =", afid, ", uname =", uname, ", aname =", aname, ")"
 
-	def v9fs_attach_return(self, tag, id, type, verison, path):
-		print "RATTACH (tag =", tag, ", qid={type =", type, ", version =", version, ", path =", path, "})"
+        def v9fs_attach_return(self, tag, id, type, version, path):
+                print "RATTACH (tag =", tag, ", qid={type =", type, ", version =", version, ", path =", path, "})"
 
-	def v9fs_stat(self, tag, id, fid):
-		print "TSTAT (tag =", tag, ", fid =", fid, ")"
+        def v9fs_stat(self, tag, id, fid):
+                print "TSTAT (tag =", tag, ", fid =", fid, ")"
 
-	def v9fs_stat_return(self, tag, id, mode, atime, mtime, length):
-		print "RSTAT (tag =", tag, ", mode =", mode, ", atime =", atime, ", mtime =", mtime, ", length =", length, ")"
+        def v9fs_stat_return(self, tag, id, mode, atime, mtime, length):
+                print "RSTAT (tag =", tag, ", mode =", mode, ", atime =", atime, ", mtime =", mtime, ", length =", length, ")"
 
-	def v9fs_getattr(self, tag, id, fid, request_mask):
-		print "TGETATTR (tag =", tag, ", fid =", fid, ", request_mask =", hex(request_mask), ")"
+        def v9fs_getattr(self, tag, id, fid, request_mask):
+                print "TGETATTR (tag =", tag, ", fid =", fid, ", request_mask =", hex(request_mask), ")"
 
-	def v9fs_getattr_return(self, tag, id, result_mask, mode, uid, gid):
-		print "RGETATTR (tag =", tag, ", result_mask =", hex(result_mask), ", mode =", oct(mode), ", uid =", uid, ", gid =", gid, ")"
+        def v9fs_getattr_return(self, tag, id, result_mask, mode, uid, gid):
+                print "RGETATTR (tag =", tag, ", result_mask =", hex(result_mask), ", mode =", oct(mode), ", uid =", uid, ", gid =", gid, ")"
 
-	def v9fs_walk(self, tag, id, fid, newfid, nwnames):
-		print "TWALK (tag =", tag, ", fid =", fid, ", newfid =", newfid, ", nwnames =", nwnames, ")"
+        def v9fs_walk(self, tag, id, fid, newfid, nwnames):
+                print "TWALK (tag =", tag, ", fid =", fid, ", newfid =", newfid, ", nwnames =", nwnames, ")"
 
-	def v9fs_walk_return(self, tag, id, nwnames, qids):
-		print "RWALK (tag =", tag, ", nwnames =", nwnames, ", qids =", hex(qids), ")"
+        def v9fs_walk_return(self, tag, id, nwnames, qids):
+                print "RWALK (tag =", tag, ", nwnames =", nwnames, ", qids =", hex(qids), ")"
 
-	def v9fs_open(self, tag, id, fid, mode):
-		print "TOPEN (tag =", tag, ", fid =", fid, ", mode =", oct(mode), ")"
+        def v9fs_open(self, tag, id, fid, mode):
+                print "TOPEN (tag =", tag, ", fid =", fid, ", mode =", oct(mode), ")"
 
-	def v9fs_open_return(self, tag, id, type, version, path, iounit):
-		print "ROPEN (tag =", tag,  ", qid={type =", type, ", version =", version, ", path =", path, "}, iounit =", iounit, ")"
+        def v9fs_open_return(self, tag, id, type, version, path, iounit):
+                print "ROPEN (tag =", tag,  ", qid={type =", type, ", version =", version, ", path =", path, "}, iounit =", iounit, ")"
 
-	def v9fs_lcreate(self, tag, id, dfid, flags, mode, gid):
-		print "TLCREATE (tag =", tag, ", dfid =", dfid, ", flags =", oct(flags), ", mode =", oct(mode), ", gid =", gid, ")"
+        def v9fs_lcreate(self, tag, id, dfid, flags, mode, gid):
+                print "TLCREATE (tag =", tag, ", dfid =", dfid, ", flags =", oct(flags), ", mode =", oct(mode), ", gid =", gid, ")"
 
-	def v9fs_lcreate_return(self, id, type, version, path, iounit):
-		print "RLCREATE (tag =", tag,  ", qid={type =", type, ", version =", version, ", path =", path, "}, iounit =", iounit, ")"
+        def v9fs_lcreate_return(self, tag, id, type, version, path, iounit):
+                print "RLCREATE (tag =", tag,  ", qid={type =", type, ", version =", version, ", path =", path, "}, iounit =", iounit, ")"
 
-	def v9fs_fsync(self, tag, id, fid, datasync):
-		print "TFSYNC (tag =", tag, ", fid =", fid, ", datasync =", datasync, ")"
+        def v9fs_fsync(self, tag, id, fid, datasync):
+                print "TFSYNC (tag =", tag, ", fid =", fid, ", datasync =", datasync, ")"
 
-	def v9fs_clunk(self, tag, id, fid):
-		print "TCLUNK (tag =", tag, ", fid =", fid, ")"
+        def v9fs_clunk(self, tag, id, fid):
+                print "TCLUNK (tag =", tag, ", fid =", fid, ")"
 
-	def v9fs_read(self, tag, id, fid, off, max_count):
-		print "TREAD (tag =", tag, ", fid =", fid, ", off =", off, ", max_count =", max_count, ")"
+        def v9fs_read(self, tag, id, fid, off, max_count):
+                print "TREAD (tag =", tag, ", fid =", fid, ", off =", off, ", max_count =", max_count, ")"
 
-	def v9fs_read_return(self, tag, id, count, err):
-		print "RREAD (tag =", tag, ", count =", count, ", err =", err, ")"
+        def v9fs_read_return(self, tag, id, count, err):
+                print "RREAD (tag =", tag, ", count =", count, ", err =", err, ")"
 
-	def v9fs_readdir(self, tag, id, fid, offset, max_count):
-		print "TREADDIR (tag =", tag, ", fid =", fid, ", offset =", offset, ", max_count =", max_count, ")"
+        def v9fs_readdir(self, tag, id, fid, offset, max_count):
+                print "TREADDIR (tag =", tag, ", fid =", fid, ", offset =", offset, ", max_count =", max_count, ")"
 
-	def v9fs_readdir_return(self, tag, id, count, retval):
-		print "RREADDIR (tag =", tag, ", count =", count, ", retval =", retval, ")"
+        def v9fs_readdir_return(self, tag, id, count, retval):
+                print "RREADDIR (tag =", tag, ", count =", count, ", retval =", retval, ")"
 
-	def v9fs_write(self, tag, id, fid, off, count, cnt):
-		print "TWRITE (tag =", tag, ", fid =", fid, ", off =", off, ", count =", count, ", cnt =", cnt, ")"
+        def v9fs_write(self, tag, id, fid, off, count, cnt):
+                print "TWRITE (tag =", tag, ", fid =", fid, ", off =", off, ", count =", count, ", cnt =", cnt, ")"
 
-	def v9fs_write_return(self, tag, id, total, err):
-		print "RWRITE (tag =", tag, ", total =", total, ", err =", err, ")"
+        def v9fs_write_return(self, tag, id, total, err):
+                print "RWRITE (tag =", tag, ", total =", total, ", err =", err, ")"
 
-	def v9fs_create(self, tag, id, fid, perm, name, mode):
-		print "TCREATE (tag =", tag, ", fid =", fid, ", perm =", oct(perm), ", name =", name, ", mode =", oct(mode), ")"
+        def v9fs_create(self, tag, id, fid, name, perm, mode):
+                print "TCREATE (tag =", tag, ", fid =", fid, ", perm =", oct(perm), ", name =", name, ", mode =", oct(mode), ")"
 
-	def v9fs_create_return(self, tag, id, type, verison, path, iounit):
-		print "RCREATE (tag =", tag,  ", qid={type =", type, ", version =", version, ", path =", path, "}, iounit =", iounit, ")"
+        def v9fs_create_return(self, tag, id, type, version, path, iounit):
+                print "RCREATE (tag =", tag,  ", qid={type =", type, ", version =", version, ", path =", path, "}, iounit =", iounit, ")"
 
-	def v9fs_symlink(self, tag, id, fid, name, symname, gid):
-		print "TSYMLINK (tag =", tag, ", fid =", fid, ", name =", name, ", symname =", symname, ", gid =", gid, ")"
+        def v9fs_symlink(self, tag, id, fid, name, symname, gid):
+                print "TSYMLINK (tag =", tag, ", fid =", fid, ", name =", name, ", symname =", symname, ", gid =", gid, ")"
 
-	def v9fs_symlink_return(self, tag, id, type, version, path):
-		print "RSYMLINK (tag =", tag,  ", qid={type =", type, ", version =", version, ", path =", path, "})"
+        def v9fs_symlink_return(self, tag, id, type, version, path):
+                print "RSYMLINK (tag =", tag,  ", qid={type =", type, ", version =", version, ", path =", path, "})"
 
-	def v9fs_flush(self, tag, id, flush_tag):
-		print "TFLUSH (tag =", tag, ", flush_tag =", flush_tag, ")"
+        def v9fs_flush(self, tag, id, flush_tag):
+                print "TFLUSH (tag =", tag, ", flush_tag =", flush_tag, ")"
 
-	def v9fs_link(self, tag, id, dfid, oldfid, name):
-		print "TLINK (tag =", tag, ", dfid =", dfid, ", oldfid =", oldfid, ", name =", name, ")"
+        def v9fs_link(self, tag, id, dfid, oldfid, name):
+                print "TLINK (tag =", tag, ", dfid =", dfid, ", oldfid =", oldfid, ", name =", name, ")"
 
-	def v9fs_remove(self, tag, id, fid):
-		print "TREMOVE (tag =", tag, ", fid =", fid, ")"
+        def v9fs_remove(self, tag, id, fid):
+                print "TREMOVE (tag =", tag, ", fid =", fid, ")"
 
-	def v9fs_wstat(self, tag, id, fid, mode, atime, mtime):
-		print "TWSTAT (tag =", tag, ", fid =", fid, ", mode =", oct(mode), ", atime =", atime, "mtime =", mtime, ")"
+        def v9fs_wstat(self, tag, id, fid, mode, atime, mtime):
+                print "TWSTAT (tag =", tag, ", fid =", fid, ", mode =", oct(mode), ", atime =", atime, "mtime =", mtime, ")"
 
-	def v9fs_mknod(self, tag, id, fid, mode, major, minor):
-		print "TMKNOD (tag =", tag, ", fid =", fid, ", mode =", oct(mode), ", major =", major, ", minor =", minor, ")"
+        def v9fs_mknod(self, tag, id, fid, mode, major, minor):
+                print "TMKNOD (tag =", tag, ", fid =", fid, ", mode =", oct(mode), ", major =", major, ", minor =", minor, ")"
 
-	def v9fs_lock(self, tag, id, fid, type, start, length):
-		print "TLOCK (tag =", tag, ", fid =", fid, "type =", type, ", start =", start, ", length =", length, ")"
+        def v9fs_lock(self, tag, id, fid, type, start, length):
+                print "TLOCK (tag =", tag, ", fid =", fid, "type =", type, ", start =", start, ", length =", length, ")"
 
-	def v9fs_lock_return(self, tag, id, status):
-		print "RLOCK (tag =", tag, ", status =", status, ")"
+        def v9fs_lock_return(self, tag, id, status):
+                print "RLOCK (tag =", tag, ", status =", status, ")"
 
-	def v9fs_getlock(self, tag, id, fid, type, start, length):
-		print "TGETLOCK (tag =", tag, ", fid =", fid, "type =", type, ", start =", start, ", length =", length, ")"
+        def v9fs_getlock(self, tag, id, fid, type, start, length):
+                print "TGETLOCK (tag =", tag, ", fid =", fid, "type =", type, ", start =", start, ", length =", length, ")"
 
-	def v9fs_getlock_return(self, tag, id, type, start, length, proc_id):
-		print "RGETLOCK (tag =", tag, "type =", type, ", start =", start, ", length =", length, ", proc_id =", proc_id,  ")"
+        def v9fs_getlock_return(self, tag, id, type, start, length, proc_id):
+                print "RGETLOCK (tag =", tag, "type =", type, ", start =", start, ", length =", length, ", proc_id =", proc_id,  ")"
 
-	def v9fs_mkdir(self, tag, id, fid, name, mode, gid):
-		print "TMKDIR (tag =", tag, ", fid =", fid, ", name =", name, ", mode =", mode, ", gid =", gid, ")"
+        def v9fs_mkdir(self, tag, id, fid, name, mode, gid):
+                print "TMKDIR (tag =", tag, ", fid =", fid, ", name =", name, ", mode =", mode, ", gid =", gid, ")"
 
-	def v9fs_mkdir_return(self, tag, id, type, version, path, err):
-		print "RMKDIR (tag =", tag,  ", qid={type =", type, ", version =", version, ", path =", path, "}, err =", err, ")"
+        def v9fs_mkdir_return(self, tag, id, type, version, path, err):
+                print "RMKDIR (tag =", tag,  ", qid={type =", type, ", version =", version, ", path =", path, "}, err =", err, ")"
 
-	def v9fs_xattrwalk(self, tag, id, fid, newfid, name):
-		print "TXATTRWALK (tag =", tag, ", fid =", fid, ", newfid =", newfid, ", xattr name =", name, ")"
+        def v9fs_xattrwalk(self, tag, id, fid, newfid, name):
+                print "TXATTRWALK (tag =", tag, ", fid =", fid, ", newfid =", newfid, ", xattr name =", name, ")"
 
-	def v9fs_xattrwalk_return(self, tag, id, size):
-		print "RXATTRWALK (tag =", tag, ", xattrsize  =", size, ")"
+        def v9fs_xattrwalk_return(self, tag, id, size):
+                print "RXATTRWALK (tag =", tag, ", xattrsize  =", size, ")"
 
-	def v9fs_xattrcreate(self, tag, id, fid, name, size, flags):
-		print "TXATTRCREATE (tag =", tag, ", fid =", fid, ", name =", name, ", xattrsize =", size, ", flags =", flags, ")"
+        def v9fs_xattrcreate(self, tag, id, fid, name, size, flags):
+                print "TXATTRCREATE (tag =", tag, ", fid =", fid, ", name =", name, ", xattrsize =", size, ", flags =", flags, ")"
 
-	def v9fs_readlink(self, tag, id, fid):
-		print "TREADLINK (tag =", tag, ", fid =", fid, ")"
+        def v9fs_readlink(self, tag, id, fid):
+                print "TREADLINK (tag =", tag, ", fid =", fid, ")"
 
-	def v9fs_readlink_return(self, tag, id, target):
-		print "RREADLINK (tag =", tag, ", target =", target, ")"
+        def v9fs_readlink_return(self, tag, id, target):
+                print "RREADLINK (tag =", tag, ", target =", target, ")"
 
 simpletrace.run(VirtFSRequestTracker())
diff --git a/trace-events b/trace-events
index 7f9cec4..0f0a6b0 100644
--- a/trace-events
+++ b/trace-events
@@ -554,7 +554,7 @@ open_eth_desc_read(uint32_t addr, uint32_t v) "DESC[%04x] -> %08x"
 open_eth_desc_write(uint32_t addr, uint32_t v) "DESC[%04x] <- %08x"
 
 # hw/9pfs/virtio-9p.c
-complete_pdu(uint16_t tag, uint8_t id, int err) "tag %d id %d err %d"
+v9fs_rerror(uint16_t tag, uint8_t id, int err) "tag %d id %d err %d"
 v9fs_version(uint16_t tag, uint8_t id, int32_t msize, char* version) "tag %d id %d msize %d version %s"
 v9fs_version_return(uint16_t tag, uint8_t id, int32_t msize, char* version) "tag %d id %d msize %d version %s"
 v9fs_attach(uint16_t tag, uint8_t id, int32_t fid, int32_t afid, char* uname, char* aname) "tag %u id %u fid %d afid %d uname %s aname %s"
-- 
1.7.5.4

^ permalink raw reply related

* [RFC 1/4] Documentation: devres: add allocation functions to list of supported calls
From: Wolfram Sang @ 2011-10-24  8:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arm-kernel, Greg KH, Grant Likely, Tejun Heo, Wolfram Sang
In-Reply-To: <1319445729-14841-1-git-send-email-w.sang@pengutronix.de>

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
 Documentation/driver-model/devres.txt |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt
index d79aead..badd964 100644
--- a/Documentation/driver-model/devres.txt
+++ b/Documentation/driver-model/devres.txt
@@ -233,6 +233,10 @@ certainly invest a bit more effort into libata core layer).
   6. List of managed interfaces
   -----------------------------
 
+MEM
+  devm_kzalloc()
+  devm_kfree()
+
 IO region
   devm_request_region()
   devm_request_mem_region()
-- 
1.7.6.3


^ permalink raw reply related

* [RFC 2/4] lib: devres: add annotations for #endif
From: Wolfram Sang @ 2011-10-24  8:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arm-kernel, Greg KH, Grant Likely, Tejun Heo, Wolfram Sang
In-Reply-To: <1319445729-14841-1-git-send-email-w.sang@pengutronix.de>

While working on devres, I found those make navigating the code a tad
easier.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
 lib/devres.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/devres.c b/lib/devres.c
index 7c0e953..78777ae 100644
--- a/lib/devres.c
+++ b/lib/devres.c
@@ -348,5 +348,5 @@ void pcim_iounmap_regions(struct pci_dev *pdev, u16 mask)
 	}
 }
 EXPORT_SYMBOL(pcim_iounmap_regions);
-#endif
-#endif
+#endif /* CONFIG_PCI */
+#endif /* CONFIG_HAS_IOPORT */
-- 
1.7.6.3


^ permalink raw reply related

* [RFC 3/4] lib: devres: add convenience function to remap a resource
From: Wolfram Sang @ 2011-10-24  8:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arm-kernel, Greg KH, Grant Likely, Tejun Heo, Wolfram Sang
In-Reply-To: <1319445729-14841-1-git-send-email-w.sang@pengutronix.de>

Almost every platform_driver does the three steps get_resource,
request_mem_region, ioremap. This does not only lead to a lot of code
duplication, but also a number of similar error strings and inconsistent
error codes on failure. So, introduce a helper function which simplifies
remapping a resource and make it hard to do something wrong.

A few notes on design choices:

* not 100% sure on ENOENT when the resource is invalid. Seems to be frequently
  used currently and fits "somehow"

* the remapped pointer is a function argument and not a return value. This is to
  save users from forgetting to use IS_ERR/PTR_ERR.

* the usage of IORESOURCE_CACHEABLE enforces calling the correct ioremap-variant.
  A number of drivers miss to call the _nocache-version, although they should do.

* the new function is not named 'devm_ioremap_resource' because it does more than
  just ioremap, namely request_mem_region. I didn't want to create implicit
  knowledge here.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
 Documentation/driver-model/devres.txt |    1 +
 include/linux/device.h                |    3 ++
 lib/devres.c                          |   52 +++++++++++++++++++++++++++++++++
 3 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt
index badd964..3aeb4f4 100644
--- a/Documentation/driver-model/devres.txt
+++ b/Documentation/driver-model/devres.txt
@@ -266,6 +266,7 @@ IOMAP
   devm_ioremap()
   devm_ioremap_nocache()
   devm_iounmap()
+  devm_resource_to_mapped_ptr() : checks resource, requests region, ioremaps
   pcim_iomap()
   pcim_iounmap()
   pcim_iomap_table()	: array of mapped addresses indexed by BAR
diff --git a/include/linux/device.h b/include/linux/device.h
index c20dfbf..82a621c 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -481,6 +481,9 @@ extern int devres_release_group(struct device *dev, void *id);
 extern void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp);
 extern void devm_kfree(struct device *dev, void *p);
 
+int __must_check devm_resource_to_mapped_ptr(struct device *dev,
+			struct resource *res, void __iomem **dest);
+
 struct device_dma_parameters {
 	/*
 	 * a low level driver may set these to teach IOMMU code about
diff --git a/lib/devres.c b/lib/devres.c
index 78777ae..970588b 100644
--- a/lib/devres.c
+++ b/lib/devres.c
@@ -85,6 +85,58 @@ void devm_iounmap(struct device *dev, void __iomem *addr)
 }
 EXPORT_SYMBOL(devm_iounmap);
 
+/**
+ * devm_resource_to_mapped_ptr - Check, request region, and ioremap resource
+ * @dev: Generic device to handle the resource for
+ * @res: resource to be handled
+ * @dest: Pointer to pointer which carries the remapped address
+ *
+ * Takes all necessary steps to ioremap a mem resource. Uses managed device, so
+ * everything is undone on driver detach. Checks arguments, so you can feed
+ * it the result from e.g. platform_get_resource() directly:
+ *
+ *	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ *	err = devm_resource_to_mapped_ptr(&pdev->dev, res, &priv->regs);
+ *	if (err)
+ *		return err;
+ */
+int __must_check devm_resource_to_mapped_ptr(struct device *dev,
+			struct resource *res, void __iomem **dest)
+{
+	resource_size_t size;
+	const char *name;
+
+	BUG_ON(!dev || !dest);
+
+	*dest = NULL;
+
+	if (!res || resource_type(res) != IORESOURCE_MEM) {
+		dev_err(dev, "invalid resource\n");
+		return -ENOENT;
+	}
+
+	size = resource_size(res);
+	name = res->name ?: dev_name(dev);
+
+	if (!devm_request_mem_region(dev, res->start, size, name)) {
+		dev_err(dev, "can't request region for resource %pR\n", res);
+		return -EBUSY;
+	}
+
+	if (res->flags & IORESOURCE_CACHEABLE)
+		*dest = devm_ioremap(dev, res->start, size);
+	else
+		*dest = devm_ioremap_nocache(dev, res->start, size);
+
+	if (!*dest) {
+		dev_err(dev, "ioremap failed for resource %pR\n", res);
+		return -ENOMEM;
+	}
+
+	return 0;
+}
+EXPORT_SYMBOL(devm_resource_to_mapped_ptr);
+
 #ifdef CONFIG_HAS_IOPORT
 /*
  * Generic iomap devres
-- 
1.7.6.3


^ permalink raw reply related

* [RFC 4/4] watchdog: imx2: simplify resource allocation
From: Wolfram Sang @ 2011-10-24  8:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arm-kernel, Greg KH, Grant Likely, Tejun Heo, Wolfram Sang
In-Reply-To: <1319445729-14841-1-git-send-email-w.sang@pengutronix.de>

Use the new devm_resource_to_mapped_ptr function to simplify the code
and standardize the error-handling. Silently fixes a wrong type for the
resource_size variable as well.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
---
 drivers/watchdog/imx2_wdt.c |   22 +++-------------------
 1 files changed, 3 insertions(+), 19 deletions(-)

diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
index b8ef2c6..1fc6714 100644
--- a/drivers/watchdog/imx2_wdt.c
+++ b/drivers/watchdog/imx2_wdt.c
@@ -247,28 +247,12 @@ static struct miscdevice imx2_wdt_miscdev = {
 static int __init imx2_wdt_probe(struct platform_device *pdev)
 {
 	int ret;
-	int res_size;
 	struct resource *res;
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	if (!res) {
-		dev_err(&pdev->dev, "can't get device resources\n");
-		return -ENODEV;
-	}
-
-	res_size = resource_size(res);
-	if (!devm_request_mem_region(&pdev->dev, res->start, res_size,
-		res->name)) {
-		dev_err(&pdev->dev, "can't allocate %d bytes at %d address\n",
-			res_size, res->start);
-		return -ENOMEM;
-	}
-
-	imx2_wdt.base = devm_ioremap_nocache(&pdev->dev, res->start, res_size);
-	if (!imx2_wdt.base) {
-		dev_err(&pdev->dev, "ioremap failed\n");
-		return -ENOMEM;
-	}
+	ret = devm_resource_to_mapped_ptr(&pdev->dev, res, &imx2_wdt.base);
+	if (ret)
+		return ret;
 
 	imx2_wdt.clk = clk_get(&pdev->dev, NULL);
 	if (IS_ERR(imx2_wdt.clk)) {
-- 
1.7.6.3


^ permalink raw reply related

* [RFC 0/4] simplify remapping a resource for drivers
From: Wolfram Sang @ 2011-10-24  8:42 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arm-kernel, Greg KH, Grant Likely, Tejun Heo, Wolfram Sang

Mostly all platform drivers need to do something like this to get a ioremapped
pointer from a resource (and some have multiple resources to be remapped):

 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (!res) {
		dev_err(&pdev->dev, "can't get device resources\n");
		return -ENOENT;
	}

	res_size = resource_size(res);
	if (!devm_request_mem_region(&pdev->dev, res->start, res_size, res->name)) {
		dev_err(&pdev->dev, "can't allocate %d bytes at %d address\n",
				res_size, res->start);
		return -EBUSY;
	}

	priv->base = devm_ioremap_nocache(&pdev->dev, res->start, res_size);
	if (priv->base) {
		dev_err(&pdev->dev, "ioremap failed\n");
		return -ENOMEM;
	}

In case of not using managed devices, there is also code for cleaning up when
hitting an error. After this series, the same can be done with:

 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	err = devm_resource_to_mapped_ptr(&pdev->dev, res, &priv->base);
	if (err)
		return err;

The new function will perform all necessary checks and return with consistent
error codes and messages on failures. It also prevents common mistakes like
using a wrong type for res_size or not calling the _nocache-variant of ioremap
if the resource is not marked otherwise. Because the new functions works with
the struct device (plus a resource), it will probably be useful even if
platform drivers run out of fashion.

The first two patches are minor cleanups on devres found while working on the code.
The third patch adds the new function. The fourth patch is an example, so we have a
simple use-case for the proposed functionality.

The series can also be fetched from:

	git://git.pengutronix.de/git/wsa/linux-2.6.git resource_to_ptr

Looking forward to reviews and comments.

Thanks,

   Wolfram


Wolfram Sang (4):
  Documentation: devres: add allocation functions to list of supported calls
  lib: devres: add annotations for #endif
  lib: devres: add function which remaps a given resource
  watchdog: imx2: simplify resource allocation

 Documentation/driver-model/devres.txt |    5 +++
 drivers/watchdog/imx2_wdt.c           |   22 ++-----------
 include/linux/device.h                |    3 ++
 lib/devres.c                          |   56 +++++++++++++++++++++++++++++++-
 4 files changed, 65 insertions(+), 21 deletions(-)

-- 
1.7.6.3


^ permalink raw reply

* [RFC 0/4] simplify remapping a resource for drivers
From: Wolfram Sang @ 2011-10-24  8:42 UTC (permalink / raw)
  To: linux-arm-kernel

Mostly all platform drivers need to do something like this to get a ioremapped
pointer from a resource (and some have multiple resources to be remapped):

 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (!res) {
		dev_err(&pdev->dev, "can't get device resources\n");
		return -ENOENT;
	}

	res_size = resource_size(res);
	if (!devm_request_mem_region(&pdev->dev, res->start, res_size, res->name)) {
		dev_err(&pdev->dev, "can't allocate %d bytes at %d address\n",
				res_size, res->start);
		return -EBUSY;
	}

	priv->base = devm_ioremap_nocache(&pdev->dev, res->start, res_size);
	if (priv->base) {
		dev_err(&pdev->dev, "ioremap failed\n");
		return -ENOMEM;
	}

In case of not using managed devices, there is also code for cleaning up when
hitting an error. After this series, the same can be done with:

 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	err = devm_resource_to_mapped_ptr(&pdev->dev, res, &priv->base);
	if (err)
		return err;

The new function will perform all necessary checks and return with consistent
error codes and messages on failures. It also prevents common mistakes like
using a wrong type for res_size or not calling the _nocache-variant of ioremap
if the resource is not marked otherwise. Because the new functions works with
the struct device (plus a resource), it will probably be useful even if
platform drivers run out of fashion.

The first two patches are minor cleanups on devres found while working on the code.
The third patch adds the new function. The fourth patch is an example, so we have a
simple use-case for the proposed functionality.

The series can also be fetched from:

	git://git.pengutronix.de/git/wsa/linux-2.6.git resource_to_ptr

Looking forward to reviews and comments.

Thanks,

   Wolfram


Wolfram Sang (4):
  Documentation: devres: add allocation functions to list of supported calls
  lib: devres: add annotations for #endif
  lib: devres: add function which remaps a given resource
  watchdog: imx2: simplify resource allocation

 Documentation/driver-model/devres.txt |    5 +++
 drivers/watchdog/imx2_wdt.c           |   22 ++-----------
 include/linux/device.h                |    3 ++
 lib/devres.c                          |   56 +++++++++++++++++++++++++++++++-
 4 files changed, 65 insertions(+), 21 deletions(-)

-- 
1.7.6.3

^ permalink raw reply

* Re: [Xenomai-help] installing xenomai on pandaboard
From: Gilles Chanteperdrix @ 2011-10-24  8:41 UTC (permalink / raw)
  To: Robert; +Cc: xenomai
In-Reply-To: <2b889a6c.722ea076.4ea51970.edef6@domain.hid>

On 10/24/2011 09:53 AM, Robert wrote:
> Compiled the kernel, modules and copied uImage to boot partition.
> After reboot i got the following dmesg | grep -i xeno:
> user@domain.hid$ dmesg | grep -i xeno
> [    1.195556] I-pipe: Domain Xenomai registered.
> [    1.195587] Xenomai: hal/arm started.
> [    1.195861] Xenomai: scheduling class idle registered.
> [    1.195861] Xenomai: scheduling class rt registered.
> [    1.199798] Xenomai: real-time nucleus v2.6.0-rc5 (head) loaded.
> [    1.199798] Xenomai: debug mode enabled.
> [    1.590240] Xenomai: native skin init failed, code -19.
> [    1.590270] Xenomai: starting POSIX services.
> [    1.980804] Xenomai: POSIX skin init failed, code -19.
> [    2.371429] Xenomai: RTDM skin init failed, code -19.

Missed that. Please post us your .config

-- 
					    Gilles.


^ permalink raw reply

* Re: [Qemu-devel] Question about intermediate code generation in qemu (tcg)
From: Peter Maydell @ 2011-10-24  8:39 UTC (permalink / raw)
  To: Carter Cheng; +Cc: qemu-devel
In-Reply-To: <CALS6=qVFDqhOuPCRMOOSLXsw5_EFZrGS1mt16FN3FJt7Ov9p=A@mail.gmail.com>

On 24 October 2011 07:46, Carter Cheng <cartercheng@gmail.com> wrote:
> I was wondering if someone could help me understand some aspects of the
> current qemu code generation routines. How are floating point and SSE ops
> currently handled? I do not see specific tcg routines for these cases(the
> README seems to indicate that FP and vector ops are not handled using the
> current IL).

FP instructions are generally turned into code which calls out to
a "helper function" written in C which emulates the floating point
arithmetic -- see target-i386/op_helper.c for the x87 ops and
target-i386/ops_sse.h for the SSE ops. (Some simple arithmetic
vector ops might be done by generating inline code; ARM does this
but I haven't checked target-i386.) IEEE arithmetic emulation
is done in fpu/ but you probably don't need to look at the actual
implementation...

In the TCG intermediate representation there's no special support
for float/double types -- they're just passed around as i32/i64.

-- PMM

^ permalink raw reply

* Re: Vanilla-Kernel 3 - page allocation failure
From: Stefan Priebe - Profihost AG @ 2011-10-24  8:36 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: p.herz, David Rientjes, Andi Kleen, linux-kernel
In-Reply-To: <1319444998.2381.4.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>

Am 24.10.2011 10:29, schrieb Eric Dumazet:
> Le lundi 24 octobre 2011 à 10:19 +0200, Philipp Herz - Profihost AG a
> écrit :
>> Currently i can not provide any further information, 'cause server has
>> been restarted.
>>
>> What exactly are you looking for?
>
> A dmesg for 2.6.32 is OK, I look for :
>
> - memory layout (tg3 has workarounds for 4G crossing),
> - and exact tg3 chip, tg3 messages...

Here is a dmesg from 2.6.38 where this message also does not occur:
http://pastebin.com/raw.php?i=HjDEKVcp

Stefan

^ permalink raw reply

* [U-Boot] [PATCH] qong: remove unneeded "1" from qong.h
From: Stefano Babic @ 2011-10-24  8:36 UTC (permalink / raw)
  To: u-boot
In-Reply-To: <1319216634-2754-1-git-send-email-fabio.estevam@freescale.com>

On 10/21/2011 07:03 PM, Fabio Estevam wrote:
> Remove unneeded "1" from qong.h.

Hi Fabio,

thanks for your "cleanup" work, it is high appreciated !

>  
>  /*
>   * Filesystem
> @@ -311,6 +311,6 @@ extern int qong_nand_rdy(void *chip);
>  #define CONFIG_SYS_GBL_DATA_OFFSET	(CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
>  #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET)
>  
> -#define CONFIG_BOARD_EARLY_INIT_F	1
> +#define CONFIG_BOARD_EARLY_INIT_F
>  
>  #endif /* __CONFIG_H */

Applied to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================

^ permalink raw reply

* Re: [Xenomai-help] installing xenomai on pandaboard
From: Gilles Chanteperdrix @ 2011-10-24  8:33 UTC (permalink / raw)
  To: Robert; +Cc: xenomai
In-Reply-To: <2b889a6c.722ea076.4ea51970.edef6@domain.hid>

On 10/24/2011 09:53 AM, Robert wrote:
> 
> 
> 
> Dnia 20 września 2011 20:13 Gilles Chanteperdrix <gilles.chanteperdrix@domain.hid> napisał(a):
> 
>> On 09/20/2011 07:26 PM, Robert wrote:
>>> Can someone help me installing xenomai on panda?
>>>
>>> What should I do, to install xenomai on ubuntu host?
>>> Download kernel from kernel.org and patch it with xenomai and adeos-patch, or download kernel from git repository, or download ubuntu image-omap4 via apt-get source?
>>>
>>> The last one would download 2.6.38 kernel, but there is no adeos patch for this version yet.
>>> It is also possible to download 2.6.37-9, but the same problem.
>>
>> The upcoming xenomai 2.6.0 supports panda. It should be released real
>> soon now, in the mean-time, you can try xenomai 2.6.0-rc3.
>>
>>
> 
> Hi again,
> I have downloaded xenomai 2.6.0-rc5, and kernel 2.6.38.8 from kernel.org to ubuntu 11.04 on pandaboard.
> Patched it with adeos included in xeno package.
> 
> Compiled the kernel, modules and copied uImage to boot partition.
> After reboot i got the following dmesg | grep -i xeno:
> user@domain.hid$ dmesg | grep -i xeno
> [    1.195556] I-pipe: Domain Xenomai registered.
> [    1.195587] Xenomai: hal/arm started.
> [    1.195861] Xenomai: scheduling class idle registered.
> [    1.195861] Xenomai: scheduling class rt registered.
> [    1.199798] Xenomai: real-time nucleus v2.6.0-rc5 (head) loaded.
> [    1.199798] Xenomai: debug mode enabled.
> [    1.590240] Xenomai: native skin init failed, code -19.
> [    1.590270] Xenomai: starting POSIX services.
> [    1.980804] Xenomai: POSIX skin init failed, code -19.
> [    2.371429] Xenomai: RTDM skin init failed, code -19.
> 
> user@domain.hid$ modprobe -l | grep -i xeno
> user@domain.hid$ modprobe xeno_native
> user@domain.hid$ modprobe -l | grep -i xeno
> 
> user@domain.hid$ sudo ./xeno-test
> /usr/xenomai/bin/xeno-test-run-wrapper: 19: source: not found
> ./xeno-test failed: dead child 1238 not found!

That is surprising, what shell do you use? Have you copied all files
installed by xenomai on the board root filesystem?

>
> user@domain.hid$ ./cond-torture-native
> Xenomai: incompatible feature set
> (userland requires "kuser_tsc fastsynch nosmp", kernel provides "sa1100 v6 eabi
> kuser_tsc fastsynch smp", missing="nosmp").
> 
> Should I disable smp in kernel config?

That, or more likely enable smp in user-space configuration.


-- 
					    Gilles.



^ permalink raw reply

* Re: [PATCH] ceph: fix memory leak in async readpages
From: Jeff Wu @ 2011-10-24  8:28 UTC (permalink / raw)
  To: Sage Weil; +Cc: David Flynn, ceph-devel@vger.kernel.org
In-Reply-To: <Pine.LNX.4.64.1109281215280.13650@cobra.newdream.net>

Hi ,

start_read() do twice "kfree(pages)",

................
 out_pages:
        ceph_release_page_vector(pages, nr_pages);
        kfree(pages);


ceph_release_page_vector had kfree pages, continue to do kfree(pages),
sometimes ,async read ,printk "BUG kmalloc-16: Object already
free" ,then OOPS.

Jeff Wu

----------------------------------------------------------------------
void ceph_release_page_vector(struct page **pages, int num_pages)
{
	int i;

	for (i = 0; i < num_pages; i++)
		__free_pages(pages[i], 0);
	kfree(pages);
}


$ git diff
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 5ffee90..4144caf 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -345,7 +345,6 @@ static int start_read(struct inode *inode, struct
list_head *page_list, int max)
 
 out_pages:
        ceph_release_page_vector(pages, nr_pages);
-       kfree(pages);
 out:
        ceph_osdc_put_request(req);
        return ret;


On Thu, 2011-09-29 at 03:16 +0800, Sage Weil wrote:
> On Wed, 28 Sep 2011, Sage Weil wrote:
> > I'll send this upstream with the other patches so it'll hopefully make 
> > 3.1...
> 
> Er, not really.. this'll go upstream during the next merge window, along 
> with the readahead code.  :)
> 
> sage
> 
> 
> > 
> > Thanks!
> > sage
> > 
> > 
> > On Wed, 28 Sep 2011, David Flynn wrote:
> > 
> > > The finish_read callback introduced in 63c90314546c1cec1f220f6ab24ea
> > > fails to release the page list allocated in start_read.
> > > ---
> > >  fs/ceph/addr.c |    1 +
> > >  1 files changed, 1 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> > > index e06a322..4144caf 100644
> > > --- a/fs/ceph/addr.c
> > > +++ b/fs/ceph/addr.c
> > > @@ -261,6 +261,7 @@ static void finish_read(struct ceph_osd_request *req, struct ceph_msg *msg)
> > >  		unlock_page(page);
> > >  		page_cache_release(page);
> > >  	}
> > > +	kfree(req->r_pages);
> > >  }
> > >  
> > >  /*
> > > -- 
> > > 1.7.4.1
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > > 
> > > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> > 
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply related

* Re: [PATCH] staging:iio:treewide only use shared to decide on interfaces
From: Jonathan Cameron @ 2011-10-24  8:33 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: linux-iio, michael.hennerich, device-drivers-devel
In-Reply-To: <4EA5220A.6010301@metafoo.de>

On 10/24/11 09:30, Lars-Peter Clausen wrote:
> On 10/21/2011 05:39 PM, Jonathan Cameron wrote:
>> Internally the fact that say scale is shared across channels is
>> actually of remarkably little interest.  Hence lets not store it.
>> Numerous devices have weird combinations of channels sharing
>> scale anyway so it is not as though this was really telling
>> us much. Note however that we do still use the shared sysfs
>> attrs thus massively reducing the number of attrs in complex
>> drivers.
>>
>> Side effect is that certain drivers that were abusing this
>> (mostly my work) needed to do a few more checks on what the
>> channel they are being queried on actually is.
>>
>> This is also helpful for in kernel interfaces where we
>> just want to query the scale and don't care whether it
>> is shared with other channels or not.
>>
>> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
> 
> Hi
> 
> Seems to work. I think it makes sense to submit this one and the other,
> which removes the bitmask addressing, together. Will you take care of this?
Yes.  Might take a few days to hit though as I would guess Greg is going
to be busy at the kernel summit.

Are you happy to Ack this patch or if not give a tested-by.
Whilst I can push stuff on without review to Greg, I always prefer not to!

Jonathan

^ permalink raw reply

* Re: serial-console: IMAGE_FEATURE, MACHINE_FEATURE or DISTRO_FEATURE?
From: Frans Meulenbroeks @ 2011-10-24  8:27 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer
In-Reply-To: <F930E711-421C-439B-AAA8-EEBA0371ED86@dominion.thruhere.net>

[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]

2011/10/24 Koen Kooi <koen@dominion.thruhere.net>

> Hi,
>
> Otavio is cleaning up systemd in meta-oe to work with his initramfs setup
> and we stumbled onto a challenge that we'd like some more feedback on.
>
> The old sysvinit recipes always hardcode a serial getty into inittab,
> systemd installs a getty@<port>.service file instead. Otavio doesn't need
> (or want) a getty on serial in his setup, but I need (and want) it on all my
> setups. So we agreed that it needs to be a feature :)
>
> I nitially suggested MACHINE_FEATURE, which Otavio implemented here:
> http://patchwork.openembedded.org/patch/13713/ , but I'm having second
> thoughs about it and am leaning toward an IMAGE_FEATURE instead. Since this
> involves *_FEATURE and we want systemd to move into oe-core eventually I'm
> moving the discussion from OE-devel to OE-core. Not much discussion has been
> going on, so I hope we'll get some more feedback here. I'll try to
> buttonhole some more OE developers at ELC and report back as well.
>  <http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core>



Technically it is probably both.
I've seen embedded systems without a console. That seems to indicate a
machine feature.
Then again even if you have a console you might not want to enable it (e.g.
in order not to give the customer root access or even info wrt printk etc).
That seems to indicate a machine feature.
Probably the answer is inbetween: A machine feature HAS_CONSOLE or something
like that and an image feature CONSOLE_ENABLED.

My 2 cents.

Frans

[-- Attachment #2: Type: text/html, Size: 1973 bytes --]

^ permalink raw reply

* Re: lvs-users mailing list and archive dead?
From: Graeme Fowler @ 2011-10-24  8:32 UTC (permalink / raw)
  To: Tomasz Chmielewski; +Cc: lvs-devel
In-Reply-To: <4EA4709A.1050501@wpkg.org>

On Sun, 2011-10-23 at 21:52 +0200, Tomasz Chmielewski wrote:
> I'm not able to resolve names from it from a largish German hosting 
> provider, Hetzner.

Can you please tell me which IP netblock these queries are originating
from? I smell a previously unallocated (to an RIR) block which is in my
bogons list.

Thanks!

Graeme


^ permalink raw reply

* Re: Vanilla-Kernel 3 - page allocation failure
From: Eric Dumazet @ 2011-10-24  8:29 UTC (permalink / raw)
  To: p.herz; +Cc: David Rientjes, Andi Kleen, s.priebe, linux-kernel
In-Reply-To: <4EA51F9B.7090806@profihost.ag>

Le lundi 24 octobre 2011 à 10:19 +0200, Philipp Herz - Profihost AG a
écrit :
> Currently i can not provide any further information, 'cause server has 
> been restarted.
> 
> What exactly are you looking for?

A dmesg for 2.6.32 is OK, I look for :

- memory layout (tg3 has workarounds for 4G crossing),
- and exact tg3 chip, tg3 messages...




^ permalink raw reply

* Re: [PATCH] staging:iio:treewide only use shared to decide on interfaces
From: Lars-Peter Clausen @ 2011-10-24  8:30 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, michael.hennerich, device-drivers-devel
In-Reply-To: <1319211579-14367-2-git-send-email-jic23@cam.ac.uk>

On 10/21/2011 05:39 PM, Jonathan Cameron wrote:
> Internally the fact that say scale is shared across channels is
> actually of remarkably little interest.  Hence lets not store it.
> Numerous devices have weird combinations of channels sharing
> scale anyway so it is not as though this was really telling
> us much. Note however that we do still use the shared sysfs
> attrs thus massively reducing the number of attrs in complex
> drivers.
> 
> Side effect is that certain drivers that were abusing this
> (mostly my work) needed to do a few more checks on what the
> channel they are being queried on actually is.
> 
> This is also helpful for in kernel interfaces where we
> just want to query the scale and don't care whether it
> is shared with other channels or not.
> 
> Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>

Hi

Seems to work. I think it makes sense to submit this one and the other,
which removes the bitmask addressing, together. Will you take care of this?

Thanks,
- Lars

^ permalink raw reply


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.