ia64/xen-unstable

changeset 3992:00e4db805624

bitkeeper revision 1.1236.1.61 (422996d7OS-GHHO0uCOWruz6V8AWXw)

[PATCH] [PATCH] gcc4isms part 1

This patch gets rid of the compile warnings under the xen/
subdirectory, for an x86_32 compile. The cpuid change has
also been sent to the upstream kernel.

I am not quite sure about the vmx_platform.c bits, since
__s8 should be the same as char, so gcc really shouldn't
warn...

Signed-off-by: Rik van Riel <riel@redhat.com>

arch/x86/acpi.c | 2 +-
arch/x86/domain_build.c | 2 +-
arch/x86/pci-pc.c | 4 ++--
arch/x86/setup.c | 16 ++++++++--------
arch/x86/vmx.c | 2 +-
arch/x86/vmx_platform.c | 20 ++++++++++----------
common/kernel.c | 2 +-
drivers/char/console.c | 4 ++--
drivers/char/serial.c | 4 ++--
include/asm-x86/processor.h | 2 +-
include/public/xen.h | 2 +-
include/xen/serial.h | 2 +-
12 files changed, 31 insertions(+), 31 deletions(-)
author riel@redhat.com[kaf24]
date Sat Mar 05 11:24:07 2005 +0000 (2005-03-05)
parents 2101e98387dd
children 59a924789d34
files BitKeeper/etc/logging_ok xen/arch/x86/acpi.c xen/arch/x86/domain_build.c xen/arch/x86/pci-pc.c xen/arch/x86/setup.c xen/arch/x86/vmx.c xen/arch/x86/vmx_platform.c xen/common/kernel.c xen/drivers/char/console.c xen/drivers/char/serial.c xen/include/asm-x86/processor.h xen/include/public/xen.h xen/include/xen/serial.h
line diff
     1.1 --- a/BitKeeper/etc/logging_ok	Sat Mar 05 11:21:06 2005 +0000
     1.2 +++ b/BitKeeper/etc/logging_ok	Sat Mar 05 11:24:07 2005 +0000
     1.3 @@ -57,6 +57,7 @@ mwilli2@equilibrium.research.intel-resea
     1.4  mwilli2@pug.(none)
     1.5  rac61@labyrinth.cl.cam.ac.uk
     1.6  rgr22@boulderdash.cl.cam.ac.uk
     1.7 +riel@redhat.com
     1.8  rminnich@lanl.gov
     1.9  rn@wyvis.camb.intel-research.net
    1.10  rn@wyvis.research.intel-research.net
     2.1 --- a/xen/arch/x86/acpi.c	Sat Mar 05 11:21:06 2005 +0000
     2.2 +++ b/xen/arch/x86/acpi.c	Sat Mar 05 11:24:07 2005 +0000
     2.3 @@ -97,7 +97,7 @@ char *__acpi_map_table(unsigned long phy
     2.4  		mapped_size += PAGE_SIZE;
     2.5  	}
     2.6  
     2.7 -	return ((unsigned char *) base + offset);
     2.8 +	return ((char *) base + offset);
     2.9  }
    2.10  
    2.11  
     3.1 --- a/xen/arch/x86/domain_build.c	Sat Mar 05 11:21:06 2005 +0000
     3.2 +++ b/xen/arch/x86/domain_build.c	Sat Mar 05 11:24:07 2005 +0000
     3.3 @@ -481,7 +481,7 @@ int construct_dom0(struct domain *d,
     3.4                 si->mod_len, si->mod_start);
     3.5      }
     3.6  
     3.7 -    dst = si->cmd_line;
     3.8 +    dst = (char *)si->cmd_line;
     3.9      if ( cmdline != NULL )
    3.10      {
    3.11          for ( i = 0; i < 255; i++ )
     4.1 --- a/xen/arch/x86/pci-pc.c	Sat Mar 05 11:21:06 2005 +0000
     4.2 +++ b/xen/arch/x86/pci-pc.c	Sat Mar 05 11:24:07 2005 +0000
     4.3 @@ -816,7 +816,7 @@ static int pci_bios_write (int seg, int 
     4.4  static int pci_bios_read_config_byte(struct pci_dev *dev, int where, u8 *value)
     4.5  {
     4.6  	int result; 
     4.7 -	u32 data;
     4.8 +	u32 data = 0;
     4.9  
    4.10  	if (!value) 
    4.11  		BUG();
    4.12 @@ -832,7 +832,7 @@ static int pci_bios_read_config_byte(str
    4.13  static int pci_bios_read_config_word(struct pci_dev *dev, int where, u16 *value)
    4.14  {
    4.15  	int result; 
    4.16 -	u32 data;
    4.17 +	u32 data = 0;
    4.18  
    4.19  	if (!value) 
    4.20  		BUG();
     5.1 --- a/xen/arch/x86/setup.c	Sat Mar 05 11:21:06 2005 +0000
     5.2 +++ b/xen/arch/x86/setup.c	Sat Mar 05 11:24:07 2005 +0000
     5.3 @@ -201,8 +201,8 @@ static void __init init_amd(struct cpuin
     5.4   */
     5.5  void __init identify_cpu(struct cpuinfo_x86 *c)
     5.6  {
     5.7 -    int junk, i, cpu = smp_processor_id();
     5.8 -    u32 xlvl, tfms;
     5.9 +    int i, cpu = smp_processor_id();
    5.10 +    u32 xlvl, tfms, junk;
    5.11  
    5.12      phys_proc_id[cpu]    = cpu;
    5.13      logical_proc_id[cpu] = 0;
    5.14 @@ -217,10 +217,10 @@ void __init identify_cpu(struct cpuinfo_
    5.15          panic("Ancient processors not supported\n");
    5.16  
    5.17      /* Get vendor name */
    5.18 -    cpuid(0x00000000, &c->cpuid_level,
    5.19 -          (int *)&c->x86_vendor_id[0],
    5.20 -          (int *)&c->x86_vendor_id[8],
    5.21 -          (int *)&c->x86_vendor_id[4]);
    5.22 +    cpuid(0x00000000, (unsigned int *)&c->cpuid_level,
    5.23 +          (unsigned int *)&c->x86_vendor_id[0],
    5.24 +          (unsigned int *)&c->x86_vendor_id[8],
    5.25 +          (unsigned int *)&c->x86_vendor_id[4]);
    5.26  
    5.27      get_cpu_vendor(c);
    5.28  		
    5.29 @@ -455,7 +455,7 @@ static void __init start_of_day(void)
    5.30  
    5.31  void __init __start_xen(multiboot_info_t *mbi)
    5.32  {
    5.33 -    unsigned char *cmdline;
    5.34 +    char *cmdline;
    5.35      module_t *mod = (module_t *)__va(mbi->mods_addr);
    5.36      void *heap_start;
    5.37      unsigned long firsthole_start, nr_pages;
    5.38 @@ -587,7 +587,7 @@ void __init __start_xen(multiboot_info_t
    5.39      set_bit(DF_PRIVILEGED, &dom0->d_flags);
    5.40  
    5.41      /* Grab the DOM0 command line. Skip past the image name. */
    5.42 -    cmdline = (unsigned char *)(mod[0].string ? __va(mod[0].string) : NULL);
    5.43 +    cmdline = (char *)(mod[0].string ? __va(mod[0].string) : NULL);
    5.44      if ( cmdline != NULL )
    5.45      {
    5.46          while ( *cmdline == ' ' ) cmdline++;
     6.1 --- a/xen/arch/x86/vmx.c	Sat Mar 05 11:21:06 2005 +0000
     6.2 +++ b/xen/arch/x86/vmx.c	Sat Mar 05 11:24:07 2005 +0000
     6.3 @@ -178,7 +178,7 @@ static void vmx_do_general_protection_fa
     6.4  
     6.5  static void vmx_vmexit_do_cpuid(unsigned long input, struct xen_regs *regs) 
     6.6  {
     6.7 -    int eax, ebx, ecx, edx;
     6.8 +    unsigned int eax, ebx, ecx, edx;
     6.9      unsigned long eip;
    6.10  
    6.11      __vmread(GUEST_EIP, &eip);
     7.1 --- a/xen/arch/x86/vmx_platform.c	Sat Mar 05 11:21:06 2005 +0000
     7.2 +++ b/xen/arch/x86/vmx_platform.c	Sat Mar 05 11:24:07 2005 +0000
     7.3 @@ -290,7 +290,7 @@ static int vmx_decode(const unsigned cha
     7.4          case 0xa4:
     7.5              /* movsb */
     7.6              thread_inst->op_size = BYTE;
     7.7 -            strcpy(thread_inst->i_name, "movs");
     7.8 +            strcpy((char *)thread_inst->i_name, "movs");
     7.9              
    7.10              return DECODE_success;
    7.11          case 0xa5:
    7.12 @@ -300,7 +300,7 @@ static int vmx_decode(const unsigned cha
    7.13                  thread_inst->op_size = LONG;
    7.14              }
    7.15              
    7.16 -            strcpy(thread_inst->i_name, "movs");
    7.17 +            strcpy((char *)thread_inst->i_name, "movs");
    7.18              
    7.19              return DECODE_success;
    7.20  
    7.21 @@ -328,7 +328,7 @@ static int vmx_decode(const unsigned cha
    7.22              return DECODE_failure;
    7.23      }
    7.24      
    7.25 -    strcpy(thread_inst->i_name, "mov");
    7.26 +    strcpy((char *)thread_inst->i_name, "mov");
    7.27      if (*inst != 0x0f) {
    7.28          return DECODE_success;
    7.29      }
    7.30 @@ -346,14 +346,14 @@ static int vmx_decode(const unsigned cha
    7.31                  
    7.32              }
    7.33              thread_inst->op_size = BYTE;
    7.34 -            strcpy(thread_inst->i_name, "movzb");
    7.35 +            strcpy((char *)thread_inst->i_name, "movzb");
    7.36              
    7.37              return DECODE_success;
    7.38          case 0xb7:
    7.39              thread_inst->op_size = WORD;
    7.40              index = get_index((inst + 1));
    7.41              thread_inst->operand[1] = mk_operand(LONG, index, 0, REGISTER);
    7.42 -            strcpy(thread_inst->i_name, "movzw");
    7.43 +            strcpy((char *)thread_inst->i_name, "movzw");
    7.44              
    7.45              return DECODE_success;
    7.46          default:
    7.47 @@ -365,7 +365,7 @@ static int vmx_decode(const unsigned cha
    7.48      return DECODE_failure;
    7.49  }
    7.50  
    7.51 -static int inst_copy_from_guest(char *buf, unsigned long guest_eip, int inst_len)
    7.52 +static int inst_copy_from_guest(unsigned char *buf, unsigned long guest_eip, int inst_len)
    7.53  {
    7.54      unsigned long gpte;
    7.55      unsigned long mfn;
    7.56 @@ -382,7 +382,7 @@ static int inst_copy_from_guest(char *bu
    7.57          ma = (mfn << PAGE_SHIFT) | (guest_eip & (PAGE_SIZE - 1));
    7.58          inst_start = (unsigned char *)map_domain_mem(ma);
    7.59                  
    7.60 -        memcpy(buf, inst_start, inst_len);
    7.61 +        memcpy((char *)buf, inst_start, inst_len);
    7.62          unmap_domain_mem(inst_start);
    7.63      } else {
    7.64          // Todo: In two page frames
    7.65 @@ -502,7 +502,7 @@ void handle_mmio(unsigned long va, unsig
    7.66      store_xen_regs(inst_decoder_regs);
    7.67  
    7.68      // Only handle "mov" and "movs" instructions!
    7.69 -    if (!strncmp(mmio_inst.i_name, "movz", 4)) {
    7.70 +    if (!strncmp((char *)mmio_inst.i_name, "movz", 4)) {
    7.71          if (read_from_mmio(&mmio_inst)) {
    7.72              // Send the request and waiting for return value.
    7.73              mpci_p->mmio_target = mmio_inst.operand[1] | WZEROEXTEND;
    7.74 @@ -514,7 +514,7 @@ void handle_mmio(unsigned long va, unsig
    7.75          }
    7.76      }
    7.77  
    7.78 -    if (!strncmp(mmio_inst.i_name, "movs", 4)) {
    7.79 +    if (!strncmp((char *)mmio_inst.i_name, "movs", 4)) {
    7.80          int tmp_dir;
    7.81  
    7.82          tmp_dir = ((va == inst_decoder_regs->edi) ? IOREQ_WRITE : IOREQ_READ);
    7.83 @@ -522,7 +522,7 @@ void handle_mmio(unsigned long va, unsig
    7.84          return;
    7.85      }
    7.86  
    7.87 -    if (!strncmp(mmio_inst.i_name, "mov", 3)) {
    7.88 +    if (!strncmp((char *)mmio_inst.i_name, "mov", 3)) {
    7.89          long value = 0;
    7.90          int size, index;
    7.91  
     8.1 --- a/xen/common/kernel.c	Sat Mar 05 11:21:06 2005 +0000
     8.2 +++ b/xen/common/kernel.c	Sat Mar 05 11:24:07 2005 +0000
     8.3 @@ -16,7 +16,7 @@
     8.4  
     8.5  void cmdline_parse(char *cmdline)
     8.6  {
     8.7 -    unsigned char *opt_end, *opt;
     8.8 +    char *opt_end, *opt;
     8.9      struct kernel_param *param;
    8.10      
    8.11      if ( cmdline == NULL )
     9.1 --- a/xen/drivers/char/console.c	Sat Mar 05 11:21:06 2005 +0000
     9.2 +++ b/xen/drivers/char/console.c	Sat Mar 05 11:24:07 2005 +0000
     9.3 @@ -22,7 +22,7 @@
     9.4  #include <asm/debugger.h>
     9.5  
     9.6  /* opt_console: comma-separated list of console outputs. */
     9.7 -static unsigned char opt_console[30] = OPT_CONSOLE_STR;
     9.8 +static char opt_console[30] = OPT_CONSOLE_STR;
     9.9  string_param("console", opt_console);
    9.10  
    9.11  /* opt_conswitch: a character pair controlling console switching. */
    9.12 @@ -408,7 +408,7 @@ void set_printk_prefix(const char *prefi
    9.13  
    9.14  void init_console(void)
    9.15  {
    9.16 -    unsigned char *p;
    9.17 +    char *p;
    9.18  
    9.19      /* Where should console output go? */
    9.20      for ( p = opt_console; p != NULL; p = strchr(p, ',') )
    10.1 --- a/xen/drivers/char/serial.c	Sat Mar 05 11:21:06 2005 +0000
    10.2 +++ b/xen/drivers/char/serial.c	Sat Mar 05 11:24:07 2005 +0000
    10.3 @@ -18,7 +18,7 @@
    10.4  #include <asm/io.h>
    10.5  
    10.6  /* Config serial port with a string <baud>,DPS,<io-base>,<irq>. */
    10.7 -static unsigned char opt_com1[30] = OPT_COM1_STR, opt_com2[30] = OPT_COM2_STR;
    10.8 +static char opt_com1[30] = OPT_COM1_STR, opt_com2[30] = OPT_COM2_STR;
    10.9  string_param("com1", opt_com1);
   10.10  string_param("com2", opt_com2);
   10.11  
   10.12 @@ -395,7 +395,7 @@ void serial_putc(int handle, unsigned ch
   10.13      __serial_putc(uart, handle, c);
   10.14  }
   10.15  
   10.16 -void serial_puts(int handle, const unsigned char *s)
   10.17 +void serial_puts(int handle, const char *s)
   10.18  {
   10.19      struct uart *uart = &com[handle & SERHND_IDX];
   10.20  
    11.1 --- a/xen/include/asm-x86/processor.h	Sat Mar 05 11:21:06 2005 +0000
    11.2 +++ b/xen/include/asm-x86/processor.h	Sat Mar 05 11:24:07 2005 +0000
    11.3 @@ -192,7 +192,7 @@ extern void dodgy_tsc(void);
    11.4  /*
    11.5   * Generic CPUID function
    11.6   */
    11.7 -static inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
    11.8 +static inline void cpuid(int op, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx)
    11.9  {
   11.10      __asm__("cpuid"
   11.11              : "=a" (*eax),
    12.1 --- a/xen/include/public/xen.h	Sat Mar 05 11:21:06 2005 +0000
    12.2 +++ b/xen/include/public/xen.h	Sat Mar 05 11:24:07 2005 +0000
    12.3 @@ -428,7 +428,7 @@ typedef struct {
    12.4      _MEMORY_PADDING(F);
    12.5      memory_t mod_len;         /* 56: Size (bytes) of pre-loaded module.    */
    12.6      _MEMORY_PADDING(G);
    12.7 -    u8 cmd_line[MAX_CMDLINE]; /* 64 */
    12.8 +    s8 cmd_line[MAX_CMDLINE]; /* 64 */
    12.9  } PACKED start_info_t; /* 320 bytes */
   12.10  
   12.11  /* These flags are passed in the 'flags' field of start_info_t. */
    13.1 --- a/xen/include/xen/serial.h	Sat Mar 05 11:21:06 2005 +0000
    13.2 +++ b/xen/include/xen/serial.h	Sat Mar 05 11:24:07 2005 +0000
    13.3 @@ -35,7 +35,7 @@ void serial_set_rx_handler(int handle, s
    13.4  void serial_putc(int handle, unsigned char c);
    13.5  
    13.6  /* Transmit a NULL-terminated string via the specified COM port. */
    13.7 -void serial_puts(int handle, const unsigned char *s);
    13.8 +void serial_puts(int handle, const char *s);
    13.9  
   13.10  /*
   13.11   * An alternative to registering a character-receive hook. This function