aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/ABI/testing/sysfs-kernel-slab479
-rw-r--r--Makefile2
-rw-r--r--drivers/acpi/acpica/Makefile27
-rw-r--r--drivers/acpi/acpica/aclocal.h7
-rw-r--r--drivers/acpi/bus.c2
-rw-r--r--drivers/acpi/processor_idle.c42
-rw-r--r--drivers/acpi/processor_throttling.c25
-rw-r--r--drivers/acpi/video.c38
-rw-r--r--drivers/gpu/drm/Kconfig6
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c13
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h11
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c9
-rw-r--r--drivers/gpu/drm/i915/i915_reg.h1
-rw-r--r--drivers/gpu/drm/i915/i915_suspend.c24
-rw-r--r--drivers/gpu/drm/i915/intel_crt.c2
-rw-r--r--drivers/gpu/drm/i915/intel_display.c31
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h4
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c17
-rw-r--r--drivers/gpu/drm/i915/intel_i2c.c17
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c54
-rw-r--r--drivers/gpu/drm/i915/intel_modes.c6
-rw-r--r--drivers/ide/icside.c2
-rw-r--r--drivers/ide/ide-tape.c6
-rw-r--r--drivers/ide/piix.c1
-rw-r--r--drivers/pci/msi.c8
-rw-r--r--drivers/pci/pcie/aer/aerdrv.h3
-rw-r--r--drivers/pci/pcie/portdrv_pci.c2
-rw-r--r--drivers/platform/x86/asus-laptop.c6
-rw-r--r--drivers/platform/x86/eeepc-laptop.c47
-rw-r--r--drivers/pnp/pnpacpi/core.c8
-rw-r--r--drivers/thermal/thermal_sys.c8
-rw-r--r--fs/reiserfs/super.c2
-rw-r--r--fs/reiserfs/xattr.c81
-rw-r--r--include/drm/i915_drm.h10
-rw-r--r--include/linux/reiserfs_xattr.h4
-rw-r--r--kernel/panic.c35
-rw-r--r--mm/slob.c5
-rw-r--r--mm/slub.c6
-rw-r--r--net/bluetooth/hci_conn.c6
-rw-r--r--net/bluetooth/hci_event.c2
-rw-r--r--net/bluetooth/hci_sysfs.c3
41 files changed, 920 insertions, 142 deletions
diff --git a/Documentation/ABI/testing/sysfs-kernel-slab b/Documentation/ABI/testing/sysfs-kernel-slab
new file mode 100644
index 00000000000..6dcf75e594f
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-kernel-slab
@@ -0,0 +1,479 @@
1What: /sys/kernel/slab
2Date: May 2007
3KernelVersion: 2.6.22
4Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
5 Christoph Lameter <cl@linux-foundation.org>
6Description:
7 The /sys/kernel/slab directory contains a snapshot of the
8 internal state of the SLUB allocator for each cache. Certain
9 files may be modified to change the behavior of the cache (and
10 any cache it aliases, if any).
11Users: kernel memory tuning tools
12
13What: /sys/kernel/slab/cache/aliases
14Date: May 2007
15KernelVersion: 2.6.22
16Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
17 Christoph Lameter <cl@linux-foundation.org>
18Description:
19 The aliases file is read-only and specifies how many caches
20 have merged into this cache.
21
22What: /sys/kernel/slab/cache/align
23Date: May 2007
24KernelVersion: 2.6.22
25Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
26 Christoph Lameter <cl@linux-foundation.org>
27Description:
28 The align file is read-only and specifies the cache's object
29 alignment in bytes.
30
31What: /sys/kernel/slab/cache/alloc_calls
32Date: May 2007
33KernelVersion: 2.6.22
34Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
35 Christoph Lameter <cl@linux-foundation.org>
36Description:
37 The alloc_calls file is read-only and lists the kernel code
38 locations from which allocations for this cache were performed.
39 The alloc_calls file only contains information if debugging is
40 enabled for that cache (see Documentation/vm/slub.txt).
41
42What: /sys/kernel/slab/cache/alloc_fastpath
43Date: February 2008
44KernelVersion: 2.6.25
45Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
46 Christoph Lameter <cl@linux-foundation.org>
47Description:
48 The alloc_fastpath file is read-only and specifies how many
49 objects have been allocated using the fast path.
50 Available when CONFIG_SLUB_STATS is enabled.
51
52What: /sys/kernel/slab/cache/alloc_from_partial
53Date: February 2008
54KernelVersion: 2.6.25
55Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
56 Christoph Lameter <cl@linux-foundation.org>
57Description:
58 The alloc_from_partial file is read-only and specifies how
59 many times a cpu slab has been full and it has been refilled
60 by using a slab from the list of partially used slabs.
61 Available when CONFIG_SLUB_STATS is enabled.
62
63What: /sys/kernel/slab/cache/alloc_refill
64Date: February 2008
65KernelVersion: 2.6.25
66Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
67 Christoph Lameter <cl@linux-foundation.org>
68Description:
69 The alloc_refill file is read-only and specifies how many
70 times the per-cpu freelist was empty but there were objects
71 available as the result of remote cpu frees.
72 Available when CONFIG_SLUB_STATS is enabled.
73
74What: /sys/kernel/slab/cache/alloc_slab
75Date: February 2008
76KernelVersion: 2.6.25
77Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
78 Christoph Lameter <cl@linux-foundation.org>
79Description:
80 The alloc_slab file is read-only and specifies how many times
81 a new slab had to be allocated from the page allocator.
82 Available when CONFIG_SLUB_STATS is enabled.
83
84What: /sys/kernel/slab/cache/alloc_slowpath
85Date: February 2008
86KernelVersion: 2.6.25
87Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
88 Christoph Lameter <cl@linux-foundation.org>
89Description:
90 The alloc_slowpath file is read-only and specifies how many
91 objects have been allocated using the slow path because of a
92 refill or allocation from a partial or new slab.
93 Available when CONFIG_SLUB_STATS is enabled.
94
95What: /sys/kernel/slab/cache/cache_dma
96Date: May 2007
97KernelVersion: 2.6.22
98Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
99 Christoph Lameter <cl@linux-foundation.org>
100Description:
101 The cache_dma file is read-only and specifies whether objects
102 are from ZONE_DMA.
103 Available when CONFIG_ZONE_DMA is enabled.
104
105What: /sys/kernel/slab/cache/cpu_slabs
106Date: May 2007
107KernelVersion: 2.6.22
108Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
109 Christoph Lameter <cl@linux-foundation.org>
110Description:
111 The cpu_slabs file is read-only and displays how many cpu slabs
112 are active and their NUMA locality.
113
114What: /sys/kernel/slab/cache/cpuslab_flush
115Date: April 2009
116KernelVersion: 2.6.31
117Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
118 Christoph Lameter <cl@linux-foundation.org>
119Description:
120 The file cpuslab_flush is read-only and specifies how many
121 times a cache's cpu slabs have been flushed as the result of
122 destroying or shrinking a cache, a cpu going offline, or as
123 the result of forcing an allocation from a certain node.
124 Available when CONFIG_SLUB_STATS is enabled.
125
126What: /sys/kernel/slab/cache/ctor
127Date: May 2007
128KernelVersion: 2.6.22
129Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
130 Christoph Lameter <cl@linux-foundation.org>
131Description:
132 The ctor file is read-only and specifies the cache's object
133 constructor function, which is invoked for each object when a
134 new slab is allocated.
135
136What: /sys/kernel/slab/cache/deactivate_empty
137Date: February 2008
138KernelVersion: 2.6.25
139Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
140 Christoph Lameter <cl@linux-foundation.org>
141Description:
142 The file deactivate_empty is read-only and specifies how many
143 times an empty cpu slab was deactivated.
144 Available when CONFIG_SLUB_STATS is enabled.
145
146What: /sys/kernel/slab/cache/deactivate_full
147Date: February 2008
148KernelVersion: 2.6.25
149Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
150 Christoph Lameter <cl@linux-foundation.org>
151Description:
152 The file deactivate_full is read-only and specifies how many
153 times a full cpu slab was deactivated.
154 Available when CONFIG_SLUB_STATS is enabled.
155
156What: /sys/kernel/slab/cache/deactivate_remote_frees
157Date: February 2008
158KernelVersion: 2.6.25
159Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
160 Christoph Lameter <cl@linux-foundation.org>
161Description:
162 The file deactivate_remote_frees is read-only and specifies how
163 many times a cpu slab has been deactivated and contained free
164 objects that were freed remotely.
165 Available when CONFIG_SLUB_STATS is enabled.
166
167What: /sys/kernel/slab/cache/deactivate_to_head
168Date: February 2008
169KernelVersion: 2.6.25
170Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
171 Christoph Lameter <cl@linux-foundation.org>
172Description:
173 The file deactivate_to_head is read-only and specifies how
174 many times a partial cpu slab was deactivated and added to the
175 head of its node's partial list.
176 Available when CONFIG_SLUB_STATS is enabled.
177
178What: /sys/kernel/slab/cache/deactivate_to_tail
179Date: February 2008
180KernelVersion: 2.6.25
181Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
182 Christoph Lameter <cl@linux-foundation.org>
183Description:
184 The file deactivate_to_tail is read-only and specifies how
185 many times a partial cpu slab was deactivated and added to the
186 tail of its node's partial list.
187 Available when CONFIG_SLUB_STATS is enabled.
188
189What: /sys/kernel/slab/cache/destroy_by_rcu
190Date: May 2007
191KernelVersion: 2.6.22
192Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
193 Christoph Lameter <cl@linux-foundation.org>
194Description:
195 The destroy_by_rcu file is read-only and specifies whether
196 slabs (not objects) are freed by rcu.
197
198What: /sys/kernel/slab/cache/free_add_partial
199Date: February 2008
200KernelVersion: 2.6.25
201Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
202 Christoph Lameter <cl@linux-foundation.org>
203Description:
204 The file free_add_partial is read-only and specifies how many
205 times an object has been freed in a full slab so that it had to
206 added to its node's partial list.
207 Available when CONFIG_SLUB_STATS is enabled.
208
209What: /sys/kernel/slab/cache/free_calls
210Date: May 2007
211KernelVersion: 2.6.22
212Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
213 Christoph Lameter <cl@linux-foundation.org>
214Description:
215 The free_calls file is read-only and lists the locations of
216 object frees if slab debugging is enabled (see
217 Documentation/vm/slub.txt).
218
219What: /sys/kernel/slab/cache/free_fastpath
220Date: February 2008
221KernelVersion: 2.6.25
222Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
223 Christoph Lameter <cl@linux-foundation.org>
224Description:
225 The free_fastpath file is read-only and specifies how many
226 objects have been freed using the fast path because it was an
227 object from the cpu slab.
228 Available when CONFIG_SLUB_STATS is enabled.
229
230What: /sys/kernel/slab/cache/free_frozen
231Date: February 2008
232KernelVersion: 2.6.25
233Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
234 Christoph Lameter <cl@linux-foundation.org>
235Description:
236 The free_frozen file is read-only and specifies how many
237 objects have been freed to a frozen slab (i.e. a remote cpu
238 slab).
239 Available when CONFIG_SLUB_STATS is enabled.
240
241What: /sys/kernel/slab/cache/free_remove_partial
242Date: February 2008
243KernelVersion: 2.6.25
244Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
245 Christoph Lameter <cl@linux-foundation.org>
246Description:
247 The file free_remove_partial is read-only and specifies how
248 many times an object has been freed to a now-empty slab so
249 that it had to be removed from its node's partial list.
250 Available when CONFIG_SLUB_STATS is enabled.
251
252What: /sys/kernel/slab/cache/free_slab
253Date: February 2008
254KernelVersion: 2.6.25
255Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
256 Christoph Lameter <cl@linux-foundation.org>
257Description:
258 The free_slab file is read-only and specifies how many times an
259 empty slab has been freed back to the page allocator.
260 Available when CONFIG_SLUB_STATS is enabled.
261
262What: /sys/kernel/slab/cache/free_slowpath
263Date: February 2008
264KernelVersion: 2.6.25
265Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
266 Christoph Lameter <cl@linux-foundation.org>
267Description:
268 The free_slowpath file is read-only and specifies how many
269 objects have been freed using the slow path (i.e. to a full or
270 partial slab).
271 Available when CONFIG_SLUB_STATS is enabled.
272
273What: /sys/kernel/slab/cache/hwcache_align
274Date: May 2007
275KernelVersion: 2.6.22
276Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
277 Christoph Lameter <cl@linux-foundation.org>
278Description:
279 The hwcache_align file is read-only and specifies whether
280 objects are aligned on cachelines.
281
282What: /sys/kernel/slab/cache/min_partial
283Date: February 2009
284KernelVersion: 2.6.30
285Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
286 David Rientjes <rientjes@google.com>
287Description:
288 The min_partial file specifies how many empty slabs shall
289 remain on a node's partial list to avoid the overhead of
290 allocating new slabs. Such slabs may be reclaimed by utilizing
291 the shrink file.
292
293What: /sys/kernel/slab/cache/object_size
294Date: May 2007
295KernelVersion: 2.6.22
296Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
297 Christoph Lameter <cl@linux-foundation.org>
298Description:
299 The object_size file is read-only and specifies the cache's
300 object size.
301
302What: /sys/kernel/slab/cache/objects
303Date: May 2007
304KernelVersion: 2.6.22
305Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
306 Christoph Lameter <cl@linux-foundation.org>
307Description:
308 The objects file is read-only and displays how many objects are
309 active and from which nodes they are from.
310
311What: /sys/kernel/slab/cache/objects_partial
312Date: April 2008
313KernelVersion: 2.6.26
314Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
315 Christoph Lameter <cl@linux-foundation.org>
316Description:
317 The objects_partial file is read-only and displays how many
318 objects are on partial slabs and from which nodes they are
319 from.
320
321What: /sys/kernel/slab/cache/objs_per_slab
322Date: May 2007
323KernelVersion: 2.6.22
324Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
325 Christoph Lameter <cl@linux-foundation.org>
326Description:
327 The file objs_per_slab is read-only and specifies how many
328 objects may be allocated from a single slab of the order
329 specified in /sys/kernel/slab/cache/order.
330
331What: /sys/kernel/slab/cache/order
332Date: May 2007
333KernelVersion: 2.6.22
334Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
335 Christoph Lameter <cl@linux-foundation.org>
336Description:
337 The order file specifies the page order at which new slabs are
338 allocated. It is writable and can be changed to increase the
339 number of objects per slab. If a slab cannot be allocated
340 because of fragmentation, SLUB will retry with the minimum order
341 possible depending on its characteristics.
342
343What: /sys/kernel/slab/cache/order_fallback
344Date: April 2008
345KernelVersion: 2.6.26
346Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
347 Christoph Lameter <cl@linux-foundation.org>
348Description:
349 The file order_fallback is read-only and specifies how many
350 times an allocation of a new slab has not been possible at the
351 cache's order and instead fallen back to its minimum possible
352 order.
353 Available when CONFIG_SLUB_STATS is enabled.
354
355What: /sys/kernel/slab/cache/partial
356Date: May 2007
357KernelVersion: 2.6.22
358Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
359 Christoph Lameter <cl@linux-foundation.org>
360Description:
361 The partial file is read-only and displays how long many
362 partial slabs there are and how long each node's list is.
363
364What: /sys/kernel/slab/cache/poison
365Date: May 2007
366KernelVersion: 2.6.22
367Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
368 Christoph Lameter <cl@linux-foundation.org>
369Description:
370 The poison file specifies whether objects should be poisoned
371 when a new slab is allocated.
372
373What: /sys/kernel/slab/cache/reclaim_account
374Date: May 2007
375KernelVersion: 2.6.22
376Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
377 Christoph Lameter <cl@linux-foundation.org>
378Description:
379 The reclaim_account file specifies whether the cache's objects
380 are reclaimable (and grouped by their mobility).
381
382What: /sys/kernel/slab/cache/red_zone
383Date: May 2007
384KernelVersion: 2.6.22
385Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
386 Christoph Lameter <cl@linux-foundation.org>
387Description:
388 The red_zone file specifies whether the cache's objects are red
389 zoned.
390
391What: /sys/kernel/slab/cache/remote_node_defrag_ratio
392Date: January 2008
393KernelVersion: 2.6.25
394Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
395 Christoph Lameter <cl@linux-foundation.org>
396Description:
397 The file remote_node_defrag_ratio specifies the percentage of
398 times SLUB will attempt to refill the cpu slab with a partial
399 slab from a remote node as opposed to allocating a new slab on
400 the local node. This reduces the amount of wasted memory over
401 the entire system but can be expensive.
402 Available when CONFIG_NUMA is enabled.
403
404What: /sys/kernel/slab/cache/sanity_checks
405Date: May 2007
406KernelVersion: 2.6.22
407Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
408 Christoph Lameter <cl@linux-foundation.org>
409Description:
410 The sanity_checks file specifies whether expensive checks
411 should be performed on free and, at minimum, enables double free
412 checks. Caches that enable sanity_checks cannot be merged with
413 caches that do not.
414
415What: /sys/kernel/slab/cache/shrink
416Date: May 2007
417KernelVersion: 2.6.22
418Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
419 Christoph Lameter <cl@linux-foundation.org>
420Description:
421 The shrink file is written when memory should be reclaimed from
422 a cache. Empty partial slabs are freed and the partial list is
423 sorted so the slabs with the fewest available objects are used
424 first.
425
426What: /sys/kernel/slab/cache/slab_size
427Date: May 2007
428KernelVersion: 2.6.22
429Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
430 Christoph Lameter <cl@linux-foundation.org>
431Description:
432 The slab_size file is read-only and specifies the object size
433 with metadata (debugging information and alignment) in bytes.
434
435What: /sys/kernel/slab/cache/slabs
436Date: May 2007
437KernelVersion: 2.6.22
438Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
439 Christoph Lameter <cl@linux-foundation.org>
440Description:
441 The slabs file is read-only and displays how long many slabs
442 there are (both cpu and partial) and from which nodes they are
443 from.
444
445What: /sys/kernel/slab/cache/store_user
446Date: May 2007
447KernelVersion: 2.6.22
448Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
449 Christoph Lameter <cl@linux-foundation.org>
450Description:
451 The store_user file specifies whether the location of
452 allocation or free should be tracked for a cache.
453
454What: /sys/kernel/slab/cache/total_objects
455Date: April 2008
456KernelVersion: 2.6.26
457Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
458 Christoph Lameter <cl@linux-foundation.org>
459Description:
460 The total_objects file is read-only and displays how many total
461 objects a cache has and from which nodes they are from.
462
463What: /sys/kernel/slab/cache/trace
464Date: May 2007
465KernelVersion: 2.6.22
466Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
467 Christoph Lameter <cl@linux-foundation.org>
468Description:
469 The trace file specifies whether object allocations and frees
470 should be traced.
471
472What: /sys/kernel/slab/cache/validate
473Date: May 2007
474KernelVersion: 2.6.22
475Contact: Pekka Enberg <penberg@cs.helsinki.fi>,
476 Christoph Lameter <cl@linux-foundation.org>
477Description:
478 Writing to the validate file causes SLUB to traverse all of its
479 cache's objects and check the validity of metadata.
diff --git a/Makefile b/Makefile
index 9b2b58c3b3d..b57e1f539e8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 30 3SUBLEVEL = 30
4EXTRAVERSION = -rc5 4EXTRAVERSION = -rc6
5NAME = Vindictive Armadillo 5NAME = Vindictive Armadillo
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
index 17e50824a6f..72ac28da14e 100644
--- a/drivers/acpi/acpica/Makefile
+++ b/drivers/acpi/acpica/Makefile
@@ -5,40 +5,43 @@
5ccflags-y := -Os 5ccflags-y := -Os
6ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT 6ccflags-$(CONFIG_ACPI_DEBUG) += -DACPI_DEBUG_OUTPUT
7 7
8obj-y := dsfield.o dsmthdat.o dsopcode.o dswexec.o dswscope.o \ 8# use acpi.o to put all files here into acpi.o modparam namespace
9obj-y += acpi.o
10
11acpi-y := dsfield.o dsmthdat.o dsopcode.o dswexec.o dswscope.o \
9 dsmethod.o dsobject.o dsutils.o dswload.o dswstate.o \ 12 dsmethod.o dsobject.o dsutils.o dswload.o dswstate.o \
10 dsinit.o 13 dsinit.o
11 14
12obj-y += evevent.o evregion.o evsci.o evxfevnt.o \ 15acpi-y += evevent.o evregion.o evsci.o evxfevnt.o \
13 evmisc.o evrgnini.o evxface.o evxfregn.o \ 16 evmisc.o evrgnini.o evxface.o evxfregn.o \
14 evgpe.o evgpeblk.o 17 evgpe.o evgpeblk.o
15 18
16obj-y += exconfig.o exfield.o exnames.o exoparg6.o exresolv.o exstorob.o\ 19acpi-y += exconfig.o exfield.o exnames.o exoparg6.o exresolv.o exstorob.o\
17 exconvrt.o exfldio.o exoparg1.o exprep.o exresop.o exsystem.o\ 20 exconvrt.o exfldio.o exoparg1.o exprep.o exresop.o exsystem.o\
18 excreate.o exmisc.o exoparg2.o exregion.o exstore.o exutils.o \ 21 excreate.o exmisc.o exoparg2.o exregion.o exstore.o exutils.o \
19 exdump.o exmutex.o exoparg3.o exresnte.o exstoren.o 22 exdump.o exmutex.o exoparg3.o exresnte.o exstoren.o
20 23
21obj-y += hwacpi.o hwgpe.o hwregs.o hwsleep.o hwxface.o hwvalid.o 24acpi-y += hwacpi.o hwgpe.o hwregs.o hwsleep.o hwxface.o hwvalid.o
22 25
23obj-$(ACPI_FUTURE_USAGE) += hwtimer.o 26acpi-$(ACPI_FUTURE_USAGE) += hwtimer.o
24 27
25obj-y += nsaccess.o nsload.o nssearch.o nsxfeval.o \ 28acpi-y += nsaccess.o nsload.o nssearch.o nsxfeval.o \
26 nsalloc.o nseval.o nsnames.o nsutils.o nsxfname.o \ 29 nsalloc.o nseval.o nsnames.o nsutils.o nsxfname.o \
27 nsdump.o nsinit.o nsobject.o nswalk.o nsxfobj.o \ 30 nsdump.o nsinit.o nsobject.o nswalk.o nsxfobj.o \
28 nsparse.o nspredef.o 31 nsparse.o nspredef.o
29 32
30obj-$(ACPI_FUTURE_USAGE) += nsdumpdv.o 33acpi-$(ACPI_FUTURE_USAGE) += nsdumpdv.o
31 34
32obj-y += psargs.o psparse.o psloop.o pstree.o pswalk.o \ 35acpi-y += psargs.o psparse.o psloop.o pstree.o pswalk.o \
33 psopcode.o psscope.o psutils.o psxface.o 36 psopcode.o psscope.o psutils.o psxface.o
34 37
35obj-y += rsaddr.o rscreate.o rsinfo.o rsio.o rslist.o rsmisc.o rsxface.o \ 38acpi-y += rsaddr.o rscreate.o rsinfo.o rsio.o rslist.o rsmisc.o rsxface.o \
36 rscalc.o rsirq.o rsmemory.o rsutils.o 39 rscalc.o rsirq.o rsmemory.o rsutils.o
37 40
38obj-$(ACPI_FUTURE_USAGE) += rsdump.o 41acpi-$(ACPI_FUTURE_USAGE) += rsdump.o
39 42
40obj-y += tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o 43acpi-y += tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o
41 44
42obj-y += utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \ 45acpi-y += utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \
43 utcopy.o utdelete.o utglobal.o utmath.o utobject.o \ 46 utcopy.o utdelete.o utglobal.o utmath.o utobject.o \
44 utstate.o utmutex.o utobject.o utresrc.o utlock.o 47 utstate.o utmutex.o utobject.o utresrc.o utlock.o
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index 772ee5c4ccc..2ec394a328e 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -787,7 +787,12 @@ struct acpi_bit_register_info {
787 787
788/* For control registers, both ignored and reserved bits must be preserved */ 788/* For control registers, both ignored and reserved bits must be preserved */
789 789
790#define ACPI_PM1_CONTROL_IGNORED_BITS 0x0201 /* Bits 9, 0(SCI_EN) */ 790/*
791 * The ACPI spec says to ignore PM1_CTL.SCI_EN (bit 0)
792 * but we need to be able to write ACPI_BITREG_SCI_ENABLE directly
793 * as a BIOS workaround on some machines.
794 */
795#define ACPI_PM1_CONTROL_IGNORED_BITS 0x0200 /* Bits 9 */
791#define ACPI_PM1_CONTROL_RESERVED_BITS 0xC1F8 /* Bits 14-15, 3-8 */ 796#define ACPI_PM1_CONTROL_RESERVED_BITS 0xC1F8 /* Bits 14-15, 3-8 */
792#define ACPI_PM1_CONTROL_PRESERVED_BITS \ 797#define ACPI_PM1_CONTROL_PRESERVED_BITS \
793 (ACPI_PM1_CONTROL_IGNORED_BITS | ACPI_PM1_CONTROL_RESERVED_BITS) 798 (ACPI_PM1_CONTROL_IGNORED_BITS | ACPI_PM1_CONTROL_RESERVED_BITS)
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index e8f7b64e92d..ae862f1798d 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -312,7 +312,7 @@ int acpi_bus_set_power(acpi_handle handle, int state)
312 end: 312 end:
313 if (result) 313 if (result)
314 printk(KERN_WARNING PREFIX 314 printk(KERN_WARNING PREFIX
315 "Transitioning device [%s] to D%d\n", 315 "Device [%s] failed to transition to D%d\n",
316 device->pnp.bus_id, state); 316 device->pnp.bus_id, state);
317 else { 317 else {
318 device->power.state = state; 318 device->power.state = state;
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index f7ca8c55956..72069ba5f1e 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -202,21 +202,44 @@ static void acpi_state_timer_broadcast(struct acpi_processor *pr,
202 * Suspend / resume control 202 * Suspend / resume control
203 */ 203 */
204static int acpi_idle_suspend; 204static int acpi_idle_suspend;
205static u32 saved_bm_rld;
206
207static void acpi_idle_bm_rld_save(void)
208{
209 acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_RLD, &saved_bm_rld);
210}
211static void acpi_idle_bm_rld_restore(void)
212{
213 u32 resumed_bm_rld;
214
215 acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_RLD, &resumed_bm_rld);
216
217 if (resumed_bm_rld != saved_bm_rld)
218 acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, saved_bm_rld);
219}
205 220
206int acpi_processor_suspend(struct acpi_device * device, pm_message_t state) 221int acpi_processor_suspend(struct acpi_device * device, pm_message_t state)
207{ 222{
223 if (acpi_idle_suspend == 1)
224 return 0;
225
226 acpi_idle_bm_rld_save();
208 acpi_idle_suspend = 1; 227 acpi_idle_suspend = 1;
209 return 0; 228 return 0;
210} 229}
211 230
212int acpi_processor_resume(struct acpi_device * device) 231int acpi_processor_resume(struct acpi_device * device)
213{ 232{
233 if (acpi_idle_suspend == 0)
234 return 0;
235
236 acpi_idle_bm_rld_restore();
214 acpi_idle_suspend = 0; 237 acpi_idle_suspend = 0;
215 return 0; 238 return 0;
216} 239}
217 240
218#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86) 241#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86)
219static int tsc_halts_in_c(int state) 242static void tsc_check_state(int state)
220{ 243{
221 switch (boot_cpu_data.x86_vendor) { 244 switch (boot_cpu_data.x86_vendor) {
222 case X86_VENDOR_AMD: 245 case X86_VENDOR_AMD:
@@ -226,13 +249,17 @@ static int tsc_halts_in_c(int state)
226 * C/P/S0/S1 states when this bit is set. 249 * C/P/S0/S1 states when this bit is set.
227 */ 250 */
228 if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) 251 if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC))
229 return 0; 252 return;
230 253
231 /*FALL THROUGH*/ 254 /*FALL THROUGH*/
232 default: 255 default:
233 return state > ACPI_STATE_C1; 256 /* TSC could halt in idle, so notify users */
257 if (state > ACPI_STATE_C1)
258 mark_tsc_unstable("TSC halts in idle");
234 } 259 }
235} 260}
261#else
262static void tsc_check_state(int state) { return; }
236#endif 263#endif
237 264
238static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) 265static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
@@ -578,14 +605,9 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
578 605
579 pr->power.timer_broadcast_on_state = INT_MAX; 606 pr->power.timer_broadcast_on_state = INT_MAX;
580 607
581 for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) { 608 for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) {
582 struct acpi_processor_cx *cx = &pr->power.states[i]; 609 struct acpi_processor_cx *cx = &pr->power.states[i];
583 610
584#if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86)
585 /* TSC could halt in idle, so notify users */
586 if (tsc_halts_in_c(cx->type))
587 mark_tsc_unstable("TSC halts in idle");;
588#endif
589 switch (cx->type) { 611 switch (cx->type) {
590 case ACPI_STATE_C1: 612 case ACPI_STATE_C1:
591 cx->valid = 1; 613 cx->valid = 1;
@@ -603,6 +625,8 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
603 acpi_timer_check_state(i, pr, cx); 625 acpi_timer_check_state(i, pr, cx);
604 break; 626 break;
605 } 627 }
628 if (cx->valid)
629 tsc_check_state(cx->type);
606 630
607 if (cx->valid) 631 if (cx->valid)
608 working++; 632 working++;
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index d0d1f4d5043..7f16f5f8e7d 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -45,6 +45,14 @@
45#define _COMPONENT ACPI_PROCESSOR_COMPONENT 45#define _COMPONENT ACPI_PROCESSOR_COMPONENT
46ACPI_MODULE_NAME("processor_throttling"); 46ACPI_MODULE_NAME("processor_throttling");
47 47
48/* ignore_tpc:
49 * 0 -> acpi processor driver doesn't ignore _TPC values
50 * 1 -> acpi processor driver ignores _TPC values
51 */
52static int ignore_tpc;
53module_param(ignore_tpc, int, 0644);
54MODULE_PARM_DESC(ignore_tpc, "Disable broken BIOS _TPC throttling support");
55
48struct throttling_tstate { 56struct throttling_tstate {
49 unsigned int cpu; /* cpu nr */ 57 unsigned int cpu; /* cpu nr */
50 int target_state; /* target T-state */ 58 int target_state; /* target T-state */
@@ -283,6 +291,10 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
283 291
284 if (!pr) 292 if (!pr)
285 return -EINVAL; 293 return -EINVAL;
294
295 if (ignore_tpc)
296 goto end;
297
286 status = acpi_evaluate_integer(pr->handle, "_TPC", NULL, &tpc); 298 status = acpi_evaluate_integer(pr->handle, "_TPC", NULL, &tpc);
287 if (ACPI_FAILURE(status)) { 299 if (ACPI_FAILURE(status)) {
288 if (status != AE_NOT_FOUND) { 300 if (status != AE_NOT_FOUND) {
@@ -290,6 +302,8 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
290 } 302 }
291 return -ENODEV; 303 return -ENODEV;
292 } 304 }
305
306end:
293 pr->throttling_platform_limit = (int)tpc; 307 pr->throttling_platform_limit = (int)tpc;
294 return 0; 308 return 0;
295} 309}
@@ -302,6 +316,9 @@ int acpi_processor_tstate_has_changed(struct acpi_processor *pr)
302 struct acpi_processor_limit *limit; 316 struct acpi_processor_limit *limit;
303 int target_state; 317 int target_state;
304 318
319 if (ignore_tpc)
320 return 0;
321
305 result = acpi_processor_get_platform_limit(pr); 322 result = acpi_processor_get_platform_limit(pr);
306 if (result) { 323 if (result) {
307 /* Throttling Limit is unsupported */ 324 /* Throttling Limit is unsupported */
@@ -821,6 +838,14 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr)
821 ret = acpi_read_throttling_status(pr, &value); 838 ret = acpi_read_throttling_status(pr, &value);
822 if (ret >= 0) { 839 if (ret >= 0) {
823 state = acpi_get_throttling_state(pr, value); 840 state = acpi_get_throttling_state(pr, value);
841 if (state == -1) {
842 ACPI_WARNING((AE_INFO,
843 "Invalid throttling state, reset\n"));
844 state = 0;
845 ret = acpi_processor_set_throttling(pr, state);
846 if (ret)
847 return ret;
848 }
824 pr->throttling.state = state; 849 pr->throttling.state = state;
825 } 850 }
826 851
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index d7ff61c0d57..810cca90ca7 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -538,6 +538,41 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)
538 return -EINVAL; 538 return -EINVAL;
539} 539}
540 540
541/*
542 * For some buggy _BQC methods, we need to add a constant value to
543 * the _BQC return value to get the actual current brightness level
544 */
545
546static int bqc_offset_aml_bug_workaround;
547static int __init video_set_bqc_offset(const struct dmi_system_id *d)
548{
549 bqc_offset_aml_bug_workaround = 9;
550 return 0;
551}
552
553static struct dmi_system_id video_dmi_table[] __initdata = {
554 /*
555 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
556 */
557 {
558 .callback = video_set_bqc_offset,
559 .ident = "Acer Aspire 5720",
560 .matches = {
561 DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
562 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5720"),
563 },
564 },
565 {
566 .callback = video_set_bqc_offset,
567 .ident = "Acer Aspire 5710Z",
568 .matches = {
569 DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
570 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5710Z"),
571 },
572 },
573 {}
574};
575
541static int 576static int
542acpi_video_device_lcd_get_level_current(struct acpi_video_device *device, 577acpi_video_device_lcd_get_level_current(struct acpi_video_device *device,
543 unsigned long long *level) 578 unsigned long long *level)
@@ -557,6 +592,7 @@ acpi_video_device_lcd_get_level_current(struct acpi_video_device *device,
557 *level = device->brightness->levels[*level + 2]; 592 *level = device->brightness->levels[*level + 2];
558 593
559 } 594 }
595 *level += bqc_offset_aml_bug_workaround;
560 device->brightness->curr = *level; 596 device->brightness->curr = *level;
561 return 0; 597 return 0;
562 } else { 598 } else {
@@ -2290,6 +2326,8 @@ EXPORT_SYMBOL(acpi_video_register);
2290 2326
2291static int __init acpi_video_init(void) 2327static int __init acpi_video_init(void)
2292{ 2328{
2329 dmi_check_system(video_dmi_table);
2330
2293 if (intel_opregion_present()) 2331 if (intel_opregion_present())
2294 return 0; 2332 return 0;
2295 2333
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 17b24c580c0..4cd35d8fd79 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -84,6 +84,12 @@ config DRM_I915
84config DRM_I915_KMS 84config DRM_I915_KMS
85 bool "Enable modesetting on intel by default" 85 bool "Enable modesetting on intel by default"
86 depends on DRM_I915 86 depends on DRM_I915
87 # i915 KMS depends on ACPI_VIDEO when ACPI is enabled
88 # but for select to work, need to select ACPI_VIDEO's dependencies, ick
89 select VIDEO_OUTPUT_CONTROL if ACPI
90 select BACKLIGHT_CLASS_DEVICE if ACPI
91 select INPUT if ACPI
92 select ACPI_VIDEO if ACPI
87 help 93 help
88 Choose this option if you want kernel modesetting enabled by default, 94 Choose this option if you want kernel modesetting enabled by default,
89 and you have a new enough userspace to support this. Running old 95 and you have a new enough userspace to support this. Running old
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 051134c56ae..53d54455262 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1011,8 +1011,16 @@ static int i915_load_modeset_init(struct drm_device *dev)
1011 /* Basic memrange allocator for stolen space (aka vram) */ 1011 /* Basic memrange allocator for stolen space (aka vram) */
1012 drm_mm_init(&dev_priv->vram, 0, prealloc_size); 1012 drm_mm_init(&dev_priv->vram, 0, prealloc_size);
1013 1013
1014 /* Let GEM Manage from end of prealloc space to end of aperture */ 1014 /* Let GEM Manage from end of prealloc space to end of aperture.
1015 i915_gem_do_init(dev, prealloc_size, agp_size); 1015 *
1016 * However, leave one page at the end still bound to the scratch page.
1017 * There are a number of places where the hardware apparently
1018 * prefetches past the end of the object, and we've seen multiple
1019 * hangs with the GPU head pointer stuck in a batchbuffer bound
1020 * at the last page of the aperture. One page should be enough to
1021 * keep any prefetching inside of the aperture.
1022 */
1023 i915_gem_do_init(dev, prealloc_size, agp_size - 4096);
1016 1024
1017 ret = i915_gem_init_ringbuffer(dev); 1025 ret = i915_gem_init_ringbuffer(dev);
1018 if (ret) 1026 if (ret)
@@ -1350,6 +1358,7 @@ struct drm_ioctl_desc i915_ioctls[] = {
1350 DRM_IOCTL_DEF(DRM_I915_GEM_SET_TILING, i915_gem_set_tiling, 0), 1358 DRM_IOCTL_DEF(DRM_I915_GEM_SET_TILING, i915_gem_set_tiling, 0),
1351 DRM_IOCTL_DEF(DRM_I915_GEM_GET_TILING, i915_gem_get_tiling, 0), 1359 DRM_IOCTL_DEF(DRM_I915_GEM_GET_TILING, i915_gem_get_tiling, 0),
1352 DRM_IOCTL_DEF(DRM_I915_GEM_GET_APERTURE, i915_gem_get_aperture_ioctl, 0), 1360 DRM_IOCTL_DEF(DRM_I915_GEM_GET_APERTURE, i915_gem_get_aperture_ioctl, 0),
1361 DRM_IOCTL_DEF(DRM_I915_GET_PIPE_FROM_CRTC_ID, intel_get_pipe_from_crtc_id, 0),
1353}; 1362};
1354 1363
1355int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls); 1364int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls);
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 25065923b8a..9b149fe824c 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -283,6 +283,7 @@ typedef struct drm_i915_private {
283 u8 saveAR[21]; 283 u8 saveAR[21];
284 u8 saveDACMASK; 284 u8 saveDACMASK;
285 u8 saveCR[37]; 285 u8 saveCR[37];
286 uint64_t saveFENCE[16];
286 287
287 struct { 288 struct {
288 struct drm_mm gtt_space; 289 struct drm_mm gtt_space;
@@ -705,13 +706,8 @@ extern void intel_modeset_cleanup(struct drm_device *dev);
705#define I915_WRITE16(reg, val) writel(val, dev_priv->regs + (reg)) 706#define I915_WRITE16(reg, val) writel(val, dev_priv->regs + (reg))
706#define I915_READ8(reg) readb(dev_priv->regs + (reg)) 707#define I915_READ8(reg) readb(dev_priv->regs + (reg))
707#define I915_WRITE8(reg, val) writeb(val, dev_priv->regs + (reg)) 708#define I915_WRITE8(reg, val) writeb(val, dev_priv->regs + (reg))
708#ifdef writeq
709#define I915_WRITE64(reg, val) writeq(val, dev_priv->regs + (reg)) 709#define I915_WRITE64(reg, val) writeq(val, dev_priv->regs + (reg))
710#else 710#define I915_READ64(reg) readq(dev_priv->regs + (reg))
711#define I915_WRITE64(reg, val) (writel(val, dev_priv->regs + (reg)), \
712 writel(upper_32_bits(val), dev_priv->regs + \
713 (reg) + 4))
714#endif
715#define POSTING_READ(reg) (void)I915_READ(reg) 711#define POSTING_READ(reg) (void)I915_READ(reg)
716 712
717#define I915_VERBOSE 0 713#define I915_VERBOSE 0
@@ -790,7 +786,8 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
790 (dev)->pci_device == 0x2E22 || \ 786 (dev)->pci_device == 0x2E22 || \
791 (dev)->pci_device == 0x2E32) 787 (dev)->pci_device == 0x2E32)
792 788
793#define IS_I965GM(dev) ((dev)->pci_device == 0x2A02) 789#define IS_I965GM(dev) ((dev)->pci_device == 0x2A02 || \
790 (dev)->pci_device == 0x2A12)
794 791
795#define IS_GM45(dev) ((dev)->pci_device == 0x2A42) 792#define IS_GM45(dev) ((dev)->pci_device == 0x2A42)
796 793
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index ee896d91c5b..b189b49c760 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1691,11 +1691,20 @@ static int
1691i915_wait_request(struct drm_device *dev, uint32_t seqno) 1691i915_wait_request(struct drm_device *dev, uint32_t seqno)
1692{ 1692{
1693 drm_i915_private_t *dev_priv = dev->dev_private; 1693 drm_i915_private_t *dev_priv = dev->dev_private;
1694 u32 ier;
1694 int ret = 0; 1695 int ret = 0;
1695 1696
1696 BUG_ON(seqno == 0); 1697 BUG_ON(seqno == 0);
1697 1698
1698 if (!i915_seqno_passed(i915_get_gem_seqno(dev), seqno)) { 1699 if (!i915_seqno_passed(i915_get_gem_seqno(dev), seqno)) {
1700 ier = I915_READ(IER);
1701 if (!ier) {
1702 DRM_ERROR("something (likely vbetool) disabled "
1703 "interrupts, re-enabling\n");
1704 i915_driver_irq_preinstall(dev);
1705 i915_driver_irq_postinstall(dev);
1706 }
1707
1699 dev_priv->mm.waiting_gem_seqno = seqno; 1708 dev_priv->mm.waiting_gem_seqno = seqno;
1700 i915_user_irq_get(dev); 1709 i915_user_irq_get(dev);
1701 ret = wait_event_interruptible(dev_priv->irq_queue, 1710 ret = wait_event_interruptible(dev_priv->irq_queue,
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 52119473226..15da44cf21b 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -526,6 +526,7 @@
526#define DPLLA_INPUT_BUFFER_ENABLE (1 << 0) 526#define DPLLA_INPUT_BUFFER_ENABLE (1 << 0)
527#define D_STATE 0x6104 527#define D_STATE 0x6104
528#define CG_2D_DIS 0x6200 528#define CG_2D_DIS 0x6200
529#define DPCUNIT_CLOCK_GATE_DISABLE (1 << 24)
529#define CG_3D_DIS 0x6204 530#define CG_3D_DIS 0x6204
530 531
531/* 532/*
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
index d669cc2b42c..ce8a21344a7 100644
--- a/drivers/gpu/drm/i915/i915_suspend.c
+++ b/drivers/gpu/drm/i915/i915_suspend.c
@@ -349,6 +349,18 @@ int i915_save_state(struct drm_device *dev)
349 for (i = 0; i < 3; i++) 349 for (i = 0; i < 3; i++)
350 dev_priv->saveSWF2[i] = I915_READ(SWF30 + (i << 2)); 350 dev_priv->saveSWF2[i] = I915_READ(SWF30 + (i << 2));
351 351
352 /* Fences */
353 if (IS_I965G(dev)) {
354 for (i = 0; i < 16; i++)
355 dev_priv->saveFENCE[i] = I915_READ64(FENCE_REG_965_0 + (i * 8));
356 } else {
357 for (i = 0; i < 8; i++)
358 dev_priv->saveFENCE[i] = I915_READ(FENCE_REG_830_0 + (i * 4));
359
360 if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev))
361 for (i = 0; i < 8; i++)
362 dev_priv->saveFENCE[i+8] = I915_READ(FENCE_REG_945_8 + (i * 4));
363 }
352 i915_save_vga(dev); 364 i915_save_vga(dev);
353 365
354 return 0; 366 return 0;
@@ -371,6 +383,18 @@ int i915_restore_state(struct drm_device *dev)
371 /* Display arbitration */ 383 /* Display arbitration */
372 I915_WRITE(DSPARB, dev_priv->saveDSPARB); 384 I915_WRITE(DSPARB, dev_priv->saveDSPARB);
373 385
386 /* Fences */
387 if (IS_I965G(dev)) {
388 for (i = 0; i < 16; i++)
389 I915_WRITE64(FENCE_REG_965_0 + (i * 8), dev_priv->saveFENCE[i]);
390 } else {
391 for (i = 0; i < 8; i++)
392 I915_WRITE(FENCE_REG_830_0 + (i * 4), dev_priv->saveFENCE[i]);
393 if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev))
394 for (i = 0; i < 8; i++)
395 I915_WRITE(FENCE_REG_945_8 + (i * 4), dev_priv->saveFENCE[i+8]);
396 }
397
374 /* Pipe & plane A info */ 398 /* Pipe & plane A info */
375 /* Prime the clock */ 399 /* Prime the clock */
376 if (dev_priv->saveDPLL_A & DPLL_VCO_ENABLE) { 400 if (dev_priv->saveDPLL_A & DPLL_VCO_ENABLE) {
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index 9bdd959260a..19148c3df63 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -161,7 +161,7 @@ static bool intel_crt_detect_hotplug(struct drm_connector *connector)
161 hotplug_en &= CRT_FORCE_HOTPLUG_MASK; 161 hotplug_en &= CRT_FORCE_HOTPLUG_MASK;
162 hotplug_en |= CRT_HOTPLUG_FORCE_DETECT; 162 hotplug_en |= CRT_HOTPLUG_FORCE_DETECT;
163 163
164 if (IS_GM45(dev)) 164 if (IS_G4X(dev))
165 hotplug_en |= CRT_HOTPLUG_ACTIVATION_PERIOD_64; 165 hotplug_en |= CRT_HOTPLUG_ACTIVATION_PERIOD_64;
166 166
167 hotplug_en |= CRT_HOTPLUG_VOLTAGE_COMPARE_50; 167 hotplug_en |= CRT_HOTPLUG_VOLTAGE_COMPARE_50;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index bdcda36953b..3387cf32f38 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1804,6 +1804,37 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
1804 } 1804 }
1805} 1805}
1806 1806
1807int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data,
1808 struct drm_file *file_priv)
1809{
1810 drm_i915_private_t *dev_priv = dev->dev_private;
1811 struct drm_i915_get_pipe_from_crtc_id *pipe_from_crtc_id = data;
1812 struct drm_crtc *crtc = NULL;
1813 int pipe = -1;
1814
1815 if (!dev_priv) {
1816 DRM_ERROR("called with no initialization\n");
1817 return -EINVAL;
1818 }
1819
1820 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
1821 struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
1822 if (crtc->base.id == pipe_from_crtc_id->crtc_id) {
1823 pipe = intel_crtc->pipe;
1824 break;
1825 }
1826 }
1827
1828 if (pipe == -1) {
1829 DRM_ERROR("no such CRTC id\n");
1830 return -EINVAL;
1831 }
1832
1833 pipe_from_crtc_id->pipe = pipe;
1834
1835 return 0;
1836}
1837
1807struct drm_crtc *intel_get_crtc_from_pipe(struct drm_device *dev, int pipe) 1838struct drm_crtc *intel_get_crtc_from_pipe(struct drm_device *dev, int pipe)
1808{ 1839{
1809 struct drm_crtc *crtc = NULL; 1840 struct drm_crtc *crtc = NULL;
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 957daef8edf..cd4b9c5f715 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -109,7 +109,7 @@ struct intel_i2c_chan *intel_i2c_create(struct drm_device *dev, const u32 reg,
109void intel_i2c_destroy(struct intel_i2c_chan *chan); 109void intel_i2c_destroy(struct intel_i2c_chan *chan);
110int intel_ddc_get_modes(struct intel_output *intel_output); 110int intel_ddc_get_modes(struct intel_output *intel_output);
111extern bool intel_ddc_probe(struct intel_output *intel_output); 111extern bool intel_ddc_probe(struct intel_output *intel_output);
112 112void intel_i2c_quirk_set(struct drm_device *dev, bool enable);
113extern void intel_crt_init(struct drm_device *dev); 113extern void intel_crt_init(struct drm_device *dev);
114extern void intel_hdmi_init(struct drm_device *dev, int sdvox_reg); 114extern void intel_hdmi_init(struct drm_device *dev, int sdvox_reg);
115extern bool intel_sdvo_init(struct drm_device *dev, int output_device); 115extern bool intel_sdvo_init(struct drm_device *dev, int output_device);
@@ -125,6 +125,8 @@ extern struct drm_encoder *intel_best_encoder(struct drm_connector *connector);
125 125
126extern struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev, 126extern struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev,
127 struct drm_crtc *crtc); 127 struct drm_crtc *crtc);
128int intel_get_pipe_from_crtc_id(struct drm_device *dev, void *data,
129 struct drm_file *file_priv);
128extern void intel_wait_for_vblank(struct drm_device *dev); 130extern void intel_wait_for_vblank(struct drm_device *dev);
129extern struct drm_crtc *intel_get_crtc_from_pipe(struct drm_device *dev, int pipe); 131extern struct drm_crtc *intel_get_crtc_from_pipe(struct drm_device *dev, int pipe);
130extern struct drm_crtc *intel_get_load_detect_pipe(struct intel_output *intel_output, 132extern struct drm_crtc *intel_get_load_detect_pipe(struct intel_output *intel_output,
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 55037422538..d0983bb93a1 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -155,11 +155,18 @@ intel_hdmi_detect(struct drm_connector *connector)
155 155
156 temp = I915_READ(PORT_HOTPLUG_EN); 156 temp = I915_READ(PORT_HOTPLUG_EN);
157 157
158 I915_WRITE(PORT_HOTPLUG_EN, 158 switch (hdmi_priv->sdvox_reg) {
159 temp | 159 case SDVOB:
160 HDMIB_HOTPLUG_INT_EN | 160 temp |= HDMIB_HOTPLUG_INT_EN;
161 HDMIC_HOTPLUG_INT_EN | 161 break;
162 HDMID_HOTPLUG_INT_EN); 162 case SDVOC:
163 temp |= HDMIC_HOTPLUG_INT_EN;
164 break;
165 default:
166 return connector_status_unknown;
167 }
168
169 I915_WRITE(PORT_HOTPLUG_EN, temp);
163 170
164 POSTING_READ(PORT_HOTPLUG_EN); 171 POSTING_READ(PORT_HOTPLUG_EN);
165 172
diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index 5ee9d4c2575..f7061f68d05 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -34,6 +34,21 @@
34#include "i915_drm.h" 34#include "i915_drm.h"
35#include "i915_drv.h" 35#include "i915_drv.h"
36 36
37void intel_i2c_quirk_set(struct drm_device *dev, bool enable)
38{
39 struct drm_i915_private *dev_priv = dev->dev_private;
40
41 /* When using bit bashing for I2C, this bit needs to be set to 1 */
42 if (!IS_IGD(dev))
43 return;
44 if (enable)
45 I915_WRITE(CG_2D_DIS,
46 I915_READ(CG_2D_DIS) | DPCUNIT_CLOCK_GATE_DISABLE);
47 else
48 I915_WRITE(CG_2D_DIS,
49 I915_READ(CG_2D_DIS) & (~DPCUNIT_CLOCK_GATE_DISABLE));
50}
51
37/* 52/*
38 * Intel GPIO access functions 53 * Intel GPIO access functions
39 */ 54 */
@@ -153,8 +168,10 @@ struct intel_i2c_chan *intel_i2c_create(struct drm_device *dev, const u32 reg,
153 goto out_free; 168 goto out_free;
154 169
155 /* JJJ: raise SCL and SDA? */ 170 /* JJJ: raise SCL and SDA? */
171 intel_i2c_quirk_set(dev, true);
156 set_data(chan, 1); 172 set_data(chan, 1);
157 set_clock(chan, 1); 173 set_clock(chan, 1);
174 intel_i2c_quirk_set(dev, false);
158 udelay(20); 175 udelay(20);
159 176
160 return chan; 177 return chan;
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 6619f26e46a..439a8651499 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -384,7 +384,51 @@ static const struct drm_encoder_funcs intel_lvds_enc_funcs = {
384 .destroy = intel_lvds_enc_destroy, 384 .destroy = intel_lvds_enc_destroy,
385}; 385};
386 386
387static int __init intel_no_lvds_dmi_callback(const struct dmi_system_id *id)
388{
389 DRM_DEBUG("Skipping LVDS initialization for %s\n", id->ident);
390 return 1;
391}
387 392
393/* These systems claim to have LVDS, but really don't */
394static const struct dmi_system_id __initdata intel_no_lvds[] = {
395 {
396 .callback = intel_no_lvds_dmi_callback,
397 .ident = "Apple Mac Mini (Core series)",
398 .matches = {
399 DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
400 DMI_MATCH(DMI_PRODUCT_NAME, "Macmini1,1"),
401 },
402 },
403 {
404 .callback = intel_no_lvds_dmi_callback,
405 .ident = "Apple Mac Mini (Core 2 series)",
406 .matches = {
407 DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
408 DMI_MATCH(DMI_PRODUCT_NAME, "Macmini2,1"),
409 },
410 },
411 {
412 .callback = intel_no_lvds_dmi_callback,
413 .ident = "MSI IM-945GSE-A",
414 .matches = {
415 DMI_MATCH(DMI_SYS_VENDOR, "MSI"),
416 DMI_MATCH(DMI_PRODUCT_NAME, "A9830IMS"),
417 },
418 },
419 {
420 .callback = intel_no_lvds_dmi_callback,
421 .ident = "Dell Studio Hybrid",
422 .matches = {
423 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
424 DMI_MATCH(DMI_PRODUCT_NAME, "Studio Hybrid 140g"),
425 },
426 },
427
428 /* FIXME: add a check for the Aopen Mini PC */
429
430 { } /* terminating entry */
431};
388 432
389/** 433/**
390 * intel_lvds_init - setup LVDS connectors on this device 434 * intel_lvds_init - setup LVDS connectors on this device
@@ -404,15 +448,9 @@ void intel_lvds_init(struct drm_device *dev)
404 u32 lvds; 448 u32 lvds;
405 int pipe; 449 int pipe;
406 450
407 /* Blacklist machines that we know falsely report LVDS. */ 451 /* Skip init on machines we know falsely report LVDS */
408 /* FIXME: add a check for the Aopen Mini PC */ 452 if (dmi_check_system(intel_no_lvds))
409
410 /* Apple Mac Mini Core Duo and Mac Mini Core 2 Duo */
411 if(dmi_match(DMI_PRODUCT_NAME, "Macmini1,1") ||
412 dmi_match(DMI_PRODUCT_NAME, "Macmini2,1")) {
413 DRM_DEBUG("Skipping LVDS initialization for Apple Mac Mini\n");
414 return; 453 return;
415 }
416 454
417 intel_output = kzalloc(sizeof(struct intel_output), GFP_KERNEL); 455 intel_output = kzalloc(sizeof(struct intel_output), GFP_KERNEL);
418 if (!intel_output) { 456 if (!intel_output) {
diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c
index 07d7ec97616..e0910fefce8 100644
--- a/drivers/gpu/drm/i915/intel_modes.c
+++ b/drivers/gpu/drm/i915/intel_modes.c
@@ -27,6 +27,7 @@
27#include <linux/fb.h> 27#include <linux/fb.h>
28#include "drmP.h" 28#include "drmP.h"
29#include "intel_drv.h" 29#include "intel_drv.h"
30#include "i915_drv.h"
30 31
31/** 32/**
32 * intel_ddc_probe 33 * intel_ddc_probe
@@ -52,7 +53,10 @@ bool intel_ddc_probe(struct intel_output *intel_output)
52 } 53 }
53 }; 54 };
54 55
56 intel_i2c_quirk_set(intel_output->ddc_bus->drm_dev, true);
55 ret = i2c_transfer(&intel_output->ddc_bus->adapter, msgs, 2); 57 ret = i2c_transfer(&intel_output->ddc_bus->adapter, msgs, 2);
58 intel_i2c_quirk_set(intel_output->ddc_bus->drm_dev, false);
59
56 if (ret == 2) 60 if (ret == 2)
57 return true; 61 return true;
58 62
@@ -70,8 +74,10 @@ int intel_ddc_get_modes(struct intel_output *intel_output)
70 struct edid *edid; 74 struct edid *edid;
71 int ret = 0; 75 int ret = 0;
72 76
77 intel_i2c_quirk_set(intel_output->ddc_bus->drm_dev, true);
73 edid = drm_get_edid(&intel_output->base, 78 edid = drm_get_edid(&intel_output->base,
74 &intel_output->ddc_bus->adapter); 79 &intel_output->ddc_bus->adapter);
80 intel_i2c_quirk_set(intel_output->ddc_bus->drm_dev, false);
75 if (edid) { 81 if (edid) {
76 drm_mode_connector_update_edid_property(&intel_output->base, 82 drm_mode_connector_update_edid_property(&intel_output->base,
77 edid); 83 edid);
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c
index 4e16ce68b06..36da913cc55 100644
--- a/drivers/ide/icside.c
+++ b/drivers/ide/icside.c
@@ -466,7 +466,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec)
466 struct ide_host *host; 466 struct ide_host *host;
467 unsigned int sel = 0; 467 unsigned int sel = 0;
468 int ret; 468 int ret;
469 hw_regs_t hw[2], *hws[] = { &hw[0], NULL, NULL, NULL }; 469 hw_regs_t hw[2], *hws[] = { &hw[0], &hw[1], NULL, NULL };
470 struct ide_port_info d = icside_v6_port_info; 470 struct ide_port_info d = icside_v6_port_info;
471 471
472 ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0); 472 ioc_base = ecardm_iomap(ec, ECARD_RES_IOCFAST, 0, 0);
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index cb942a9b580..3a53e0834cf 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -614,12 +614,6 @@ static ide_startstop_t ide_tape_issue_pc(ide_drive_t *drive,
614{ 614{
615 idetape_tape_t *tape = drive->driver_data; 615 idetape_tape_t *tape = drive->driver_data;
616 616
617 if (drive->pc->c[0] == REQUEST_SENSE &&
618 pc->c[0] == REQUEST_SENSE) {
619 printk(KERN_ERR "ide-tape: possible ide-tape.c bug - "
620 "Two request sense in serial were issued\n");
621 }
622
623 if (drive->failed_pc == NULL && pc->c[0] != REQUEST_SENSE) 617 if (drive->failed_pc == NULL && pc->c[0] != REQUEST_SENSE)
624 drive->failed_pc = pc; 618 drive->failed_pc = pc;
625 619
diff --git a/drivers/ide/piix.c b/drivers/ide/piix.c
index 2aa69993306..69860dea382 100644
--- a/drivers/ide/piix.c
+++ b/drivers/ide/piix.c
@@ -263,6 +263,7 @@ static const struct ich_laptop ich_laptop[] = {
263 { 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */ 263 { 0x24CA, 0x1025, 0x003d }, /* ICH4 on ACER TM290 */
264 { 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */ 264 { 0x266F, 0x1025, 0x0066 }, /* ICH6 on ACER Aspire 1694WLMi */
265 { 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */ 265 { 0x2653, 0x1043, 0x82D8 }, /* ICH6M on Asus Eee 701 */
266 { 0x27df, 0x104d, 0x900e }, /* ICH7 on Sony TZ-90 */
266 /* end marker */ 267 /* end marker */
267 { 0, } 268 { 0, }
268}; 269};
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 6f2e6295e77..362773247fb 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -455,8 +455,6 @@ static int msix_capability_init(struct pci_dev *dev,
455 entry->msi_attrib.default_irq = dev->irq; 455 entry->msi_attrib.default_irq = dev->irq;
456 entry->msi_attrib.pos = pos; 456 entry->msi_attrib.pos = pos;
457 entry->mask_base = base; 457 entry->mask_base = base;
458 entry->masked = readl(base + j * PCI_MSIX_ENTRY_SIZE +
459 PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET);
460 msix_mask_irq(entry, 1); 458 msix_mask_irq(entry, 1);
461 459
462 list_add_tail(&entry->list, &dev->msi_list); 460 list_add_tail(&entry->list, &dev->msi_list);
@@ -493,6 +491,12 @@ static int msix_capability_init(struct pci_dev *dev,
493 msix_set_enable(dev, 1); 491 msix_set_enable(dev, 1);
494 dev->msix_enabled = 1; 492 dev->msix_enabled = 1;
495 493
494 list_for_each_entry(entry, &dev->msi_list, list) {
495 int vector = entry->msi_attrib.entry_nr;
496 entry->masked = readl(base + vector * PCI_MSIX_ENTRY_SIZE +
497 PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET);
498 }
499
496 return 0; 500 return 0;
497} 501}
498 502
diff --git a/drivers/pci/pcie/aer/aerdrv.h b/drivers/pci/pcie/aer/aerdrv.h
index c7ad68b6c6d..aa14482a477 100644
--- a/drivers/pci/pcie/aer/aerdrv.h
+++ b/drivers/pci/pcie/aer/aerdrv.h
@@ -95,6 +95,9 @@ struct aer_broadcast_data {
95static inline pci_ers_result_t merge_result(enum pci_ers_result orig, 95static inline pci_ers_result_t merge_result(enum pci_ers_result orig,
96 enum pci_ers_result new) 96 enum pci_ers_result new)
97{ 97{
98 if (new == PCI_ERS_RESULT_NONE)
99 return orig;
100
98 switch (orig) { 101 switch (orig) {
99 case PCI_ERS_RESULT_CAN_RECOVER: 102 case PCI_ERS_RESULT_CAN_RECOVER:
100 case PCI_ERS_RESULT_RECOVERED: 103 case PCI_ERS_RESULT_RECOVERED:
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index b924e2463f8..091ce70051e 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -200,7 +200,7 @@ static int slot_reset_iter(struct device *device, void *data)
200 200
201static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev) 201static pci_ers_result_t pcie_portdrv_slot_reset(struct pci_dev *dev)
202{ 202{
203 pci_ers_result_t status = PCI_ERS_RESULT_NONE; 203 pci_ers_result_t status = PCI_ERS_RESULT_RECOVERED;
204 int retval; 204 int retval;
205 205
206 /* If fatal, restore cfg space for possible link reset at upstream */ 206 /* If fatal, restore cfg space for possible link reset at upstream */
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index eeafc6c0160..bfc1a8892a3 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -269,16 +269,16 @@ static struct key_entry asus_keymap[] = {
269 {KE_KEY, 0x34, KEY_SWITCHVIDEOMODE}, 269 {KE_KEY, 0x34, KEY_SWITCHVIDEOMODE},
270 {KE_KEY, 0x40, KEY_PREVIOUSSONG}, 270 {KE_KEY, 0x40, KEY_PREVIOUSSONG},
271 {KE_KEY, 0x41, KEY_NEXTSONG}, 271 {KE_KEY, 0x41, KEY_NEXTSONG},
272 {KE_KEY, 0x43, KEY_STOP}, 272 {KE_KEY, 0x43, KEY_STOPCD},
273 {KE_KEY, 0x45, KEY_PLAYPAUSE}, 273 {KE_KEY, 0x45, KEY_PLAYPAUSE},
274 {KE_KEY, 0x50, KEY_EMAIL}, 274 {KE_KEY, 0x50, KEY_EMAIL},
275 {KE_KEY, 0x51, KEY_WWW}, 275 {KE_KEY, 0x51, KEY_WWW},
276 {KE_KEY, 0x5C, BTN_EXTRA}, /* Performance */ 276 {KE_KEY, 0x5C, KEY_SCREENLOCK}, /* Screenlock */
277 {KE_KEY, 0x5D, KEY_WLAN}, 277 {KE_KEY, 0x5D, KEY_WLAN},
278 {KE_KEY, 0x61, KEY_SWITCHVIDEOMODE}, 278 {KE_KEY, 0x61, KEY_SWITCHVIDEOMODE},
279 {KE_KEY, 0x6B, BTN_TOUCH}, /* Lock Mouse */ 279 {KE_KEY, 0x6B, BTN_TOUCH}, /* Lock Mouse */
280 {KE_KEY, 0x82, KEY_CAMERA}, 280 {KE_KEY, 0x82, KEY_CAMERA},
281 {KE_KEY, 0x8A, KEY_TV}, 281 {KE_KEY, 0x8A, KEY_PROG1},
282 {KE_KEY, 0x95, KEY_MEDIA}, 282 {KE_KEY, 0x95, KEY_MEDIA},
283 {KE_KEY, 0x99, KEY_PHONE}, 283 {KE_KEY, 0x99, KEY_PHONE},
284 {KE_END, 0}, 284 {KE_END, 0},
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c
index 6f54fd1757c..353a898c369 100644
--- a/drivers/platform/x86/eeepc-laptop.c
+++ b/drivers/platform/x86/eeepc-laptop.c
@@ -158,6 +158,7 @@ enum { KE_KEY, KE_END };
158static struct key_entry eeepc_keymap[] = { 158static struct key_entry eeepc_keymap[] = {
159 /* Sleep already handled via generic ACPI code */ 159 /* Sleep already handled via generic ACPI code */
160 {KE_KEY, 0x10, KEY_WLAN }, 160 {KE_KEY, 0x10, KEY_WLAN },
161 {KE_KEY, 0x11, KEY_WLAN },
161 {KE_KEY, 0x12, KEY_PROG1 }, 162 {KE_KEY, 0x12, KEY_PROG1 },
162 {KE_KEY, 0x13, KEY_MUTE }, 163 {KE_KEY, 0x13, KEY_MUTE },
163 {KE_KEY, 0x14, KEY_VOLUMEDOWN }, 164 {KE_KEY, 0x14, KEY_VOLUMEDOWN },
@@ -166,6 +167,8 @@ static struct key_entry eeepc_keymap[] = {
166 {KE_KEY, 0x1b, KEY_ZOOM }, 167 {KE_KEY, 0x1b, KEY_ZOOM },
167 {KE_KEY, 0x1c, KEY_PROG2 }, 168 {KE_KEY, 0x1c, KEY_PROG2 },
168 {KE_KEY, 0x1d, KEY_PROG3 }, 169 {KE_KEY, 0x1d, KEY_PROG3 },
170 {KE_KEY, NOTIFY_BRN_MIN, KEY_BRIGHTNESSDOWN },
171 {KE_KEY, NOTIFY_BRN_MIN + 2, KEY_BRIGHTNESSUP },
169 {KE_KEY, 0x30, KEY_SWITCHVIDEOMODE }, 172 {KE_KEY, 0x30, KEY_SWITCHVIDEOMODE },
170 {KE_KEY, 0x31, KEY_SWITCHVIDEOMODE }, 173 {KE_KEY, 0x31, KEY_SWITCHVIDEOMODE },
171 {KE_KEY, 0x32, KEY_SWITCHVIDEOMODE }, 174 {KE_KEY, 0x32, KEY_SWITCHVIDEOMODE },
@@ -381,11 +384,13 @@ static ssize_t show_sys_acpi(int cm, char *buf)
381EEEPC_CREATE_DEVICE_ATTR(camera, CM_ASL_CAMERA); 384EEEPC_CREATE_DEVICE_ATTR(camera, CM_ASL_CAMERA);
382EEEPC_CREATE_DEVICE_ATTR(cardr, CM_ASL_CARDREADER); 385EEEPC_CREATE_DEVICE_ATTR(cardr, CM_ASL_CARDREADER);
383EEEPC_CREATE_DEVICE_ATTR(disp, CM_ASL_DISPLAYSWITCH); 386EEEPC_CREATE_DEVICE_ATTR(disp, CM_ASL_DISPLAYSWITCH);
387EEEPC_CREATE_DEVICE_ATTR(cpufv, CM_ASL_CPUFV);
384 388
385static struct attribute *platform_attributes[] = { 389static struct attribute *platform_attributes[] = {
386 &dev_attr_camera.attr, 390 &dev_attr_camera.attr,
387 &dev_attr_cardr.attr, 391 &dev_attr_cardr.attr,
388 &dev_attr_disp.attr, 392 &dev_attr_disp.attr,
393 &dev_attr_cpufv.attr,
389 NULL 394 NULL
390}; 395};
391 396
@@ -512,15 +517,21 @@ static int eeepc_hotk_check(void)
512 return 0; 517 return 0;
513} 518}
514 519
515static void notify_brn(void) 520static int notify_brn(void)
516{ 521{
522 /* returns the *previous* brightness, or -1 */
517 struct backlight_device *bd = eeepc_backlight_device; 523 struct backlight_device *bd = eeepc_backlight_device;
518 if (bd) 524 if (bd) {
525 int old = bd->props.brightness;
519 bd->props.brightness = read_brightness(bd); 526 bd->props.brightness = read_brightness(bd);
527 return old;
528 }
529 return -1;
520} 530}
521 531
522static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data) 532static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data)
523{ 533{
534 enum rfkill_state state;
524 struct pci_dev *dev; 535 struct pci_dev *dev;
525 struct pci_bus *bus = pci_find_bus(0, 1); 536 struct pci_bus *bus = pci_find_bus(0, 1);
526 537
@@ -532,7 +543,9 @@ static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data)
532 return; 543 return;
533 } 544 }
534 545
535 if (get_acpi(CM_ASL_WLAN) == 1) { 546 eeepc_wlan_rfkill_state(ehotk->eeepc_wlan_rfkill, &state);
547
548 if (state == RFKILL_STATE_UNBLOCKED) {
536 dev = pci_get_slot(bus, 0); 549 dev = pci_get_slot(bus, 0);
537 if (dev) { 550 if (dev) {
538 /* Device already present */ 551 /* Device already present */
@@ -552,23 +565,41 @@ static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data)
552 pci_dev_put(dev); 565 pci_dev_put(dev);
553 } 566 }
554 } 567 }
568
569 rfkill_force_state(ehotk->eeepc_wlan_rfkill, state);
555} 570}
556 571
557static void eeepc_hotk_notify(acpi_handle handle, u32 event, void *data) 572static void eeepc_hotk_notify(acpi_handle handle, u32 event, void *data)
558{ 573{
559 static struct key_entry *key; 574 static struct key_entry *key;
560 u16 count; 575 u16 count;
576 int brn = -ENODEV;
561 577
562 if (!ehotk) 578 if (!ehotk)
563 return; 579 return;
564 if (event >= NOTIFY_BRN_MIN && event <= NOTIFY_BRN_MAX) 580 if (event >= NOTIFY_BRN_MIN && event <= NOTIFY_BRN_MAX)
565 notify_brn(); 581 brn = notify_brn();
566 count = ehotk->event_count[event % 128]++; 582 count = ehotk->event_count[event % 128]++;
567 acpi_bus_generate_proc_event(ehotk->device, event, count); 583 acpi_bus_generate_proc_event(ehotk->device, event, count);
568 acpi_bus_generate_netlink_event(ehotk->device->pnp.device_class, 584 acpi_bus_generate_netlink_event(ehotk->device->pnp.device_class,
569 dev_name(&ehotk->device->dev), event, 585 dev_name(&ehotk->device->dev), event,
570 count); 586 count);
571 if (ehotk->inputdev) { 587 if (ehotk->inputdev) {
588 if (brn != -ENODEV) {
589 /* brightness-change events need special
590 * handling for conversion to key events
591 */
592 if (brn < 0)
593 brn = event;
594 else
595 brn += NOTIFY_BRN_MIN;
596 if (event < brn)
597 event = NOTIFY_BRN_MIN; /* brightness down */
598 else if (event > brn)
599 event = NOTIFY_BRN_MIN + 2; /* ... up */
600 else
601 event = NOTIFY_BRN_MIN + 1; /* ... unchanged */
602 }
572 key = eepc_get_entry_by_scancode(event); 603 key = eepc_get_entry_by_scancode(event);
573 if (key) { 604 if (key) {
574 switch (key->type) { 605 switch (key->type) {
@@ -649,6 +680,9 @@ static int eeepc_hotk_add(struct acpi_device *device)
649 if (ACPI_FAILURE(status)) 680 if (ACPI_FAILURE(status))
650 printk(EEEPC_ERR "Error installing notify handler\n"); 681 printk(EEEPC_ERR "Error installing notify handler\n");
651 682
683 eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P6");
684 eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P7");
685
652 if (get_acpi(CM_ASL_WLAN) != -1) { 686 if (get_acpi(CM_ASL_WLAN) != -1) {
653 ehotk->eeepc_wlan_rfkill = rfkill_allocate(&device->dev, 687 ehotk->eeepc_wlan_rfkill = rfkill_allocate(&device->dev,
654 RFKILL_TYPE_WLAN); 688 RFKILL_TYPE_WLAN);
@@ -704,9 +738,6 @@ static int eeepc_hotk_add(struct acpi_device *device)
704 goto bluetooth_fail; 738 goto bluetooth_fail;
705 } 739 }
706 740
707 eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P6");
708 eeepc_register_rfkill_notifier("\\_SB.PCI0.P0P7");
709
710 return 0; 741 return 0;
711 742
712 bluetooth_fail: 743 bluetooth_fail:
@@ -717,6 +748,8 @@ static int eeepc_hotk_add(struct acpi_device *device)
717 wlan_fail: 748 wlan_fail:
718 if (ehotk->eeepc_wlan_rfkill) 749 if (ehotk->eeepc_wlan_rfkill)
719 rfkill_free(ehotk->eeepc_wlan_rfkill); 750 rfkill_free(ehotk->eeepc_wlan_rfkill);
751 eeepc_unregister_rfkill_notifier("\\_SB.PCI0.P0P6");
752 eeepc_unregister_rfkill_notifier("\\_SB.PCI0.P0P7");
720 ehotk_fail: 753 ehotk_fail:
721 kfree(ehotk); 754 kfree(ehotk);
722 ehotk = NULL; 755 ehotk = NULL;
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index 9a3a682c698..9496494f340 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -110,11 +110,9 @@ static int pnpacpi_disable_resources(struct pnp_dev *dev)
110 110
111 /* acpi_unregister_gsi(pnp_irq(dev, 0)); */ 111 /* acpi_unregister_gsi(pnp_irq(dev, 0)); */
112 ret = 0; 112 ret = 0;
113 if (acpi_bus_power_manageable(handle)) { 113 if (acpi_bus_power_manageable(handle))
114 ret = acpi_bus_set_power(handle, ACPI_STATE_D3); 114 acpi_bus_set_power(handle, ACPI_STATE_D3);
115 if (ret) 115 /* continue even if acpi_bus_set_power() fails */
116 return ret;
117 }
118 if (ACPI_FAILURE(acpi_evaluate_object(handle, "_DIS", NULL, NULL))) 116 if (ACPI_FAILURE(acpi_evaluate_object(handle, "_DIS", NULL, NULL)))
119 ret = -ENODEV; 117 ret = -ENODEV;
120 return ret; 118 return ret;
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index d0b093b66ad..5e38ba10a3a 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -961,7 +961,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)
961 961
962 switch (trip_type) { 962 switch (trip_type) {
963 case THERMAL_TRIP_CRITICAL: 963 case THERMAL_TRIP_CRITICAL:
964 if (temp > trip_temp) { 964 if (temp >= trip_temp) {
965 if (tz->ops->notify) 965 if (tz->ops->notify)
966 ret = tz->ops->notify(tz, count, 966 ret = tz->ops->notify(tz, count,
967 trip_type); 967 trip_type);
@@ -974,7 +974,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)
974 } 974 }
975 break; 975 break;
976 case THERMAL_TRIP_HOT: 976 case THERMAL_TRIP_HOT:
977 if (temp > trip_temp) 977 if (temp >= trip_temp)
978 if (tz->ops->notify) 978 if (tz->ops->notify)
979 tz->ops->notify(tz, count, trip_type); 979 tz->ops->notify(tz, count, trip_type);
980 break; 980 break;
@@ -986,14 +986,14 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)
986 986
987 cdev = instance->cdev; 987 cdev = instance->cdev;
988 988
989 if (temp > trip_temp) 989 if (temp >= trip_temp)
990 cdev->ops->set_cur_state(cdev, 1); 990 cdev->ops->set_cur_state(cdev, 1);
991 else 991 else
992 cdev->ops->set_cur_state(cdev, 0); 992 cdev->ops->set_cur_state(cdev, 0);
993 } 993 }
994 break; 994 break;
995 case THERMAL_TRIP_PASSIVE: 995 case THERMAL_TRIP_PASSIVE:
996 if (temp > trip_temp || tz->passive) 996 if (temp >= trip_temp || tz->passive)
997 thermal_zone_device_passive(tz, temp, 997 thermal_zone_device_passive(tz, temp,
998 trip_temp, count); 998 trip_temp, count);
999 break; 999 break;
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 1215a4f50cd..3567fb9e3fb 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -448,13 +448,11 @@ int remove_save_link(struct inode *inode, int truncate)
448static void reiserfs_kill_sb(struct super_block *s) 448static void reiserfs_kill_sb(struct super_block *s)
449{ 449{
450 if (REISERFS_SB(s)) { 450 if (REISERFS_SB(s)) {
451#ifdef CONFIG_REISERFS_FS_XATTR
452 if (REISERFS_SB(s)->xattr_root) { 451 if (REISERFS_SB(s)->xattr_root) {
453 d_invalidate(REISERFS_SB(s)->xattr_root); 452 d_invalidate(REISERFS_SB(s)->xattr_root);
454 dput(REISERFS_SB(s)->xattr_root); 453 dput(REISERFS_SB(s)->xattr_root);
455 REISERFS_SB(s)->xattr_root = NULL; 454 REISERFS_SB(s)->xattr_root = NULL;
456 } 455 }
457#endif
458 if (REISERFS_SB(s)->priv_root) { 456 if (REISERFS_SB(s)->priv_root) {
459 d_invalidate(REISERFS_SB(s)->priv_root); 457 d_invalidate(REISERFS_SB(s)->priv_root);
460 dput(REISERFS_SB(s)->priv_root); 458 dput(REISERFS_SB(s)->priv_root);
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
index 2237e10c7c7..8e7deb0e696 100644
--- a/fs/reiserfs/xattr.c
+++ b/fs/reiserfs/xattr.c
@@ -123,7 +123,9 @@ static struct dentry *open_xa_root(struct super_block *sb, int flags)
123 mutex_lock_nested(&privroot->d_inode->i_mutex, I_MUTEX_XATTR); 123 mutex_lock_nested(&privroot->d_inode->i_mutex, I_MUTEX_XATTR);
124 124
125 xaroot = dget(REISERFS_SB(sb)->xattr_root); 125 xaroot = dget(REISERFS_SB(sb)->xattr_root);
126 if (!xaroot->d_inode) { 126 if (!xaroot)
127 xaroot = ERR_PTR(-ENODATA);
128 else if (!xaroot->d_inode) {
127 int err = -ENODATA; 129 int err = -ENODATA;
128 if (xattr_may_create(flags)) 130 if (xattr_may_create(flags))
129 err = xattr_mkdir(privroot->d_inode, xaroot, 0700); 131 err = xattr_mkdir(privroot->d_inode, xaroot, 0700);
@@ -685,20 +687,6 @@ out:
685 return err; 687 return err;
686} 688}
687 689
688/* Actual operations that are exported to VFS-land */
689struct xattr_handler *reiserfs_xattr_handlers[] = {
690 &reiserfs_xattr_user_handler,
691 &reiserfs_xattr_trusted_handler,
692#ifdef CONFIG_REISERFS_FS_SECURITY
693 &reiserfs_xattr_security_handler,
694#endif
695#ifdef CONFIG_REISERFS_FS_POSIX_ACL
696 &reiserfs_posix_acl_access_handler,
697 &reiserfs_posix_acl_default_handler,
698#endif
699 NULL
700};
701
702/* 690/*
703 * In order to implement different sets of xattr operations for each xattr 691 * In order to implement different sets of xattr operations for each xattr
704 * prefix with the generic xattr API, a filesystem should create a 692 * prefix with the generic xattr API, a filesystem should create a
@@ -883,23 +871,6 @@ static int reiserfs_check_acl(struct inode *inode, int mask)
883 return error; 871 return error;
884} 872}
885 873
886int reiserfs_permission(struct inode *inode, int mask)
887{
888 /*
889 * We don't do permission checks on the internal objects.
890 * Permissions are determined by the "owning" object.
891 */
892 if (IS_PRIVATE(inode))
893 return 0;
894 /*
895 * Stat data v1 doesn't support ACLs.
896 */
897 if (get_inode_sd_version(inode) == STAT_DATA_V1)
898 return generic_permission(inode, mask, NULL);
899 else
900 return generic_permission(inode, mask, reiserfs_check_acl);
901}
902
903static int create_privroot(struct dentry *dentry) 874static int create_privroot(struct dentry *dentry)
904{ 875{
905 int err; 876 int err;
@@ -922,6 +893,28 @@ static int create_privroot(struct dentry *dentry)
922 return 0; 893 return 0;
923} 894}
924 895
896#else
897int __init reiserfs_xattr_register_handlers(void) { return 0; }
898void reiserfs_xattr_unregister_handlers(void) {}
899static int create_privroot(struct dentry *dentry) { return 0; }
900#endif
901
902/* Actual operations that are exported to VFS-land */
903struct xattr_handler *reiserfs_xattr_handlers[] = {
904#ifdef CONFIG_REISERFS_FS_XATTR
905 &reiserfs_xattr_user_handler,
906 &reiserfs_xattr_trusted_handler,
907#endif
908#ifdef CONFIG_REISERFS_FS_SECURITY
909 &reiserfs_xattr_security_handler,
910#endif
911#ifdef CONFIG_REISERFS_FS_POSIX_ACL
912 &reiserfs_posix_acl_access_handler,
913 &reiserfs_posix_acl_default_handler,
914#endif
915 NULL
916};
917
925static int xattr_mount_check(struct super_block *s) 918static int xattr_mount_check(struct super_block *s)
926{ 919{
927 /* We need generation numbers to ensure that the oid mapping is correct 920 /* We need generation numbers to ensure that the oid mapping is correct
@@ -941,10 +934,24 @@ static int xattr_mount_check(struct super_block *s)
941 return 0; 934 return 0;
942} 935}
943 936
944#else 937int reiserfs_permission(struct inode *inode, int mask)
945int __init reiserfs_xattr_register_handlers(void) { return 0; } 938{
946void reiserfs_xattr_unregister_handlers(void) {} 939 /*
940 * We don't do permission checks on the internal objects.
941 * Permissions are determined by the "owning" object.
942 */
943 if (IS_PRIVATE(inode))
944 return 0;
945
946#ifdef CONFIG_REISERFS_FS_XATTR
947 /*
948 * Stat data v1 doesn't support ACLs.
949 */
950 if (get_inode_sd_version(inode) != STAT_DATA_V1)
951 return generic_permission(inode, mask, reiserfs_check_acl);
947#endif 952#endif
953 return generic_permission(inode, mask, NULL);
954}
948 955
949/* This will catch lookups from the fs root to .reiserfs_priv */ 956/* This will catch lookups from the fs root to .reiserfs_priv */
950static int 957static int
@@ -992,7 +999,6 @@ int reiserfs_xattr_init(struct super_block *s, int mount_flags)
992 int err = 0; 999 int err = 0;
993 struct dentry *privroot = REISERFS_SB(s)->priv_root; 1000 struct dentry *privroot = REISERFS_SB(s)->priv_root;
994 1001
995#ifdef CONFIG_REISERFS_FS_XATTR
996 err = xattr_mount_check(s); 1002 err = xattr_mount_check(s);
997 if (err) 1003 if (err)
998 goto error; 1004 goto error;
@@ -1023,14 +1029,11 @@ error:
1023 clear_bit(REISERFS_XATTRS_USER, &(REISERFS_SB(s)->s_mount_opt)); 1029 clear_bit(REISERFS_XATTRS_USER, &(REISERFS_SB(s)->s_mount_opt));
1024 clear_bit(REISERFS_POSIXACL, &(REISERFS_SB(s)->s_mount_opt)); 1030 clear_bit(REISERFS_POSIXACL, &(REISERFS_SB(s)->s_mount_opt));
1025 } 1031 }
1026#endif
1027 1032
1028 /* The super_block MS_POSIXACL must mirror the (no)acl mount option. */ 1033 /* The super_block MS_POSIXACL must mirror the (no)acl mount option. */
1029#ifdef CONFIG_REISERFS_FS_POSIX_ACL
1030 if (reiserfs_posixacl(s)) 1034 if (reiserfs_posixacl(s))
1031 s->s_flags |= MS_POSIXACL; 1035 s->s_flags |= MS_POSIXACL;
1032 else 1036 else
1033#endif
1034 s->s_flags &= ~MS_POSIXACL; 1037 s->s_flags &= ~MS_POSIXACL;
1035 1038
1036 return err; 1039 return err;
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index 95962fa8398..8e1e92583fb 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -184,6 +184,7 @@ typedef struct _drm_i915_sarea {
184#define DRM_I915_GEM_GET_TILING 0x22 184#define DRM_I915_GEM_GET_TILING 0x22
185#define DRM_I915_GEM_GET_APERTURE 0x23 185#define DRM_I915_GEM_GET_APERTURE 0x23
186#define DRM_I915_GEM_MMAP_GTT 0x24 186#define DRM_I915_GEM_MMAP_GTT 0x24
187#define DRM_I915_GET_PIPE_FROM_CRTC_ID 0x25
187 188
188#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) 189#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
189#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH) 190#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH)
@@ -219,6 +220,7 @@ typedef struct _drm_i915_sarea {
219#define DRM_IOCTL_I915_GEM_SET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling) 220#define DRM_IOCTL_I915_GEM_SET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling)
220#define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling) 221#define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling)
221#define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture) 222#define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture)
223#define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_intel_get_pipe_from_crtc_id)
222 224
223/* Allow drivers to submit batchbuffers directly to hardware, relying 225/* Allow drivers to submit batchbuffers directly to hardware, relying
224 * on the security mechanisms provided by hardware. 226 * on the security mechanisms provided by hardware.
@@ -657,4 +659,12 @@ struct drm_i915_gem_get_aperture {
657 __u64 aper_available_size; 659 __u64 aper_available_size;
658}; 660};
659 661
662struct drm_i915_get_pipe_from_crtc_id {
663 /** ID of CRTC being requested **/
664 __u32 crtc_id;
665
666 /** pipe of requested CRTC **/
667 __u32 pipe;
668};
669
660#endif /* _I915_DRM_H_ */ 670#endif /* _I915_DRM_H_ */
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h
index cdedc01036e..99928dce37e 100644
--- a/include/linux/reiserfs_xattr.h
+++ b/include/linux/reiserfs_xattr.h
@@ -41,6 +41,7 @@ int reiserfs_xattr_init(struct super_block *sb, int mount_flags);
41int reiserfs_lookup_privroot(struct super_block *sb); 41int reiserfs_lookup_privroot(struct super_block *sb);
42int reiserfs_delete_xattrs(struct inode *inode); 42int reiserfs_delete_xattrs(struct inode *inode);
43int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs); 43int reiserfs_chown_xattrs(struct inode *inode, struct iattr *attrs);
44int reiserfs_permission(struct inode *inode, int mask);
44 45
45#ifdef CONFIG_REISERFS_FS_XATTR 46#ifdef CONFIG_REISERFS_FS_XATTR
46#define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir) 47#define has_xattr_dir(inode) (REISERFS_I(inode)->i_flags & i_has_xattr_dir)
@@ -50,7 +51,6 @@ int reiserfs_setxattr(struct dentry *dentry, const char *name,
50 const void *value, size_t size, int flags); 51 const void *value, size_t size, int flags);
51ssize_t reiserfs_listxattr(struct dentry *dentry, char *buffer, size_t size); 52ssize_t reiserfs_listxattr(struct dentry *dentry, char *buffer, size_t size);
52int reiserfs_removexattr(struct dentry *dentry, const char *name); 53int reiserfs_removexattr(struct dentry *dentry, const char *name);
53int reiserfs_permission(struct inode *inode, int mask);
54 54
55int reiserfs_xattr_get(struct inode *, const char *, void *, size_t); 55int reiserfs_xattr_get(struct inode *, const char *, void *, size_t);
56int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int); 56int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int);
@@ -117,8 +117,6 @@ static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
117#define reiserfs_listxattr NULL 117#define reiserfs_listxattr NULL
118#define reiserfs_removexattr NULL 118#define reiserfs_removexattr NULL
119 119
120#define reiserfs_permission NULL
121
122static inline void reiserfs_init_xattr_rwsem(struct inode *inode) 120static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
123{ 121{
124} 122}
diff --git a/kernel/panic.c b/kernel/panic.c
index 874ecf1307a..984b3ecbd72 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -340,39 +340,44 @@ void oops_exit(void)
340} 340}
341 341
342#ifdef WANT_WARN_ON_SLOWPATH 342#ifdef WANT_WARN_ON_SLOWPATH
343void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...) 343struct slowpath_args {
344{ 344 const char *fmt;
345 va_list args; 345 va_list args;
346 char function[KSYM_SYMBOL_LEN]; 346};
347 unsigned long caller = (unsigned long)__builtin_return_address(0);
348 const char *board;
349 347
350 sprint_symbol(function, caller); 348static void warn_slowpath_common(const char *file, int line, void *caller, struct slowpath_args *args)
349{
350 const char *board;
351 351
352 printk(KERN_WARNING "------------[ cut here ]------------\n"); 352 printk(KERN_WARNING "------------[ cut here ]------------\n");
353 printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file, 353 printk(KERN_WARNING "WARNING: at %s:%d %pS()\n", file, line, caller);
354 line, function);
355 board = dmi_get_system_info(DMI_PRODUCT_NAME); 354 board = dmi_get_system_info(DMI_PRODUCT_NAME);
356 if (board) 355 if (board)
357 printk(KERN_WARNING "Hardware name: %s\n", board); 356 printk(KERN_WARNING "Hardware name: %s\n", board);
358 357
359 if (*fmt) { 358 if (args)
360 va_start(args, fmt); 359 vprintk(args->fmt, args->args);
361 vprintk(fmt, args);
362 va_end(args);
363 }
364 360
365 print_modules(); 361 print_modules();
366 dump_stack(); 362 dump_stack();
367 print_oops_end_marker(); 363 print_oops_end_marker();
368 add_taint(TAINT_WARN); 364 add_taint(TAINT_WARN);
369} 365}
366
367void warn_slowpath_fmt(const char *file, int line, const char *fmt, ...)
368{
369 struct slowpath_args args;
370
371 args.fmt = fmt;
372 va_start(args.args, fmt);
373 warn_slowpath_common(file, line, __builtin_return_address(0), &args);
374 va_end(args.args);
375}
370EXPORT_SYMBOL(warn_slowpath_fmt); 376EXPORT_SYMBOL(warn_slowpath_fmt);
371 377
372void warn_slowpath_null(const char *file, int line) 378void warn_slowpath_null(const char *file, int line)
373{ 379{
374 static const char *empty = ""; 380 warn_slowpath_common(file, line, __builtin_return_address(0), NULL);
375 warn_slowpath_fmt(file, line, empty);
376} 381}
377EXPORT_SYMBOL(warn_slowpath_null); 382EXPORT_SYMBOL(warn_slowpath_null);
378#endif 383#endif
diff --git a/mm/slob.c b/mm/slob.c
index a2d4ab32198..f92e66d558b 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -60,6 +60,7 @@
60#include <linux/kernel.h> 60#include <linux/kernel.h>
61#include <linux/slab.h> 61#include <linux/slab.h>
62#include <linux/mm.h> 62#include <linux/mm.h>
63#include <linux/swap.h> /* struct reclaim_state */
63#include <linux/cache.h> 64#include <linux/cache.h>
64#include <linux/init.h> 65#include <linux/init.h>
65#include <linux/module.h> 66#include <linux/module.h>
@@ -255,6 +256,8 @@ static void *slob_new_pages(gfp_t gfp, int order, int node)
255 256
256static void slob_free_pages(void *b, int order) 257static void slob_free_pages(void *b, int order)
257{ 258{
259 if (current->reclaim_state)
260 current->reclaim_state->reclaimed_slab += 1 << order;
258 free_pages((unsigned long)b, order); 261 free_pages((unsigned long)b, order);
259} 262}
260 263
@@ -407,7 +410,7 @@ static void slob_free(void *block, int size)
407 spin_unlock_irqrestore(&slob_lock, flags); 410 spin_unlock_irqrestore(&slob_lock, flags);
408 clear_slob_page(sp); 411 clear_slob_page(sp);
409 free_slob_page(sp); 412 free_slob_page(sp);
410 free_page((unsigned long)b); 413 slob_free_pages(b, 0);
411 return; 414 return;
412 } 415 }
413 416
diff --git a/mm/slub.c b/mm/slub.c
index 7ab54ecbd3f..65ffda5934b 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -9,6 +9,7 @@
9 */ 9 */
10 10
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <linux/swap.h> /* struct reclaim_state */
12#include <linux/module.h> 13#include <linux/module.h>
13#include <linux/bit_spinlock.h> 14#include <linux/bit_spinlock.h>
14#include <linux/interrupt.h> 15#include <linux/interrupt.h>
@@ -1170,6 +1171,8 @@ static void __free_slab(struct kmem_cache *s, struct page *page)
1170 1171
1171 __ClearPageSlab(page); 1172 __ClearPageSlab(page);
1172 reset_page_mapcount(page); 1173 reset_page_mapcount(page);
1174 if (current->reclaim_state)
1175 current->reclaim_state->reclaimed_slab += pages;
1173 __free_pages(page, order); 1176 __free_pages(page, order);
1174} 1177}
1175 1178
@@ -1909,7 +1912,7 @@ static inline int calculate_order(int size)
1909 * Doh this slab cannot be placed using slub_max_order. 1912 * Doh this slab cannot be placed using slub_max_order.
1910 */ 1913 */
1911 order = slab_order(size, 1, MAX_ORDER, 1); 1914 order = slab_order(size, 1, MAX_ORDER, 1);
1912 if (order <= MAX_ORDER) 1915 if (order < MAX_ORDER)
1913 return order; 1916 return order;
1914 return -ENOSYS; 1917 return -ENOSYS;
1915} 1918}
@@ -2522,6 +2525,7 @@ __setup("slub_min_order=", setup_slub_min_order);
2522static int __init setup_slub_max_order(char *str) 2525static int __init setup_slub_max_order(char *str)
2523{ 2526{
2524 get_option(&str, &slub_max_order); 2527 get_option(&str, &slub_max_order);
2528 slub_max_order = min(slub_max_order, MAX_ORDER - 1);
2525 2529
2526 return 1; 2530 return 1;
2527} 2531}
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 61309b26f27..fa47d5d84f5 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -171,10 +171,8 @@ static void hci_conn_timeout(unsigned long arg)
171 switch (conn->state) { 171 switch (conn->state) {
172 case BT_CONNECT: 172 case BT_CONNECT:
173 case BT_CONNECT2: 173 case BT_CONNECT2:
174 if (conn->type == ACL_LINK) 174 if (conn->type == ACL_LINK && conn->out)
175 hci_acl_connect_cancel(conn); 175 hci_acl_connect_cancel(conn);
176 else
177 hci_acl_disconn(conn, 0x13);
178 break; 176 break;
179 case BT_CONFIG: 177 case BT_CONFIG:
180 case BT_CONNECTED: 178 case BT_CONNECTED:
@@ -292,6 +290,8 @@ int hci_conn_del(struct hci_conn *conn)
292 290
293 hci_conn_del_sysfs(conn); 291 hci_conn_del_sysfs(conn);
294 292
293 hci_dev_put(hdev);
294
295 return 0; 295 return 0;
296} 296}
297 297
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 4e7cb88e5da..184ba0a88ec 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1493,7 +1493,7 @@ static inline void hci_pin_code_request_evt(struct hci_dev *hdev, struct sk_buff
1493 hci_dev_lock(hdev); 1493 hci_dev_lock(hdev);
1494 1494
1495 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); 1495 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr);
1496 if (conn) { 1496 if (conn && conn->state == BT_CONNECTED) {
1497 hci_conn_hold(conn); 1497 hci_conn_hold(conn);
1498 conn->disc_timeout = HCI_PAIRING_TIMEOUT; 1498 conn->disc_timeout = HCI_PAIRING_TIMEOUT;
1499 hci_conn_put(conn); 1499 hci_conn_put(conn);
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index a05d45eb3ba..4cc3624bd22 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -99,6 +99,8 @@ static void add_conn(struct work_struct *work)
99 BT_ERR("Failed to register connection device"); 99 BT_ERR("Failed to register connection device");
100 return; 100 return;
101 } 101 }
102
103 hci_dev_hold(hdev);
102} 104}
103 105
104/* 106/*
@@ -134,6 +136,7 @@ static void del_conn(struct work_struct *work)
134 136
135 device_del(&conn->dev); 137 device_del(&conn->dev);
136 put_device(&conn->dev); 138 put_device(&conn->dev);
139
137 hci_dev_put(hdev); 140 hci_dev_put(hdev);
138} 141}
139 142