diff options
author | Jes Sorensen <jes@sgi.com> | 2006-02-13 05:29:57 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-02-15 16:24:45 -0500 |
commit | 8ed9b2c7a804335004e4bd3b4c6989c5b6bc243f (patch) | |
tree | f7420b3fe8ad59ad23707ccbfd7ccaef7abe2a70 /include/asm-ia64/sn | |
parent | 50d8e59038703c4da5acaed9afaa37ae416d3153 (diff) |
[IA64-SGI] sn2 minor fixes and cleanups
General SN2 code cleanup:
- Do not initialize global variables to zero
- Use kzalloc instead of kmalloc+memset
- Check kmalloc return values
- Do not obfuscate spin lock calls
- Remove some unused code
- Various formatting cleanups
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'include/asm-ia64/sn')
-rw-r--r-- | include/asm-ia64/sn/bte.h | 6 | ||||
-rw-r--r-- | include/asm-ia64/sn/pcibr_provider.h | 14 | ||||
-rw-r--r-- | include/asm-ia64/sn/sn_feature_sets.h | 3 |
3 files changed, 4 insertions, 19 deletions
diff --git a/include/asm-ia64/sn/bte.h b/include/asm-ia64/sn/bte.h index 01e5b4103235..5335d87ca5f8 100644 --- a/include/asm-ia64/sn/bte.h +++ b/include/asm-ia64/sn/bte.h | |||
@@ -46,7 +46,7 @@ | |||
46 | #define BTES_PER_NODE (is_shub2() ? 4 : 2) | 46 | #define BTES_PER_NODE (is_shub2() ? 4 : 2) |
47 | #define MAX_BTES_PER_NODE 4 | 47 | #define MAX_BTES_PER_NODE 4 |
48 | 48 | ||
49 | #define BTE2OFF_CTRL (0) | 49 | #define BTE2OFF_CTRL 0 |
50 | #define BTE2OFF_SRC (SH2_BT_ENG_SRC_ADDR_0 - SH2_BT_ENG_CSR_0) | 50 | #define BTE2OFF_SRC (SH2_BT_ENG_SRC_ADDR_0 - SH2_BT_ENG_CSR_0) |
51 | #define BTE2OFF_DEST (SH2_BT_ENG_DEST_ADDR_0 - SH2_BT_ENG_CSR_0) | 51 | #define BTE2OFF_DEST (SH2_BT_ENG_DEST_ADDR_0 - SH2_BT_ENG_CSR_0) |
52 | #define BTE2OFF_NOTIFY (SH2_BT_ENG_NOTIF_ADDR_0 - SH2_BT_ENG_CSR_0) | 52 | #define BTE2OFF_NOTIFY (SH2_BT_ENG_NOTIF_ADDR_0 - SH2_BT_ENG_CSR_0) |
@@ -75,11 +75,11 @@ | |||
75 | : base + (BTEOFF_NOTIFY/8)) | 75 | : base + (BTEOFF_NOTIFY/8)) |
76 | 76 | ||
77 | /* Define hardware modes */ | 77 | /* Define hardware modes */ |
78 | #define BTE_NOTIFY (IBCT_NOTIFY) | 78 | #define BTE_NOTIFY IBCT_NOTIFY |
79 | #define BTE_NORMAL BTE_NOTIFY | 79 | #define BTE_NORMAL BTE_NOTIFY |
80 | #define BTE_ZERO_FILL (BTE_NOTIFY | IBCT_ZFIL_MODE) | 80 | #define BTE_ZERO_FILL (BTE_NOTIFY | IBCT_ZFIL_MODE) |
81 | /* Use a reserved bit to let the caller specify a wait for any BTE */ | 81 | /* Use a reserved bit to let the caller specify a wait for any BTE */ |
82 | #define BTE_WACQUIRE (0x4000) | 82 | #define BTE_WACQUIRE 0x4000 |
83 | /* Use the BTE on the node with the destination memory */ | 83 | /* Use the BTE on the node with the destination memory */ |
84 | #define BTE_USE_DEST (BTE_WACQUIRE << 1) | 84 | #define BTE_USE_DEST (BTE_WACQUIRE << 1) |
85 | /* Use any available BTE interface on any node for the transfer */ | 85 | /* Use any available BTE interface on any node for the transfer */ |
diff --git a/include/asm-ia64/sn/pcibr_provider.h b/include/asm-ia64/sn/pcibr_provider.h index 9334078b089a..a601d3af39b6 100644 --- a/include/asm-ia64/sn/pcibr_provider.h +++ b/include/asm-ia64/sn/pcibr_provider.h | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1992-1997,2000-2004 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 1992-1997,2000-2006 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | #ifndef _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H | 8 | #ifndef _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H |
9 | #define _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H | 9 | #define _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H |
@@ -115,18 +115,6 @@ struct pcibus_info { | |||
115 | spinlock_t pbi_lock; | 115 | spinlock_t pbi_lock; |
116 | }; | 116 | }; |
117 | 117 | ||
118 | /* | ||
119 | * pcibus_info structure locking macros | ||
120 | */ | ||
121 | inline static unsigned long | ||
122 | pcibr_lock(struct pcibus_info *pcibus_info) | ||
123 | { | ||
124 | unsigned long flag; | ||
125 | spin_lock_irqsave(&pcibus_info->pbi_lock, flag); | ||
126 | return(flag); | ||
127 | } | ||
128 | #define pcibr_unlock(pcibus_info, flag) spin_unlock_irqrestore(&pcibus_info->pbi_lock, flag) | ||
129 | |||
130 | extern int pcibr_init_provider(void); | 118 | extern int pcibr_init_provider(void); |
131 | extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *); | 119 | extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *); |
132 | extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t); | 120 | extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t); |
diff --git a/include/asm-ia64/sn/sn_feature_sets.h b/include/asm-ia64/sn/sn_feature_sets.h index 9ca642cad338..ff33e3bd3f8e 100644 --- a/include/asm-ia64/sn/sn_feature_sets.h +++ b/include/asm-ia64/sn/sn_feature_sets.h | |||
@@ -12,9 +12,6 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | 14 | ||
15 | #include <asm/types.h> | ||
16 | #include <asm/bitops.h> | ||
17 | |||
18 | /* --------------------- PROM Features -----------------------------*/ | 15 | /* --------------------- PROM Features -----------------------------*/ |
19 | extern int sn_prom_feature_available(int id); | 16 | extern int sn_prom_feature_available(int id); |
20 | 17 | ||