Module Name: src
Committed By: christos
Date: Mon Nov 4 16:58:33 UTC 2013
Modified Files:
src/sys/arch/alpha/pci: pci_swiz_bus_io_chipdep.c
pci_swiz_bus_mem_chipdep.c
Log Message:
move ifdef'ed out code inside if 0
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c
diff -u src/sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c:1.41 src/sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c:1.42
--- src/sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c:1.41 Sun Feb 5 21:14:15 2012
+++ src/sys/arch/alpha/pci/pci_swiz_bus_io_chipdep.c Mon Nov 4 11:58:33 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_swiz_bus_io_chipdep.c,v 1.41 2012/02/06 02:14:15 matt Exp $ */
+/* $NetBSD: pci_swiz_bus_io_chipdep.c,v 1.42 2013/11/04 16:58:33 christos Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: pci_swiz_bus_io_chipdep.c,v 1.41 2012/02/06 02:14:15 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: pci_swiz_bus_io_chipdep.c,v 1.42 2013/11/04 16:58:33 christos Exp $");
#include <sys/extent.h>
@@ -656,16 +656,15 @@ __C(CHIP,_io_read_4)(void *v, bus_space_
register bus_space_handle_t tmpioh;
register uint32_t *port, val;
register uint32_t rval;
- register int offset;
alpha_mb();
tmpioh = ioh + off;
- offset = tmpioh & 3;
port = (uint32_t *)((tmpioh << CHIP_ADDR_SHIFT) |
(3 << CHIP_SIZE_SHIFT));
val = *port;
#if 0
+ int offset = tmpioh & 3;
rval = ((val) >> (8 * offset)) & 0xffffffff;
#else
rval = val;
@@ -753,10 +752,12 @@ __C(CHIP,_io_write_4)(void *v, bus_space
{
register bus_space_handle_t tmpioh;
register uint32_t *port, nval;
- register int offset;
tmpioh = ioh + off;
+#if 0
+ register int offset;
offset = tmpioh & 3;
+#endif
nval = val /*<< (8 * offset)*/;
port = (uint32_t *)((tmpioh << CHIP_ADDR_SHIFT) |
(3 << CHIP_SIZE_SHIFT));
Index: src/sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c
diff -u src/sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c:1.46 src/sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c:1.47
--- src/sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c:1.46 Sun Feb 5 21:14:15 2012
+++ src/sys/arch/alpha/pci/pci_swiz_bus_mem_chipdep.c Mon Nov 4 11:58:33 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: pci_swiz_bus_mem_chipdep.c,v 1.46 2012/02/06 02:14:15 matt Exp $ */
+/* $NetBSD: pci_swiz_bus_mem_chipdep.c,v 1.47 2013/11/04 16:58:33 christos Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -85,7 +85,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: pci_swiz_bus_mem_chipdep.c,v 1.46 2012/02/06 02:14:15 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: pci_swiz_bus_mem_chipdep.c,v 1.47 2013/11/04 16:58:33 christos Exp $");
#include <sys/extent.h>
@@ -982,7 +982,6 @@ __C(CHIP,_mem_read_4)(void *v, bus_space
register bus_space_handle_t tmpmemh;
register uint32_t *port, val;
register uint32_t rval;
- register int offset;
alpha_mb();
@@ -992,11 +991,12 @@ __C(CHIP,_mem_read_4)(void *v, bus_space
#endif
tmpmemh = memh + off;
- offset = tmpmemh & 3;
port = (uint32_t *)((tmpmemh << CHIP_ADDR_SHIFT) |
(3 << CHIP_SIZE_SHIFT));
val = *port;
#if 0
+ int offset;
+ offset = tmpmemh & 3;
rval = ((val) >> (8 * offset)) & 0xffffffff;
#else
rval = val;
@@ -1102,7 +1102,6 @@ __C(CHIP,_mem_write_4)(void *v, bus_spac
{
register bus_space_handle_t tmpmemh;
register uint32_t *port, nval;
- register int offset;
#ifdef CHIP_D_MEM_W1_SYS_START
if ((memh >> 63) != 0)
@@ -1111,7 +1110,10 @@ __C(CHIP,_mem_write_4)(void *v, bus_spac
#endif
{
tmpmemh = memh + off;
+#if 0
+ int offset;
offset = tmpmemh & 3;
+#endif
nval = val /*<< (8 * offset)*/;
port = (uint32_t *)((tmpmemh << CHIP_ADDR_SHIFT) |
(3 << CHIP_SIZE_SHIFT));