diff options
Diffstat (limited to 'include/asm-ia64')
-rw-r--r-- | include/asm-ia64/ide.h | 8 | ||||
-rw-r--r-- | include/asm-ia64/semaphore.h | 8 | ||||
-rw-r--r-- | include/asm-ia64/sn/sn_feature_sets.h | 14 | ||||
-rw-r--r-- | include/asm-ia64/sn/xp.h | 3 | ||||
-rw-r--r-- | include/asm-ia64/sn/xpc.h | 9 | ||||
-rw-r--r-- | include/asm-ia64/topology.h | 11 |
6 files changed, 28 insertions, 25 deletions
diff --git a/include/asm-ia64/ide.h b/include/asm-ia64/ide.h index e62b95301d51..93f45c5f189f 100644 --- a/include/asm-ia64/ide.h +++ b/include/asm-ia64/ide.h | |||
@@ -17,14 +17,6 @@ | |||
17 | 17 | ||
18 | #include <linux/irq.h> | 18 | #include <linux/irq.h> |
19 | 19 | ||
20 | #ifndef MAX_HWIFS | ||
21 | # ifdef CONFIG_PCI | ||
22 | #define MAX_HWIFS 10 | ||
23 | # else | ||
24 | #define MAX_HWIFS 6 | ||
25 | # endif | ||
26 | #endif | ||
27 | |||
28 | #define IDE_ARCH_OBSOLETE_DEFAULTS | 20 | #define IDE_ARCH_OBSOLETE_DEFAULTS |
29 | 21 | ||
30 | static inline int ide_default_irq(unsigned long base) | 22 | static inline int ide_default_irq(unsigned long base) |
diff --git a/include/asm-ia64/semaphore.h b/include/asm-ia64/semaphore.h index bb8906285fab..f483eeb95dd1 100644 --- a/include/asm-ia64/semaphore.h +++ b/include/asm-ia64/semaphore.h | |||
@@ -61,7 +61,7 @@ static inline void | |||
61 | down (struct semaphore *sem) | 61 | down (struct semaphore *sem) |
62 | { | 62 | { |
63 | might_sleep(); | 63 | might_sleep(); |
64 | if (atomic_dec_return(&sem->count) < 0) | 64 | if (ia64_fetchadd(-1, &sem->count.counter, acq) < 1) |
65 | __down(sem); | 65 | __down(sem); |
66 | } | 66 | } |
67 | 67 | ||
@@ -75,7 +75,7 @@ down_interruptible (struct semaphore * sem) | |||
75 | int ret = 0; | 75 | int ret = 0; |
76 | 76 | ||
77 | might_sleep(); | 77 | might_sleep(); |
78 | if (atomic_dec_return(&sem->count) < 0) | 78 | if (ia64_fetchadd(-1, &sem->count.counter, acq) < 1) |
79 | ret = __down_interruptible(sem); | 79 | ret = __down_interruptible(sem); |
80 | return ret; | 80 | return ret; |
81 | } | 81 | } |
@@ -85,7 +85,7 @@ down_trylock (struct semaphore *sem) | |||
85 | { | 85 | { |
86 | int ret = 0; | 86 | int ret = 0; |
87 | 87 | ||
88 | if (atomic_dec_return(&sem->count) < 0) | 88 | if (ia64_fetchadd(-1, &sem->count.counter, acq) < 1) |
89 | ret = __down_trylock(sem); | 89 | ret = __down_trylock(sem); |
90 | return ret; | 90 | return ret; |
91 | } | 91 | } |
@@ -93,7 +93,7 @@ down_trylock (struct semaphore *sem) | |||
93 | static inline void | 93 | static inline void |
94 | up (struct semaphore * sem) | 94 | up (struct semaphore * sem) |
95 | { | 95 | { |
96 | if (atomic_inc_return(&sem->count) <= 0) | 96 | if (ia64_fetchadd(1, &sem->count.counter, rel) <= -1) |
97 | __up(sem); | 97 | __up(sem); |
98 | } | 98 | } |
99 | 99 | ||
diff --git a/include/asm-ia64/sn/sn_feature_sets.h b/include/asm-ia64/sn/sn_feature_sets.h index e68a80853d5d..9ca642cad338 100644 --- a/include/asm-ia64/sn/sn_feature_sets.h +++ b/include/asm-ia64/sn/sn_feature_sets.h | |||
@@ -8,7 +8,7 @@ | |||
8 | * License. See the file "COPYING" in the main directory of this archive | 8 | * License. See the file "COPYING" in the main directory of this archive |
9 | * for more details. | 9 | * for more details. |
10 | * | 10 | * |
11 | * Copyright (c) 2005 Silicon Graphics, Inc. All rights reserved. | 11 | * Copyright (c) 2005-2006 Silicon Graphics, Inc. All rights reserved. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | 14 | ||
@@ -27,14 +27,12 @@ extern int sn_prom_feature_available(int id); | |||
27 | * "false" for new features. | 27 | * "false" for new features. |
28 | * | 28 | * |
29 | * Use: | 29 | * Use: |
30 | * if (sn_prom_feature_available(PRF_FEATURE_XXX)) | 30 | * if (sn_prom_feature_available(PRF_XXX)) |
31 | * ... | 31 | * ... |
32 | */ | 32 | */ |
33 | 33 | ||
34 | /* | 34 | #define PRF_PAL_CACHE_FLUSH_SAFE 0 |
35 | * Example: feature XXX | 35 | #define PRF_DEVICE_FLUSH_LIST 1 |
36 | */ | ||
37 | #define PRF_FEATURE_XXX 0 | ||
38 | 36 | ||
39 | 37 | ||
40 | 38 | ||
@@ -51,7 +49,7 @@ extern int sn_prom_feature_available(int id); | |||
51 | * | 49 | * |
52 | * By default, features are disabled unless explicitly enabled. | 50 | * By default, features are disabled unless explicitly enabled. |
53 | */ | 51 | */ |
54 | #define OSF_MCA_SLV_TO_OS_INIT_SLV 0 | 52 | #define OSF_MCA_SLV_TO_OS_INIT_SLV 0 |
55 | #define OSF_FEAT_LOG_SBES 1 | 53 | #define OSF_FEAT_LOG_SBES 1 |
56 | 54 | ||
57 | #endif /* _ASM_IA64_SN_FEATURE_SETS_H */ | 55 | #endif /* _ASM_IA64_SN_FEATURE_SETS_H */ |
diff --git a/include/asm-ia64/sn/xp.h b/include/asm-ia64/sn/xp.h index 203945ae034e..9bd2f9bf329b 100644 --- a/include/asm-ia64/sn/xp.h +++ b/include/asm-ia64/sn/xp.h | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <linux/cache.h> | 19 | #include <linux/cache.h> |
20 | #include <linux/hardirq.h> | 20 | #include <linux/hardirq.h> |
21 | #include <linux/mutex.h> | ||
21 | #include <asm/sn/types.h> | 22 | #include <asm/sn/types.h> |
22 | #include <asm/sn/bte.h> | 23 | #include <asm/sn/bte.h> |
23 | 24 | ||
@@ -359,7 +360,7 @@ typedef void (*xpc_notify_func)(enum xpc_retval reason, partid_t partid, | |||
359 | * the channel. | 360 | * the channel. |
360 | */ | 361 | */ |
361 | struct xpc_registration { | 362 | struct xpc_registration { |
362 | struct semaphore sema; | 363 | struct mutex mutex; |
363 | xpc_channel_func func; /* function to call */ | 364 | xpc_channel_func func; /* function to call */ |
364 | void *key; /* pointer to user's key */ | 365 | void *key; /* pointer to user's key */ |
365 | u16 nentries; /* #of msg entries in local msg queue */ | 366 | u16 nentries; /* #of msg entries in local msg queue */ |
diff --git a/include/asm-ia64/sn/xpc.h b/include/asm-ia64/sn/xpc.h index 87e9cd588510..0c36928ffd8b 100644 --- a/include/asm-ia64/sn/xpc.h +++ b/include/asm-ia64/sn/xpc.h | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/sysctl.h> | 20 | #include <linux/sysctl.h> |
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/mutex.h> | ||
23 | #include <linux/completion.h> | ||
22 | #include <asm/pgtable.h> | 24 | #include <asm/pgtable.h> |
23 | #include <asm/processor.h> | 25 | #include <asm/processor.h> |
24 | #include <asm/sn/bte.h> | 26 | #include <asm/sn/bte.h> |
@@ -335,8 +337,7 @@ struct xpc_openclose_args { | |||
335 | * and consumed by the intended recipient. | 337 | * and consumed by the intended recipient. |
336 | */ | 338 | */ |
337 | struct xpc_notify { | 339 | struct xpc_notify { |
338 | struct semaphore sema; /* notify semaphore */ | 340 | volatile u8 type; /* type of notification */ |
339 | volatile u8 type; /* type of notification */ | ||
340 | 341 | ||
341 | /* the following two fields are only used if type == XPC_N_CALL */ | 342 | /* the following two fields are only used if type == XPC_N_CALL */ |
342 | xpc_notify_func func; /* user's notify function */ | 343 | xpc_notify_func func; /* user's notify function */ |
@@ -465,8 +466,8 @@ struct xpc_channel { | |||
465 | xpc_channel_func func; /* user's channel function */ | 466 | xpc_channel_func func; /* user's channel function */ |
466 | void *key; /* pointer to user's key */ | 467 | void *key; /* pointer to user's key */ |
467 | 468 | ||
468 | struct semaphore msg_to_pull_sema; /* next msg to pull serialization */ | 469 | struct mutex msg_to_pull_mutex; /* next msg to pull serialization */ |
469 | struct semaphore wdisconnect_sema; /* wait for channel disconnect */ | 470 | struct completion wdisconnect_wait; /* wait for channel disconnect */ |
470 | 471 | ||
471 | struct xpc_openclose_args *local_openclose_args; /* args passed on */ | 472 | struct xpc_openclose_args *local_openclose_args; /* args passed on */ |
472 | /* opening or closing of channel */ | 473 | /* opening or closing of channel */ |
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index d8aae4da3978..3ee19dfa46df 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -18,6 +18,10 @@ | |||
18 | #include <asm/smp.h> | 18 | #include <asm/smp.h> |
19 | 19 | ||
20 | #ifdef CONFIG_NUMA | 20 | #ifdef CONFIG_NUMA |
21 | |||
22 | /* Nodes w/o CPUs are preferred for memory allocations, see build_zonelists */ | ||
23 | #define PENALTY_FOR_NODE_WITH_CPUS 255 | ||
24 | |||
21 | /* | 25 | /* |
22 | * Returns the number of the node containing CPU 'cpu' | 26 | * Returns the number of the node containing CPU 'cpu' |
23 | */ | 27 | */ |
@@ -98,6 +102,13 @@ void build_cpu_to_node_map(void); | |||
98 | 102 | ||
99 | #endif /* CONFIG_NUMA */ | 103 | #endif /* CONFIG_NUMA */ |
100 | 104 | ||
105 | #ifdef CONFIG_SMP | ||
106 | #define topology_physical_package_id(cpu) (cpu_data(cpu)->socket_id) | ||
107 | #define topology_core_id(cpu) (cpu_data(cpu)->core_id) | ||
108 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | ||
109 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) | ||
110 | #endif | ||
111 | |||
101 | #include <asm-generic/topology.h> | 112 | #include <asm-generic/topology.h> |
102 | 113 | ||
103 | #endif /* _ASM_IA64_TOPOLOGY_H */ | 114 | #endif /* _ASM_IA64_TOPOLOGY_H */ |