Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PReP patches for gcc48



Trying again, should be non-flowed this time.

Patches to allow NetBSD/prep-6.99.38+ build with HAVE_GCC=48

+Index: sys/arch/prep/stand/boot/pci.c
+===================================================================
+RCS file: /cvsroot/src/sys/arch/prep/stand/boot/pci.c,v
+retrieving revision 1.1
+diff -u -b -r1.1 pci.c
+--- sys/arch/prep/stand/boot/pci.c     19 May 2012 14:40:12 -0000      1.1
++++ sys/arch/prep/stand/boot/pci.c     13 Mar 2014 01:11:36 -0000
+@@ -158,7 +158,6 @@
+       int slot, r;
+       struct PCI_cinfo *pslot;
+       int VGAslot = -1;
+-      int highVGAslot = 0;
+ 
+       for (slot = start + 1; slot < PCI_NSLOTS; slot++) {
+               pslot = &PCI_slots[slot];
+@@ -171,7 +170,6 @@
+                           ((pslot->regs[CLASS] & 0xffffff00) ==
+                               0x00010000)) {
+                               /* it's a VGA card */
+-                              highVGAslot = slot;
+                               if ((pslot->regs[CMD] & 0x03)) {
+                                       /* fW enabled it */
+                                       VGAslot = slot;
+Index: sys/arch/prep/stand/boot/siop.c
+===================================================================
+RCS file: /cvsroot/src/sys/arch/prep/stand/boot/siop.c,v
+retrieving revision 1.1
+diff -u -b -r1.1 siop.c
+--- sys/arch/prep/stand/boot/siop.c    19 May 2012 14:40:13 -0000      1.1
++++ sys/arch/prep/stand/boot/siop.c    2 Apr 2014 01:14:43 -0000
+@@ -238,7 +238,7 @@
+       int offset, target, lun, tag, restart = 0, need_reset = 0;
+       uint32_t dsa, irqcode;
+       uint16_t sist;
+-      uint8_t dstat, sstat1, istat;
++      uint8_t dstat=0, sstat1, istat;
+ 
+       istat = readb(adp->addr + SIOP_ISTAT);
+       if ((istat & (ISTAT_INTF | ISTAT_DIP | ISTAT_SIP)) == 0)
+@@ -604,7 +604,7 @@
+ {
+       struct siop_xfer *siop_xfer = adp->xfer;
+       uint32_t dsa, *script = adp->script;
+-      int target, lun, slot;
++      int slot;
+       void *scriptaddr = (void *)local_to_PCI((u_long)script);
+       const int siop_common_xfer_size = sizeof(struct siop_common_xfer);
+ 
+@@ -631,8 +631,6 @@
+       } else {
+               slot++;
+       }
+-      target = xs->target;
+-      lun = xs->lun;
+       /*
+        * find a free scheduler slot and load it.
+        */
+Index: sys/arch/prep/stand/boot/vreset.c
+===================================================================
+RCS file: /cvsroot/src/sys/arch/prep/stand/boot/vreset.c,v
+retrieving revision 1.8
+diff -u -b -r1.8 vreset.c
+--- sys/arch/prep/stand/boot/vreset.c  13 Sep 2008 15:58:01 -0000      1.8
++++ sys/arch/prep/stand/boot/vreset.c  3 Apr 2014 01:34:55 -0000
+@@ -237,6 +237,7 @@
+       u_int8_t v;
+ 
+       v = inb(0x3da);         /* reset attr addr toggle */
++      __USE(v);
+       if (videoOn)
+               outb(0x3c0, (index & 0x1F) | 0x20);
+       else
+Index: sys/arch/prep/pci/pci_machdep.c
+===================================================================
+RCS file: /cvsroot/src/sys/arch/prep/pci/pci_machdep.c,v
+retrieving revision 1.39
+diff -u -b -r1.39 pci_machdep.c
+--- sys/arch/prep/pci/pci_machdep.c    26 Mar 2014 16:01:43 -0000      1.39
++++ sys/arch/prep/pci/pci_machdep.c    2 Apr 2014 12:53:40 -0000
+@@ -153,13 +153,12 @@
+       prop_dictionary_t dict, devsub;
+       prop_object_t pinsub;
+       prop_number_t pbus;
+-      int busno, bus, pin, line, swiz, dev, origdev, i;
++      int busno, pin, line, dev, origdev, i;
+       char key[20];
+ 
+       pin = pa->pa_intrpin;
+       line = pa->pa_intrline;
+-      bus = busno = pa->pa_bus;
+-      swiz = pa->pa_intrswiz;
++      busno = pa->pa_bus;
+       origdev = dev = pa->pa_device;
+       i = 0;
+ 
+Index: sys/arch/prep/prep/machdep.c
+===================================================================
+RCS file: /cvsroot/src/sys/arch/prep/prep/machdep.c,v
+retrieving revision 1.74
+diff -u -b -r1.74 machdep.c
+--- sys/arch/prep/prep/machdep.c       21 Apr 2013 15:42:11 -0000      1.74
++++ sys/arch/prep/prep/machdep.c       2 Apr 2014 10:38:51 -0000
+@@ -313,7 +313,6 @@
+ {
+       uint32_t l;
+       uint8_t *p;
+-      void *v;
+       int tag, size, item, i;
+       unsigned char *baseaddr = NULL;
+ 
+@@ -329,7 +328,6 @@
+               struct _L4_PPCPack *pa = &pack->L4_Data.L4_PPCPack;
+ 
+               tag = *p;
+-              v = p;
+               if (tag_type(p[0]) == PNP_SMALL) {
+                       size = tag_small_count(tag) + 1;
+                       continue;
+@@ -383,7 +381,6 @@
+ {
+       uint32_t l, addr;
+       uint8_t *p;
+-      void *v;
+       int tag, size, item;
+ 
+       l = be32toh(dev->AllocatedOffset);
+@@ -395,7 +392,6 @@
+               struct _L4_PPCPack *pa = &pack->L4_Data.L4_PPCPack;
+ 
+               tag = *p;
+-              v = p;
+               if (tag_type(p[0]) == PNP_SMALL) {
+                       size = tag_small_count(tag) + 1;
+                       continue;
+Index: sys/arch/prep/prep/platform.c
+===================================================================
+RCS file: /cvsroot/src/sys/arch/prep/prep/platform.c,v
+retrieving revision 1.27
+diff -u -b -r1.27 platform.c
+--- sys/arch/prep/prep/platform.c      26 Mar 2014 16:01:43 -0000      1.27
++++ sys/arch/prep/prep/platform.c      3 Apr 2014 01:38:14 -0000
+@@ -91,6 +91,7 @@
+       l2ctrl = inb(PREP_BUS_SPACE_IO + 0x81c);
+       /* device status register */
+       cpuinf = inb(PREP_BUS_SPACE_IO + 0x80c);
++      __USE(cpuinf);
+ 
+       /* Enable L2 cache */
+       outb(PREP_BUS_SPACE_IO + 0x81c, l2ctrl | 0xc0);
+@@ -222,7 +223,7 @@
+ create_intr_map(void *v, prop_dictionary_t dict)
+ {
+       prop_dictionary_t sub;
+-      int item, size, i, j, bus, numslots;
++      int item, size, i, j, numslots;
+       int tag = *(unsigned char *)v;
+       unsigned char *q = v;
+       PCIInfoPack *pi = v;
+@@ -238,7 +239,6 @@
+               return size;
+ 
+       numslots = (le16dec(&pi->count0)-21)/sizeof(IntrMap);
+-      bus = pi->busnum;
+ 
+       for (i = 0; i < numslots; i++) {
+               int lines[MAX_PCI_INTRS] = { 0, 0, 0, 0 };
+Index: sys/dev/isa/pckbc_isa.c
+===================================================================
+RCS file: /cvsroot/src/sys/dev/isa/pckbc_isa.c,v
+retrieving revision 1.25
+diff -u -b -r1.25 pckbc_isa.c
+--- sys/dev/isa/pckbc_isa.c    25 May 2008 16:19:12 -0000      1.25
++++ sys/dev/isa/pckbc_isa.c    3 Apr 2014 01:42:51 -0000
+@@ -123,6 +123,8 @@
+ #endif
+                       ok = 0;
+               }
++#else
++              __USE(res);
+ #endif /* PCKBCNOTEST */
+  out:
+               bus_space_unmap(iot, ioh_d, 1);

-- 
|/"\ John D. Baker, KN5UKS               NetBSD     Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com    OpenBSD            FreeBSD
| X  No HTML/proprietary data in email.   BSD just sits there and works!
|/ \ GPGkeyID:  D703 4A7E 479F 63F8 D3F4  BD99 9572 8F23 E4AD 1645



Home | Main Index | Thread Index | Old Index