ia64/xen-unstable

changeset 12032:64100a77fd17

[XEN] Logging parameters for common code.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
author kaf24@localhost.localdomain
date Fri Oct 27 18:55:16 2006 +0100 (2006-10-27)
parents fd8036d06e10
children 5c8c5925c7e2
files xen/common/event_channel.c xen/common/grant_table.c xen/common/memory.c xen/common/multicall.c xen/common/page_alloc.c xen/common/schedule.c xen/common/trace.c
line diff
     1.1 --- a/xen/common/event_channel.c	Fri Oct 27 18:52:55 2006 +0100
     1.2 +++ b/xen/common/event_channel.c	Fri Oct 27 18:55:16 2006 +0100
     1.3 @@ -40,7 +40,8 @@
     1.4  
     1.5  #define ERROR_EXIT(_errno)                                          \
     1.6      do {                                                            \
     1.7 -        DPRINTK("EVTCHNOP failure: domain %d, error %d, line %d\n", \
     1.8 +        DPRINTK(XENLOG_G_WARNING                                    \
     1.9 +                "EVTCHNOP failure: domain %d, error %d, line %d\n", \
    1.10                  current->domain->domain_id, (_errno), __LINE__);    \
    1.11          rc = (_errno);                                              \
    1.12          goto out;                                                   \
     2.1 --- a/xen/common/grant_table.c	Fri Oct 27 18:52:55 2006 +0100
     2.2 +++ b/xen/common/grant_table.c	Fri Oct 27 18:55:16 2006 +0100
     2.3 @@ -47,7 +47,7 @@ union grant_combo {
     2.4  
     2.5  #define PIN_FAIL(_lbl, _rc, _f, _a...)          \
     2.6      do {                                        \
     2.7 -        DPRINTK( _f, ## _a );                   \
     2.8 +        DPRINTK( XENLOG_G_WARNING _f, ## _a );  \
     2.9          rc = (_rc);                             \
    2.10          goto _lbl;                              \
    2.11      } while ( 0 )
    2.12 @@ -109,7 +109,8 @@ static void
    2.13      if ( unlikely(op->ref >= NR_GRANT_ENTRIES) ||
    2.14           unlikely((op->flags & (GNTMAP_device_map|GNTMAP_host_map)) == 0) )
    2.15      {
    2.16 -        DPRINTK("Bad ref (%d) or flags (%x).\n", op->ref, op->flags);
    2.17 +        DPRINTK(XENLOG_G_INFO "Bad ref (%d) or flags (%x).\n",
    2.18 +                op->ref, op->flags);
    2.19          op->status = GNTST_bad_gntref;
    2.20          return;
    2.21      }
    2.22 @@ -124,7 +125,7 @@ static void
    2.23      {
    2.24          if ( rd != NULL )
    2.25              put_domain(rd);
    2.26 -        DPRINTK("Could not find domain %d\n", op->dom);
    2.27 +        DPRINTK(XENLOG_G_INFO "Could not find domain %d\n", op->dom);
    2.28          op->status = GNTST_bad_domain;
    2.29          return;
    2.30      }
    2.31 @@ -139,7 +140,7 @@ static void
    2.32          if ( (lgt->maptrack_limit << 1) > MAPTRACK_MAX_ENTRIES )
    2.33          {
    2.34              put_domain(rd);
    2.35 -            DPRINTK("Maptrack table is at maximum size.\n");
    2.36 +            DPRINTK(XENLOG_G_INFO "Maptrack table is at maximum size.\n");
    2.37              op->status = GNTST_no_device_space;
    2.38              return;
    2.39          }
    2.40 @@ -149,7 +150,7 @@ static void
    2.41          if ( new_mt == NULL )
    2.42          {
    2.43              put_domain(rd);
    2.44 -            DPRINTK("No more map handles available.\n");
    2.45 +            DPRINTK(XENLOG_G_INFO "No more map handles available.\n");
    2.46              op->status = GNTST_no_device_space;
    2.47              return;
    2.48          }
    2.49 @@ -166,7 +167,7 @@ static void
    2.50          lgt->maptrack_order   += 1;
    2.51          lgt->maptrack_limit  <<= 1;
    2.52  
    2.53 -        DPRINTK("Doubled maptrack size\n");
    2.54 +        DPRINTK(XENLOG_G_INFO "Doubled maptrack size\n");
    2.55          handle = get_maptrack_handle(ld->grant_table);
    2.56      }
    2.57  
    2.58 @@ -353,7 +354,7 @@ static void
    2.59      if ( unlikely(op->handle >= ld->grant_table->maptrack_limit) ||
    2.60           unlikely(!map->flags) )
    2.61      {
    2.62 -        DPRINTK("Bad handle (%d).\n", op->handle);
    2.63 +        DPRINTK(XENLOG_G_INFO "Bad handle (%d).\n", op->handle);
    2.64          op->status = GNTST_bad_handle;
    2.65          return;
    2.66      }
    2.67 @@ -366,7 +367,7 @@ static void
    2.68      {
    2.69          if ( rd != NULL )
    2.70              put_domain(rd);
    2.71 -        DPRINTK("Could not find domain %d\n", dom);
    2.72 +        DPRINTK(XENLOG_G_INFO "Could not find domain %d\n", dom);
    2.73          op->status = GNTST_bad_domain;
    2.74          return;
    2.75      }
    2.76 @@ -486,13 +487,14 @@ gnttab_setup_table(
    2.77  
    2.78      if ( unlikely(copy_from_guest(&op, uop, 1) != 0) )
    2.79      {
    2.80 -        DPRINTK("Fault while reading gnttab_setup_table_t.\n");
    2.81 +        DPRINTK(XENLOG_G_INFO "Fault while reading gnttab_setup_table_t.\n");
    2.82          return -EFAULT;
    2.83      }
    2.84  
    2.85      if ( unlikely(op.nr_frames > NR_GRANT_FRAMES) )
    2.86      {
    2.87 -        DPRINTK("Xen only supports up to %d grant-table frames per domain.\n",
    2.88 +        DPRINTK(XENLOG_G_INFO "Xen only supports up to %d grant-table frames"
    2.89 +                " per domain.\n",
    2.90                  NR_GRANT_FRAMES);
    2.91          op.status = GNTST_general_error;
    2.92          goto out;
    2.93 @@ -511,7 +513,7 @@ gnttab_setup_table(
    2.94  
    2.95      if ( unlikely((d = find_domain_by_id(dom)) == NULL) )
    2.96      {
    2.97 -        DPRINTK("Bad domid %d.\n", dom);
    2.98 +        DPRINTK(XENLOG_G_INFO "Bad domid %d.\n", dom);
    2.99          op.status = GNTST_bad_domain;
   2.100          goto out;
   2.101      }
   2.102 @@ -549,7 +551,7 @@ gnttab_prepare_for_transfer(
   2.103      if ( unlikely((rgt = rd->grant_table) == NULL) ||
   2.104           unlikely(ref >= NR_GRANT_ENTRIES) )
   2.105      {
   2.106 -        DPRINTK("Dom %d has no g.t., or ref is bad (%d).\n",
   2.107 +        DPRINTK(XENLOG_G_INFO "Dom %d has no g.t., or ref is bad (%d).\n",
   2.108                  rd->domain_id, ref);
   2.109          return 0;
   2.110      }
   2.111 @@ -565,7 +567,8 @@ gnttab_prepare_for_transfer(
   2.112          if ( unlikely(scombo.shorts.flags != GTF_accept_transfer) ||
   2.113               unlikely(scombo.shorts.domid != ld->domain_id) )
   2.114          {
   2.115 -            DPRINTK("Bad flags (%x) or dom (%d). (NB. expected dom %d)\n",
   2.116 +            DPRINTK(XENLOG_G_INFO "Bad flags (%x) or dom (%d). "
   2.117 +                    "(NB. expected dom %d)\n",
   2.118                      scombo.shorts.flags, scombo.shorts.domid,
   2.119                      ld->domain_id);
   2.120              goto fail;
   2.121 @@ -581,7 +584,7 @@ gnttab_prepare_for_transfer(
   2.122  
   2.123          if ( retries++ == 4 )
   2.124          {
   2.125 -            DPRINTK("Shared grant entry is unstable.\n");
   2.126 +            DPRINTK(XENLOG_G_WARNING "Shared grant entry is unstable.\n");
   2.127              goto fail;
   2.128          }
   2.129  
   2.130 @@ -613,7 +616,8 @@ gnttab_transfer(
   2.131          /* Read from caller address space. */
   2.132          if ( unlikely(__copy_from_guest_offset(&gop, uop, i, 1)) )
   2.133          {
   2.134 -            DPRINTK("gnttab_transfer: error reading req %d/%d\n", i, count);
   2.135 +            DPRINTK(XENLOG_G_INFO "gnttab_transfer: error reading req %d/%d\n",
   2.136 +                    i, count);
   2.137              return -EFAULT;
   2.138          }
   2.139  
   2.140 @@ -622,7 +626,7 @@ gnttab_transfer(
   2.141          /* Check the passed page frame for basic validity. */
   2.142          if ( unlikely(!mfn_valid(mfn)) )
   2.143          { 
   2.144 -            DPRINTK("gnttab_transfer: out-of-range %lx\n",
   2.145 +            DPRINTK(XENLOG_G_INFO "gnttab_transfer: out-of-range %lx\n",
   2.146                      (unsigned long)gop.mfn);
   2.147              gop.status = GNTST_bad_page;
   2.148              goto copyback;
   2.149 @@ -631,7 +635,7 @@ gnttab_transfer(
   2.150          page = mfn_to_page(mfn);
   2.151          if ( unlikely(IS_XEN_HEAP_FRAME(page)) )
   2.152          { 
   2.153 -            DPRINTK("gnttab_transfer: xen frame %lx\n",
   2.154 +            DPRINTK(XENLOG_G_INFO "gnttab_transfer: xen frame %lx\n",
   2.155                      (unsigned long)gop.mfn);
   2.156              gop.status = GNTST_bad_page;
   2.157              goto copyback;
   2.158 @@ -646,7 +650,8 @@ gnttab_transfer(
   2.159          /* Find the target domain. */
   2.160          if ( unlikely((e = find_domain_by_id(gop.domid)) == NULL) )
   2.161          {
   2.162 -            DPRINTK("gnttab_transfer: can't find domain %d\n", gop.domid);
   2.163 +            DPRINTK(XENLOG_G_INFO "gnttab_transfer: can't find domain %d\n",
   2.164 +                    gop.domid);
   2.165              page->count_info &= ~(PGC_count_mask|PGC_allocated);
   2.166              free_domheap_page(page);
   2.167              gop.status = GNTST_bad_domain;
   2.168 @@ -665,7 +670,8 @@ gnttab_transfer(
   2.169               unlikely(!gnttab_prepare_for_transfer(e, d, gop.ref)) )
   2.170          {
   2.171              if ( !test_bit(_DOMF_dying, &e->domain_flags) )
   2.172 -                DPRINTK("gnttab_transfer: Transferee has no reservation "
   2.173 +                DPRINTK(XENLOG_G_INFO "gnttab_transfer: "
   2.174 +                        "Transferee has no reservation "
   2.175                          "headroom (%d,%d) or provided a bad grant ref (%08x) "
   2.176                          "or is dying (%lx)\n",
   2.177                          e->tot_pages, e->max_pages, gop.ref, e->domain_flags);
   2.178 @@ -701,7 +707,8 @@ gnttab_transfer(
   2.179      copyback:
   2.180          if ( unlikely(__copy_to_guest_offset(uop, i, &gop, 1)) )
   2.181          {
   2.182 -            DPRINTK("gnttab_transfer: error writing resp %d/%d\n", i, count);
   2.183 +            DPRINTK(XENLOG_G_INFO "gnttab_transfer: error writing resp %d/%d\n",
   2.184 +                    i, count);
   2.185              return -EFAULT;
   2.186          }
   2.187      }
   2.188 @@ -1090,7 +1097,8 @@ gnttab_release_mappings(
   2.189  
   2.190          ref = map->ref;
   2.191  
   2.192 -        DPRINTK("Grant release (%hu) ref:(%hu) flags:(%x) dom:(%hu)\n",
   2.193 +        DPRINTK(XENLOG_G_INFO "Grant release (%hu) ref:(%hu) "
   2.194 +                "flags:(%x) dom:(%hu)\n",
   2.195                  handle, ref, map->flags, map->domid);
   2.196  
   2.197          rd = find_domain_by_id(map->domid);
     3.1 --- a/xen/common/memory.c	Fri Oct 27 18:52:55 2006 +0100
     3.2 +++ b/xen/common/memory.c	Fri Oct 27 18:55:16 2006 +0100
     3.3 @@ -63,7 +63,7 @@ increase_reservation(
     3.4          if ( unlikely((page = __alloc_domheap_pages( d, cpu, 
     3.5              extent_order, memflags )) == NULL) ) 
     3.6          {
     3.7 -            DPRINTK("Could not allocate order=%d extent: "
     3.8 +            DPRINTK(XENLOG_G_INFO "Could not allocate order=%d extent: "
     3.9                      "id=%d memflags=%x (%ld of %d)\n",
    3.10                      extent_order, d->domain_id, memflags, i, nr_extents);
    3.11              return i;
    3.12 @@ -118,7 +118,7 @@ populate_physmap(
    3.13          if ( unlikely((page = __alloc_domheap_pages( d, cpu, 
    3.14              extent_order, memflags )) == NULL) ) 
    3.15          {
    3.16 -            DPRINTK("Could not allocate order=%d extent: "
    3.17 +            DPRINTK(XENLOG_G_INFO "Could not allocate order=%d extent: "
    3.18                      "id=%d memflags=%x (%ld of %d)\n",
    3.19                      extent_order, d->domain_id, memflags, i, nr_extents);
    3.20              goto out;
    3.21 @@ -157,7 +157,7 @@ guest_remove_page(
    3.22      mfn = gmfn_to_mfn(d, gmfn);
    3.23      if ( unlikely(!mfn_valid(mfn)) )
    3.24      {
    3.25 -        DPRINTK("Domain %u page number %lx invalid\n",
    3.26 +        DPRINTK(XENLOG_G_INFO "Domain %u page number %lx invalid\n",
    3.27                  d->domain_id, gmfn);
    3.28          return 0;
    3.29      }
    3.30 @@ -165,7 +165,7 @@ guest_remove_page(
    3.31      page = mfn_to_page(mfn);
    3.32      if ( unlikely(!get_page(page, d)) )
    3.33      {
    3.34 -        DPRINTK("Bad page free for domain %u\n", d->domain_id);
    3.35 +        DPRINTK(XENLOG_G_INFO "Bad page free for domain %u\n", d->domain_id);
    3.36          return 0;
    3.37      }
    3.38  
    3.39 @@ -178,7 +178,7 @@ guest_remove_page(
    3.40      if ( unlikely(!page_is_removable(page)) )
    3.41      {
    3.42          /* We'll make this a guest-visible error in future, so take heed! */
    3.43 -        DPRINTK("Dom%d freeing in-use page %lx (pseudophys %lx):"
    3.44 +        DPRINTK(XENLOG_G_INFO "Dom%d freeing in-use page %lx (pseudophys %lx):"
    3.45                  " count=%lx type=%lx\n",
    3.46                  d->domain_id, mfn, get_gpfn_from_mfn(mfn),
    3.47                  (unsigned long)page->count_info, page->u.inuse.type_info);
     4.1 --- a/xen/common/multicall.c	Fri Oct 27 18:52:55 2006 +0100
     4.2 +++ b/xen/common/multicall.c	Fri Oct 27 18:55:16 2006 +0100
     4.3 @@ -24,7 +24,7 @@ do_multicall(
     4.4  
     4.5      if ( unlikely(__test_and_set_bit(_MCSF_in_multicall, &mcs->flags)) )
     4.6      {
     4.7 -        DPRINTK("Multicall reentry is disallowed.\n");
     4.8 +        DPRINTK(XENLOG_G_INFO "Multicall reentry is disallowed.\n");
     4.9          return -EINVAL;
    4.10      }
    4.11  
     5.1 --- a/xen/common/page_alloc.c	Fri Oct 27 18:52:55 2006 +0100
     5.2 +++ b/xen/common/page_alloc.c	Fri Oct 27 18:55:16 2006 +0100
     5.3 @@ -599,7 +599,8 @@ int assign_pages(
     5.4  
     5.5      if ( unlikely(test_bit(_DOMF_dying, &d->domain_flags)) )
     5.6      {
     5.7 -        DPRINTK("Cannot assign page to domain%d -- dying.\n", d->domain_id);
     5.8 +        DPRINTK(XENLOG_G_INFO "Cannot assign page to domain%d -- dying.\n",
     5.9 +                d->domain_id);
    5.10          goto fail;
    5.11      }
    5.12  
    5.13 @@ -607,7 +608,7 @@ int assign_pages(
    5.14      {
    5.15          if ( unlikely((d->tot_pages + (1 << order)) > d->max_pages) )
    5.16          {
    5.17 -            DPRINTK("Over-allocation for domain %u: %u > %u\n",
    5.18 +            DPRINTK(XENLOG_G_INFO "Over-allocation for domain %u: %u > %u\n",
    5.19                      d->domain_id, d->tot_pages + (1 << order), d->max_pages);
    5.20              goto fail;
    5.21          }
     6.1 --- a/xen/common/schedule.c	Fri Oct 27 18:52:55 2006 +0100
     6.2 +++ b/xen/common/schedule.c	Fri Oct 27 18:55:16 2006 +0100
     6.3 @@ -468,7 +468,7 @@ long do_set_timer_op(s_time_t timeout)
     6.4           * timeout in this case can burn a lot of CPU. We therefore go for a
     6.5           * reasonable middleground of triggering a timer event in 100ms.
     6.6           */
     6.7 -        DPRINTK("Warning: huge timeout set by domain %d (vcpu %d):"
     6.8 +        DPRINTK(XENLOG_G_INFO "Warning: huge timeout set by domain %d (vcpu %d):"
     6.9                  " %"PRIx64"\n",
    6.10                  v->domain->domain_id, v->vcpu_id, (uint64_t)timeout);
    6.11          set_timer(&v->timer, NOW() + MILLISECS(100));
     7.1 --- a/xen/common/trace.c	Fri Oct 27 18:52:55 2006 +0100
     7.2 +++ b/xen/common/trace.c	Fri Oct 27 18:55:16 2006 +0100
     7.3 @@ -131,7 +131,7 @@ static int tb_set_size(int size)
     7.4       */
     7.5      if ( (opt_tbuf_size != 0) || (size <= 0) )
     7.6      {
     7.7 -        DPRINTK("tb_set_size from %d to %d not implemented\n",
     7.8 +        DPRINTK(XENLOG_G_INFO "tb_set_size from %d to %d not implemented\n",
     7.9                  opt_tbuf_size, size);
    7.10          return -EINVAL;
    7.11      }