diff options
author | ru <ru@FreeBSD.org> | 2005-12-04 12:30:34 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2005-12-04 12:30:34 +0000 |
commit | 9ab7c4c82f85132804b9e2e974de1d83e3d81096 (patch) | |
tree | 54910c516819ca03e15ab383231c49940a169e0a /sys/dev/sym/sym_hipd.c | |
parent | 798500dfd84901b8d5d22e9a99c47e96fe8b9ec5 (diff) | |
download | FreeBSD-src-9ab7c4c82f85132804b9e2e974de1d83e3d81096.zip FreeBSD-src-9ab7c4c82f85132804b9e2e974de1d83e3d81096.tar.gz |
Use a compile-time detection of 64-bit addressing so that this
compiles on 32-bit machines.
Reported by: ale
Diffstat (limited to 'sys/dev/sym/sym_hipd.c')
-rw-r--r-- | sys/dev/sym/sym_hipd.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c index d8b1d73..dd6f4e8 100644 --- a/sys/dev/sym/sym_hipd.c +++ b/sys/dev/sym/sym_hipd.c @@ -111,10 +111,6 @@ typedef u_int8_t u8; typedef u_int16_t u16; typedef u_int32_t u32; -#ifndef BITS_PER_LONG -#define BITS_PER_LONG (sizeof(long) * 8) -#endif - /* * From 'cam.error_recovery_diffs.20010313.context' patch. */ @@ -2645,12 +2641,12 @@ static int sym_prepare_setting(hcb_p np, struct sym_nvram *nvram) /* * 64 bit addressing (895A/896/1010) ? */ - if (np->features & FE_DAC) { - if (BITS_PER_LONG > 32) - np->rv_ccntl1 |= (XTIMOD | EXTIBMV); - else - np->rv_ccntl1 |= (DDAC); - } + if (np->features & FE_DAC) +#ifdef __LP64__ + np->rv_ccntl1 |= (XTIMOD | EXTIBMV); +#else + np->rv_ccntl1 |= (DDAC); +#endif /* * Phase mismatch handled by SCRIPTS (895A/896/1010) ? @@ -8906,8 +8902,9 @@ sym_pci_attach(device_t dev) if (np->features & FE_RAM8K) { np->ram_ws = 8192; np->scriptb_ba = np->scripta_ba + 4096; - if (BITS_PER_LONG > 32) +#ifdef __LP64__ np->scr_ram_seg = cpu_to_scr(np->scripta_ba >> 32); +#endif } else np->ram_ws = 4096; |