ia64/xen-unstable

changeset 12974:6deca1ea217f

[XEN][POWERPC] cleanup hard tabs
allowed in some files in order to track linux lineage
Signed-off-by: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Jimi Xenidis <jimix@watson.ibm.com>
date Tue Nov 28 19:01:46 2006 -0500 (2006-11-28)
parents 5a3fd0b7617d
children 9d83185b4c37
files xen/arch/powerpc/bitops.c xen/arch/powerpc/external.c xen/arch/powerpc/memory.c xen/arch/powerpc/of-devtree.h xen/arch/powerpc/of_handler/console.c xen/arch/powerpc/papr/xlate.c xen/arch/powerpc/rtas.c xen/arch/powerpc/shadow.c xen/arch/powerpc/smp.c
line diff
     1.1 --- a/xen/arch/powerpc/bitops.c	Tue Nov 28 18:46:13 2006 -0500
     1.2 +++ b/xen/arch/powerpc/bitops.c	Tue Nov 28 19:01:46 2006 -0500
     1.3 @@ -12,42 +12,42 @@
     1.4   * @size: The maximum size to search
     1.5   */
     1.6  unsigned long find_next_bit(const unsigned long *addr, unsigned long size,
     1.7 -			    unsigned long offset)
     1.8 +                            unsigned long offset)
     1.9  {
    1.10 -	const unsigned long *p = addr + BITOP_WORD(offset);
    1.11 -	unsigned long result = offset & ~(BITS_PER_LONG-1);
    1.12 -	unsigned long tmp;
    1.13 +    const unsigned long *p = addr + BITOP_WORD(offset);
    1.14 +    unsigned long result = offset & ~(BITS_PER_LONG-1);
    1.15 +    unsigned long tmp;
    1.16  
    1.17 -	if (offset >= size)
    1.18 -		return size;
    1.19 -	size -= result;
    1.20 -	offset %= BITS_PER_LONG;
    1.21 -	if (offset) {
    1.22 -		tmp = *(p++);
    1.23 -		tmp &= (~0UL << offset);
    1.24 -		if (size < BITS_PER_LONG)
    1.25 -			goto found_first;
    1.26 -		if (tmp)
    1.27 -			goto found_middle;
    1.28 -		size -= BITS_PER_LONG;
    1.29 -		result += BITS_PER_LONG;
    1.30 -	}
    1.31 -	while (size & ~(BITS_PER_LONG-1)) {
    1.32 -		if ((tmp = *(p++)))
    1.33 -			goto found_middle;
    1.34 -		result += BITS_PER_LONG;
    1.35 -		size -= BITS_PER_LONG;
    1.36 -	}
    1.37 -	if (!size)
    1.38 -		return result;
    1.39 -	tmp = *p;
    1.40 +    if (offset >= size)
    1.41 +        return size;
    1.42 +    size -= result;
    1.43 +    offset %= BITS_PER_LONG;
    1.44 +    if (offset) {
    1.45 +        tmp = *(p++);
    1.46 +        tmp &= (~0UL << offset);
    1.47 +        if (size < BITS_PER_LONG)
    1.48 +            goto found_first;
    1.49 +        if (tmp)
    1.50 +            goto found_middle;
    1.51 +        size -= BITS_PER_LONG;
    1.52 +        result += BITS_PER_LONG;
    1.53 +    }
    1.54 +    while (size & ~(BITS_PER_LONG-1)) {
    1.55 +        if ((tmp = *(p++)))
    1.56 +            goto found_middle;
    1.57 +        result += BITS_PER_LONG;
    1.58 +        size -= BITS_PER_LONG;
    1.59 +    }
    1.60 +    if (!size)
    1.61 +        return result;
    1.62 +    tmp = *p;
    1.63  
    1.64  found_first:
    1.65 -	tmp &= (~0UL >> (BITS_PER_LONG - size));
    1.66 -	if (tmp == 0UL)		/* Are any bits set? */
    1.67 -		return result + size;	/* Nope. */
    1.68 +    tmp &= (~0UL >> (BITS_PER_LONG - size));
    1.69 +    if (tmp == 0UL)        /* Are any bits set? */
    1.70 +        return result + size;    /* Nope. */
    1.71  found_middle:
    1.72 -	return result + __ffs(tmp);
    1.73 +    return result + __ffs(tmp);
    1.74  }
    1.75  
    1.76  /*
    1.77 @@ -55,40 +55,40 @@ found_middle:
    1.78   * Linus' asm-alpha/bitops.h.
    1.79   */
    1.80  unsigned long find_next_zero_bit(const unsigned long *addr, unsigned long size,
    1.81 -				 unsigned long offset)
    1.82 +                                 unsigned long offset)
    1.83  {
    1.84 -	const unsigned long *p = addr + BITOP_WORD(offset);
    1.85 -	unsigned long result = offset & ~(BITS_PER_LONG-1);
    1.86 -	unsigned long tmp;
    1.87 +    const unsigned long *p = addr + BITOP_WORD(offset);
    1.88 +    unsigned long result = offset & ~(BITS_PER_LONG-1);
    1.89 +    unsigned long tmp;
    1.90  
    1.91 -	if (offset >= size)
    1.92 -		return size;
    1.93 -	size -= result;
    1.94 -	offset %= BITS_PER_LONG;
    1.95 -	if (offset) {
    1.96 -		tmp = *(p++);
    1.97 -		tmp |= ~0UL >> (BITS_PER_LONG - offset);
    1.98 -		if (size < BITS_PER_LONG)
    1.99 -			goto found_first;
   1.100 -		if (~tmp)
   1.101 -			goto found_middle;
   1.102 -		size -= BITS_PER_LONG;
   1.103 -		result += BITS_PER_LONG;
   1.104 -	}
   1.105 -	while (size & ~(BITS_PER_LONG-1)) {
   1.106 -		if (~(tmp = *(p++)))
   1.107 -			goto found_middle;
   1.108 -		result += BITS_PER_LONG;
   1.109 -		size -= BITS_PER_LONG;
   1.110 -	}
   1.111 -	if (!size)
   1.112 -		return result;
   1.113 -	tmp = *p;
   1.114 +    if (offset >= size)
   1.115 +        return size;
   1.116 +    size -= result;
   1.117 +    offset %= BITS_PER_LONG;
   1.118 +    if (offset) {
   1.119 +        tmp = *(p++);
   1.120 +        tmp |= ~0UL >> (BITS_PER_LONG - offset);
   1.121 +        if (size < BITS_PER_LONG)
   1.122 +            goto found_first;
   1.123 +        if (~tmp)
   1.124 +            goto found_middle;
   1.125 +        size -= BITS_PER_LONG;
   1.126 +        result += BITS_PER_LONG;
   1.127 +    }
   1.128 +    while (size & ~(BITS_PER_LONG-1)) {
   1.129 +        if (~(tmp = *(p++)))
   1.130 +            goto found_middle;
   1.131 +        result += BITS_PER_LONG;
   1.132 +        size -= BITS_PER_LONG;
   1.133 +    }
   1.134 +    if (!size)
   1.135 +        return result;
   1.136 +    tmp = *p;
   1.137  
   1.138  found_first:
   1.139 -	tmp |= ~0UL << size;
   1.140 -	if (tmp == ~0UL)	/* Are any bits zero? */
   1.141 -		return result + size;	/* Nope. */
   1.142 +    tmp |= ~0UL << size;
   1.143 +    if (tmp == ~0UL)    /* Are any bits zero? */
   1.144 +        return result + size;    /* Nope. */
   1.145  found_middle:
   1.146 -	return result + ffz(tmp);
   1.147 +    return result + ffz(tmp);
   1.148  }
     2.1 --- a/xen/arch/powerpc/external.c	Tue Nov 28 18:46:13 2006 -0500
     2.2 +++ b/xen/arch/powerpc/external.c	Tue Nov 28 19:01:46 2006 -0500
     2.3 @@ -83,7 +83,7 @@ void do_external(struct cpu_user_regs *r
     2.4      vec = xen_mpic_get_irq(regs);
     2.5  
     2.6      if (irq_desc[vec].status & IRQ_PER_CPU) {
     2.7 -	/* x86 do_IRQ does not respect the per cpu flag.  */
     2.8 +        /* x86 do_IRQ does not respect the per cpu flag.  */
     2.9          irq_desc_t *desc = &irq_desc[vec];
    2.10          regs->entry_vector = vec;
    2.11          desc->handler->ack(vec);
     3.1 --- a/xen/arch/powerpc/memory.c	Tue Nov 28 18:46:13 2006 -0500
     3.2 +++ b/xen/arch/powerpc/memory.c	Tue Nov 28 19:01:46 2006 -0500
     3.3 @@ -98,11 +98,11 @@ static void heap_init(struct membuf *mb,
     3.4      ulong start_blk;
     3.5      ulong end_blk = 0;
     3.6  
     3.7 -	for (i = 0; i < entries; i++) {
     3.8 -	    start_blk = mb[i].start;
     3.9 -	    end_blk = start_blk + mb[i].size;
    3.10 +    for (i = 0; i < entries; i++) {
    3.11 +        start_blk = mb[i].start;
    3.12 +        end_blk = start_blk + mb[i].size;
    3.13  
    3.14 -	    if (start_blk < xenheap_phys_end) {
    3.15 +        if (start_blk < xenheap_phys_end) {
    3.16              if (xenheap_phys_end > end_blk) {
    3.17                  panic("xenheap spans LMB\n");
    3.18              }
    3.19 @@ -114,7 +114,7 @@ static void heap_init(struct membuf *mb,
    3.20  
    3.21          init_boot_pages(start_blk, end_blk);
    3.22          total_pages += (end_blk - start_blk) >> PAGE_SHIFT;
    3.23 -	}
    3.24 +    }
    3.25  }
    3.26  
    3.27  static void ofd_walk_mem(void *m, walk_mem_fn fn)
     4.1 --- a/xen/arch/powerpc/of-devtree.h	Tue Nov 28 18:46:13 2006 -0500
     4.2 +++ b/xen/arch/powerpc/of-devtree.h	Tue Nov 28 19:01:46 2006 -0500
     4.3 @@ -33,15 +33,15 @@ enum {
     4.4  union of_pci_hi {
     4.5      u32 word;
     4.6      struct {
     4.7 -        u32	opa_n: 1; /* relocatable */
     4.8 -        u32	opa_p: 1; /* prefetchable */
     4.9 -        u32	opa_t: 1; /* aliased */
    4.10 +        u32 opa_n: 1; /* relocatable */
    4.11 +        u32 opa_p: 1; /* prefetchable */
    4.12 +        u32 opa_t: 1; /* aliased */
    4.13          u32 _opa_res: 3;
    4.14 -        u32	opa: 2; /* space code */
    4.15 +        u32 opa: 2; /* space code */
    4.16          u32  opa_b: 8; /* bus number */
    4.17 -        u32	opa_d: 5; /* device number */
    4.18 -        u32	opa_f: 3; /* function number */
    4.19 -        u32	opa_r: 8; /* register number */
    4.20 +        u32 opa_d: 5; /* device number */
    4.21 +        u32 opa_f: 3; /* function number */
    4.22 +        u32 opa_r: 8; /* register number */
    4.23      } bits;
    4.24  };
    4.25  
    4.26 @@ -79,9 +79,9 @@ struct reg_property32 {
    4.27  typedef s32 ofdn_t;
    4.28  
    4.29  #define OFD_ROOT 1
    4.30 -#define OFD_DUMP_NAMES	0x1
    4.31 -#define OFD_DUMP_VALUES	0x2
    4.32 -#define OFD_DUMP_ALL	(OFD_DUMP_VALUES|OFD_DUMP_NAMES)
    4.33 +#define OFD_DUMP_NAMES 0x1
    4.34 +#define OFD_DUMP_VALUES 0x2
    4.35 +#define OFD_DUMP_ALL (OFD_DUMP_VALUES|OFD_DUMP_NAMES)
    4.36  
    4.37  extern void *ofd_create(void *mem, size_t sz);
    4.38  extern ofdn_t ofd_node_parent(void *mem, ofdn_t n);
    4.39 @@ -90,9 +90,9 @@ extern ofdn_t ofd_node_child(void *mem, 
    4.40  extern const char *ofd_node_path(void *mem, ofdn_t p);
    4.41  extern int ofd_node_to_path(void *mem, ofdn_t p, void *buf, size_t sz);
    4.42  extern ofdn_t ofd_node_child_create(void *mem, ofdn_t parent,
    4.43 -				    const char *path, size_t pathlen);
    4.44 +                                    const char *path, size_t pathlen);
    4.45  extern ofdn_t ofd_node_peer_create(void *mem, ofdn_t sibling,
    4.46 -				   const char *path, size_t pathlen);
    4.47 +                                   const char *path, size_t pathlen);
    4.48  extern ofdn_t ofd_node_find(void *mem, const char *devspec);
    4.49  extern ofdn_t ofd_node_add(void *m, ofdn_t n, const char *path, size_t sz);
    4.50  extern int ofd_node_prune(void *m, ofdn_t n);
    4.51 @@ -102,14 +102,14 @@ extern ofdn_t ofd_node_io(void *mem, ofd
    4.52  extern ofdn_t ofd_nextprop(void *mem, ofdn_t n, const char *prev, char *name);
    4.53  extern ofdn_t ofd_prop_find(void *mem, ofdn_t n, const char *name);
    4.54  extern int ofd_getprop(void *mem, ofdn_t n, const char *name,
    4.55 -			void *buf, size_t sz);
    4.56 +                       void *buf, size_t sz);
    4.57  extern int ofd_getproplen(void *mem, ofdn_t n, const char *name);
    4.58  
    4.59  extern int ofd_setprop(void *mem, ofdn_t n, const char *name,
    4.60 -			const void *buf, size_t sz);
    4.61 +                       const void *buf, size_t sz);
    4.62  extern void ofd_prop_remove(void *mem, ofdn_t node, ofdn_t prop);
    4.63  extern ofdn_t ofd_prop_add(void *mem, ofdn_t n, const char *name,
    4.64 -			   const void *buf, size_t sz);
    4.65 +                           const void *buf, size_t sz);
    4.66  extern ofdn_t ofd_io_create(void *m, ofdn_t node, u64 open);
    4.67  extern u32 ofd_io_open(void *mem, ofdn_t n);
    4.68  extern void ofd_io_close(void *mem, ofdn_t n);
    4.69 @@ -129,10 +129,10 @@ extern size_t ofd_size(void *mem);
    4.70  extern size_t ofd_space(void *mem);
    4.71  
    4.72  extern void ofd_prop_print(const char *head, const char *path,
    4.73 -			   const char *name, const char *prop, size_t sz);
    4.74 +                           const char *name, const char *prop, size_t sz);
    4.75  
    4.76  extern ofdn_t ofd_node_find_by_prop(void *mem, ofdn_t n, const char *name,
    4.77 -				    const void *val, size_t sz);
    4.78 +                                    const void *val, size_t sz);
    4.79  extern ofdn_t ofd_node_find_next(void *mem, ofdn_t n);
    4.80  extern ofdn_t ofd_node_find_prev(void *mem, ofdn_t n);
    4.81  extern void ofd_init(int (*write)(const char *, size_t len));
     5.1 --- a/xen/arch/powerpc/of_handler/console.c	Tue Nov 28 18:46:13 2006 -0500
     5.2 +++ b/xen/arch/powerpc/of_handler/console.c	Tue Nov 28 19:01:46 2006 -0500
     5.3 @@ -113,7 +113,7 @@ static s32 ofh_xen_dom0_read(s32 chan, v
     5.4              return ret;
     5.5  
     5.6          rc = xen_hvcall(XEN_MARK(__HYPERVISOR_console_io), CONSOLEIO_read,
     5.7 -                count, desc);
     5.8 +                        count, desc);
     5.9          if (rc <= 0) {
    5.10              return ret;
    5.11          }
    5.12 @@ -139,7 +139,7 @@ static s32 ofh_xen_dom0_write(s32 chan, 
    5.13              return ret;
    5.14  
    5.15          rc = xen_hvcall(XEN_MARK(__HYPERVISOR_console_io), CONSOLEIO_write,
    5.16 -                count, desc);
    5.17 +                        count, desc);
    5.18          if (rc <= 0) {
    5.19              return ret;
    5.20          }
    5.21 @@ -157,8 +157,8 @@ static s32 ofh_xen_dom0_write(s32 chan, 
    5.22  static s32 ofh_xen_domu_read(s32 chan, void *buf, u32 count, s32 *actual,
    5.23                               ulong b)
    5.24  {
    5.25 -	struct xencons_interface *intf;
    5.26 -	XENCONS_RING_IDX cons, prod;
    5.27 +    struct xencons_interface *intf;
    5.28 +    XENCONS_RING_IDX cons, prod;
    5.29      s32 ret;
    5.30  
    5.31      intf = DRELA(ofh_ihp, b)->ofi_intf;
    5.32 @@ -180,8 +180,8 @@ static s32 ofh_xen_domu_read(s32 chan, v
    5.33  static s32 ofh_xen_domu_write(s32 chan, const void *buf, u32 count,
    5.34                                s32 *actual, ulong b)
    5.35  {
    5.36 -	struct xencons_interface *intf;
    5.37 -	XENCONS_RING_IDX cons, prod;
    5.38 +    struct xencons_interface *intf;
    5.39 +    XENCONS_RING_IDX cons, prod;
    5.40      s32 ret;
    5.41  
    5.42      intf = DRELA(ofh_ihp, b)->ofi_intf;
     6.1 --- a/xen/arch/powerpc/papr/xlate.c	Tue Nov 28 18:46:13 2006 -0500
     6.2 +++ b/xen/arch/powerpc/papr/xlate.c	Tue Nov 28 19:01:46 2006 -0500
     6.3 @@ -570,7 +570,7 @@ static void h_read(struct cpu_user_regs 
     6.4      struct domain_htab *htab = &d->arch.htab;
     6.5      union pte volatile *pte;
     6.6  
     6.7 -	if (flags & H_READ_4)
     6.8 +    if (flags & H_READ_4)
     6.9          ptex &= ~0x3UL;
    6.10  
    6.11      if (ptex > (1UL << htab->log_num_ptes)) {
     7.1 --- a/xen/arch/powerpc/rtas.c	Tue Nov 28 18:46:13 2006 -0500
     7.2 +++ b/xen/arch/powerpc/rtas.c	Tue Nov 28 19:01:46 2006 -0500
     7.3 @@ -33,10 +33,10 @@ unsigned long rtas_base;
     7.4  unsigned long rtas_end;
     7.5  
     7.6  struct rtas_args {
     7.7 -	int ra_token;
     7.8 -	int ra_nargs;
     7.9 -	int ra_nrets;
    7.10 -	int ra_args[10];
    7.11 +    int ra_token;
    7.12 +    int ra_nargs;
    7.13 +    int ra_nrets;
    7.14 +    int ra_args[10];
    7.15  } __attribute__ ((aligned(8)));
    7.16  
    7.17  static int rtas_call(struct rtas_args *r)
    7.18 @@ -44,13 +44,13 @@ static int rtas_call(struct rtas_args *r
    7.19      if (rtas_entry == 0)
    7.20          return -ENOSYS;
    7.21  
    7.22 -	return prom_call(r, rtas_base, rtas_entry, rtas_msr);
    7.23 +    return prom_call(r, rtas_base, rtas_entry, rtas_msr);
    7.24  }
    7.25  
    7.26  int __init rtas_init(void *m)
    7.27  {
    7.28      static const char halt[] = "power-off";
    7.29 -	static const char reboot[] = "system-reboot";
    7.30 +    static const char reboot[] = "system-reboot";
    7.31      ofdn_t n;
    7.32  
    7.33      if (rtas_entry == 0)
    7.34 @@ -89,7 +89,7 @@ rtas_reboot(void)
    7.35  {
    7.36      struct rtas_args r;
    7.37  
    7.38 -	if (rtas_reboot_token == -1)
    7.39 +    if (rtas_reboot_token == -1)
    7.40          return -ENOSYS;
    7.41  
    7.42      r.ra_token = rtas_reboot_token;
     8.1 --- a/xen/arch/powerpc/shadow.c	Tue Nov 28 18:46:13 2006 -0500
     8.2 +++ b/xen/arch/powerpc/shadow.c	Tue Nov 28 19:01:46 2006 -0500
     8.3 @@ -115,8 +115,8 @@ unsigned int shadow_set_allocation(struc
     8.4  }
     8.5  
     8.6  int shadow_domctl(struct domain *d, 
     8.7 -				  xen_domctl_shadow_op_t *sc,
     8.8 -				  XEN_GUEST_HANDLE(xen_domctl_t) u_domctl)
     8.9 +                  xen_domctl_shadow_op_t *sc,
    8.10 +                  XEN_GUEST_HANDLE(xen_domctl_t) u_domctl)
    8.11  {
    8.12      if ( unlikely(d == current->domain) )
    8.13      {
     9.1 --- a/xen/arch/powerpc/smp.c	Tue Nov 28 18:46:13 2006 -0500
     9.2 +++ b/xen/arch/powerpc/smp.c	Tue Nov 28 19:01:46 2006 -0500
     9.3 @@ -109,7 +109,7 @@ int on_selected_cpus(
     9.4          if (NOW() > start + stall) {
     9.5              printk("IPI start stall: %d ACKS to %d SYNS\n", 
     9.6                     atomic_read(&call_data.started), nr_cpus);
     9.7 -	    start = NOW();
     9.8 +            start = NOW();
     9.9          }
    9.10      }
    9.11  
    9.12 @@ -172,9 +172,9 @@ void smp_message_recv(int msg, struct cp
    9.13  static void debug_ipi_ack(void *info)
    9.14  {
    9.15      if (info) {
    9.16 -	unsigned long start, stall = SECONDS(5);
    9.17 -	for (start = NOW(); NOW() < start + stall; );
    9.18 -	printk("IPI recv on cpu #%d: %s\n", smp_processor_id(), (char *)info);
    9.19 +        unsigned long start, stall = SECONDS(5);
    9.20 +        for (start = NOW(); NOW() < start + stall; );
    9.21 +        printk("IPI recv on cpu #%d: %s\n", smp_processor_id(), (char *)info);
    9.22      }
    9.23      return;
    9.24  }
    9.25 @@ -207,7 +207,7 @@ void ipi_torture_test(void)
    9.26      mean = tb_to_ns(sum / trials);
    9.27  
    9.28      printk("IPI latency: min = %ld ticks, max = %ld ticks, mean = %ldns\n",
    9.29 -	   min, max, mean);
    9.30 +           min, max, mean);
    9.31  
    9.32      smp_call_function(debug_ipi_ack, "Hi", 0, 1);
    9.33  }