aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/topology.h14
-rw-r--r--include/asm-m32r/smp.h2
-rw-r--r--include/linux/clockchips.h4
-rw-r--r--include/linux/cpumask.h98
-rw-r--r--include/linux/interrupt.h4
-rw-r--r--include/linux/irq.h3
-rw-r--r--include/video/radeon.h18
7 files changed, 88 insertions, 55 deletions
diff --git a/include/asm-generic/topology.h b/include/asm-generic/topology.h
index 54bbf6e04ee8..0e9e2bc0ee96 100644
--- a/include/asm-generic/topology.h
+++ b/include/asm-generic/topology.h
@@ -40,6 +40,9 @@
40#ifndef node_to_cpumask 40#ifndef node_to_cpumask
41#define node_to_cpumask(node) ((void)node, cpu_online_map) 41#define node_to_cpumask(node) ((void)node, cpu_online_map)
42#endif 42#endif
43#ifndef cpumask_of_node
44#define cpumask_of_node(node) ((void)node, cpu_online_mask)
45#endif
43#ifndef node_to_first_cpu 46#ifndef node_to_first_cpu
44#define node_to_first_cpu(node) ((void)(node),0) 47#define node_to_first_cpu(node) ((void)(node),0)
45#endif 48#endif
@@ -54,9 +57,18 @@
54 ) 57 )
55#endif 58#endif
56 59
60#ifndef cpumask_of_pcibus
61#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \
62 cpu_all_mask : \
63 cpumask_of_node(pcibus_to_node(bus)))
64#endif
65
57#endif /* CONFIG_NUMA */ 66#endif /* CONFIG_NUMA */
58 67
59/* returns pointer to cpumask for specified node */ 68/*
69 * returns pointer to cpumask for specified node
70 * Deprecated: use "const struct cpumask *mask = cpumask_of_node(node)"
71 */
60#ifndef node_to_cpumask_ptr 72#ifndef node_to_cpumask_ptr
61 73
62#define node_to_cpumask_ptr(v, node) \ 74#define node_to_cpumask_ptr(v, node) \
diff --git a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h
index c5dd66916692..b96a6d2ffbc3 100644
--- a/include/asm-m32r/smp.h
+++ b/include/asm-m32r/smp.h
@@ -63,8 +63,6 @@ extern volatile int cpu_2_physid[NR_CPUS];
63#define raw_smp_processor_id() (current_thread_info()->cpu) 63#define raw_smp_processor_id() (current_thread_info()->cpu)
64 64
65extern cpumask_t cpu_callout_map; 65extern cpumask_t cpu_callout_map;
66extern cpumask_t cpu_possible_map;
67extern cpumask_t cpu_present_map;
68 66
69static __inline__ int hard_smp_processor_id(void) 67static __inline__ int hard_smp_processor_id(void)
70{ 68{
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index ed3a5d473e52..cea153697ec7 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -82,13 +82,13 @@ struct clock_event_device {
82 int shift; 82 int shift;
83 int rating; 83 int rating;
84 int irq; 84 int irq;
85 cpumask_t cpumask; 85 const struct cpumask *cpumask;
86 int (*set_next_event)(unsigned long evt, 86 int (*set_next_event)(unsigned long evt,
87 struct clock_event_device *); 87 struct clock_event_device *);
88 void (*set_mode)(enum clock_event_mode mode, 88 void (*set_mode)(enum clock_event_mode mode,
89 struct clock_event_device *); 89 struct clock_event_device *);
90 void (*event_handler)(struct clock_event_device *); 90 void (*event_handler)(struct clock_event_device *);
91 void (*broadcast)(cpumask_t mask); 91 void (*broadcast)(const struct cpumask *mask);
92 struct list_head list; 92 struct list_head list;
93 enum clock_event_mode mode; 93 enum clock_event_mode mode;
94 ktime_t next_event; 94 ktime_t next_event;
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index 21e1dd43e52a..d4bf52603e6b 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -339,36 +339,6 @@ extern cpumask_t cpu_mask_all;
339#endif 339#endif
340#define CPUMASK_PTR(v, m) cpumask_t *v = &(m->v) 340#define CPUMASK_PTR(v, m) cpumask_t *v = &(m->v)
341 341
342#define cpumask_scnprintf(buf, len, src) \
343 __cpumask_scnprintf((buf), (len), &(src), NR_CPUS)
344static inline int __cpumask_scnprintf(char *buf, int len,
345 const cpumask_t *srcp, int nbits)
346{
347 return bitmap_scnprintf(buf, len, srcp->bits, nbits);
348}
349
350#define cpumask_parse_user(ubuf, ulen, dst) \
351 __cpumask_parse_user((ubuf), (ulen), &(dst), NR_CPUS)
352static inline int __cpumask_parse_user(const char __user *buf, int len,
353 cpumask_t *dstp, int nbits)
354{
355 return bitmap_parse_user(buf, len, dstp->bits, nbits);
356}
357
358#define cpulist_scnprintf(buf, len, src) \
359 __cpulist_scnprintf((buf), (len), &(src), NR_CPUS)
360static inline int __cpulist_scnprintf(char *buf, int len,
361 const cpumask_t *srcp, int nbits)
362{
363 return bitmap_scnlistprintf(buf, len, srcp->bits, nbits);
364}
365
366#define cpulist_parse(buf, dst) __cpulist_parse((buf), &(dst), NR_CPUS)
367static inline int __cpulist_parse(const char *buf, cpumask_t *dstp, int nbits)
368{
369 return bitmap_parselist(buf, dstp->bits, nbits);
370}
371
372#define cpu_remap(oldbit, old, new) \ 342#define cpu_remap(oldbit, old, new) \
373 __cpu_remap((oldbit), &(old), &(new), NR_CPUS) 343 __cpu_remap((oldbit), &(old), &(new), NR_CPUS)
374static inline int __cpu_remap(int oldbit, 344static inline int __cpu_remap(int oldbit,
@@ -540,9 +510,6 @@ extern cpumask_t cpu_active_map;
540 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ 510 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
541} 511}
542 512
543/* This produces more efficient code. */
544#define nr_cpumask_bits NR_CPUS
545
546#else /* NR_CPUS > BITS_PER_LONG */ 513#else /* NR_CPUS > BITS_PER_LONG */
547 514
548#define CPU_BITS_ALL \ 515#define CPU_BITS_ALL \
@@ -550,9 +517,15 @@ extern cpumask_t cpu_active_map;
550 [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \ 517 [0 ... BITS_TO_LONGS(NR_CPUS)-2] = ~0UL, \
551 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \ 518 [BITS_TO_LONGS(NR_CPUS)-1] = CPU_MASK_LAST_WORD \
552} 519}
520#endif /* NR_CPUS > BITS_PER_LONG */
553 521
522#ifdef CONFIG_CPUMASK_OFFSTACK
523/* Assuming NR_CPUS is huge, a runtime limit is more efficient. Also,
524 * not all bits may be allocated. */
554#define nr_cpumask_bits nr_cpu_ids 525#define nr_cpumask_bits nr_cpu_ids
555#endif /* NR_CPUS > BITS_PER_LONG */ 526#else
527#define nr_cpumask_bits NR_CPUS
528#endif
556 529
557/* verify cpu argument to cpumask_* operators */ 530/* verify cpu argument to cpumask_* operators */
558static inline unsigned int cpumask_check(unsigned int cpu) 531static inline unsigned int cpumask_check(unsigned int cpu)
@@ -946,6 +919,63 @@ static inline void cpumask_copy(struct cpumask *dstp,
946#define cpumask_of(cpu) (get_cpu_mask(cpu)) 919#define cpumask_of(cpu) (get_cpu_mask(cpu))
947 920
948/** 921/**
922 * cpumask_scnprintf - print a cpumask into a string as comma-separated hex
923 * @buf: the buffer to sprintf into
924 * @len: the length of the buffer
925 * @srcp: the cpumask to print
926 *
927 * If len is zero, returns zero. Otherwise returns the length of the
928 * (nul-terminated) @buf string.
929 */
930static inline int cpumask_scnprintf(char *buf, int len,
931 const struct cpumask *srcp)
932{
933 return bitmap_scnprintf(buf, len, srcp->bits, nr_cpumask_bits);
934}
935
936/**
937 * cpumask_parse_user - extract a cpumask from a user string
938 * @buf: the buffer to extract from
939 * @len: the length of the buffer
940 * @dstp: the cpumask to set.
941 *
942 * Returns -errno, or 0 for success.
943 */
944static inline int cpumask_parse_user(const char __user *buf, int len,
945 struct cpumask *dstp)
946{
947 return bitmap_parse_user(buf, len, dstp->bits, nr_cpumask_bits);
948}
949
950/**
951 * cpulist_scnprintf - print a cpumask into a string as comma-separated list
952 * @buf: the buffer to sprintf into
953 * @len: the length of the buffer
954 * @srcp: the cpumask to print
955 *
956 * If len is zero, returns zero. Otherwise returns the length of the
957 * (nul-terminated) @buf string.
958 */
959static inline int cpulist_scnprintf(char *buf, int len,
960 const struct cpumask *srcp)
961{
962 return bitmap_scnlistprintf(buf, len, srcp->bits, nr_cpumask_bits);
963}
964
965/**
966 * cpulist_parse_user - extract a cpumask from a user string of ranges
967 * @buf: the buffer to extract from
968 * @len: the length of the buffer
969 * @dstp: the cpumask to set.
970 *
971 * Returns -errno, or 0 for success.
972 */
973static inline int cpulist_parse(const char *buf, struct cpumask *dstp)
974{
975 return bitmap_parselist(buf, dstp->bits, nr_cpumask_bits);
976}
977
978/**
949 * to_cpumask - convert an NR_CPUS bitmap to a struct cpumask * 979 * to_cpumask - convert an NR_CPUS bitmap to a struct cpumask *
950 * @bitmap: the bitmap 980 * @bitmap: the bitmap
951 * 981 *
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 777f89e00b4a..7e85a6e89e41 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -111,13 +111,13 @@ extern void enable_irq(unsigned int irq);
111 111
112extern cpumask_t irq_default_affinity; 112extern cpumask_t irq_default_affinity;
113 113
114extern int irq_set_affinity(unsigned int irq, cpumask_t cpumask); 114extern int irq_set_affinity(unsigned int irq, const struct cpumask *cpumask);
115extern int irq_can_set_affinity(unsigned int irq); 115extern int irq_can_set_affinity(unsigned int irq);
116extern int irq_select_affinity(unsigned int irq); 116extern int irq_select_affinity(unsigned int irq);
117 117
118#else /* CONFIG_SMP */ 118#else /* CONFIG_SMP */
119 119
120static inline int irq_set_affinity(unsigned int irq, cpumask_t cpumask) 120static inline int irq_set_affinity(unsigned int irq, const struct cpumask *m)
121{ 121{
122 return -EINVAL; 122 return -EINVAL;
123} 123}
diff --git a/include/linux/irq.h b/include/linux/irq.h
index b5749db3e5a1..59525b74979f 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -113,7 +113,8 @@ struct irq_chip {
113 void (*eoi)(unsigned int irq); 113 void (*eoi)(unsigned int irq);
114 114
115 void (*end)(unsigned int irq); 115 void (*end)(unsigned int irq);
116 void (*set_affinity)(unsigned int irq, cpumask_t dest); 116 void (*set_affinity)(unsigned int irq,
117 const struct cpumask *dest);
117 int (*retrigger)(unsigned int irq); 118 int (*retrigger)(unsigned int irq);
118 int (*set_type)(unsigned int irq, unsigned int flow_type); 119 int (*set_type)(unsigned int irq, unsigned int flow_type);
119 int (*set_wake)(unsigned int irq, unsigned int on); 120 int (*set_wake)(unsigned int irq, unsigned int on);
diff --git a/include/video/radeon.h b/include/video/radeon.h
index d5dcaf154ba4..1cd09cc5b169 100644
--- a/include/video/radeon.h
+++ b/include/video/radeon.h
@@ -525,9 +525,6 @@
525#define CRTC_DISPLAY_DIS (1 << 10) 525#define CRTC_DISPLAY_DIS (1 << 10)
526#define CRTC_CRT_ON (1 << 15) 526#define CRTC_CRT_ON (1 << 15)
527 527
528/* DSTCACHE_MODE bits constants */
529#define RB2D_DC_AUTOFLUSH_ENABLE (1 << 8)
530#define RB2D_DC_DC_DISABLE_IGNORE_PE (1 << 17)
531 528
532/* DSTCACHE_CTLSTAT bit constants */ 529/* DSTCACHE_CTLSTAT bit constants */
533#define RB2D_DC_FLUSH_2D (1 << 0) 530#define RB2D_DC_FLUSH_2D (1 << 0)
@@ -869,10 +866,15 @@
869#define GMC_DST_16BPP_YVYU422 0x00000c00 866#define GMC_DST_16BPP_YVYU422 0x00000c00
870#define GMC_DST_32BPP_AYUV444 0x00000e00 867#define GMC_DST_32BPP_AYUV444 0x00000e00
871#define GMC_DST_16BPP_ARGB4444 0x00000f00 868#define GMC_DST_16BPP_ARGB4444 0x00000f00
869#define GMC_SRC_MONO 0x00000000
870#define GMC_SRC_MONO_LBKGD 0x00001000
871#define GMC_SRC_DSTCOLOR 0x00003000
872#define GMC_BYTE_ORDER_MSB_TO_LSB 0x00000000 872#define GMC_BYTE_ORDER_MSB_TO_LSB 0x00000000
873#define GMC_BYTE_ORDER_LSB_TO_MSB 0x00004000 873#define GMC_BYTE_ORDER_LSB_TO_MSB 0x00004000
874#define GMC_DP_CONVERSION_TEMP_9300 0x00008000 874#define GMC_DP_CONVERSION_TEMP_9300 0x00008000
875#define GMC_DP_CONVERSION_TEMP_6500 0x00000000 875#define GMC_DP_CONVERSION_TEMP_6500 0x00000000
876#define GMC_DP_SRC_RECT 0x02000000
877#define GMC_DP_SRC_HOST 0x03000000
876#define GMC_DP_SRC_HOST_BYTEALIGN 0x04000000 878#define GMC_DP_SRC_HOST_BYTEALIGN 0x04000000
877#define GMC_3D_FCN_EN_CLR 0x00000000 879#define GMC_3D_FCN_EN_CLR 0x00000000
878#define GMC_3D_FCN_EN_SET 0x08000000 880#define GMC_3D_FCN_EN_SET 0x08000000
@@ -883,9 +885,6 @@
883#define GMC_WRITE_MASK_LEAVE 0x00000000 885#define GMC_WRITE_MASK_LEAVE 0x00000000
884#define GMC_WRITE_MASK_SET 0x40000000 886#define GMC_WRITE_MASK_SET 0x40000000
885#define GMC_CLR_CMP_CNTL_DIS (1 << 28) 887#define GMC_CLR_CMP_CNTL_DIS (1 << 28)
886#define GMC_SRC_DATATYPE_MASK (3 << 12)
887#define GMC_SRC_DATATYPE_MONO_FG_BG (0 << 12)
888#define GMC_SRC_DATATYPE_MONO_FG_LA (1 << 12)
889#define GMC_SRC_DATATYPE_COLOR (3 << 12) 888#define GMC_SRC_DATATYPE_COLOR (3 << 12)
890#define ROP3_S 0x00cc0000 889#define ROP3_S 0x00cc0000
891#define ROP3_SRCCOPY 0x00cc0000 890#define ROP3_SRCCOPY 0x00cc0000
@@ -894,7 +893,6 @@
894#define DP_SRC_SOURCE_MASK (7 << 24) 893#define DP_SRC_SOURCE_MASK (7 << 24)
895#define GMC_BRUSH_NONE (15 << 4) 894#define GMC_BRUSH_NONE (15 << 4)
896#define DP_SRC_SOURCE_MEMORY (2 << 24) 895#define DP_SRC_SOURCE_MEMORY (2 << 24)
897#define DP_SRC_SOURCE_HOST_DATA (3 << 24)
898#define GMC_BRUSH_SOLIDCOLOR 0x000000d0 896#define GMC_BRUSH_SOLIDCOLOR 0x000000d0
899 897
900/* DP_MIX bit constants */ 898/* DP_MIX bit constants */
@@ -980,12 +978,6 @@
980#define DISP_PWR_MAN_TV_ENABLE_RST (1 << 25) 978#define DISP_PWR_MAN_TV_ENABLE_RST (1 << 25)
981#define DISP_PWR_MAN_AUTO_PWRUP_EN (1 << 26) 979#define DISP_PWR_MAN_AUTO_PWRUP_EN (1 << 26)
982 980
983/* RBBM_GUICNTL constants */
984#define RBBM_GUICNTL_HOST_DATA_SWAP_NONE (0 << 0)
985#define RBBM_GUICNTL_HOST_DATA_SWAP_16BIT (1 << 0)
986#define RBBM_GUICNTL_HOST_DATA_SWAP_32BIT (2 << 0)
987#define RBBM_GUICNTL_HOST_DATA_SWAP_HDW (3 << 0)
988
989/* masks */ 981/* masks */
990 982
991#define CONFIG_MEMSIZE_MASK 0x1f000000 983#define CONFIG_MEMSIZE_MASK 0x1f000000