diff options
215 files changed, 2076 insertions, 1617 deletions
diff --git a/Documentation/DocBook/media/Makefile b/Documentation/DocBook/media/Makefile index 9b7e4c557928..f9fd615427fb 100644 --- a/Documentation/DocBook/media/Makefile +++ b/Documentation/DocBook/media/Makefile | |||
@@ -56,15 +56,15 @@ FUNCS = \ | |||
56 | write \ | 56 | write \ |
57 | 57 | ||
58 | IOCTLS = \ | 58 | IOCTLS = \ |
59 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/videodev2.h) \ | 59 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/videodev2.h) \ |
60 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/audio.h) \ | 60 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/audio.h) \ |
61 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/ca.h) \ | 61 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/ca.h) \ |
62 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/dmx.h) \ | 62 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/dmx.h) \ |
63 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/frontend.h) \ | 63 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/frontend.h) \ |
64 | $(shell perl -ne 'print "$$1 " if /\#define\s+([A-Z][^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/net.h) \ | 64 | $(shell perl -ne 'print "$$1 " if /\#define\s+([A-Z][^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/net.h) \ |
65 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/dvb/video.h) \ | 65 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/dvb/video.h) \ |
66 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/media.h) \ | 66 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/media.h) \ |
67 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/linux/v4l2-subdev.h) \ | 67 | $(shell perl -ne 'print "$$1 " if /\#define\s+([^\s]+)\s+_IO/' $(srctree)/include/uapi/linux/v4l2-subdev.h) \ |
68 | VIDIOC_SUBDEV_G_FRAME_INTERVAL \ | 68 | VIDIOC_SUBDEV_G_FRAME_INTERVAL \ |
69 | VIDIOC_SUBDEV_S_FRAME_INTERVAL \ | 69 | VIDIOC_SUBDEV_S_FRAME_INTERVAL \ |
70 | VIDIOC_SUBDEV_ENUM_MBUS_CODE \ | 70 | VIDIOC_SUBDEV_ENUM_MBUS_CODE \ |
@@ -74,32 +74,32 @@ IOCTLS = \ | |||
74 | VIDIOC_SUBDEV_S_SELECTION \ | 74 | VIDIOC_SUBDEV_S_SELECTION \ |
75 | 75 | ||
76 | TYPES = \ | 76 | TYPES = \ |
77 | $(shell perl -ne 'print "$$1 " if /^typedef\s+[^\s]+\s+([^\s]+)\;/' $(srctree)/include/linux/videodev2.h) \ | 77 | $(shell perl -ne 'print "$$1 " if /^typedef\s+[^\s]+\s+([^\s]+)\;/' $(srctree)/include/uapi/linux/videodev2.h) \ |
78 | $(shell perl -ne 'print "$$1 " if /^}\s+([a-z0-9_]+_t)/' $(srctree)/include/linux/dvb/frontend.h) | 78 | $(shell perl -ne 'print "$$1 " if /^}\s+([a-z0-9_]+_t)/' $(srctree)/include/uapi/linux/dvb/frontend.h) |
79 | 79 | ||
80 | ENUMS = \ | 80 | ENUMS = \ |
81 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/videodev2.h) \ | 81 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/videodev2.h) \ |
82 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/audio.h) \ | 82 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/audio.h) \ |
83 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/ca.h) \ | 83 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/ca.h) \ |
84 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/dmx.h) \ | 84 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/dmx.h) \ |
85 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/frontend.h) \ | 85 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/frontend.h) \ |
86 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/net.h) \ | 86 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/net.h) \ |
87 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/dvb/video.h) \ | 87 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/dvb/video.h) \ |
88 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/media.h) \ | 88 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/media.h) \ |
89 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-mediabus.h) \ | 89 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-mediabus.h) \ |
90 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-subdev.h) | 90 | $(shell perl -ne 'print "$$1 " if /^enum\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-subdev.h) |
91 | 91 | ||
92 | STRUCTS = \ | 92 | STRUCTS = \ |
93 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/videodev2.h) \ | 93 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/videodev2.h) \ |
94 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s\{]+)\s*/)' $(srctree)/include/linux/dvb/audio.h) \ | 94 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s\{]+)\s*/)' $(srctree)/include/uapi/linux/dvb/audio.h) \ |
95 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/ca.h) \ | 95 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/ca.h) \ |
96 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/dmx.h) \ | 96 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/dmx.h) \ |
97 | $(shell perl -ne 'print "$$1 " if (!/dtv\_cmds\_h/ && /^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/frontend.h) \ | 97 | $(shell perl -ne 'print "$$1 " if (!/dtv\_cmds\_h/ && /^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/frontend.h) \ |
98 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([A-Z][^\s]+)\s+/)' $(srctree)/include/linux/dvb/net.h) \ | 98 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([A-Z][^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/net.h) \ |
99 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/linux/dvb/video.h) \ | 99 | $(shell perl -ne 'print "$$1 " if (/^struct\s+([^\s]+)\s+/)' $(srctree)/include/uapi/linux/dvb/video.h) \ |
100 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/media.h) \ | 100 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/media.h) \ |
101 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-subdev.h) \ | 101 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-subdev.h) \ |
102 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/linux/v4l2-mediabus.h) | 102 | $(shell perl -ne 'print "$$1 " if /^struct\s+([^\s]+)\s+/' $(srctree)/include/uapi/linux/v4l2-mediabus.h) |
103 | 103 | ||
104 | ERRORS = \ | 104 | ERRORS = \ |
105 | E2BIG \ | 105 | E2BIG \ |
@@ -205,7 +205,7 @@ $(MEDIA_OBJ_DIR)/v4l2.xml: $(OBJIMGFILES) | |||
205 | @(ln -sf $(MEDIA_SRC_DIR)/v4l/*xml $(MEDIA_OBJ_DIR)/) | 205 | @(ln -sf $(MEDIA_SRC_DIR)/v4l/*xml $(MEDIA_OBJ_DIR)/) |
206 | @(ln -sf $(MEDIA_SRC_DIR)/dvb/*xml $(MEDIA_OBJ_DIR)/) | 206 | @(ln -sf $(MEDIA_SRC_DIR)/dvb/*xml $(MEDIA_OBJ_DIR)/) |
207 | 207 | ||
208 | $(MEDIA_OBJ_DIR)/videodev2.h.xml: $(srctree)/include/linux/videodev2.h $(MEDIA_OBJ_DIR)/v4l2.xml | 208 | $(MEDIA_OBJ_DIR)/videodev2.h.xml: $(srctree)/include/uapi/linux/videodev2.h $(MEDIA_OBJ_DIR)/v4l2.xml |
209 | @$($(quiet)gen_xml) | 209 | @$($(quiet)gen_xml) |
210 | @( \ | 210 | @( \ |
211 | echo "<programlisting>") > $@ | 211 | echo "<programlisting>") > $@ |
@@ -216,7 +216,7 @@ $(MEDIA_OBJ_DIR)/videodev2.h.xml: $(srctree)/include/linux/videodev2.h $(MEDIA_O | |||
216 | @( \ | 216 | @( \ |
217 | echo "</programlisting>") >> $@ | 217 | echo "</programlisting>") >> $@ |
218 | 218 | ||
219 | $(MEDIA_OBJ_DIR)/audio.h.xml: $(srctree)/include/linux/dvb/audio.h $(MEDIA_OBJ_DIR)/v4l2.xml | 219 | $(MEDIA_OBJ_DIR)/audio.h.xml: $(srctree)/include/uapi/linux/dvb/audio.h $(MEDIA_OBJ_DIR)/v4l2.xml |
220 | @$($(quiet)gen_xml) | 220 | @$($(quiet)gen_xml) |
221 | @( \ | 221 | @( \ |
222 | echo "<programlisting>") > $@ | 222 | echo "<programlisting>") > $@ |
@@ -227,7 +227,7 @@ $(MEDIA_OBJ_DIR)/audio.h.xml: $(srctree)/include/linux/dvb/audio.h $(MEDIA_OBJ_D | |||
227 | @( \ | 227 | @( \ |
228 | echo "</programlisting>") >> $@ | 228 | echo "</programlisting>") >> $@ |
229 | 229 | ||
230 | $(MEDIA_OBJ_DIR)/ca.h.xml: $(srctree)/include/linux/dvb/ca.h $(MEDIA_OBJ_DIR)/v4l2.xml | 230 | $(MEDIA_OBJ_DIR)/ca.h.xml: $(srctree)/include/uapi/linux/dvb/ca.h $(MEDIA_OBJ_DIR)/v4l2.xml |
231 | @$($(quiet)gen_xml) | 231 | @$($(quiet)gen_xml) |
232 | @( \ | 232 | @( \ |
233 | echo "<programlisting>") > $@ | 233 | echo "<programlisting>") > $@ |
@@ -238,7 +238,7 @@ $(MEDIA_OBJ_DIR)/ca.h.xml: $(srctree)/include/linux/dvb/ca.h $(MEDIA_OBJ_DIR)/v4 | |||
238 | @( \ | 238 | @( \ |
239 | echo "</programlisting>") >> $@ | 239 | echo "</programlisting>") >> $@ |
240 | 240 | ||
241 | $(MEDIA_OBJ_DIR)/dmx.h.xml: $(srctree)/include/linux/dvb/dmx.h $(MEDIA_OBJ_DIR)/v4l2.xml | 241 | $(MEDIA_OBJ_DIR)/dmx.h.xml: $(srctree)/include/uapi/linux/dvb/dmx.h $(MEDIA_OBJ_DIR)/v4l2.xml |
242 | @$($(quiet)gen_xml) | 242 | @$($(quiet)gen_xml) |
243 | @( \ | 243 | @( \ |
244 | echo "<programlisting>") > $@ | 244 | echo "<programlisting>") > $@ |
@@ -249,7 +249,7 @@ $(MEDIA_OBJ_DIR)/dmx.h.xml: $(srctree)/include/linux/dvb/dmx.h $(MEDIA_OBJ_DIR)/ | |||
249 | @( \ | 249 | @( \ |
250 | echo "</programlisting>") >> $@ | 250 | echo "</programlisting>") >> $@ |
251 | 251 | ||
252 | $(MEDIA_OBJ_DIR)/frontend.h.xml: $(srctree)/include/linux/dvb/frontend.h $(MEDIA_OBJ_DIR)/v4l2.xml | 252 | $(MEDIA_OBJ_DIR)/frontend.h.xml: $(srctree)/include/uapi/linux/dvb/frontend.h $(MEDIA_OBJ_DIR)/v4l2.xml |
253 | @$($(quiet)gen_xml) | 253 | @$($(quiet)gen_xml) |
254 | @( \ | 254 | @( \ |
255 | echo "<programlisting>") > $@ | 255 | echo "<programlisting>") > $@ |
@@ -260,7 +260,7 @@ $(MEDIA_OBJ_DIR)/frontend.h.xml: $(srctree)/include/linux/dvb/frontend.h $(MEDIA | |||
260 | @( \ | 260 | @( \ |
261 | echo "</programlisting>") >> $@ | 261 | echo "</programlisting>") >> $@ |
262 | 262 | ||
263 | $(MEDIA_OBJ_DIR)/net.h.xml: $(srctree)/include/linux/dvb/net.h $(MEDIA_OBJ_DIR)/v4l2.xml | 263 | $(MEDIA_OBJ_DIR)/net.h.xml: $(srctree)/include/uapi/linux/dvb/net.h $(MEDIA_OBJ_DIR)/v4l2.xml |
264 | @$($(quiet)gen_xml) | 264 | @$($(quiet)gen_xml) |
265 | @( \ | 265 | @( \ |
266 | echo "<programlisting>") > $@ | 266 | echo "<programlisting>") > $@ |
@@ -271,7 +271,7 @@ $(MEDIA_OBJ_DIR)/net.h.xml: $(srctree)/include/linux/dvb/net.h $(MEDIA_OBJ_DIR)/ | |||
271 | @( \ | 271 | @( \ |
272 | echo "</programlisting>") >> $@ | 272 | echo "</programlisting>") >> $@ |
273 | 273 | ||
274 | $(MEDIA_OBJ_DIR)/video.h.xml: $(srctree)/include/linux/dvb/video.h $(MEDIA_OBJ_DIR)/v4l2.xml | 274 | $(MEDIA_OBJ_DIR)/video.h.xml: $(srctree)/include/uapi/linux/dvb/video.h $(MEDIA_OBJ_DIR)/v4l2.xml |
275 | @$($(quiet)gen_xml) | 275 | @$($(quiet)gen_xml) |
276 | @( \ | 276 | @( \ |
277 | echo "<programlisting>") > $@ | 277 | echo "<programlisting>") > $@ |
diff --git a/Documentation/DocBook/networking.tmpl b/Documentation/DocBook/networking.tmpl index 59ad69a9d777..29df25016c7c 100644 --- a/Documentation/DocBook/networking.tmpl +++ b/Documentation/DocBook/networking.tmpl | |||
@@ -56,7 +56,7 @@ | |||
56 | !Enet/core/filter.c | 56 | !Enet/core/filter.c |
57 | </sect1> | 57 | </sect1> |
58 | <sect1><title>Generic Network Statistics</title> | 58 | <sect1><title>Generic Network Statistics</title> |
59 | !Iinclude/linux/gen_stats.h | 59 | !Iinclude/uapi/linux/gen_stats.h |
60 | !Enet/core/gen_stats.c | 60 | !Enet/core/gen_stats.c |
61 | !Enet/core/gen_estimator.c | 61 | !Enet/core/gen_estimator.c |
62 | </sect1> | 62 | </sect1> |
@@ -80,7 +80,7 @@ | |||
80 | !Enet/wimax/op-rfkill.c | 80 | !Enet/wimax/op-rfkill.c |
81 | !Enet/wimax/stack.c | 81 | !Enet/wimax/stack.c |
82 | !Iinclude/net/wimax.h | 82 | !Iinclude/net/wimax.h |
83 | !Iinclude/linux/wimax.h | 83 | !Iinclude/uapi/linux/wimax.h |
84 | </sect1> | 84 | </sect1> |
85 | </chapter> | 85 | </chapter> |
86 | 86 | ||
diff --git a/Documentation/IPMI.txt b/Documentation/IPMI.txt index b2bea15137d2..16eb4c9e9233 100644 --- a/Documentation/IPMI.txt +++ b/Documentation/IPMI.txt | |||
@@ -42,13 +42,7 @@ The driver interface depends on your hardware. If your system | |||
42 | properly provides the SMBIOS info for IPMI, the driver will detect it | 42 | properly provides the SMBIOS info for IPMI, the driver will detect it |
43 | and just work. If you have a board with a standard interface (These | 43 | and just work. If you have a board with a standard interface (These |
44 | will generally be either "KCS", "SMIC", or "BT", consult your hardware | 44 | will generally be either "KCS", "SMIC", or "BT", consult your hardware |
45 | manual), choose the 'IPMI SI handler' option. A driver also exists | 45 | manual), choose the 'IPMI SI handler' option. |
46 | for direct I2C access to the IPMI management controller. Some boards | ||
47 | support this, but it is unknown if it will work on every board. For | ||
48 | this, choose 'IPMI SMBus handler', but be ready to try to do some | ||
49 | figuring to see if it will work on your system if the SMBIOS/APCI | ||
50 | information is wrong or not present. It is fairly safe to have both | ||
51 | these enabled and let the drivers auto-detect what is present. | ||
52 | 46 | ||
53 | You should generally enable ACPI on your system, as systems with IPMI | 47 | You should generally enable ACPI on your system, as systems with IPMI |
54 | can have ACPI tables describing them. | 48 | can have ACPI tables describing them. |
@@ -58,8 +52,7 @@ their job correctly, the IPMI controller should be automatically | |||
58 | detected (via ACPI or SMBIOS tables) and should just work. Sadly, | 52 | detected (via ACPI or SMBIOS tables) and should just work. Sadly, |
59 | many boards do not have this information. The driver attempts | 53 | many boards do not have this information. The driver attempts |
60 | standard defaults, but they may not work. If you fall into this | 54 | standard defaults, but they may not work. If you fall into this |
61 | situation, you need to read the section below named 'The SI Driver' or | 55 | situation, you need to read the section below named 'The SI Driver'. |
62 | "The SMBus Driver" on how to hand-configure your system. | ||
63 | 56 | ||
64 | IPMI defines a standard watchdog timer. You can enable this with the | 57 | IPMI defines a standard watchdog timer. You can enable this with the |
65 | 'IPMI Watchdog Timer' config option. If you compile the driver into | 58 | 'IPMI Watchdog Timer' config option. If you compile the driver into |
@@ -104,12 +97,7 @@ driver, each open file for this device ties in to the message handler | |||
104 | as an IPMI user. | 97 | as an IPMI user. |
105 | 98 | ||
106 | ipmi_si - A driver for various system interfaces. This supports KCS, | 99 | ipmi_si - A driver for various system interfaces. This supports KCS, |
107 | SMIC, and BT interfaces. Unless you have an SMBus interface or your | 100 | SMIC, and BT interfaces. |
108 | own custom interface, you probably need to use this. | ||
109 | |||
110 | ipmi_smb - A driver for accessing BMCs on the SMBus. It uses the | ||
111 | I2C kernel driver's SMBus interfaces to send and receive IPMI messages | ||
112 | over the SMBus. | ||
113 | 101 | ||
114 | ipmi_watchdog - IPMI requires systems to have a very capable watchdog | 102 | ipmi_watchdog - IPMI requires systems to have a very capable watchdog |
115 | timer. This driver implements the standard Linux watchdog timer | 103 | timer. This driver implements the standard Linux watchdog timer |
@@ -482,53 +470,6 @@ for specifying an interface. Note that when removing an interface, | |||
482 | only the first three parameters (si type, address type, and address) | 470 | only the first three parameters (si type, address type, and address) |
483 | are used for the comparison. Any options are ignored for removing. | 471 | are used for the comparison. Any options are ignored for removing. |
484 | 472 | ||
485 | The SMBus Driver | ||
486 | ---------------- | ||
487 | |||
488 | The SMBus driver allows up to 4 SMBus devices to be configured in the | ||
489 | system. By default, the driver will register any SMBus interfaces it finds | ||
490 | in the I2C address range of 0x20 to 0x4f on any adapter. You can change this | ||
491 | at module load time (for a module) with: | ||
492 | |||
493 | modprobe ipmi_smb.o | ||
494 | addr=<adapter1>,<i2caddr1>[,<adapter2>,<i2caddr2>[,...]] | ||
495 | dbg=<flags1>,<flags2>... | ||
496 | [defaultprobe=1] [dbg_probe=1] | ||
497 | |||
498 | The addresses are specified in pairs, the first is the adapter ID and the | ||
499 | second is the I2C address on that adapter. | ||
500 | |||
501 | The debug flags are bit flags for each BMC found, they are: | ||
502 | IPMI messages: 1, driver state: 2, timing: 4, I2C probe: 8 | ||
503 | |||
504 | Setting smb_defaultprobe to zero disabled the default probing of SMBus | ||
505 | interfaces at address range 0x20 to 0x4f. This means that only the | ||
506 | BMCs specified on the smb_addr line will be detected. | ||
507 | |||
508 | Setting smb_dbg_probe to 1 will enable debugging of the probing and | ||
509 | detection process for BMCs on the SMBusses. | ||
510 | |||
511 | Discovering the IPMI compliant BMC on the SMBus can cause devices | ||
512 | on the I2C bus to fail. The SMBus driver writes a "Get Device ID" IPMI | ||
513 | message as a block write to the I2C bus and waits for a response. | ||
514 | This action can be detrimental to some I2C devices. It is highly recommended | ||
515 | that the known I2c address be given to the SMBus driver in the smb_addr | ||
516 | parameter. The default address range will not be used when a smb_addr | ||
517 | parameter is provided. | ||
518 | |||
519 | When compiled into the kernel, the addresses can be specified on the | ||
520 | kernel command line as: | ||
521 | |||
522 | ipmb_smb.addr=<adapter1>,<i2caddr1>[,<adapter2>,<i2caddr2>[,...]] | ||
523 | ipmi_smb.dbg=<flags1>,<flags2>... | ||
524 | ipmi_smb.defaultprobe=0 ipmi_smb.dbg_probe=1 | ||
525 | |||
526 | These are the same options as on the module command line. | ||
527 | |||
528 | Note that you might need some I2C changes if CONFIG_IPMI_PANIC_EVENT | ||
529 | is enabled along with this, so the I2C driver knows to run to | ||
530 | completion during sending a panic event. | ||
531 | |||
532 | 473 | ||
533 | Other Pieces | 474 | Other Pieces |
534 | ------------ | 475 | ------------ |
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt index 642f84495b29..2a4cdda4828e 100644 --- a/Documentation/sysrq.txt +++ b/Documentation/sysrq.txt | |||
@@ -116,6 +116,7 @@ On all - write a character to /proc/sysrq-trigger. e.g.: | |||
116 | 'w' - Dumps tasks that are in uninterruptable (blocked) state. | 116 | 'w' - Dumps tasks that are in uninterruptable (blocked) state. |
117 | 117 | ||
118 | 'x' - Used by xmon interface on ppc/powerpc platforms. | 118 | 'x' - Used by xmon interface on ppc/powerpc platforms. |
119 | Show global PMU Registers on sparc64. | ||
119 | 120 | ||
120 | 'y' - Show global CPU Registers [SPARC-64 specific] | 121 | 'y' - Show global CPU Registers [SPARC-64 specific] |
121 | 122 | ||
diff --git a/MAINTAINERS b/MAINTAINERS index e73060fe0788..41c53491db60 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -4372,7 +4372,7 @@ F: Documentation/scsi/53c700.txt | |||
4372 | F: drivers/scsi/53c700* | 4372 | F: drivers/scsi/53c700* |
4373 | 4373 | ||
4374 | LED SUBSYSTEM | 4374 | LED SUBSYSTEM |
4375 | M: Bryan Wu <bryan.wu@canonical.com> | 4375 | M: Bryan Wu <cooloney@gmail.com> |
4376 | M: Richard Purdie <rpurdie@rpsys.net> | 4376 | M: Richard Purdie <rpurdie@rpsys.net> |
4377 | L: linux-leds@vger.kernel.org | 4377 | L: linux-leds@vger.kernel.org |
4378 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds.git | 4378 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds.git |
@@ -5019,6 +5019,20 @@ F: net/ipv6/ | |||
5019 | F: include/net/ip* | 5019 | F: include/net/ip* |
5020 | F: arch/x86/net/* | 5020 | F: arch/x86/net/* |
5021 | 5021 | ||
5022 | NETWORKING [IPSEC] | ||
5023 | M: Steffen Klassert <steffen.klassert@secunet.com> | ||
5024 | M: Herbert Xu <herbert@gondor.apana.org.au> | ||
5025 | M: "David S. Miller" <davem@davemloft.net> | ||
5026 | L: netdev@vger.kernel.org | ||
5027 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git | ||
5028 | S: Maintained | ||
5029 | F: net/xfrm/ | ||
5030 | F: net/key/ | ||
5031 | F: net/ipv4/xfrm* | ||
5032 | F: net/ipv6/xfrm* | ||
5033 | F: include/uapi/linux/xfrm.h | ||
5034 | F: include/net/xfrm.h | ||
5035 | |||
5022 | NETWORKING [LABELED] (NetLabel, CIPSO, Labeled IPsec, SECMARK) | 5036 | NETWORKING [LABELED] (NetLabel, CIPSO, Labeled IPsec, SECMARK) |
5023 | M: Paul Moore <paul@paul-moore.com> | 5037 | M: Paul Moore <paul@paul-moore.com> |
5024 | L: netdev@vger.kernel.org | 5038 | L: netdev@vger.kernel.org |
@@ -437,7 +437,9 @@ endif | |||
437 | PHONY += asm-generic | 437 | PHONY += asm-generic |
438 | asm-generic: | 438 | asm-generic: |
439 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \ | 439 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \ |
440 | obj=arch/$(SRCARCH)/include/generated/asm | 440 | src=asm obj=arch/$(SRCARCH)/include/generated/asm |
441 | $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \ | ||
442 | src=uapi/asm obj=arch/$(SRCARCH)/include/generated/uapi/asm | ||
441 | 443 | ||
442 | # To make sure we do not include .config for any of the *config targets | 444 | # To make sure we do not include .config for any of the *config targets |
443 | # catch them early, and hand them over to scripts/kconfig/Makefile | 445 | # catch them early, and hand them over to scripts/kconfig/Makefile |
@@ -717,6 +719,17 @@ endif # INSTALL_MOD_STRIP | |||
717 | export mod_strip_cmd | 719 | export mod_strip_cmd |
718 | 720 | ||
719 | 721 | ||
722 | ifeq ($(CONFIG_MODULE_SIG),y) | ||
723 | MODSECKEY = ./signing_key.priv | ||
724 | MODPUBKEY = ./signing_key.x509 | ||
725 | export MODPUBKEY | ||
726 | mod_sign_cmd = sh $(srctree)/scripts/sign-file $(MODSECKEY) $(MODPUBKEY) $(srctree)/scripts/x509keyid | ||
727 | else | ||
728 | mod_sign_cmd = true | ||
729 | endif | ||
730 | export mod_sign_cmd | ||
731 | |||
732 | |||
720 | ifeq ($(KBUILD_EXTMOD),) | 733 | ifeq ($(KBUILD_EXTMOD),) |
721 | core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ | 734 | core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/ |
722 | 735 | ||
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 417bac1846bd..34711757ba59 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -88,9 +88,9 @@ ENTRY(ret_from_fork) | |||
88 | bl schedule_tail | 88 | bl schedule_tail |
89 | cmp r5, #0 | 89 | cmp r5, #0 |
90 | movne r0, r4 | 90 | movne r0, r4 |
91 | movne lr, pc | 91 | adrne lr, BSYM(1f) |
92 | movne pc, r5 | 92 | movne pc, r5 |
93 | get_thread_info tsk | 93 | 1: get_thread_info tsk |
94 | b ret_slow_syscall | 94 | b ret_slow_syscall |
95 | ENDPROC(ret_from_fork) | 95 | ENDPROC(ret_from_fork) |
96 | 96 | ||
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index 9518bf5996dc..e255164ff087 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c | |||
@@ -444,16 +444,28 @@ static struct omap1_cam_platform_data ams_delta_camera_platform_data = { | |||
444 | .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */ | 444 | .lclk_khz_max = 1334, /* results in 5fps CIF, 10fps QCIF */ |
445 | }; | 445 | }; |
446 | 446 | ||
447 | static struct platform_device ams_delta_audio_device = { | ||
448 | .name = "ams-delta-audio", | ||
449 | .id = -1, | ||
450 | }; | ||
451 | |||
452 | static struct platform_device cx20442_codec_device = { | ||
453 | .name = "cx20442-codec", | ||
454 | .id = -1, | ||
455 | }; | ||
456 | |||
447 | static struct platform_device *ams_delta_devices[] __initdata = { | 457 | static struct platform_device *ams_delta_devices[] __initdata = { |
448 | &latch1_gpio_device, | 458 | &latch1_gpio_device, |
449 | &latch2_gpio_device, | 459 | &latch2_gpio_device, |
450 | &ams_delta_kp_device, | 460 | &ams_delta_kp_device, |
451 | &ams_delta_camera_device, | 461 | &ams_delta_camera_device, |
462 | &ams_delta_audio_device, | ||
452 | }; | 463 | }; |
453 | 464 | ||
454 | static struct platform_device *late_devices[] __initdata = { | 465 | static struct platform_device *late_devices[] __initdata = { |
455 | &ams_delta_nand_device, | 466 | &ams_delta_nand_device, |
456 | &ams_delta_lcd_device, | 467 | &ams_delta_lcd_device, |
468 | &cx20442_codec_device, | ||
457 | }; | 469 | }; |
458 | 470 | ||
459 | static void __init ams_delta_init(void) | 471 | static void __init ams_delta_init(void) |
diff --git a/arch/arm/mach-prima2/include/mach/gpio.h b/arch/arm/mach-prima2/include/mach/gpio.h deleted file mode 100644 index 1904bb03876e..000000000000 --- a/arch/arm/mach-prima2/include/mach/gpio.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #ifndef __MACH_GPIO_H | ||
2 | #define __MACH_GPIO_H | ||
3 | |||
4 | /* Pull up/down values */ | ||
5 | enum sirfsoc_gpio_pull { | ||
6 | SIRFSOC_GPIO_PULL_NONE, | ||
7 | SIRFSOC_GPIO_PULL_UP, | ||
8 | SIRFSOC_GPIO_PULL_DOWN, | ||
9 | }; | ||
10 | |||
11 | void sirfsoc_gpio_set_pull(unsigned gpio, unsigned mode); | ||
12 | |||
13 | #endif | ||
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S index 002732960315..ee0beb354e4d 100644 --- a/arch/frv/kernel/entry.S +++ b/arch/frv/kernel/entry.S | |||
@@ -867,8 +867,8 @@ ret_from_fork: | |||
867 | ret_from_kernel_thread: | 867 | ret_from_kernel_thread: |
868 | lddi.p @(gr28,#REG_GR(8)),gr20 | 868 | lddi.p @(gr28,#REG_GR(8)),gr20 |
869 | call schedule_tail | 869 | call schedule_tail |
870 | or.p gr20,gr20,gr8 | 870 | calll.p @(gr21,gr0) |
871 | calll @(gr21,gr0) | 871 | or gr20,gr20,gr8 |
872 | bra sys_exit | 872 | bra sys_exit |
873 | 873 | ||
874 | .globl ret_from_kernel_execve | 874 | .globl ret_from_kernel_execve |
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c index 655d90d20bb0..e1e3aa196aa4 100644 --- a/arch/frv/kernel/process.c +++ b/arch/frv/kernel/process.c | |||
@@ -194,7 +194,7 @@ int copy_thread(unsigned long clone_flags, | |||
194 | memset(childregs, 0, sizeof(struct pt_regs)); | 194 | memset(childregs, 0, sizeof(struct pt_regs)); |
195 | childregs->gr9 = usp; /* function */ | 195 | childregs->gr9 = usp; /* function */ |
196 | childregs->gr8 = arg; | 196 | childregs->gr8 = arg; |
197 | chilregs->psr = PSR_S; | 197 | childregs->psr = PSR_S; |
198 | p->thread.pc = (unsigned long) ret_from_kernel_thread; | 198 | p->thread.pc = (unsigned long) ret_from_kernel_thread; |
199 | save_user_regs(p->thread.user); | 199 | save_user_regs(p->thread.user); |
200 | return 0; | 200 | return 0; |
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c index 1f1e5efb3385..b8993c87d3de 100644 --- a/arch/frv/kernel/setup.c +++ b/arch/frv/kernel/setup.c | |||
@@ -112,9 +112,11 @@ char __initdata redboot_command_line[COMMAND_LINE_SIZE]; | |||
112 | #ifdef CONFIG_PM | 112 | #ifdef CONFIG_PM |
113 | #define __pminit | 113 | #define __pminit |
114 | #define __pminitdata | 114 | #define __pminitdata |
115 | #define __pminitconst | ||
115 | #else | 116 | #else |
116 | #define __pminit __init | 117 | #define __pminit __init |
117 | #define __pminitdata __initdata | 118 | #define __pminitdata __initdata |
119 | #define __pminitconst __initconst | ||
118 | #endif | 120 | #endif |
119 | 121 | ||
120 | struct clock_cmode { | 122 | struct clock_cmode { |
diff --git a/arch/ia64/include/uapi/asm/Kbuild b/arch/ia64/include/uapi/asm/Kbuild index 30cafac93703..1b3f5eb5fcdb 100644 --- a/arch/ia64/include/uapi/asm/Kbuild +++ b/arch/ia64/include/uapi/asm/Kbuild | |||
@@ -1,6 +1,8 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | generic-y += kvm_para.h | ||
5 | |||
4 | header-y += auxvec.h | 6 | header-y += auxvec.h |
5 | header-y += bitsperlong.h | 7 | header-y += bitsperlong.h |
6 | header-y += break.h | 8 | header-y += break.h |
diff --git a/arch/ia64/include/uapi/asm/kvm_para.h b/arch/ia64/include/uapi/asm/kvm_para.h deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/arch/ia64/include/uapi/asm/kvm_para.h +++ /dev/null | |||
diff --git a/arch/mips/include/asm/Kbuild b/arch/mips/include/asm/Kbuild index e69de29bb2d1..533053d12ced 100644 --- a/arch/mips/include/asm/Kbuild +++ b/arch/mips/include/asm/Kbuild | |||
@@ -0,0 +1 @@ | |||
# MIPS headers | |||
diff --git a/arch/mips/include/asm/delay.h b/arch/mips/include/asm/delay.h index e7cd78277c23..dc0a5f77a35c 100644 --- a/arch/mips/include/asm/delay.h +++ b/arch/mips/include/asm/delay.h | |||
@@ -13,9 +13,9 @@ | |||
13 | 13 | ||
14 | #include <linux/param.h> | 14 | #include <linux/param.h> |
15 | 15 | ||
16 | extern void __delay(unsigned int loops); | 16 | extern void __delay(unsigned long loops); |
17 | extern void __ndelay(unsigned int ns); | 17 | extern void __ndelay(unsigned long ns); |
18 | extern void __udelay(unsigned int us); | 18 | extern void __udelay(unsigned long us); |
19 | 19 | ||
20 | #define ndelay(ns) __ndelay(ns) | 20 | #define ndelay(ns) __ndelay(ns) |
21 | #define udelay(us) __udelay(us) | 21 | #define udelay(us) __udelay(us) |
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index c26e18250079..f5b521d5a67d 100644 --- a/arch/mips/include/asm/pgtable-64.h +++ b/arch/mips/include/asm/pgtable-64.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #ifndef _ASM_PGTABLE_64_H | 9 | #ifndef _ASM_PGTABLE_64_H |
10 | #define _ASM_PGTABLE_64_H | 10 | #define _ASM_PGTABLE_64_H |
11 | 11 | ||
12 | #include <linux/compiler.h> | ||
12 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
13 | 14 | ||
14 | #include <asm/addrspace.h> | 15 | #include <asm/addrspace.h> |
@@ -172,7 +173,19 @@ static inline int pmd_none(pmd_t pmd) | |||
172 | return pmd_val(pmd) == (unsigned long) invalid_pte_table; | 173 | return pmd_val(pmd) == (unsigned long) invalid_pte_table; |
173 | } | 174 | } |
174 | 175 | ||
175 | #define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK) | 176 | static inline int pmd_bad(pmd_t pmd) |
177 | { | ||
178 | #ifdef CONFIG_HUGETLB_PAGE | ||
179 | /* pmd_huge(pmd) but inline */ | ||
180 | if (unlikely(pmd_val(pmd) & _PAGE_HUGE)) | ||
181 | return 0; | ||
182 | #endif | ||
183 | |||
184 | if (unlikely(pmd_val(pmd) & ~PAGE_MASK)) | ||
185 | return 1; | ||
186 | |||
187 | return 0; | ||
188 | } | ||
176 | 189 | ||
177 | static inline int pmd_present(pmd_t pmd) | 190 | static inline int pmd_present(pmd_t pmd) |
178 | { | 191 | { |
diff --git a/arch/mips/jz4740/serial.h b/arch/mips/jz4740/serial.h index b9fe3ade0289..8eb715bb1ea8 100644 --- a/arch/mips/jz4740/serial.h +++ b/arch/mips/jz4740/serial.h | |||
@@ -14,6 +14,9 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef __MIPS_JZ4740_SERIAL_H__ | 16 | #ifndef __MIPS_JZ4740_SERIAL_H__ |
17 | #define __MIPS_JZ4740_SERIAL_H__ | ||
18 | |||
19 | struct uart_port; | ||
17 | 20 | ||
18 | void jz4740_serial_out(struct uart_port *p, int offset, int value); | 21 | void jz4740_serial_out(struct uart_port *p, int offset, int value); |
19 | 22 | ||
diff --git a/arch/mips/kernel/smp-cmp.c b/arch/mips/kernel/smp-cmp.c index afc379ca3753..06cd0c610f44 100644 --- a/arch/mips/kernel/smp-cmp.c +++ b/arch/mips/kernel/smp-cmp.c | |||
@@ -97,7 +97,7 @@ static void cmp_init_secondary(void) | |||
97 | 97 | ||
98 | /* Enable per-cpu interrupts: platform specific */ | 98 | /* Enable per-cpu interrupts: platform specific */ |
99 | 99 | ||
100 | c->core = (read_c0_ebase() >> 1) & 0xff; | 100 | c->core = (read_c0_ebase() >> 1) & 0x1ff; |
101 | #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) | 101 | #if defined(CONFIG_MIPS_MT_SMP) || defined(CONFIG_MIPS_MT_SMTC) |
102 | c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE; | 102 | c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & TCBIND_CURVPE; |
103 | #endif | 103 | #endif |
diff --git a/arch/mips/lib/delay.c b/arch/mips/lib/delay.c index 5995969e8c42..dc81ca8dc0dd 100644 --- a/arch/mips/lib/delay.c +++ b/arch/mips/lib/delay.c | |||
@@ -15,13 +15,17 @@ | |||
15 | #include <asm/compiler.h> | 15 | #include <asm/compiler.h> |
16 | #include <asm/war.h> | 16 | #include <asm/war.h> |
17 | 17 | ||
18 | inline void __delay(unsigned int loops) | 18 | void __delay(unsigned long loops) |
19 | { | 19 | { |
20 | __asm__ __volatile__ ( | 20 | __asm__ __volatile__ ( |
21 | " .set noreorder \n" | 21 | " .set noreorder \n" |
22 | " .align 3 \n" | 22 | " .align 3 \n" |
23 | "1: bnez %0, 1b \n" | 23 | "1: bnez %0, 1b \n" |
24 | #if __SIZEOF_LONG__ == 4 | ||
24 | " subu %0, 1 \n" | 25 | " subu %0, 1 \n" |
26 | #else | ||
27 | " dsubu %0, 1 \n" | ||
28 | #endif | ||
25 | " .set reorder \n" | 29 | " .set reorder \n" |
26 | : "=r" (loops) | 30 | : "=r" (loops) |
27 | : "0" (loops)); | 31 | : "0" (loops)); |
diff --git a/arch/mips/lib/dump_tlb.c b/arch/mips/lib/dump_tlb.c index 3f69725556af..a99c1d3fc567 100644 --- a/arch/mips/lib/dump_tlb.c +++ b/arch/mips/lib/dump_tlb.c | |||
@@ -50,8 +50,9 @@ static void dump_tlb(int first, int last) | |||
50 | { | 50 | { |
51 | unsigned long s_entryhi, entryhi, asid; | 51 | unsigned long s_entryhi, entryhi, asid; |
52 | unsigned long long entrylo0, entrylo1; | 52 | unsigned long long entrylo0, entrylo1; |
53 | unsigned int s_index, pagemask, c0, c1, i; | 53 | unsigned int s_index, s_pagemask, pagemask, c0, c1, i; |
54 | 54 | ||
55 | s_pagemask = read_c0_pagemask(); | ||
55 | s_entryhi = read_c0_entryhi(); | 56 | s_entryhi = read_c0_entryhi(); |
56 | s_index = read_c0_index(); | 57 | s_index = read_c0_index(); |
57 | asid = s_entryhi & 0xff; | 58 | asid = s_entryhi & 0xff; |
@@ -103,6 +104,7 @@ static void dump_tlb(int first, int last) | |||
103 | 104 | ||
104 | write_c0_entryhi(s_entryhi); | 105 | write_c0_entryhi(s_entryhi); |
105 | write_c0_index(s_index); | 106 | write_c0_index(s_index); |
107 | write_c0_pagemask(s_pagemask); | ||
106 | } | 108 | } |
107 | 109 | ||
108 | void dump_tlb_all(void) | 110 | void dump_tlb_all(void) |
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 87b9cfcc30ff..4b9b935a070e 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c | |||
@@ -320,6 +320,7 @@ void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte) | |||
320 | tlb_write_random(); | 320 | tlb_write_random(); |
321 | else | 321 | else |
322 | tlb_write_indexed(); | 322 | tlb_write_indexed(); |
323 | tlbw_use_hazard(); | ||
323 | write_c0_pagemask(PM_DEFAULT_MASK); | 324 | write_c0_pagemask(PM_DEFAULT_MASK); |
324 | } else | 325 | } else |
325 | #endif | 326 | #endif |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 658a520364ce..2833dcb67b5a 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -148,8 +148,8 @@ enum label_id { | |||
148 | label_leave, | 148 | label_leave, |
149 | label_vmalloc, | 149 | label_vmalloc, |
150 | label_vmalloc_done, | 150 | label_vmalloc_done, |
151 | label_tlbw_hazard, | 151 | label_tlbw_hazard_0, |
152 | label_split, | 152 | label_split = label_tlbw_hazard_0 + 8, |
153 | label_tlbl_goaround1, | 153 | label_tlbl_goaround1, |
154 | label_tlbl_goaround2, | 154 | label_tlbl_goaround2, |
155 | label_nopage_tlbl, | 155 | label_nopage_tlbl, |
@@ -167,7 +167,7 @@ UASM_L_LA(_second_part) | |||
167 | UASM_L_LA(_leave) | 167 | UASM_L_LA(_leave) |
168 | UASM_L_LA(_vmalloc) | 168 | UASM_L_LA(_vmalloc) |
169 | UASM_L_LA(_vmalloc_done) | 169 | UASM_L_LA(_vmalloc_done) |
170 | UASM_L_LA(_tlbw_hazard) | 170 | /* _tlbw_hazard_x is handled differently. */ |
171 | UASM_L_LA(_split) | 171 | UASM_L_LA(_split) |
172 | UASM_L_LA(_tlbl_goaround1) | 172 | UASM_L_LA(_tlbl_goaround1) |
173 | UASM_L_LA(_tlbl_goaround2) | 173 | UASM_L_LA(_tlbl_goaround2) |
@@ -181,6 +181,30 @@ UASM_L_LA(_large_segbits_fault) | |||
181 | UASM_L_LA(_tlb_huge_update) | 181 | UASM_L_LA(_tlb_huge_update) |
182 | #endif | 182 | #endif |
183 | 183 | ||
184 | static int __cpuinitdata hazard_instance; | ||
185 | |||
186 | static void uasm_bgezl_hazard(u32 **p, struct uasm_reloc **r, int instance) | ||
187 | { | ||
188 | switch (instance) { | ||
189 | case 0 ... 7: | ||
190 | uasm_il_bgezl(p, r, 0, label_tlbw_hazard_0 + instance); | ||
191 | return; | ||
192 | default: | ||
193 | BUG(); | ||
194 | } | ||
195 | } | ||
196 | |||
197 | static void uasm_bgezl_label(struct uasm_label **l, u32 **p, int instance) | ||
198 | { | ||
199 | switch (instance) { | ||
200 | case 0 ... 7: | ||
201 | uasm_build_label(l, *p, label_tlbw_hazard_0 + instance); | ||
202 | break; | ||
203 | default: | ||
204 | BUG(); | ||
205 | } | ||
206 | } | ||
207 | |||
184 | /* | 208 | /* |
185 | * For debug purposes. | 209 | * For debug purposes. |
186 | */ | 210 | */ |
@@ -478,21 +502,28 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l, | |||
478 | * This branch uses up a mtc0 hazard nop slot and saves | 502 | * This branch uses up a mtc0 hazard nop slot and saves |
479 | * two nops after the tlbw instruction. | 503 | * two nops after the tlbw instruction. |
480 | */ | 504 | */ |
481 | uasm_il_bgezl(p, r, 0, label_tlbw_hazard); | 505 | uasm_bgezl_hazard(p, r, hazard_instance); |
482 | tlbw(p); | 506 | tlbw(p); |
483 | uasm_l_tlbw_hazard(l, *p); | 507 | uasm_bgezl_label(l, p, hazard_instance); |
508 | hazard_instance++; | ||
484 | uasm_i_nop(p); | 509 | uasm_i_nop(p); |
485 | break; | 510 | break; |
486 | 511 | ||
487 | case CPU_R4600: | 512 | case CPU_R4600: |
488 | case CPU_R4700: | 513 | case CPU_R4700: |
489 | case CPU_R5000: | ||
490 | case CPU_R5000A: | ||
491 | uasm_i_nop(p); | 514 | uasm_i_nop(p); |
492 | tlbw(p); | 515 | tlbw(p); |
493 | uasm_i_nop(p); | 516 | uasm_i_nop(p); |
494 | break; | 517 | break; |
495 | 518 | ||
519 | case CPU_R5000: | ||
520 | case CPU_R5000A: | ||
521 | case CPU_NEVADA: | ||
522 | uasm_i_nop(p); /* QED specifies 2 nops hazard */ | ||
523 | uasm_i_nop(p); /* QED specifies 2 nops hazard */ | ||
524 | tlbw(p); | ||
525 | break; | ||
526 | |||
496 | case CPU_R4300: | 527 | case CPU_R4300: |
497 | case CPU_5KC: | 528 | case CPU_5KC: |
498 | case CPU_TX49XX: | 529 | case CPU_TX49XX: |
@@ -526,17 +557,6 @@ static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l, | |||
526 | tlbw(p); | 557 | tlbw(p); |
527 | break; | 558 | break; |
528 | 559 | ||
529 | case CPU_NEVADA: | ||
530 | uasm_i_nop(p); /* QED specifies 2 nops hazard */ | ||
531 | /* | ||
532 | * This branch uses up a mtc0 hazard nop slot and saves | ||
533 | * a nop after the tlbw instruction. | ||
534 | */ | ||
535 | uasm_il_bgezl(p, r, 0, label_tlbw_hazard); | ||
536 | tlbw(p); | ||
537 | uasm_l_tlbw_hazard(l, *p); | ||
538 | break; | ||
539 | |||
540 | case CPU_RM7000: | 560 | case CPU_RM7000: |
541 | uasm_i_nop(p); | 561 | uasm_i_nop(p); |
542 | uasm_i_nop(p); | 562 | uasm_i_nop(p); |
diff --git a/arch/mn10300/include/uapi/asm/setup.h b/arch/mn10300/include/uapi/asm/setup.h index e69de29bb2d1..ae5704fa77ad 100644 --- a/arch/mn10300/include/uapi/asm/setup.h +++ b/arch/mn10300/include/uapi/asm/setup.h | |||
@@ -0,0 +1,4 @@ | |||
1 | /* | ||
2 | * There isn't anything here anymore, but the file must not be empty or patch | ||
3 | * will delete it. | ||
4 | */ | ||
diff --git a/arch/powerpc/include/asm/kvm_book3s_32.h b/arch/powerpc/include/asm/kvm_book3s_32.h index 38040ff82063..ce0ef6ce8f86 100644 --- a/arch/powerpc/include/asm/kvm_book3s_32.h +++ b/arch/powerpc/include/asm/kvm_book3s_32.h | |||
@@ -42,5 +42,6 @@ static inline void svcpu_put(struct kvmppc_book3s_shadow_vcpu *svcpu) | |||
42 | #define SID_SHIFT 28 | 42 | #define SID_SHIFT 28 |
43 | #define ESID_MASK 0xf0000000 | 43 | #define ESID_MASK 0xf0000000 |
44 | #define VSID_MASK 0x00fffffff0000000ULL | 44 | #define VSID_MASK 0x00fffffff0000000ULL |
45 | #define VPN_SHIFT 12 | ||
45 | 46 | ||
46 | #endif /* __ASM_KVM_BOOK3S_32_H__ */ | 47 | #endif /* __ASM_KVM_BOOK3S_32_H__ */ |
diff --git a/arch/powerpc/include/asm/processor.h b/arch/powerpc/include/asm/processor.h index 8734b3855272..87502046c0dc 100644 --- a/arch/powerpc/include/asm/processor.h +++ b/arch/powerpc/include/asm/processor.h | |||
@@ -388,9 +388,9 @@ extern int powersave_nap; /* set if nap mode can be used in idle loop */ | |||
388 | extern void power7_nap(void); | 388 | extern void power7_nap(void); |
389 | 389 | ||
390 | #ifdef CONFIG_PSERIES_IDLE | 390 | #ifdef CONFIG_PSERIES_IDLE |
391 | extern void update_smt_snooze_delay(int snooze); | 391 | extern void update_smt_snooze_delay(int cpu, int residency); |
392 | #else | 392 | #else |
393 | static inline void update_smt_snooze_delay(int snooze) {} | 393 | static inline void update_smt_snooze_delay(int cpu, int residency) {} |
394 | #endif | 394 | #endif |
395 | 395 | ||
396 | extern void flush_instruction_cache(void); | 396 | extern void flush_instruction_cache(void); |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 8302af649219..cf357a059ddb 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -50,7 +50,7 @@ static ssize_t store_smt_snooze_delay(struct device *dev, | |||
50 | return -EINVAL; | 50 | return -EINVAL; |
51 | 51 | ||
52 | per_cpu(smt_snooze_delay, cpu->dev.id) = snooze; | 52 | per_cpu(smt_snooze_delay, cpu->dev.id) = snooze; |
53 | update_smt_snooze_delay(snooze); | 53 | update_smt_snooze_delay(cpu->dev.id, snooze); |
54 | 54 | ||
55 | return count; | 55 | return count; |
56 | } | 56 | } |
diff --git a/arch/powerpc/kvm/book3s_32_mmu_host.c b/arch/powerpc/kvm/book3s_32_mmu_host.c index 00aa61268e0d..b0f625a33345 100644 --- a/arch/powerpc/kvm/book3s_32_mmu_host.c +++ b/arch/powerpc/kvm/book3s_32_mmu_host.c | |||
@@ -173,8 +173,8 @@ int kvmppc_mmu_map_page(struct kvm_vcpu *vcpu, struct kvmppc_pte *orig_pte) | |||
173 | BUG_ON(!map); | 173 | BUG_ON(!map); |
174 | 174 | ||
175 | vsid = map->host_vsid; | 175 | vsid = map->host_vsid; |
176 | vpn = (vsid << (SID_SHIFT - VPN_SHIFT)) | ((eaddr & ~ESID_MASK) >> VPN_SHIFT) | 176 | vpn = (vsid << (SID_SHIFT - VPN_SHIFT)) | |
177 | 177 | ((eaddr & ~ESID_MASK) >> VPN_SHIFT); | |
178 | next_pteg: | 178 | next_pteg: |
179 | if (rr == 16) { | 179 | if (rr == 16) { |
180 | primary = !primary; | 180 | primary = !primary; |
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c index 0db88f501f91..aa2465e21f1a 100644 --- a/arch/powerpc/perf/core-book3s.c +++ b/arch/powerpc/perf/core-book3s.c | |||
@@ -1463,7 +1463,7 @@ static void perf_event_interrupt(struct pt_regs *regs) | |||
1463 | if (!event->hw.idx || is_limited_pmc(event->hw.idx)) | 1463 | if (!event->hw.idx || is_limited_pmc(event->hw.idx)) |
1464 | continue; | 1464 | continue; |
1465 | val = read_pmc(event->hw.idx); | 1465 | val = read_pmc(event->hw.idx); |
1466 | if (pmc_overflow(val)) { | 1466 | if ((int)val < 0) { |
1467 | /* event has overflowed */ | 1467 | /* event has overflowed */ |
1468 | found = 1; | 1468 | found = 1; |
1469 | record_and_restart(event, val, regs); | 1469 | record_and_restart(event, val, regs); |
diff --git a/arch/powerpc/platforms/pseries/processor_idle.c b/arch/powerpc/platforms/pseries/processor_idle.c index 455760b1fe6e..45d00e5fe14d 100644 --- a/arch/powerpc/platforms/pseries/processor_idle.c +++ b/arch/powerpc/platforms/pseries/processor_idle.c | |||
@@ -33,13 +33,6 @@ static int max_idle_state = MAX_IDLE_STATE_COUNT - 1; | |||
33 | static struct cpuidle_device __percpu *pseries_cpuidle_devices; | 33 | static struct cpuidle_device __percpu *pseries_cpuidle_devices; |
34 | static struct cpuidle_state *cpuidle_state_table; | 34 | static struct cpuidle_state *cpuidle_state_table; |
35 | 35 | ||
36 | void update_smt_snooze_delay(int snooze) | ||
37 | { | ||
38 | struct cpuidle_driver *drv = cpuidle_get_driver(); | ||
39 | if (drv) | ||
40 | drv->states[0].target_residency = snooze; | ||
41 | } | ||
42 | |||
43 | static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before) | 36 | static inline void idle_loop_prolog(unsigned long *in_purr, ktime_t *kt_before) |
44 | { | 37 | { |
45 | 38 | ||
@@ -66,32 +59,22 @@ static int snooze_loop(struct cpuidle_device *dev, | |||
66 | { | 59 | { |
67 | unsigned long in_purr; | 60 | unsigned long in_purr; |
68 | ktime_t kt_before; | 61 | ktime_t kt_before; |
69 | unsigned long start_snooze; | 62 | int cpu = dev->cpu; |
70 | long snooze = drv->states[0].target_residency; | ||
71 | 63 | ||
72 | idle_loop_prolog(&in_purr, &kt_before); | 64 | idle_loop_prolog(&in_purr, &kt_before); |
65 | local_irq_enable(); | ||
66 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
73 | 67 | ||
74 | if (snooze) { | 68 | while ((!need_resched()) && cpu_online(cpu)) { |
75 | start_snooze = get_tb() + snooze * tb_ticks_per_usec; | 69 | ppc64_runlatch_off(); |
76 | local_irq_enable(); | 70 | HMT_low(); |
77 | set_thread_flag(TIF_POLLING_NRFLAG); | 71 | HMT_very_low(); |
78 | |||
79 | while ((snooze < 0) || (get_tb() < start_snooze)) { | ||
80 | if (need_resched() || cpu_is_offline(dev->cpu)) | ||
81 | goto out; | ||
82 | ppc64_runlatch_off(); | ||
83 | HMT_low(); | ||
84 | HMT_very_low(); | ||
85 | } | ||
86 | |||
87 | HMT_medium(); | ||
88 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
89 | smp_mb(); | ||
90 | local_irq_disable(); | ||
91 | } | 72 | } |
92 | 73 | ||
93 | out: | ||
94 | HMT_medium(); | 74 | HMT_medium(); |
75 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
76 | smp_mb(); | ||
77 | |||
95 | dev->last_residency = | 78 | dev->last_residency = |
96 | (int)idle_loop_epilog(in_purr, kt_before); | 79 | (int)idle_loop_epilog(in_purr, kt_before); |
97 | return index; | 80 | return index; |
@@ -172,8 +155,8 @@ static struct cpuidle_state dedicated_states[MAX_IDLE_STATE_COUNT] = { | |||
172 | .name = "CEDE", | 155 | .name = "CEDE", |
173 | .desc = "CEDE", | 156 | .desc = "CEDE", |
174 | .flags = CPUIDLE_FLAG_TIME_VALID, | 157 | .flags = CPUIDLE_FLAG_TIME_VALID, |
175 | .exit_latency = 1, | 158 | .exit_latency = 10, |
176 | .target_residency = 10, | 159 | .target_residency = 100, |
177 | .enter = &dedicated_cede_loop }, | 160 | .enter = &dedicated_cede_loop }, |
178 | }; | 161 | }; |
179 | 162 | ||
@@ -190,6 +173,23 @@ static struct cpuidle_state shared_states[MAX_IDLE_STATE_COUNT] = { | |||
190 | .enter = &shared_cede_loop }, | 173 | .enter = &shared_cede_loop }, |
191 | }; | 174 | }; |
192 | 175 | ||
176 | void update_smt_snooze_delay(int cpu, int residency) | ||
177 | { | ||
178 | struct cpuidle_driver *drv = cpuidle_get_driver(); | ||
179 | struct cpuidle_device *dev = per_cpu(cpuidle_devices, cpu); | ||
180 | |||
181 | if (cpuidle_state_table != dedicated_states) | ||
182 | return; | ||
183 | |||
184 | if (residency < 0) { | ||
185 | /* Disable the Nap state on that cpu */ | ||
186 | if (dev) | ||
187 | dev->states_usage[1].disable = 1; | ||
188 | } else | ||
189 | if (drv) | ||
190 | drv->states[1].target_residency = residency; | ||
191 | } | ||
192 | |||
193 | static int pseries_cpuidle_add_cpu_notifier(struct notifier_block *n, | 193 | static int pseries_cpuidle_add_cpu_notifier(struct notifier_block *n, |
194 | unsigned long action, void *hcpu) | 194 | unsigned long action, void *hcpu) |
195 | { | 195 | { |
@@ -246,10 +246,6 @@ static int pseries_cpuidle_driver_init(void) | |||
246 | drv->states[drv->state_count] = /* structure copy */ | 246 | drv->states[drv->state_count] = /* structure copy */ |
247 | cpuidle_state_table[idle_state]; | 247 | cpuidle_state_table[idle_state]; |
248 | 248 | ||
249 | if (cpuidle_state_table == dedicated_states) | ||
250 | drv->states[drv->state_count].target_residency = | ||
251 | __get_cpu_var(smt_snooze_delay); | ||
252 | |||
253 | drv->state_count += 1; | 249 | drv->state_count += 1; |
254 | } | 250 | } |
255 | 251 | ||
diff --git a/arch/s390/include/uapi/asm/Kbuild b/arch/s390/include/uapi/asm/Kbuild index 7bf68fff7c5d..59b67ed423b4 100644 --- a/arch/s390/include/uapi/asm/Kbuild +++ b/arch/s390/include/uapi/asm/Kbuild | |||
@@ -1,6 +1,8 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | generic-y += kvm_para.h | ||
5 | |||
4 | header-y += auxvec.h | 6 | header-y += auxvec.h |
5 | header-y += bitsperlong.h | 7 | header-y += bitsperlong.h |
6 | header-y += byteorder.h | 8 | header-y += byteorder.h |
diff --git a/arch/s390/include/uapi/asm/kvm_para.h b/arch/s390/include/uapi/asm/kvm_para.h deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/arch/s390/include/uapi/asm/kvm_para.h +++ /dev/null | |||
diff --git a/arch/sh/include/asm/Kbuild b/arch/sh/include/asm/Kbuild index 86eadceff097..29f83beeef7a 100644 --- a/arch/sh/include/asm/Kbuild +++ b/arch/sh/include/asm/Kbuild | |||
@@ -1,4 +1,3 @@ | |||
1 | include include/asm-generic/Kbuild.asm | ||
2 | 1 | ||
3 | generic-y += bitsperlong.h | 2 | generic-y += bitsperlong.h |
4 | generic-y += cputime.h | 3 | generic-y += cputime.h |
@@ -34,13 +33,3 @@ generic-y += termbits.h | |||
34 | generic-y += termios.h | 33 | generic-y += termios.h |
35 | generic-y += ucontext.h | 34 | generic-y += ucontext.h |
36 | generic-y += xor.h | 35 | generic-y += xor.h |
37 | |||
38 | header-y += cachectl.h | ||
39 | header-y += cpu-features.h | ||
40 | header-y += hw_breakpoint.h | ||
41 | header-y += posix_types_32.h | ||
42 | header-y += posix_types_64.h | ||
43 | header-y += ptrace_32.h | ||
44 | header-y += ptrace_64.h | ||
45 | header-y += unistd_32.h | ||
46 | header-y += unistd_64.h | ||
diff --git a/arch/sh/include/asm/hw_breakpoint.h b/arch/sh/include/asm/hw_breakpoint.h index 89890f61a7b9..ec9ad593c3da 100644 --- a/arch/sh/include/asm/hw_breakpoint.h +++ b/arch/sh/include/asm/hw_breakpoint.h | |||
@@ -1,7 +1,8 @@ | |||
1 | #ifndef __ASM_SH_HW_BREAKPOINT_H | 1 | #ifndef __ASM_SH_HW_BREAKPOINT_H |
2 | #define __ASM_SH_HW_BREAKPOINT_H | 2 | #define __ASM_SH_HW_BREAKPOINT_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #include <uapi/asm/hw_breakpoint.h> |
5 | |||
5 | #define __ARCH_HW_BREAKPOINT_H | 6 | #define __ARCH_HW_BREAKPOINT_H |
6 | 7 | ||
7 | #include <linux/kdebug.h> | 8 | #include <linux/kdebug.h> |
@@ -66,5 +67,4 @@ extern int register_sh_ubc(struct sh_ubc *); | |||
66 | 67 | ||
67 | extern struct pmu perf_ops_bp; | 68 | extern struct pmu perf_ops_bp; |
68 | 69 | ||
69 | #endif /* __KERNEL__ */ | ||
70 | #endif /* __ASM_SH_HW_BREAKPOINT_H */ | 70 | #endif /* __ASM_SH_HW_BREAKPOINT_H */ |
diff --git a/arch/sh/include/asm/posix_types.h b/arch/sh/include/asm/posix_types.h index f08449bcbde7..1aa781079b1e 100644 --- a/arch/sh/include/asm/posix_types.h +++ b/arch/sh/include/asm/posix_types.h | |||
@@ -1,13 +1,5 @@ | |||
1 | #ifdef __KERNEL__ | ||
2 | # ifdef CONFIG_SUPERH32 | 1 | # ifdef CONFIG_SUPERH32 |
3 | # include <asm/posix_types_32.h> | 2 | # include <asm/posix_types_32.h> |
4 | # else | 3 | # else |
5 | # include <asm/posix_types_64.h> | 4 | # include <asm/posix_types_64.h> |
6 | # endif | 5 | # endif |
7 | #else | ||
8 | # ifdef __SH5__ | ||
9 | # include <asm/posix_types_64.h> | ||
10 | # else | ||
11 | # include <asm/posix_types_32.h> | ||
12 | # endif | ||
13 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/sh/include/asm/ptrace.h b/arch/sh/include/asm/ptrace.h index a4a38dff997a..2506c7db76b7 100644 --- a/arch/sh/include/asm/ptrace.h +++ b/arch/sh/include/asm/ptrace.h | |||
@@ -1,42 +1,16 @@ | |||
1 | #ifndef __ASM_SH_PTRACE_H | ||
2 | #define __ASM_SH_PTRACE_H | ||
3 | |||
4 | /* | 1 | /* |
5 | * Copyright (C) 1999, 2000 Niibe Yutaka | 2 | * Copyright (C) 1999, 2000 Niibe Yutaka |
6 | */ | 3 | */ |
4 | #ifndef __ASM_SH_PTRACE_H | ||
5 | #define __ASM_SH_PTRACE_H | ||
7 | 6 | ||
8 | #define PTRACE_GETREGS 12 /* General registers */ | ||
9 | #define PTRACE_SETREGS 13 | ||
10 | |||
11 | #define PTRACE_GETFPREGS 14 /* FPU registers */ | ||
12 | #define PTRACE_SETFPREGS 15 | ||
13 | |||
14 | #define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ | ||
15 | |||
16 | #define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ | ||
17 | #define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ | ||
18 | |||
19 | #define PTRACE_GETDSPREGS 55 /* DSP registers */ | ||
20 | #define PTRACE_SETDSPREGS 56 | ||
21 | |||
22 | #define PT_TEXT_END_ADDR 240 | ||
23 | #define PT_TEXT_ADDR 244 /* &(struct user)->start_code */ | ||
24 | #define PT_DATA_ADDR 248 /* &(struct user)->start_data */ | ||
25 | #define PT_TEXT_LEN 252 | ||
26 | |||
27 | #if defined(__SH5__) || defined(CONFIG_CPU_SH5) | ||
28 | #include <asm/ptrace_64.h> | ||
29 | #else | ||
30 | #include <asm/ptrace_32.h> | ||
31 | #endif | ||
32 | |||
33 | #ifdef __KERNEL__ | ||
34 | 7 | ||
35 | #include <linux/stringify.h> | 8 | #include <linux/stringify.h> |
36 | #include <linux/stddef.h> | 9 | #include <linux/stddef.h> |
37 | #include <linux/thread_info.h> | 10 | #include <linux/thread_info.h> |
38 | #include <asm/addrspace.h> | 11 | #include <asm/addrspace.h> |
39 | #include <asm/page.h> | 12 | #include <asm/page.h> |
13 | #include <uapi/asm/ptrace.h> | ||
40 | 14 | ||
41 | #define user_mode(regs) (((regs)->sr & 0x40000000)==0) | 15 | #define user_mode(regs) (((regs)->sr & 0x40000000)==0) |
42 | #define kernel_stack_pointer(_regs) ((unsigned long)(_regs)->regs[15]) | 16 | #define kernel_stack_pointer(_regs) ((unsigned long)(_regs)->regs[15]) |
@@ -140,6 +114,4 @@ static inline unsigned long profile_pc(struct pt_regs *regs) | |||
140 | #define profile_pc profile_pc | 114 | #define profile_pc profile_pc |
141 | 115 | ||
142 | #include <asm-generic/ptrace.h> | 116 | #include <asm-generic/ptrace.h> |
143 | #endif /* __KERNEL__ */ | ||
144 | |||
145 | #endif /* __ASM_SH_PTRACE_H */ | 117 | #endif /* __ASM_SH_PTRACE_H */ |
diff --git a/arch/sh/include/asm/ptrace_32.h b/arch/sh/include/asm/ptrace_32.h index 2d3e906aa722..1dd4480c5363 100644 --- a/arch/sh/include/asm/ptrace_32.h +++ b/arch/sh/include/asm/ptrace_32.h | |||
@@ -1,79 +1,8 @@ | |||
1 | #ifndef __ASM_SH_PTRACE_32_H | 1 | #ifndef __ASM_SH_PTRACE_32_H |
2 | #define __ASM_SH_PTRACE_32_H | 2 | #define __ASM_SH_PTRACE_32_H |
3 | 3 | ||
4 | /* | 4 | #include <uapi/asm/ptrace_32.h> |
5 | * GCC defines register number like this: | ||
6 | * ----------------------------- | ||
7 | * 0 - 15 are integer registers | ||
8 | * 17 - 22 are control/special registers | ||
9 | * 24 - 39 fp registers | ||
10 | * 40 - 47 xd registers | ||
11 | * 48 - fpscr register | ||
12 | * ----------------------------- | ||
13 | * | ||
14 | * We follows above, except: | ||
15 | * 16 --- program counter (PC) | ||
16 | * 22 --- syscall # | ||
17 | * 23 --- floating point communication register | ||
18 | */ | ||
19 | #define REG_REG0 0 | ||
20 | #define REG_REG15 15 | ||
21 | 5 | ||
22 | #define REG_PC 16 | ||
23 | |||
24 | #define REG_PR 17 | ||
25 | #define REG_SR 18 | ||
26 | #define REG_GBR 19 | ||
27 | #define REG_MACH 20 | ||
28 | #define REG_MACL 21 | ||
29 | |||
30 | #define REG_SYSCALL 22 | ||
31 | |||
32 | #define REG_FPREG0 23 | ||
33 | #define REG_FPREG15 38 | ||
34 | #define REG_XFREG0 39 | ||
35 | #define REG_XFREG15 54 | ||
36 | |||
37 | #define REG_FPSCR 55 | ||
38 | #define REG_FPUL 56 | ||
39 | |||
40 | /* | ||
41 | * This struct defines the way the registers are stored on the | ||
42 | * kernel stack during a system call or other kernel entry. | ||
43 | */ | ||
44 | struct pt_regs { | ||
45 | unsigned long regs[16]; | ||
46 | unsigned long pc; | ||
47 | unsigned long pr; | ||
48 | unsigned long sr; | ||
49 | unsigned long gbr; | ||
50 | unsigned long mach; | ||
51 | unsigned long macl; | ||
52 | long tra; | ||
53 | }; | ||
54 | |||
55 | /* | ||
56 | * This struct defines the way the DSP registers are stored on the | ||
57 | * kernel stack during a system call or other kernel entry. | ||
58 | */ | ||
59 | struct pt_dspregs { | ||
60 | unsigned long a1; | ||
61 | unsigned long a0g; | ||
62 | unsigned long a1g; | ||
63 | unsigned long m0; | ||
64 | unsigned long m1; | ||
65 | unsigned long a0; | ||
66 | unsigned long x0; | ||
67 | unsigned long x1; | ||
68 | unsigned long y0; | ||
69 | unsigned long y1; | ||
70 | unsigned long dsr; | ||
71 | unsigned long rs; | ||
72 | unsigned long re; | ||
73 | unsigned long mod; | ||
74 | }; | ||
75 | |||
76 | #ifdef __KERNEL__ | ||
77 | 6 | ||
78 | #define MAX_REG_OFFSET offsetof(struct pt_regs, tra) | 7 | #define MAX_REG_OFFSET offsetof(struct pt_regs, tra) |
79 | static inline long regs_return_value(struct pt_regs *regs) | 8 | static inline long regs_return_value(struct pt_regs *regs) |
@@ -81,6 +10,4 @@ static inline long regs_return_value(struct pt_regs *regs) | |||
81 | return regs->regs[0]; | 10 | return regs->regs[0]; |
82 | } | 11 | } |
83 | 12 | ||
84 | #endif /* __KERNEL__ */ | ||
85 | |||
86 | #endif /* __ASM_SH_PTRACE_32_H */ | 13 | #endif /* __ASM_SH_PTRACE_32_H */ |
diff --git a/arch/sh/include/asm/ptrace_64.h b/arch/sh/include/asm/ptrace_64.h index eb3fcceaf64b..97f4b5660f2c 100644 --- a/arch/sh/include/asm/ptrace_64.h +++ b/arch/sh/include/asm/ptrace_64.h | |||
@@ -1,16 +1,8 @@ | |||
1 | #ifndef __ASM_SH_PTRACE_64_H | 1 | #ifndef __ASM_SH_PTRACE_64_H |
2 | #define __ASM_SH_PTRACE_64_H | 2 | #define __ASM_SH_PTRACE_64_H |
3 | 3 | ||
4 | struct pt_regs { | 4 | #include <uapi/asm/ptrace_64.h> |
5 | unsigned long long pc; | ||
6 | unsigned long long sr; | ||
7 | long long syscall_nr; | ||
8 | unsigned long long regs[63]; | ||
9 | unsigned long long tregs[8]; | ||
10 | unsigned long long pad[2]; | ||
11 | }; | ||
12 | 5 | ||
13 | #ifdef __KERNEL__ | ||
14 | 6 | ||
15 | #define MAX_REG_OFFSET offsetof(struct pt_regs, tregs[7]) | 7 | #define MAX_REG_OFFSET offsetof(struct pt_regs, tregs[7]) |
16 | static inline long regs_return_value(struct pt_regs *regs) | 8 | static inline long regs_return_value(struct pt_regs *regs) |
@@ -18,6 +10,4 @@ static inline long regs_return_value(struct pt_regs *regs) | |||
18 | return regs->regs[3]; | 10 | return regs->regs[3]; |
19 | } | 11 | } |
20 | 12 | ||
21 | #endif /* __KERNEL__ */ | ||
22 | |||
23 | #endif /* __ASM_SH_PTRACE_64_H */ | 13 | #endif /* __ASM_SH_PTRACE_64_H */ |
diff --git a/arch/sh/include/asm/setup.h b/arch/sh/include/asm/setup.h index 465a22df8fd0..99238108e7a5 100644 --- a/arch/sh/include/asm/setup.h +++ b/arch/sh/include/asm/setup.h | |||
@@ -1,9 +1,8 @@ | |||
1 | #ifndef _SH_SETUP_H | 1 | #ifndef _SH_SETUP_H |
2 | #define _SH_SETUP_H | 2 | #define _SH_SETUP_H |
3 | 3 | ||
4 | #include <asm-generic/setup.h> | 4 | #include <uapi/asm/setup.h> |
5 | 5 | ||
6 | #ifdef __KERNEL__ | ||
7 | /* | 6 | /* |
8 | * This is set up by the setup-routine at boot-time | 7 | * This is set up by the setup-routine at boot-time |
9 | */ | 8 | */ |
@@ -22,6 +21,4 @@ void sh_mv_setup(void); | |||
22 | void check_for_initrd(void); | 21 | void check_for_initrd(void); |
23 | void per_cpu_trap_init(void); | 22 | void per_cpu_trap_init(void); |
24 | 23 | ||
25 | #endif /* __KERNEL__ */ | ||
26 | |||
27 | #endif /* _SH_SETUP_H */ | 24 | #endif /* _SH_SETUP_H */ |
diff --git a/arch/sh/include/asm/types.h b/arch/sh/include/asm/types.h index f8421f7ad63a..6a31053fa5e3 100644 --- a/arch/sh/include/asm/types.h +++ b/arch/sh/include/asm/types.h | |||
@@ -1,12 +1,11 @@ | |||
1 | #ifndef __ASM_SH_TYPES_H | 1 | #ifndef __ASM_SH_TYPES_H |
2 | #define __ASM_SH_TYPES_H | 2 | #define __ASM_SH_TYPES_H |
3 | 3 | ||
4 | #include <asm-generic/types.h> | 4 | #include <uapi/asm/types.h> |
5 | 5 | ||
6 | /* | 6 | /* |
7 | * These aren't exported outside the kernel to avoid name space clashes | 7 | * These aren't exported outside the kernel to avoid name space clashes |
8 | */ | 8 | */ |
9 | #ifdef __KERNEL__ | ||
10 | #ifndef __ASSEMBLY__ | 9 | #ifndef __ASSEMBLY__ |
11 | 10 | ||
12 | #ifdef CONFIG_SUPERH32 | 11 | #ifdef CONFIG_SUPERH32 |
@@ -18,6 +17,4 @@ typedef u64 reg_size_t; | |||
18 | #endif | 17 | #endif |
19 | 18 | ||
20 | #endif /* __ASSEMBLY__ */ | 19 | #endif /* __ASSEMBLY__ */ |
21 | #endif /* __KERNEL__ */ | ||
22 | |||
23 | #endif /* __ASM_SH_TYPES_H */ | 20 | #endif /* __ASM_SH_TYPES_H */ |
diff --git a/arch/sh/include/asm/unistd.h b/arch/sh/include/asm/unistd.h index 307201a854f3..38956dfa76f7 100644 --- a/arch/sh/include/asm/unistd.h +++ b/arch/sh/include/asm/unistd.h | |||
@@ -1,4 +1,3 @@ | |||
1 | #ifdef __KERNEL__ | ||
2 | # ifdef CONFIG_SUPERH32 | 1 | # ifdef CONFIG_SUPERH32 |
3 | # include <asm/unistd_32.h> | 2 | # include <asm/unistd_32.h> |
4 | # else | 3 | # else |
@@ -38,10 +37,4 @@ | |||
38 | */ | 37 | */ |
39 | # define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | 38 | # define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") |
40 | 39 | ||
41 | #else | 40 | #include <uapi/asm/unistd.h> |
42 | # ifdef __SH5__ | ||
43 | # include <asm/unistd_64.h> | ||
44 | # else | ||
45 | # include <asm/unistd_32.h> | ||
46 | # endif | ||
47 | #endif | ||
diff --git a/arch/sh/include/uapi/asm/Kbuild b/arch/sh/include/uapi/asm/Kbuild index baebb3da1d44..60613ae78513 100644 --- a/arch/sh/include/uapi/asm/Kbuild +++ b/arch/sh/include/uapi/asm/Kbuild | |||
@@ -1,3 +1,25 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | include include/uapi/asm-generic/Kbuild.asm | 2 | include include/uapi/asm-generic/Kbuild.asm |
3 | 3 | ||
4 | header-y += auxvec.h | ||
5 | header-y += byteorder.h | ||
6 | header-y += cachectl.h | ||
7 | header-y += cpu-features.h | ||
8 | header-y += hw_breakpoint.h | ||
9 | header-y += ioctls.h | ||
10 | header-y += posix_types.h | ||
11 | header-y += posix_types_32.h | ||
12 | header-y += posix_types_64.h | ||
13 | header-y += ptrace.h | ||
14 | header-y += ptrace_32.h | ||
15 | header-y += ptrace_64.h | ||
16 | header-y += setup.h | ||
17 | header-y += sigcontext.h | ||
18 | header-y += signal.h | ||
19 | header-y += sockios.h | ||
20 | header-y += stat.h | ||
21 | header-y += swab.h | ||
22 | header-y += types.h | ||
23 | header-y += unistd.h | ||
24 | header-y += unistd_32.h | ||
25 | header-y += unistd_64.h | ||
diff --git a/arch/sh/include/asm/auxvec.h b/arch/sh/include/uapi/asm/auxvec.h index 8bcc51af9367..8bcc51af9367 100644 --- a/arch/sh/include/asm/auxvec.h +++ b/arch/sh/include/uapi/asm/auxvec.h | |||
diff --git a/arch/sh/include/asm/byteorder.h b/arch/sh/include/uapi/asm/byteorder.h index db2f5d7cb17d..db2f5d7cb17d 100644 --- a/arch/sh/include/asm/byteorder.h +++ b/arch/sh/include/uapi/asm/byteorder.h | |||
diff --git a/arch/sh/include/asm/cachectl.h b/arch/sh/include/uapi/asm/cachectl.h index 6ffb4b7a212e..6ffb4b7a212e 100644 --- a/arch/sh/include/asm/cachectl.h +++ b/arch/sh/include/uapi/asm/cachectl.h | |||
diff --git a/arch/sh/include/asm/cpu-features.h b/arch/sh/include/uapi/asm/cpu-features.h index 694abe490edb..694abe490edb 100644 --- a/arch/sh/include/asm/cpu-features.h +++ b/arch/sh/include/uapi/asm/cpu-features.h | |||
diff --git a/arch/sh/include/uapi/asm/hw_breakpoint.h b/arch/sh/include/uapi/asm/hw_breakpoint.h new file mode 100644 index 000000000000..ae5704fa77ad --- /dev/null +++ b/arch/sh/include/uapi/asm/hw_breakpoint.h | |||
@@ -0,0 +1,4 @@ | |||
1 | /* | ||
2 | * There isn't anything here anymore, but the file must not be empty or patch | ||
3 | * will delete it. | ||
4 | */ | ||
diff --git a/arch/sh/include/asm/ioctls.h b/arch/sh/include/uapi/asm/ioctls.h index a6769f352bf6..a6769f352bf6 100644 --- a/arch/sh/include/asm/ioctls.h +++ b/arch/sh/include/uapi/asm/ioctls.h | |||
diff --git a/arch/sh/include/uapi/asm/posix_types.h b/arch/sh/include/uapi/asm/posix_types.h new file mode 100644 index 000000000000..dc55e5adfe1e --- /dev/null +++ b/arch/sh/include/uapi/asm/posix_types.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __KERNEL__ | ||
2 | # ifdef __SH5__ | ||
3 | # include <asm/posix_types_64.h> | ||
4 | # else | ||
5 | # include <asm/posix_types_32.h> | ||
6 | # endif | ||
7 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/sh/include/asm/posix_types_32.h b/arch/sh/include/uapi/asm/posix_types_32.h index ba0bdc423b07..ba0bdc423b07 100644 --- a/arch/sh/include/asm/posix_types_32.h +++ b/arch/sh/include/uapi/asm/posix_types_32.h | |||
diff --git a/arch/sh/include/asm/posix_types_64.h b/arch/sh/include/uapi/asm/posix_types_64.h index 244f7e950e17..244f7e950e17 100644 --- a/arch/sh/include/asm/posix_types_64.h +++ b/arch/sh/include/uapi/asm/posix_types_64.h | |||
diff --git a/arch/sh/include/uapi/asm/ptrace.h b/arch/sh/include/uapi/asm/ptrace.h new file mode 100644 index 000000000000..8b8c5aca9c28 --- /dev/null +++ b/arch/sh/include/uapi/asm/ptrace.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | * Copyright (C) 1999, 2000 Niibe Yutaka | ||
3 | */ | ||
4 | #ifndef _UAPI__ASM_SH_PTRACE_H | ||
5 | #define _UAPI__ASM_SH_PTRACE_H | ||
6 | |||
7 | |||
8 | #define PTRACE_GETREGS 12 /* General registers */ | ||
9 | #define PTRACE_SETREGS 13 | ||
10 | |||
11 | #define PTRACE_GETFPREGS 14 /* FPU registers */ | ||
12 | #define PTRACE_SETFPREGS 15 | ||
13 | |||
14 | #define PTRACE_GETFDPIC 31 /* get the ELF fdpic loadmap address */ | ||
15 | |||
16 | #define PTRACE_GETFDPIC_EXEC 0 /* [addr] request the executable loadmap */ | ||
17 | #define PTRACE_GETFDPIC_INTERP 1 /* [addr] request the interpreter loadmap */ | ||
18 | |||
19 | #define PTRACE_GETDSPREGS 55 /* DSP registers */ | ||
20 | #define PTRACE_SETDSPREGS 56 | ||
21 | |||
22 | #define PT_TEXT_END_ADDR 240 | ||
23 | #define PT_TEXT_ADDR 244 /* &(struct user)->start_code */ | ||
24 | #define PT_DATA_ADDR 248 /* &(struct user)->start_data */ | ||
25 | #define PT_TEXT_LEN 252 | ||
26 | |||
27 | #if defined(__SH5__) || defined(CONFIG_CPU_SH5) | ||
28 | #include <asm/ptrace_64.h> | ||
29 | #else | ||
30 | #include <asm/ptrace_32.h> | ||
31 | #endif | ||
32 | |||
33 | |||
34 | #endif /* _UAPI__ASM_SH_PTRACE_H */ | ||
diff --git a/arch/sh/include/uapi/asm/ptrace_32.h b/arch/sh/include/uapi/asm/ptrace_32.h new file mode 100644 index 000000000000..926e0cefc2bb --- /dev/null +++ b/arch/sh/include/uapi/asm/ptrace_32.h | |||
@@ -0,0 +1,77 @@ | |||
1 | #ifndef _UAPI__ASM_SH_PTRACE_32_H | ||
2 | #define _UAPI__ASM_SH_PTRACE_32_H | ||
3 | |||
4 | /* | ||
5 | * GCC defines register number like this: | ||
6 | * ----------------------------- | ||
7 | * 0 - 15 are integer registers | ||
8 | * 17 - 22 are control/special registers | ||
9 | * 24 - 39 fp registers | ||
10 | * 40 - 47 xd registers | ||
11 | * 48 - fpscr register | ||
12 | * ----------------------------- | ||
13 | * | ||
14 | * We follows above, except: | ||
15 | * 16 --- program counter (PC) | ||
16 | * 22 --- syscall # | ||
17 | * 23 --- floating point communication register | ||
18 | */ | ||
19 | #define REG_REG0 0 | ||
20 | #define REG_REG15 15 | ||
21 | |||
22 | #define REG_PC 16 | ||
23 | |||
24 | #define REG_PR 17 | ||
25 | #define REG_SR 18 | ||
26 | #define REG_GBR 19 | ||
27 | #define REG_MACH 20 | ||
28 | #define REG_MACL 21 | ||
29 | |||
30 | #define REG_SYSCALL 22 | ||
31 | |||
32 | #define REG_FPREG0 23 | ||
33 | #define REG_FPREG15 38 | ||
34 | #define REG_XFREG0 39 | ||
35 | #define REG_XFREG15 54 | ||
36 | |||
37 | #define REG_FPSCR 55 | ||
38 | #define REG_FPUL 56 | ||
39 | |||
40 | /* | ||
41 | * This struct defines the way the registers are stored on the | ||
42 | * kernel stack during a system call or other kernel entry. | ||
43 | */ | ||
44 | struct pt_regs { | ||
45 | unsigned long regs[16]; | ||
46 | unsigned long pc; | ||
47 | unsigned long pr; | ||
48 | unsigned long sr; | ||
49 | unsigned long gbr; | ||
50 | unsigned long mach; | ||
51 | unsigned long macl; | ||
52 | long tra; | ||
53 | }; | ||
54 | |||
55 | /* | ||
56 | * This struct defines the way the DSP registers are stored on the | ||
57 | * kernel stack during a system call or other kernel entry. | ||
58 | */ | ||
59 | struct pt_dspregs { | ||
60 | unsigned long a1; | ||
61 | unsigned long a0g; | ||
62 | unsigned long a1g; | ||
63 | unsigned long m0; | ||
64 | unsigned long m1; | ||
65 | unsigned long a0; | ||
66 | unsigned long x0; | ||
67 | unsigned long x1; | ||
68 | unsigned long y0; | ||
69 | unsigned long y1; | ||
70 | unsigned long dsr; | ||
71 | unsigned long rs; | ||
72 | unsigned long re; | ||
73 | unsigned long mod; | ||
74 | }; | ||
75 | |||
76 | |||
77 | #endif /* _UAPI__ASM_SH_PTRACE_32_H */ | ||
diff --git a/arch/sh/include/uapi/asm/ptrace_64.h b/arch/sh/include/uapi/asm/ptrace_64.h new file mode 100644 index 000000000000..0e52ee83e946 --- /dev/null +++ b/arch/sh/include/uapi/asm/ptrace_64.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef _UAPI__ASM_SH_PTRACE_64_H | ||
2 | #define _UAPI__ASM_SH_PTRACE_64_H | ||
3 | |||
4 | struct pt_regs { | ||
5 | unsigned long long pc; | ||
6 | unsigned long long sr; | ||
7 | long long syscall_nr; | ||
8 | unsigned long long regs[63]; | ||
9 | unsigned long long tregs[8]; | ||
10 | unsigned long long pad[2]; | ||
11 | }; | ||
12 | |||
13 | |||
14 | #endif /* _UAPI__ASM_SH_PTRACE_64_H */ | ||
diff --git a/arch/sh/include/uapi/asm/setup.h b/arch/sh/include/uapi/asm/setup.h new file mode 100644 index 000000000000..552df83f1a49 --- /dev/null +++ b/arch/sh/include/uapi/asm/setup.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/setup.h> | |||
diff --git a/arch/sh/include/asm/sigcontext.h b/arch/sh/include/uapi/asm/sigcontext.h index 8ce1435bc0bf..8ce1435bc0bf 100644 --- a/arch/sh/include/asm/sigcontext.h +++ b/arch/sh/include/uapi/asm/sigcontext.h | |||
diff --git a/arch/sh/include/asm/signal.h b/arch/sh/include/uapi/asm/signal.h index 9ac530a90bce..9ac530a90bce 100644 --- a/arch/sh/include/asm/signal.h +++ b/arch/sh/include/uapi/asm/signal.h | |||
diff --git a/arch/sh/include/asm/sockios.h b/arch/sh/include/uapi/asm/sockios.h index cf8b96b1f9ab..cf8b96b1f9ab 100644 --- a/arch/sh/include/asm/sockios.h +++ b/arch/sh/include/uapi/asm/sockios.h | |||
diff --git a/arch/sh/include/asm/stat.h b/arch/sh/include/uapi/asm/stat.h index e1810cc6e3da..e1810cc6e3da 100644 --- a/arch/sh/include/asm/stat.h +++ b/arch/sh/include/uapi/asm/stat.h | |||
diff --git a/arch/sh/include/asm/swab.h b/arch/sh/include/uapi/asm/swab.h index 1cd09767a7a3..1cd09767a7a3 100644 --- a/arch/sh/include/asm/swab.h +++ b/arch/sh/include/uapi/asm/swab.h | |||
diff --git a/arch/sh/include/uapi/asm/types.h b/arch/sh/include/uapi/asm/types.h new file mode 100644 index 000000000000..b9e79bc580dd --- /dev/null +++ b/arch/sh/include/uapi/asm/types.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/types.h> | |||
diff --git a/arch/sh/include/uapi/asm/unistd.h b/arch/sh/include/uapi/asm/unistd.h new file mode 100644 index 000000000000..eeef88dd53ce --- /dev/null +++ b/arch/sh/include/uapi/asm/unistd.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef __KERNEL__ | ||
2 | # ifdef __SH5__ | ||
3 | # include <asm/unistd_64.h> | ||
4 | # else | ||
5 | # include <asm/unistd_32.h> | ||
6 | # endif | ||
7 | #endif | ||
diff --git a/arch/sh/include/asm/unistd_32.h b/arch/sh/include/uapi/asm/unistd_32.h index 72fd1e061006..9e465f246dc1 100644 --- a/arch/sh/include/asm/unistd_32.h +++ b/arch/sh/include/uapi/asm/unistd_32.h | |||
@@ -378,7 +378,8 @@ | |||
378 | #define __NR_setns 364 | 378 | #define __NR_setns 364 |
379 | #define __NR_process_vm_readv 365 | 379 | #define __NR_process_vm_readv 365 |
380 | #define __NR_process_vm_writev 366 | 380 | #define __NR_process_vm_writev 366 |
381 | #define __NR_kcmp 367 | ||
381 | 382 | ||
382 | #define NR_syscalls 367 | 383 | #define NR_syscalls 368 |
383 | 384 | ||
384 | #endif /* __ASM_SH_UNISTD_32_H */ | 385 | #endif /* __ASM_SH_UNISTD_32_H */ |
diff --git a/arch/sh/include/asm/unistd_64.h b/arch/sh/include/uapi/asm/unistd_64.h index a28edc329692..8e3a2edd284e 100644 --- a/arch/sh/include/asm/unistd_64.h +++ b/arch/sh/include/uapi/asm/unistd_64.h | |||
@@ -398,7 +398,8 @@ | |||
398 | #define __NR_setns 375 | 398 | #define __NR_setns 375 |
399 | #define __NR_process_vm_readv 376 | 399 | #define __NR_process_vm_readv 376 |
400 | #define __NR_process_vm_writev 377 | 400 | #define __NR_process_vm_writev 377 |
401 | #define __NR_kcmp 378 | ||
401 | 402 | ||
402 | #define NR_syscalls 378 | 403 | #define NR_syscalls 379 |
403 | 404 | ||
404 | #endif /* __ASM_SH_UNISTD_64_H */ | 405 | #endif /* __ASM_SH_UNISTD_64_H */ |
diff --git a/arch/sh/kernel/syscalls_32.S b/arch/sh/kernel/syscalls_32.S index 4b68f0f79761..fe97ae5e56f1 100644 --- a/arch/sh/kernel/syscalls_32.S +++ b/arch/sh/kernel/syscalls_32.S | |||
@@ -384,3 +384,4 @@ ENTRY(sys_call_table) | |||
384 | .long sys_setns | 384 | .long sys_setns |
385 | .long sys_process_vm_readv /* 365 */ | 385 | .long sys_process_vm_readv /* 365 */ |
386 | .long sys_process_vm_writev | 386 | .long sys_process_vm_writev |
387 | .long sys_kcmp | ||
diff --git a/arch/sh/kernel/syscalls_64.S b/arch/sh/kernel/syscalls_64.S index 0956345b36ef..5c7b1c67bdc1 100644 --- a/arch/sh/kernel/syscalls_64.S +++ b/arch/sh/kernel/syscalls_64.S | |||
@@ -404,3 +404,4 @@ sys_call_table: | |||
404 | .long sys_setns /* 375 */ | 404 | .long sys_setns /* 375 */ |
405 | .long sys_process_vm_readv | 405 | .long sys_process_vm_readv |
406 | .long sys_process_vm_writev | 406 | .long sys_process_vm_writev |
407 | .long sys_kcmp | ||
diff --git a/arch/sparc/include/asm/ptrace.h b/arch/sparc/include/asm/ptrace.h index 0c6f6b068289..da43bdc62294 100644 --- a/arch/sparc/include/asm/ptrace.h +++ b/arch/sparc/include/asm/ptrace.h | |||
@@ -42,7 +42,18 @@ struct global_reg_snapshot { | |||
42 | struct thread_info *thread; | 42 | struct thread_info *thread; |
43 | unsigned long pad1; | 43 | unsigned long pad1; |
44 | }; | 44 | }; |
45 | extern struct global_reg_snapshot global_reg_snapshot[NR_CPUS]; | 45 | |
46 | struct global_pmu_snapshot { | ||
47 | unsigned long pcr[4]; | ||
48 | unsigned long pic[4]; | ||
49 | }; | ||
50 | |||
51 | union global_cpu_snapshot { | ||
52 | struct global_reg_snapshot reg; | ||
53 | struct global_pmu_snapshot pmu; | ||
54 | }; | ||
55 | |||
56 | extern union global_cpu_snapshot global_cpu_snapshot[NR_CPUS]; | ||
46 | 57 | ||
47 | #define force_successful_syscall_return() \ | 58 | #define force_successful_syscall_return() \ |
48 | do { current_thread_info()->syscall_noerror = 1; \ | 59 | do { current_thread_info()->syscall_noerror = 1; \ |
diff --git a/arch/sparc/include/asm/smp_64.h b/arch/sparc/include/asm/smp_64.h index 29862a9e9065..dd3bef4b9896 100644 --- a/arch/sparc/include/asm/smp_64.h +++ b/arch/sparc/include/asm/smp_64.h | |||
@@ -48,6 +48,7 @@ extern void smp_fill_in_sib_core_maps(void); | |||
48 | extern void cpu_play_dead(void); | 48 | extern void cpu_play_dead(void); |
49 | 49 | ||
50 | extern void smp_fetch_global_regs(void); | 50 | extern void smp_fetch_global_regs(void); |
51 | extern void smp_fetch_global_pmu(void); | ||
51 | 52 | ||
52 | struct seq_file; | 53 | struct seq_file; |
53 | void smp_bogo(struct seq_file *); | 54 | void smp_bogo(struct seq_file *); |
@@ -65,6 +66,7 @@ extern void __cpu_die(unsigned int cpu); | |||
65 | #define hard_smp_processor_id() 0 | 66 | #define hard_smp_processor_id() 0 |
66 | #define smp_fill_in_sib_core_maps() do { } while (0) | 67 | #define smp_fill_in_sib_core_maps() do { } while (0) |
67 | #define smp_fetch_global_regs() do { } while (0) | 68 | #define smp_fetch_global_regs() do { } while (0) |
69 | #define smp_fetch_global_pmu() do { } while (0) | ||
68 | 70 | ||
69 | #endif /* !(CONFIG_SMP) */ | 71 | #endif /* !(CONFIG_SMP) */ |
70 | 72 | ||
diff --git a/arch/sparc/include/uapi/asm/sigcontext.h b/arch/sparc/include/uapi/asm/sigcontext.h index e69de29bb2d1..ae5704fa77ad 100644 --- a/arch/sparc/include/uapi/asm/sigcontext.h +++ b/arch/sparc/include/uapi/asm/sigcontext.h | |||
@@ -0,0 +1,4 @@ | |||
1 | /* | ||
2 | * There isn't anything here anymore, but the file must not be empty or patch | ||
3 | * will delete it. | ||
4 | */ | ||
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index e48651dace1b..885a8af74064 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
@@ -817,15 +817,17 @@ static u64 nop_for_index(int idx) | |||
817 | 817 | ||
818 | static inline void sparc_pmu_enable_event(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc, int idx) | 818 | static inline void sparc_pmu_enable_event(struct cpu_hw_events *cpuc, struct hw_perf_event *hwc, int idx) |
819 | { | 819 | { |
820 | u64 val, mask = mask_for_index(idx); | 820 | u64 enc, val, mask = mask_for_index(idx); |
821 | int pcr_index = 0; | 821 | int pcr_index = 0; |
822 | 822 | ||
823 | if (sparc_pmu->num_pcrs > 1) | 823 | if (sparc_pmu->num_pcrs > 1) |
824 | pcr_index = idx; | 824 | pcr_index = idx; |
825 | 825 | ||
826 | enc = perf_event_get_enc(cpuc->events[idx]); | ||
827 | |||
826 | val = cpuc->pcr[pcr_index]; | 828 | val = cpuc->pcr[pcr_index]; |
827 | val &= ~mask; | 829 | val &= ~mask; |
828 | val |= hwc->config; | 830 | val |= event_encoding(enc, idx); |
829 | cpuc->pcr[pcr_index] = val; | 831 | cpuc->pcr[pcr_index] = val; |
830 | 832 | ||
831 | pcr_ops->write_pcr(pcr_index, cpuc->pcr[pcr_index]); | 833 | pcr_ops->write_pcr(pcr_index, cpuc->pcr[pcr_index]); |
@@ -1738,8 +1740,6 @@ static void perf_callchain_user_64(struct perf_callchain_entry *entry, | |||
1738 | { | 1740 | { |
1739 | unsigned long ufp; | 1741 | unsigned long ufp; |
1740 | 1742 | ||
1741 | perf_callchain_store(entry, regs->tpc); | ||
1742 | |||
1743 | ufp = regs->u_regs[UREG_I6] + STACK_BIAS; | 1743 | ufp = regs->u_regs[UREG_I6] + STACK_BIAS; |
1744 | do { | 1744 | do { |
1745 | struct sparc_stackf *usf, sf; | 1745 | struct sparc_stackf *usf, sf; |
@@ -1760,8 +1760,6 @@ static void perf_callchain_user_32(struct perf_callchain_entry *entry, | |||
1760 | { | 1760 | { |
1761 | unsigned long ufp; | 1761 | unsigned long ufp; |
1762 | 1762 | ||
1763 | perf_callchain_store(entry, regs->tpc); | ||
1764 | |||
1765 | ufp = regs->u_regs[UREG_I6] & 0xffffffffUL; | 1763 | ufp = regs->u_regs[UREG_I6] & 0xffffffffUL; |
1766 | do { | 1764 | do { |
1767 | struct sparc_stackf32 *usf, sf; | 1765 | struct sparc_stackf32 *usf, sf; |
@@ -1780,6 +1778,11 @@ static void perf_callchain_user_32(struct perf_callchain_entry *entry, | |||
1780 | void | 1778 | void |
1781 | perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs) | 1779 | perf_callchain_user(struct perf_callchain_entry *entry, struct pt_regs *regs) |
1782 | { | 1780 | { |
1781 | perf_callchain_store(entry, regs->tpc); | ||
1782 | |||
1783 | if (!current->mm) | ||
1784 | return; | ||
1785 | |||
1783 | flushw_user(); | 1786 | flushw_user(); |
1784 | if (test_thread_flag(TIF_32BIT)) | 1787 | if (test_thread_flag(TIF_32BIT)) |
1785 | perf_callchain_user_32(entry, regs); | 1788 | perf_callchain_user_32(entry, regs); |
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c index fcaa59421126..d778248ef3f8 100644 --- a/arch/sparc/kernel/process_64.c +++ b/arch/sparc/kernel/process_64.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/tick.h> | 27 | #include <linux/tick.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/cpu.h> | 29 | #include <linux/cpu.h> |
30 | #include <linux/perf_event.h> | ||
30 | #include <linux/elfcore.h> | 31 | #include <linux/elfcore.h> |
31 | #include <linux/sysrq.h> | 32 | #include <linux/sysrq.h> |
32 | #include <linux/nmi.h> | 33 | #include <linux/nmi.h> |
@@ -47,6 +48,7 @@ | |||
47 | #include <asm/syscalls.h> | 48 | #include <asm/syscalls.h> |
48 | #include <asm/irq_regs.h> | 49 | #include <asm/irq_regs.h> |
49 | #include <asm/smp.h> | 50 | #include <asm/smp.h> |
51 | #include <asm/pcr.h> | ||
50 | 52 | ||
51 | #include "kstack.h" | 53 | #include "kstack.h" |
52 | 54 | ||
@@ -204,18 +206,22 @@ void show_regs(struct pt_regs *regs) | |||
204 | show_stack(current, (unsigned long *) regs->u_regs[UREG_FP]); | 206 | show_stack(current, (unsigned long *) regs->u_regs[UREG_FP]); |
205 | } | 207 | } |
206 | 208 | ||
207 | struct global_reg_snapshot global_reg_snapshot[NR_CPUS]; | 209 | union global_cpu_snapshot global_cpu_snapshot[NR_CPUS]; |
208 | static DEFINE_SPINLOCK(global_reg_snapshot_lock); | 210 | static DEFINE_SPINLOCK(global_cpu_snapshot_lock); |
209 | 211 | ||
210 | static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, | 212 | static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, |
211 | int this_cpu) | 213 | int this_cpu) |
212 | { | 214 | { |
215 | struct global_reg_snapshot *rp; | ||
216 | |||
213 | flushw_all(); | 217 | flushw_all(); |
214 | 218 | ||
215 | global_reg_snapshot[this_cpu].tstate = regs->tstate; | 219 | rp = &global_cpu_snapshot[this_cpu].reg; |
216 | global_reg_snapshot[this_cpu].tpc = regs->tpc; | 220 | |
217 | global_reg_snapshot[this_cpu].tnpc = regs->tnpc; | 221 | rp->tstate = regs->tstate; |
218 | global_reg_snapshot[this_cpu].o7 = regs->u_regs[UREG_I7]; | 222 | rp->tpc = regs->tpc; |
223 | rp->tnpc = regs->tnpc; | ||
224 | rp->o7 = regs->u_regs[UREG_I7]; | ||
219 | 225 | ||
220 | if (regs->tstate & TSTATE_PRIV) { | 226 | if (regs->tstate & TSTATE_PRIV) { |
221 | struct reg_window *rw; | 227 | struct reg_window *rw; |
@@ -223,17 +229,17 @@ static void __global_reg_self(struct thread_info *tp, struct pt_regs *regs, | |||
223 | rw = (struct reg_window *) | 229 | rw = (struct reg_window *) |
224 | (regs->u_regs[UREG_FP] + STACK_BIAS); | 230 | (regs->u_regs[UREG_FP] + STACK_BIAS); |
225 | if (kstack_valid(tp, (unsigned long) rw)) { | 231 | if (kstack_valid(tp, (unsigned long) rw)) { |
226 | global_reg_snapshot[this_cpu].i7 = rw->ins[7]; | 232 | rp->i7 = rw->ins[7]; |
227 | rw = (struct reg_window *) | 233 | rw = (struct reg_window *) |
228 | (rw->ins[6] + STACK_BIAS); | 234 | (rw->ins[6] + STACK_BIAS); |
229 | if (kstack_valid(tp, (unsigned long) rw)) | 235 | if (kstack_valid(tp, (unsigned long) rw)) |
230 | global_reg_snapshot[this_cpu].rpc = rw->ins[7]; | 236 | rp->rpc = rw->ins[7]; |
231 | } | 237 | } |
232 | } else { | 238 | } else { |
233 | global_reg_snapshot[this_cpu].i7 = 0; | 239 | rp->i7 = 0; |
234 | global_reg_snapshot[this_cpu].rpc = 0; | 240 | rp->rpc = 0; |
235 | } | 241 | } |
236 | global_reg_snapshot[this_cpu].thread = tp; | 242 | rp->thread = tp; |
237 | } | 243 | } |
238 | 244 | ||
239 | /* In order to avoid hangs we do not try to synchronize with the | 245 | /* In order to avoid hangs we do not try to synchronize with the |
@@ -261,9 +267,9 @@ void arch_trigger_all_cpu_backtrace(void) | |||
261 | if (!regs) | 267 | if (!regs) |
262 | regs = tp->kregs; | 268 | regs = tp->kregs; |
263 | 269 | ||
264 | spin_lock_irqsave(&global_reg_snapshot_lock, flags); | 270 | spin_lock_irqsave(&global_cpu_snapshot_lock, flags); |
265 | 271 | ||
266 | memset(global_reg_snapshot, 0, sizeof(global_reg_snapshot)); | 272 | memset(global_cpu_snapshot, 0, sizeof(global_cpu_snapshot)); |
267 | 273 | ||
268 | this_cpu = raw_smp_processor_id(); | 274 | this_cpu = raw_smp_processor_id(); |
269 | 275 | ||
@@ -272,7 +278,7 @@ void arch_trigger_all_cpu_backtrace(void) | |||
272 | smp_fetch_global_regs(); | 278 | smp_fetch_global_regs(); |
273 | 279 | ||
274 | for_each_online_cpu(cpu) { | 280 | for_each_online_cpu(cpu) { |
275 | struct global_reg_snapshot *gp = &global_reg_snapshot[cpu]; | 281 | struct global_reg_snapshot *gp = &global_cpu_snapshot[cpu].reg; |
276 | 282 | ||
277 | __global_reg_poll(gp); | 283 | __global_reg_poll(gp); |
278 | 284 | ||
@@ -295,9 +301,9 @@ void arch_trigger_all_cpu_backtrace(void) | |||
295 | } | 301 | } |
296 | } | 302 | } |
297 | 303 | ||
298 | memset(global_reg_snapshot, 0, sizeof(global_reg_snapshot)); | 304 | memset(global_cpu_snapshot, 0, sizeof(global_cpu_snapshot)); |
299 | 305 | ||
300 | spin_unlock_irqrestore(&global_reg_snapshot_lock, flags); | 306 | spin_unlock_irqrestore(&global_cpu_snapshot_lock, flags); |
301 | } | 307 | } |
302 | 308 | ||
303 | #ifdef CONFIG_MAGIC_SYSRQ | 309 | #ifdef CONFIG_MAGIC_SYSRQ |
@@ -309,16 +315,90 @@ static void sysrq_handle_globreg(int key) | |||
309 | 315 | ||
310 | static struct sysrq_key_op sparc_globalreg_op = { | 316 | static struct sysrq_key_op sparc_globalreg_op = { |
311 | .handler = sysrq_handle_globreg, | 317 | .handler = sysrq_handle_globreg, |
312 | .help_msg = "Globalregs", | 318 | .help_msg = "global-regs(Y)", |
313 | .action_msg = "Show Global CPU Regs", | 319 | .action_msg = "Show Global CPU Regs", |
314 | }; | 320 | }; |
315 | 321 | ||
316 | static int __init sparc_globreg_init(void) | 322 | static void __global_pmu_self(int this_cpu) |
323 | { | ||
324 | struct global_pmu_snapshot *pp; | ||
325 | int i, num; | ||
326 | |||
327 | pp = &global_cpu_snapshot[this_cpu].pmu; | ||
328 | |||
329 | num = 1; | ||
330 | if (tlb_type == hypervisor && | ||
331 | sun4v_chip_type >= SUN4V_CHIP_NIAGARA4) | ||
332 | num = 4; | ||
333 | |||
334 | for (i = 0; i < num; i++) { | ||
335 | pp->pcr[i] = pcr_ops->read_pcr(i); | ||
336 | pp->pic[i] = pcr_ops->read_pic(i); | ||
337 | } | ||
338 | } | ||
339 | |||
340 | static void __global_pmu_poll(struct global_pmu_snapshot *pp) | ||
341 | { | ||
342 | int limit = 0; | ||
343 | |||
344 | while (!pp->pcr[0] && ++limit < 100) { | ||
345 | barrier(); | ||
346 | udelay(1); | ||
347 | } | ||
348 | } | ||
349 | |||
350 | static void pmu_snapshot_all_cpus(void) | ||
317 | { | 351 | { |
318 | return register_sysrq_key('y', &sparc_globalreg_op); | 352 | unsigned long flags; |
353 | int this_cpu, cpu; | ||
354 | |||
355 | spin_lock_irqsave(&global_cpu_snapshot_lock, flags); | ||
356 | |||
357 | memset(global_cpu_snapshot, 0, sizeof(global_cpu_snapshot)); | ||
358 | |||
359 | this_cpu = raw_smp_processor_id(); | ||
360 | |||
361 | __global_pmu_self(this_cpu); | ||
362 | |||
363 | smp_fetch_global_pmu(); | ||
364 | |||
365 | for_each_online_cpu(cpu) { | ||
366 | struct global_pmu_snapshot *pp = &global_cpu_snapshot[cpu].pmu; | ||
367 | |||
368 | __global_pmu_poll(pp); | ||
369 | |||
370 | printk("%c CPU[%3d]: PCR[%08lx:%08lx:%08lx:%08lx] PIC[%08lx:%08lx:%08lx:%08lx]\n", | ||
371 | (cpu == this_cpu ? '*' : ' '), cpu, | ||
372 | pp->pcr[0], pp->pcr[1], pp->pcr[2], pp->pcr[3], | ||
373 | pp->pic[0], pp->pic[1], pp->pic[2], pp->pic[3]); | ||
374 | } | ||
375 | |||
376 | memset(global_cpu_snapshot, 0, sizeof(global_cpu_snapshot)); | ||
377 | |||
378 | spin_unlock_irqrestore(&global_cpu_snapshot_lock, flags); | ||
379 | } | ||
380 | |||
381 | static void sysrq_handle_globpmu(int key) | ||
382 | { | ||
383 | pmu_snapshot_all_cpus(); | ||
384 | } | ||
385 | |||
386 | static struct sysrq_key_op sparc_globalpmu_op = { | ||
387 | .handler = sysrq_handle_globpmu, | ||
388 | .help_msg = "global-pmu(X)", | ||
389 | .action_msg = "Show Global PMU Regs", | ||
390 | }; | ||
391 | |||
392 | static int __init sparc_sysrq_init(void) | ||
393 | { | ||
394 | int ret = register_sysrq_key('y', &sparc_globalreg_op); | ||
395 | |||
396 | if (!ret) | ||
397 | ret = register_sysrq_key('x', &sparc_globalpmu_op); | ||
398 | return ret; | ||
319 | } | 399 | } |
320 | 400 | ||
321 | core_initcall(sparc_globreg_init); | 401 | core_initcall(sparc_sysrq_init); |
322 | 402 | ||
323 | #endif | 403 | #endif |
324 | 404 | ||
diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index 781bcb10b8bd..d94b878577b7 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c | |||
@@ -852,6 +852,8 @@ extern unsigned long xcall_flush_tlb_mm; | |||
852 | extern unsigned long xcall_flush_tlb_pending; | 852 | extern unsigned long xcall_flush_tlb_pending; |
853 | extern unsigned long xcall_flush_tlb_kernel_range; | 853 | extern unsigned long xcall_flush_tlb_kernel_range; |
854 | extern unsigned long xcall_fetch_glob_regs; | 854 | extern unsigned long xcall_fetch_glob_regs; |
855 | extern unsigned long xcall_fetch_glob_pmu; | ||
856 | extern unsigned long xcall_fetch_glob_pmu_n4; | ||
855 | extern unsigned long xcall_receive_signal; | 857 | extern unsigned long xcall_receive_signal; |
856 | extern unsigned long xcall_new_mmu_context_version; | 858 | extern unsigned long xcall_new_mmu_context_version; |
857 | #ifdef CONFIG_KGDB | 859 | #ifdef CONFIG_KGDB |
@@ -1000,6 +1002,15 @@ void smp_fetch_global_regs(void) | |||
1000 | smp_cross_call(&xcall_fetch_glob_regs, 0, 0, 0); | 1002 | smp_cross_call(&xcall_fetch_glob_regs, 0, 0, 0); |
1001 | } | 1003 | } |
1002 | 1004 | ||
1005 | void smp_fetch_global_pmu(void) | ||
1006 | { | ||
1007 | if (tlb_type == hypervisor && | ||
1008 | sun4v_chip_type >= SUN4V_CHIP_NIAGARA4) | ||
1009 | smp_cross_call(&xcall_fetch_glob_pmu_n4, 0, 0, 0); | ||
1010 | else | ||
1011 | smp_cross_call(&xcall_fetch_glob_pmu, 0, 0, 0); | ||
1012 | } | ||
1013 | |||
1003 | /* We know that the window frames of the user have been flushed | 1014 | /* We know that the window frames of the user have been flushed |
1004 | * to the stack before we get here because all callers of us | 1015 | * to the stack before we get here because all callers of us |
1005 | * are flush_tlb_*() routines, and these run after flush_cache_*() | 1016 | * are flush_tlb_*() routines, and these run after flush_cache_*() |
diff --git a/arch/sparc/mm/ultra.S b/arch/sparc/mm/ultra.S index 874162a11ceb..f8e13d421fcb 100644 --- a/arch/sparc/mm/ultra.S +++ b/arch/sparc/mm/ultra.S | |||
@@ -481,8 +481,8 @@ xcall_sync_tick: | |||
481 | 481 | ||
482 | .globl xcall_fetch_glob_regs | 482 | .globl xcall_fetch_glob_regs |
483 | xcall_fetch_glob_regs: | 483 | xcall_fetch_glob_regs: |
484 | sethi %hi(global_reg_snapshot), %g1 | 484 | sethi %hi(global_cpu_snapshot), %g1 |
485 | or %g1, %lo(global_reg_snapshot), %g1 | 485 | or %g1, %lo(global_cpu_snapshot), %g1 |
486 | __GET_CPUID(%g2) | 486 | __GET_CPUID(%g2) |
487 | sllx %g2, 6, %g3 | 487 | sllx %g2, 6, %g3 |
488 | add %g1, %g3, %g1 | 488 | add %g1, %g3, %g1 |
@@ -509,6 +509,66 @@ xcall_fetch_glob_regs: | |||
509 | stx %g3, [%g1 + GR_SNAP_THREAD] | 509 | stx %g3, [%g1 + GR_SNAP_THREAD] |
510 | retry | 510 | retry |
511 | 511 | ||
512 | .globl xcall_fetch_glob_pmu | ||
513 | xcall_fetch_glob_pmu: | ||
514 | sethi %hi(global_cpu_snapshot), %g1 | ||
515 | or %g1, %lo(global_cpu_snapshot), %g1 | ||
516 | __GET_CPUID(%g2) | ||
517 | sllx %g2, 6, %g3 | ||
518 | add %g1, %g3, %g1 | ||
519 | rd %pic, %g7 | ||
520 | stx %g7, [%g1 + (4 * 8)] | ||
521 | rd %pcr, %g7 | ||
522 | stx %g7, [%g1 + (0 * 8)] | ||
523 | retry | ||
524 | |||
525 | .globl xcall_fetch_glob_pmu_n4 | ||
526 | xcall_fetch_glob_pmu_n4: | ||
527 | sethi %hi(global_cpu_snapshot), %g1 | ||
528 | or %g1, %lo(global_cpu_snapshot), %g1 | ||
529 | __GET_CPUID(%g2) | ||
530 | sllx %g2, 6, %g3 | ||
531 | add %g1, %g3, %g1 | ||
532 | |||
533 | ldxa [%g0] ASI_PIC, %g7 | ||
534 | stx %g7, [%g1 + (4 * 8)] | ||
535 | mov 0x08, %g3 | ||
536 | ldxa [%g3] ASI_PIC, %g7 | ||
537 | stx %g7, [%g1 + (5 * 8)] | ||
538 | mov 0x10, %g3 | ||
539 | ldxa [%g3] ASI_PIC, %g7 | ||
540 | stx %g7, [%g1 + (6 * 8)] | ||
541 | mov 0x18, %g3 | ||
542 | ldxa [%g3] ASI_PIC, %g7 | ||
543 | stx %g7, [%g1 + (7 * 8)] | ||
544 | |||
545 | mov %o0, %g2 | ||
546 | mov %o1, %g3 | ||
547 | mov %o5, %g7 | ||
548 | |||
549 | mov HV_FAST_VT_GET_PERFREG, %o5 | ||
550 | mov 3, %o0 | ||
551 | ta HV_FAST_TRAP | ||
552 | stx %o1, [%g1 + (3 * 8)] | ||
553 | mov HV_FAST_VT_GET_PERFREG, %o5 | ||
554 | mov 2, %o0 | ||
555 | ta HV_FAST_TRAP | ||
556 | stx %o1, [%g1 + (2 * 8)] | ||
557 | mov HV_FAST_VT_GET_PERFREG, %o5 | ||
558 | mov 1, %o0 | ||
559 | ta HV_FAST_TRAP | ||
560 | stx %o1, [%g1 + (1 * 8)] | ||
561 | mov HV_FAST_VT_GET_PERFREG, %o5 | ||
562 | mov 0, %o0 | ||
563 | ta HV_FAST_TRAP | ||
564 | stx %o1, [%g1 + (0 * 8)] | ||
565 | |||
566 | mov %g2, %o0 | ||
567 | mov %g3, %o1 | ||
568 | mov %g7, %o5 | ||
569 | |||
570 | retry | ||
571 | |||
512 | #ifdef DCACHE_ALIASING_POSSIBLE | 572 | #ifdef DCACHE_ALIASING_POSSIBLE |
513 | .align 32 | 573 | .align 32 |
514 | .globl xcall_flush_dcache_page_cheetah | 574 | .globl xcall_flush_dcache_page_cheetah |
diff --git a/arch/tile/include/arch/Kbuild b/arch/tile/include/arch/Kbuild index e69de29bb2d1..3751c9fabcf2 100644 --- a/arch/tile/include/arch/Kbuild +++ b/arch/tile/include/arch/Kbuild | |||
@@ -0,0 +1 @@ | |||
# Tile arch headers | |||
diff --git a/arch/tile/include/asm/Kbuild b/arch/tile/include/asm/Kbuild index c68808a09da7..6948015e08a2 100644 --- a/arch/tile/include/asm/Kbuild +++ b/arch/tile/include/asm/Kbuild | |||
@@ -1,8 +1,6 @@ | |||
1 | 1 | ||
2 | header-y += ../arch/ | 2 | header-y += ../arch/ |
3 | 3 | ||
4 | header-y += ucontext.h | ||
5 | |||
6 | generic-y += bug.h | 4 | generic-y += bug.h |
7 | generic-y += bugs.h | 5 | generic-y += bugs.h |
8 | generic-y += clkdev.h | 6 | generic-y += clkdev.h |
@@ -37,5 +35,4 @@ generic-y += statfs.h | |||
37 | generic-y += termbits.h | 35 | generic-y += termbits.h |
38 | generic-y += termios.h | 36 | generic-y += termios.h |
39 | generic-y += types.h | 37 | generic-y += types.h |
40 | generic-y += ucontext.h | ||
41 | generic-y += xor.h | 38 | generic-y += xor.h |
diff --git a/arch/tile/include/uapi/asm/Kbuild b/arch/tile/include/uapi/asm/Kbuild index 5c6915fd30b5..c20db8e428bf 100644 --- a/arch/tile/include/uapi/asm/Kbuild +++ b/arch/tile/include/uapi/asm/Kbuild | |||
@@ -15,4 +15,7 @@ header-y += siginfo.h | |||
15 | header-y += signal.h | 15 | header-y += signal.h |
16 | header-y += stat.h | 16 | header-y += stat.h |
17 | header-y += swab.h | 17 | header-y += swab.h |
18 | header-y += ucontext.h | ||
18 | header-y += unistd.h | 19 | header-y += unistd.h |
20 | |||
21 | generic-y += ucontext.h | ||
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 58790bd85c1d..05afcca66de6 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
@@ -142,7 +142,7 @@ KBUILD_CFLAGS += $(call cc-option,-mno-avx,) | |||
142 | KBUILD_CFLAGS += $(mflags-y) | 142 | KBUILD_CFLAGS += $(mflags-y) |
143 | KBUILD_AFLAGS += $(mflags-y) | 143 | KBUILD_AFLAGS += $(mflags-y) |
144 | 144 | ||
145 | archscripts: | 145 | archscripts: scripts_basic |
146 | $(Q)$(MAKE) $(build)=arch/x86/tools relocs | 146 | $(Q)$(MAKE) $(build)=arch/x86/tools relocs |
147 | 147 | ||
148 | ### | 148 | ### |
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index 7c04d0da709b..1b9c22bea8a7 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c | |||
@@ -515,6 +515,11 @@ static int xts_aesni_setkey(struct crypto_tfm *tfm, const u8 *key, | |||
515 | } | 515 | } |
516 | 516 | ||
517 | 517 | ||
518 | static void aesni_xts_tweak(void *ctx, u8 *out, const u8 *in) | ||
519 | { | ||
520 | aesni_enc(ctx, out, in); | ||
521 | } | ||
522 | |||
518 | static int xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, | 523 | static int xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, |
519 | struct scatterlist *src, unsigned int nbytes) | 524 | struct scatterlist *src, unsigned int nbytes) |
520 | { | 525 | { |
@@ -525,7 +530,7 @@ static int xts_encrypt(struct blkcipher_desc *desc, struct scatterlist *dst, | |||
525 | .tbuflen = sizeof(buf), | 530 | .tbuflen = sizeof(buf), |
526 | 531 | ||
527 | .tweak_ctx = aes_ctx(ctx->raw_tweak_ctx), | 532 | .tweak_ctx = aes_ctx(ctx->raw_tweak_ctx), |
528 | .tweak_fn = XTS_TWEAK_CAST(aesni_enc), | 533 | .tweak_fn = aesni_xts_tweak, |
529 | .crypt_ctx = aes_ctx(ctx->raw_crypt_ctx), | 534 | .crypt_ctx = aes_ctx(ctx->raw_crypt_ctx), |
530 | .crypt_fn = lrw_xts_encrypt_callback, | 535 | .crypt_fn = lrw_xts_encrypt_callback, |
531 | }; | 536 | }; |
@@ -550,7 +555,7 @@ static int xts_decrypt(struct blkcipher_desc *desc, struct scatterlist *dst, | |||
550 | .tbuflen = sizeof(buf), | 555 | .tbuflen = sizeof(buf), |
551 | 556 | ||
552 | .tweak_ctx = aes_ctx(ctx->raw_tweak_ctx), | 557 | .tweak_ctx = aes_ctx(ctx->raw_tweak_ctx), |
553 | .tweak_fn = XTS_TWEAK_CAST(aesni_enc), | 558 | .tweak_fn = aesni_xts_tweak, |
554 | .crypt_ctx = aes_ctx(ctx->raw_crypt_ctx), | 559 | .crypt_ctx = aes_ctx(ctx->raw_crypt_ctx), |
555 | .crypt_fn = lrw_xts_decrypt_callback, | 560 | .crypt_fn = lrw_xts_decrypt_callback, |
556 | }; | 561 | }; |
diff --git a/drivers/Makefile b/drivers/Makefile index 03da5b663aef..a16a8d001ae0 100644 --- a/drivers/Makefile +++ b/drivers/Makefile | |||
@@ -17,6 +17,10 @@ obj-$(CONFIG_PARISC) += parisc/ | |||
17 | obj-$(CONFIG_RAPIDIO) += rapidio/ | 17 | obj-$(CONFIG_RAPIDIO) += rapidio/ |
18 | obj-y += video/ | 18 | obj-y += video/ |
19 | obj-y += idle/ | 19 | obj-y += idle/ |
20 | |||
21 | # IPMI must come before ACPI in order to provide IPMI opregion support | ||
22 | obj-$(CONFIG_IPMI_HANDLER) += char/ipmi/ | ||
23 | |||
20 | obj-$(CONFIG_ACPI) += acpi/ | 24 | obj-$(CONFIG_ACPI) += acpi/ |
21 | obj-$(CONFIG_SFI) += sfi/ | 25 | obj-$(CONFIG_SFI) += sfi/ |
22 | # PnP must come after ACPI since it will eventually need to check if acpi | 26 | # PnP must come after ACPI since it will eventually need to check if acpi |
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index 47199e2a9130..82422fe90f81 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile | |||
@@ -47,6 +47,10 @@ acpi-y += video_detect.o | |||
47 | endif | 47 | endif |
48 | 48 | ||
49 | # These are (potentially) separate modules | 49 | # These are (potentially) separate modules |
50 | |||
51 | # IPMI may be used by other drivers, so it has to initialise before them | ||
52 | obj-$(CONFIG_ACPI_IPMI) += acpi_ipmi.o | ||
53 | |||
50 | obj-$(CONFIG_ACPI_AC) += ac.o | 54 | obj-$(CONFIG_ACPI_AC) += ac.o |
51 | obj-$(CONFIG_ACPI_BUTTON) += button.o | 55 | obj-$(CONFIG_ACPI_BUTTON) += button.o |
52 | obj-$(CONFIG_ACPI_FAN) += fan.o | 56 | obj-$(CONFIG_ACPI_FAN) += fan.o |
@@ -70,6 +74,5 @@ processor-y += processor_idle.o processor_thermal.o | |||
70 | processor-$(CONFIG_CPU_FREQ) += processor_perflib.o | 74 | processor-$(CONFIG_CPU_FREQ) += processor_perflib.o |
71 | 75 | ||
72 | obj-$(CONFIG_ACPI_PROCESSOR_AGGREGATOR) += acpi_pad.o | 76 | obj-$(CONFIG_ACPI_PROCESSOR_AGGREGATOR) += acpi_pad.o |
73 | obj-$(CONFIG_ACPI_IPMI) += acpi_ipmi.o | ||
74 | 77 | ||
75 | obj-$(CONFIG_ACPI_APEI) += apei/ | 78 | obj-$(CONFIG_ACPI_APEI) += apei/ |
diff --git a/drivers/char/Makefile b/drivers/char/Makefile index d0b27a39f1d4..7ff1d0d208a7 100644 --- a/drivers/char/Makefile +++ b/drivers/char/Makefile | |||
@@ -52,7 +52,6 @@ obj-$(CONFIG_TELCLOCK) += tlclk.o | |||
52 | obj-$(CONFIG_MWAVE) += mwave/ | 52 | obj-$(CONFIG_MWAVE) += mwave/ |
53 | obj-$(CONFIG_AGP) += agp/ | 53 | obj-$(CONFIG_AGP) += agp/ |
54 | obj-$(CONFIG_PCMCIA) += pcmcia/ | 54 | obj-$(CONFIG_PCMCIA) += pcmcia/ |
55 | obj-$(CONFIG_IPMI_HANDLER) += ipmi/ | ||
56 | 55 | ||
57 | obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o | 56 | obj-$(CONFIG_HANGCHECK_TIMER) += hangcheck-timer.o |
58 | obj-$(CONFIG_TCG_TPM) += tpm/ | 57 | obj-$(CONFIG_TCG_TPM) += tpm/ |
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c index e01f5eaaec82..38390f7c6ab6 100644 --- a/drivers/char/agp/intel-gtt.c +++ b/drivers/char/agp/intel-gtt.c | |||
@@ -667,7 +667,7 @@ static int intel_gtt_init(void) | |||
667 | gtt_map_size = intel_private.base.gtt_total_entries * 4; | 667 | gtt_map_size = intel_private.base.gtt_total_entries * 4; |
668 | 668 | ||
669 | intel_private.gtt = NULL; | 669 | intel_private.gtt = NULL; |
670 | if (INTEL_GTT_GEN < 6) | 670 | if (INTEL_GTT_GEN < 6 && INTEL_GTT_GEN > 2) |
671 | intel_private.gtt = ioremap_wc(intel_private.gtt_bus_addr, | 671 | intel_private.gtt = ioremap_wc(intel_private.gtt_bus_addr, |
672 | gtt_map_size); | 672 | gtt_map_size); |
673 | if (intel_private.gtt == NULL) | 673 | if (intel_private.gtt == NULL) |
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index 2c29942b1326..a0c84bb30856 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c | |||
@@ -1880,7 +1880,7 @@ int ipmi_request_supply_msgs(ipmi_user_t user, | |||
1880 | struct ipmi_recv_msg *supplied_recv, | 1880 | struct ipmi_recv_msg *supplied_recv, |
1881 | int priority) | 1881 | int priority) |
1882 | { | 1882 | { |
1883 | unsigned char saddr, lun; | 1883 | unsigned char saddr = 0, lun = 0; |
1884 | int rv; | 1884 | int rv; |
1885 | 1885 | ||
1886 | if (!user) | 1886 | if (!user) |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 83f85cf7fb1b..32a6c7e256bd 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -2424,6 +2424,38 @@ static void ipmi_pci_cleanup(struct smi_info *info) | |||
2424 | pci_disable_device(pdev); | 2424 | pci_disable_device(pdev); |
2425 | } | 2425 | } |
2426 | 2426 | ||
2427 | static int __devinit ipmi_pci_probe_regspacing(struct smi_info *info) | ||
2428 | { | ||
2429 | if (info->si_type == SI_KCS) { | ||
2430 | unsigned char status; | ||
2431 | int regspacing; | ||
2432 | |||
2433 | info->io.regsize = DEFAULT_REGSIZE; | ||
2434 | info->io.regshift = 0; | ||
2435 | info->io_size = 2; | ||
2436 | info->handlers = &kcs_smi_handlers; | ||
2437 | |||
2438 | /* detect 1, 4, 16byte spacing */ | ||
2439 | for (regspacing = DEFAULT_REGSPACING; regspacing <= 16;) { | ||
2440 | info->io.regspacing = regspacing; | ||
2441 | if (info->io_setup(info)) { | ||
2442 | dev_err(info->dev, | ||
2443 | "Could not setup I/O space\n"); | ||
2444 | return DEFAULT_REGSPACING; | ||
2445 | } | ||
2446 | /* write invalid cmd */ | ||
2447 | info->io.outputb(&info->io, 1, 0x10); | ||
2448 | /* read status back */ | ||
2449 | status = info->io.inputb(&info->io, 1); | ||
2450 | info->io_cleanup(info); | ||
2451 | if (status) | ||
2452 | return regspacing; | ||
2453 | regspacing *= 4; | ||
2454 | } | ||
2455 | } | ||
2456 | return DEFAULT_REGSPACING; | ||
2457 | } | ||
2458 | |||
2427 | static int __devinit ipmi_pci_probe(struct pci_dev *pdev, | 2459 | static int __devinit ipmi_pci_probe(struct pci_dev *pdev, |
2428 | const struct pci_device_id *ent) | 2460 | const struct pci_device_id *ent) |
2429 | { | 2461 | { |
@@ -2476,8 +2508,8 @@ static int __devinit ipmi_pci_probe(struct pci_dev *pdev, | |||
2476 | } | 2508 | } |
2477 | info->io.addr_data = pci_resource_start(pdev, 0); | 2509 | info->io.addr_data = pci_resource_start(pdev, 0); |
2478 | 2510 | ||
2479 | info->io.regspacing = DEFAULT_REGSPACING; | 2511 | info->io.regspacing = ipmi_pci_probe_regspacing(info); |
2480 | info->io.regsize = DEFAULT_REGSPACING; | 2512 | info->io.regsize = DEFAULT_REGSIZE; |
2481 | info->io.regshift = 0; | 2513 | info->io.regshift = 0; |
2482 | 2514 | ||
2483 | info->irq = pdev->irq; | 2515 | info->irq = pdev->irq; |
diff --git a/drivers/gpu/drm/drm_info.c b/drivers/gpu/drm/drm_info.c index cdf8b1e7602d..441ebc1bdbef 100644 --- a/drivers/gpu/drm/drm_info.c +++ b/drivers/gpu/drm/drm_info.c | |||
@@ -239,7 +239,7 @@ int drm_vma_info(struct seq_file *m, void *data) | |||
239 | mutex_lock(&dev->struct_mutex); | 239 | mutex_lock(&dev->struct_mutex); |
240 | seq_printf(m, "vma use count: %d, high_memory = %pK, 0x%pK\n", | 240 | seq_printf(m, "vma use count: %d, high_memory = %pK, 0x%pK\n", |
241 | atomic_read(&dev->vma_count), | 241 | atomic_read(&dev->vma_count), |
242 | high_memory, (void *)virt_to_phys(high_memory)); | 242 | high_memory, (void *)(unsigned long)virt_to_phys(high_memory)); |
243 | 243 | ||
244 | list_for_each_entry(pt, &dev->vmalist, head) { | 244 | list_for_each_entry(pt, &dev->vmalist, head) { |
245 | vma = pt->vma; | 245 | vma = pt->vma; |
diff --git a/drivers/gpu/drm/i915/dvo_ch7xxx.c b/drivers/gpu/drm/i915/dvo_ch7xxx.c index 38f3a6cb8c7d..3edd981e0770 100644 --- a/drivers/gpu/drm/i915/dvo_ch7xxx.c +++ b/drivers/gpu/drm/i915/dvo_ch7xxx.c | |||
@@ -303,10 +303,10 @@ static bool ch7xxx_get_hw_state(struct intel_dvo_device *dvo) | |||
303 | 303 | ||
304 | ch7xxx_readb(dvo, CH7xxx_PM, &val); | 304 | ch7xxx_readb(dvo, CH7xxx_PM, &val); |
305 | 305 | ||
306 | if (val & CH7xxx_PM_FPD) | 306 | if (val & (CH7xxx_PM_DVIL | CH7xxx_PM_DVIP)) |
307 | return false; | ||
308 | else | ||
309 | return true; | 307 | return true; |
308 | else | ||
309 | return false; | ||
310 | } | 310 | } |
311 | 311 | ||
312 | static void ch7xxx_dump_regs(struct intel_dvo_device *dvo) | 312 | static void ch7xxx_dump_regs(struct intel_dvo_device *dvo) |
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 4f2831aa5fed..b84f7861e438 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -1341,9 +1341,14 @@ int __must_check i915_gem_object_get_pages(struct drm_i915_gem_object *obj); | |||
1341 | static inline struct page *i915_gem_object_get_page(struct drm_i915_gem_object *obj, int n) | 1341 | static inline struct page *i915_gem_object_get_page(struct drm_i915_gem_object *obj, int n) |
1342 | { | 1342 | { |
1343 | struct scatterlist *sg = obj->pages->sgl; | 1343 | struct scatterlist *sg = obj->pages->sgl; |
1344 | while (n >= SG_MAX_SINGLE_ALLOC) { | 1344 | int nents = obj->pages->nents; |
1345 | while (nents > SG_MAX_SINGLE_ALLOC) { | ||
1346 | if (n < SG_MAX_SINGLE_ALLOC - 1) | ||
1347 | break; | ||
1348 | |||
1345 | sg = sg_chain_ptr(sg + SG_MAX_SINGLE_ALLOC - 1); | 1349 | sg = sg_chain_ptr(sg + SG_MAX_SINGLE_ALLOC - 1); |
1346 | n -= SG_MAX_SINGLE_ALLOC - 1; | 1350 | n -= SG_MAX_SINGLE_ALLOC - 1; |
1351 | nents -= SG_MAX_SINGLE_ALLOC - 1; | ||
1347 | } | 1352 | } |
1348 | return sg_page(sg+n); | 1353 | return sg_page(sg+n); |
1349 | } | 1354 | } |
@@ -1427,7 +1432,7 @@ int __must_check i915_gpu_idle(struct drm_device *dev); | |||
1427 | int __must_check i915_gem_idle(struct drm_device *dev); | 1432 | int __must_check i915_gem_idle(struct drm_device *dev); |
1428 | int i915_add_request(struct intel_ring_buffer *ring, | 1433 | int i915_add_request(struct intel_ring_buffer *ring, |
1429 | struct drm_file *file, | 1434 | struct drm_file *file, |
1430 | struct drm_i915_gem_request *request); | 1435 | u32 *seqno); |
1431 | int __must_check i915_wait_seqno(struct intel_ring_buffer *ring, | 1436 | int __must_check i915_wait_seqno(struct intel_ring_buffer *ring, |
1432 | uint32_t seqno); | 1437 | uint32_t seqno); |
1433 | int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); | 1438 | int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); |
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 19dbdd7dd564..d33d02d13c96 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -1955,11 +1955,12 @@ i915_gem_next_request_seqno(struct intel_ring_buffer *ring) | |||
1955 | int | 1955 | int |
1956 | i915_add_request(struct intel_ring_buffer *ring, | 1956 | i915_add_request(struct intel_ring_buffer *ring, |
1957 | struct drm_file *file, | 1957 | struct drm_file *file, |
1958 | struct drm_i915_gem_request *request) | 1958 | u32 *out_seqno) |
1959 | { | 1959 | { |
1960 | drm_i915_private_t *dev_priv = ring->dev->dev_private; | 1960 | drm_i915_private_t *dev_priv = ring->dev->dev_private; |
1961 | uint32_t seqno; | 1961 | struct drm_i915_gem_request *request; |
1962 | u32 request_ring_position; | 1962 | u32 request_ring_position; |
1963 | u32 seqno; | ||
1963 | int was_empty; | 1964 | int was_empty; |
1964 | int ret; | 1965 | int ret; |
1965 | 1966 | ||
@@ -1974,11 +1975,9 @@ i915_add_request(struct intel_ring_buffer *ring, | |||
1974 | if (ret) | 1975 | if (ret) |
1975 | return ret; | 1976 | return ret; |
1976 | 1977 | ||
1977 | if (request == NULL) { | 1978 | request = kmalloc(sizeof(*request), GFP_KERNEL); |
1978 | request = kmalloc(sizeof(*request), GFP_KERNEL); | 1979 | if (request == NULL) |
1979 | if (request == NULL) | 1980 | return -ENOMEM; |
1980 | return -ENOMEM; | ||
1981 | } | ||
1982 | 1981 | ||
1983 | seqno = i915_gem_next_request_seqno(ring); | 1982 | seqno = i915_gem_next_request_seqno(ring); |
1984 | 1983 | ||
@@ -2030,6 +2029,8 @@ i915_add_request(struct intel_ring_buffer *ring, | |||
2030 | } | 2029 | } |
2031 | } | 2030 | } |
2032 | 2031 | ||
2032 | if (out_seqno) | ||
2033 | *out_seqno = seqno; | ||
2033 | return 0; | 2034 | return 0; |
2034 | } | 2035 | } |
2035 | 2036 | ||
@@ -3959,6 +3960,9 @@ i915_gem_init_hw(struct drm_device *dev) | |||
3959 | if (!intel_enable_gtt()) | 3960 | if (!intel_enable_gtt()) |
3960 | return -EIO; | 3961 | return -EIO; |
3961 | 3962 | ||
3963 | if (IS_HASWELL(dev) && (I915_READ(0x120010) == 1)) | ||
3964 | I915_WRITE(0x9008, I915_READ(0x9008) | 0xf0000); | ||
3965 | |||
3962 | i915_gem_l3_remap(dev); | 3966 | i915_gem_l3_remap(dev); |
3963 | 3967 | ||
3964 | i915_gem_init_swizzling(dev); | 3968 | i915_gem_init_swizzling(dev); |
@@ -4098,7 +4102,6 @@ i915_gem_entervt_ioctl(struct drm_device *dev, void *data, | |||
4098 | } | 4102 | } |
4099 | 4103 | ||
4100 | BUG_ON(!list_empty(&dev_priv->mm.active_list)); | 4104 | BUG_ON(!list_empty(&dev_priv->mm.active_list)); |
4101 | BUG_ON(!list_empty(&dev_priv->mm.inactive_list)); | ||
4102 | mutex_unlock(&dev->struct_mutex); | 4105 | mutex_unlock(&dev->struct_mutex); |
4103 | 4106 | ||
4104 | ret = drm_irq_install(dev); | 4107 | ret = drm_irq_install(dev); |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 64c1be0a9cfd..a4162ddff6c5 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -521,7 +521,7 @@ | |||
521 | */ | 521 | */ |
522 | # define _3D_CHICKEN2_WM_READ_PIPELINED (1 << 14) | 522 | # define _3D_CHICKEN2_WM_READ_PIPELINED (1 << 14) |
523 | #define _3D_CHICKEN3 0x02090 | 523 | #define _3D_CHICKEN3 0x02090 |
524 | #define _3D_CHICKEN_SF_DISABLE_FASTCLIP_CULL (1 << 5) | 524 | #define _3D_CHICKEN3_SF_DISABLE_FASTCLIP_CULL (1 << 5) |
525 | 525 | ||
526 | #define MI_MODE 0x0209c | 526 | #define MI_MODE 0x0209c |
527 | # define VS_TIMER_DISPATCH (1 << 6) | 527 | # define VS_TIMER_DISPATCH (1 << 6) |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 2b6ce9b2674a..682bd3729baf 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -3253,6 +3253,16 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc) | |||
3253 | 3253 | ||
3254 | if (HAS_PCH_CPT(dev)) | 3254 | if (HAS_PCH_CPT(dev)) |
3255 | intel_cpt_verify_modeset(dev, intel_crtc->pipe); | 3255 | intel_cpt_verify_modeset(dev, intel_crtc->pipe); |
3256 | |||
3257 | /* | ||
3258 | * There seems to be a race in PCH platform hw (at least on some | ||
3259 | * outputs) where an enabled pipe still completes any pageflip right | ||
3260 | * away (as if the pipe is off) instead of waiting for vblank. As soon | ||
3261 | * as the first vblank happend, everything works as expected. Hence just | ||
3262 | * wait for one vblank before returning to avoid strange things | ||
3263 | * happening. | ||
3264 | */ | ||
3265 | intel_wait_for_vblank(dev, intel_crtc->pipe); | ||
3256 | } | 3266 | } |
3257 | 3267 | ||
3258 | static void ironlake_crtc_disable(struct drm_crtc *crtc) | 3268 | static void ironlake_crtc_disable(struct drm_crtc *crtc) |
@@ -7892,8 +7902,7 @@ static struct intel_quirk intel_quirks[] = { | |||
7892 | /* ThinkPad T60 needs pipe A force quirk (bug #16494) */ | 7902 | /* ThinkPad T60 needs pipe A force quirk (bug #16494) */ |
7893 | { 0x2782, 0x17aa, 0x201a, quirk_pipea_force }, | 7903 | { 0x2782, 0x17aa, 0x201a, quirk_pipea_force }, |
7894 | 7904 | ||
7895 | /* 855 & before need to leave pipe A & dpll A up */ | 7905 | /* 830/845 need to leave pipe A & dpll A up */ |
7896 | { 0x3582, PCI_ANY_ID, PCI_ANY_ID, quirk_pipea_force }, | ||
7897 | { 0x2562, PCI_ANY_ID, PCI_ANY_ID, quirk_pipea_force }, | 7906 | { 0x2562, PCI_ANY_ID, PCI_ANY_ID, quirk_pipea_force }, |
7898 | { 0x3577, PCI_ANY_ID, PCI_ANY_ID, quirk_pipea_force }, | 7907 | { 0x3577, PCI_ANY_ID, PCI_ANY_ID, quirk_pipea_force }, |
7899 | 7908 | ||
@@ -8049,29 +8058,42 @@ static void intel_enable_pipe_a(struct drm_device *dev) | |||
8049 | 8058 | ||
8050 | } | 8059 | } |
8051 | 8060 | ||
8061 | static bool | ||
8062 | intel_check_plane_mapping(struct intel_crtc *crtc) | ||
8063 | { | ||
8064 | struct drm_i915_private *dev_priv = crtc->base.dev->dev_private; | ||
8065 | u32 reg, val; | ||
8066 | |||
8067 | if (dev_priv->num_pipe == 1) | ||
8068 | return true; | ||
8069 | |||
8070 | reg = DSPCNTR(!crtc->plane); | ||
8071 | val = I915_READ(reg); | ||
8072 | |||
8073 | if ((val & DISPLAY_PLANE_ENABLE) && | ||
8074 | (!!(val & DISPPLANE_SEL_PIPE_MASK) == crtc->pipe)) | ||
8075 | return false; | ||
8076 | |||
8077 | return true; | ||
8078 | } | ||
8079 | |||
8052 | static void intel_sanitize_crtc(struct intel_crtc *crtc) | 8080 | static void intel_sanitize_crtc(struct intel_crtc *crtc) |
8053 | { | 8081 | { |
8054 | struct drm_device *dev = crtc->base.dev; | 8082 | struct drm_device *dev = crtc->base.dev; |
8055 | struct drm_i915_private *dev_priv = dev->dev_private; | 8083 | struct drm_i915_private *dev_priv = dev->dev_private; |
8056 | u32 reg, val; | 8084 | u32 reg; |
8057 | 8085 | ||
8058 | /* Clear any frame start delays used for debugging left by the BIOS */ | 8086 | /* Clear any frame start delays used for debugging left by the BIOS */ |
8059 | reg = PIPECONF(crtc->pipe); | 8087 | reg = PIPECONF(crtc->pipe); |
8060 | I915_WRITE(reg, I915_READ(reg) & ~PIPECONF_FRAME_START_DELAY_MASK); | 8088 | I915_WRITE(reg, I915_READ(reg) & ~PIPECONF_FRAME_START_DELAY_MASK); |
8061 | 8089 | ||
8062 | /* We need to sanitize the plane -> pipe mapping first because this will | 8090 | /* We need to sanitize the plane -> pipe mapping first because this will |
8063 | * disable the crtc (and hence change the state) if it is wrong. */ | 8091 | * disable the crtc (and hence change the state) if it is wrong. Note |
8064 | if (!HAS_PCH_SPLIT(dev)) { | 8092 | * that gen4+ has a fixed plane -> pipe mapping. */ |
8093 | if (INTEL_INFO(dev)->gen < 4 && !intel_check_plane_mapping(crtc)) { | ||
8065 | struct intel_connector *connector; | 8094 | struct intel_connector *connector; |
8066 | bool plane; | 8095 | bool plane; |
8067 | 8096 | ||
8068 | reg = DSPCNTR(crtc->plane); | ||
8069 | val = I915_READ(reg); | ||
8070 | |||
8071 | if ((val & DISPLAY_PLANE_ENABLE) == 0 && | ||
8072 | (!!(val & DISPPLANE_SEL_PIPE_MASK) == crtc->pipe)) | ||
8073 | goto ok; | ||
8074 | |||
8075 | DRM_DEBUG_KMS("[CRTC:%d] wrong plane connection detected!\n", | 8097 | DRM_DEBUG_KMS("[CRTC:%d] wrong plane connection detected!\n", |
8076 | crtc->base.base.id); | 8098 | crtc->base.base.id); |
8077 | 8099 | ||
@@ -8095,7 +8117,6 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc) | |||
8095 | WARN_ON(crtc->active); | 8117 | WARN_ON(crtc->active); |
8096 | crtc->base.enabled = false; | 8118 | crtc->base.enabled = false; |
8097 | } | 8119 | } |
8098 | ok: | ||
8099 | 8120 | ||
8100 | if (dev_priv->quirks & QUIRK_PIPEA_FORCE && | 8121 | if (dev_priv->quirks & QUIRK_PIPEA_FORCE && |
8101 | crtc->pipe == PIPE_A && !crtc->active) { | 8122 | crtc->pipe == PIPE_A && !crtc->active) { |
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index d1e8ddb2d6c0..1b727a5c9ee5 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -2369,8 +2369,9 @@ static void | |||
2369 | intel_dp_destroy(struct drm_connector *connector) | 2369 | intel_dp_destroy(struct drm_connector *connector) |
2370 | { | 2370 | { |
2371 | struct drm_device *dev = connector->dev; | 2371 | struct drm_device *dev = connector->dev; |
2372 | struct intel_dp *intel_dp = intel_attached_dp(connector); | ||
2372 | 2373 | ||
2373 | if (intel_dpd_is_edp(dev)) | 2374 | if (is_edp(intel_dp)) |
2374 | intel_panel_destroy_backlight(dev); | 2375 | intel_panel_destroy_backlight(dev); |
2375 | 2376 | ||
2376 | drm_sysfs_connector_remove(connector); | 2377 | drm_sysfs_connector_remove(connector); |
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index ebff850a9ab6..495625914e4a 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c | |||
@@ -209,7 +209,6 @@ static void intel_overlay_unmap_regs(struct intel_overlay *overlay, | |||
209 | } | 209 | } |
210 | 210 | ||
211 | static int intel_overlay_do_wait_request(struct intel_overlay *overlay, | 211 | static int intel_overlay_do_wait_request(struct intel_overlay *overlay, |
212 | struct drm_i915_gem_request *request, | ||
213 | void (*tail)(struct intel_overlay *)) | 212 | void (*tail)(struct intel_overlay *)) |
214 | { | 213 | { |
215 | struct drm_device *dev = overlay->dev; | 214 | struct drm_device *dev = overlay->dev; |
@@ -218,12 +217,10 @@ static int intel_overlay_do_wait_request(struct intel_overlay *overlay, | |||
218 | int ret; | 217 | int ret; |
219 | 218 | ||
220 | BUG_ON(overlay->last_flip_req); | 219 | BUG_ON(overlay->last_flip_req); |
221 | ret = i915_add_request(ring, NULL, request); | 220 | ret = i915_add_request(ring, NULL, &overlay->last_flip_req); |
222 | if (ret) { | 221 | if (ret) |
223 | kfree(request); | 222 | return ret; |
224 | return ret; | 223 | |
225 | } | ||
226 | overlay->last_flip_req = request->seqno; | ||
227 | overlay->flip_tail = tail; | 224 | overlay->flip_tail = tail; |
228 | ret = i915_wait_seqno(ring, overlay->last_flip_req); | 225 | ret = i915_wait_seqno(ring, overlay->last_flip_req); |
229 | if (ret) | 226 | if (ret) |
@@ -240,7 +237,6 @@ static int intel_overlay_on(struct intel_overlay *overlay) | |||
240 | struct drm_device *dev = overlay->dev; | 237 | struct drm_device *dev = overlay->dev; |
241 | struct drm_i915_private *dev_priv = dev->dev_private; | 238 | struct drm_i915_private *dev_priv = dev->dev_private; |
242 | struct intel_ring_buffer *ring = &dev_priv->ring[RCS]; | 239 | struct intel_ring_buffer *ring = &dev_priv->ring[RCS]; |
243 | struct drm_i915_gem_request *request; | ||
244 | int ret; | 240 | int ret; |
245 | 241 | ||
246 | BUG_ON(overlay->active); | 242 | BUG_ON(overlay->active); |
@@ -248,17 +244,9 @@ static int intel_overlay_on(struct intel_overlay *overlay) | |||
248 | 244 | ||
249 | WARN_ON(IS_I830(dev) && !(dev_priv->quirks & QUIRK_PIPEA_FORCE)); | 245 | WARN_ON(IS_I830(dev) && !(dev_priv->quirks & QUIRK_PIPEA_FORCE)); |
250 | 246 | ||
251 | request = kzalloc(sizeof(*request), GFP_KERNEL); | ||
252 | if (request == NULL) { | ||
253 | ret = -ENOMEM; | ||
254 | goto out; | ||
255 | } | ||
256 | |||
257 | ret = intel_ring_begin(ring, 4); | 247 | ret = intel_ring_begin(ring, 4); |
258 | if (ret) { | 248 | if (ret) |
259 | kfree(request); | 249 | return ret; |
260 | goto out; | ||
261 | } | ||
262 | 250 | ||
263 | intel_ring_emit(ring, MI_OVERLAY_FLIP | MI_OVERLAY_ON); | 251 | intel_ring_emit(ring, MI_OVERLAY_FLIP | MI_OVERLAY_ON); |
264 | intel_ring_emit(ring, overlay->flip_addr | OFC_UPDATE); | 252 | intel_ring_emit(ring, overlay->flip_addr | OFC_UPDATE); |
@@ -266,9 +254,7 @@ static int intel_overlay_on(struct intel_overlay *overlay) | |||
266 | intel_ring_emit(ring, MI_NOOP); | 254 | intel_ring_emit(ring, MI_NOOP); |
267 | intel_ring_advance(ring); | 255 | intel_ring_advance(ring); |
268 | 256 | ||
269 | ret = intel_overlay_do_wait_request(overlay, request, NULL); | 257 | return intel_overlay_do_wait_request(overlay, NULL); |
270 | out: | ||
271 | return ret; | ||
272 | } | 258 | } |
273 | 259 | ||
274 | /* overlay needs to be enabled in OCMD reg */ | 260 | /* overlay needs to be enabled in OCMD reg */ |
@@ -278,17 +264,12 @@ static int intel_overlay_continue(struct intel_overlay *overlay, | |||
278 | struct drm_device *dev = overlay->dev; | 264 | struct drm_device *dev = overlay->dev; |
279 | drm_i915_private_t *dev_priv = dev->dev_private; | 265 | drm_i915_private_t *dev_priv = dev->dev_private; |
280 | struct intel_ring_buffer *ring = &dev_priv->ring[RCS]; | 266 | struct intel_ring_buffer *ring = &dev_priv->ring[RCS]; |
281 | struct drm_i915_gem_request *request; | ||
282 | u32 flip_addr = overlay->flip_addr; | 267 | u32 flip_addr = overlay->flip_addr; |
283 | u32 tmp; | 268 | u32 tmp; |
284 | int ret; | 269 | int ret; |
285 | 270 | ||
286 | BUG_ON(!overlay->active); | 271 | BUG_ON(!overlay->active); |
287 | 272 | ||
288 | request = kzalloc(sizeof(*request), GFP_KERNEL); | ||
289 | if (request == NULL) | ||
290 | return -ENOMEM; | ||
291 | |||
292 | if (load_polyphase_filter) | 273 | if (load_polyphase_filter) |
293 | flip_addr |= OFC_UPDATE; | 274 | flip_addr |= OFC_UPDATE; |
294 | 275 | ||
@@ -298,22 +279,14 @@ static int intel_overlay_continue(struct intel_overlay *overlay, | |||
298 | DRM_DEBUG("overlay underrun, DOVSTA: %x\n", tmp); | 279 | DRM_DEBUG("overlay underrun, DOVSTA: %x\n", tmp); |
299 | 280 | ||
300 | ret = intel_ring_begin(ring, 2); | 281 | ret = intel_ring_begin(ring, 2); |
301 | if (ret) { | 282 | if (ret) |
302 | kfree(request); | ||
303 | return ret; | 283 | return ret; |
304 | } | 284 | |
305 | intel_ring_emit(ring, MI_OVERLAY_FLIP | MI_OVERLAY_CONTINUE); | 285 | intel_ring_emit(ring, MI_OVERLAY_FLIP | MI_OVERLAY_CONTINUE); |
306 | intel_ring_emit(ring, flip_addr); | 286 | intel_ring_emit(ring, flip_addr); |
307 | intel_ring_advance(ring); | 287 | intel_ring_advance(ring); |
308 | 288 | ||
309 | ret = i915_add_request(ring, NULL, request); | 289 | return i915_add_request(ring, NULL, &overlay->last_flip_req); |
310 | if (ret) { | ||
311 | kfree(request); | ||
312 | return ret; | ||
313 | } | ||
314 | |||
315 | overlay->last_flip_req = request->seqno; | ||
316 | return 0; | ||
317 | } | 290 | } |
318 | 291 | ||
319 | static void intel_overlay_release_old_vid_tail(struct intel_overlay *overlay) | 292 | static void intel_overlay_release_old_vid_tail(struct intel_overlay *overlay) |
@@ -349,15 +322,10 @@ static int intel_overlay_off(struct intel_overlay *overlay) | |||
349 | struct drm_i915_private *dev_priv = dev->dev_private; | 322 | struct drm_i915_private *dev_priv = dev->dev_private; |
350 | struct intel_ring_buffer *ring = &dev_priv->ring[RCS]; | 323 | struct intel_ring_buffer *ring = &dev_priv->ring[RCS]; |
351 | u32 flip_addr = overlay->flip_addr; | 324 | u32 flip_addr = overlay->flip_addr; |
352 | struct drm_i915_gem_request *request; | ||
353 | int ret; | 325 | int ret; |
354 | 326 | ||
355 | BUG_ON(!overlay->active); | 327 | BUG_ON(!overlay->active); |
356 | 328 | ||
357 | request = kzalloc(sizeof(*request), GFP_KERNEL); | ||
358 | if (request == NULL) | ||
359 | return -ENOMEM; | ||
360 | |||
361 | /* According to intel docs the overlay hw may hang (when switching | 329 | /* According to intel docs the overlay hw may hang (when switching |
362 | * off) without loading the filter coeffs. It is however unclear whether | 330 | * off) without loading the filter coeffs. It is however unclear whether |
363 | * this applies to the disabling of the overlay or to the switching off | 331 | * this applies to the disabling of the overlay or to the switching off |
@@ -365,10 +333,9 @@ static int intel_overlay_off(struct intel_overlay *overlay) | |||
365 | flip_addr |= OFC_UPDATE; | 333 | flip_addr |= OFC_UPDATE; |
366 | 334 | ||
367 | ret = intel_ring_begin(ring, 6); | 335 | ret = intel_ring_begin(ring, 6); |
368 | if (ret) { | 336 | if (ret) |
369 | kfree(request); | ||
370 | return ret; | 337 | return ret; |
371 | } | 338 | |
372 | /* wait for overlay to go idle */ | 339 | /* wait for overlay to go idle */ |
373 | intel_ring_emit(ring, MI_OVERLAY_FLIP | MI_OVERLAY_CONTINUE); | 340 | intel_ring_emit(ring, MI_OVERLAY_FLIP | MI_OVERLAY_CONTINUE); |
374 | intel_ring_emit(ring, flip_addr); | 341 | intel_ring_emit(ring, flip_addr); |
@@ -379,8 +346,7 @@ static int intel_overlay_off(struct intel_overlay *overlay) | |||
379 | intel_ring_emit(ring, MI_WAIT_FOR_EVENT | MI_WAIT_FOR_OVERLAY_FLIP); | 346 | intel_ring_emit(ring, MI_WAIT_FOR_EVENT | MI_WAIT_FOR_OVERLAY_FLIP); |
380 | intel_ring_advance(ring); | 347 | intel_ring_advance(ring); |
381 | 348 | ||
382 | return intel_overlay_do_wait_request(overlay, request, | 349 | return intel_overlay_do_wait_request(overlay, intel_overlay_off_tail); |
383 | intel_overlay_off_tail); | ||
384 | } | 350 | } |
385 | 351 | ||
386 | /* recover from an interruption due to a signal | 352 | /* recover from an interruption due to a signal |
@@ -425,24 +391,16 @@ static int intel_overlay_release_old_vid(struct intel_overlay *overlay) | |||
425 | return 0; | 391 | return 0; |
426 | 392 | ||
427 | if (I915_READ(ISR) & I915_OVERLAY_PLANE_FLIP_PENDING_INTERRUPT) { | 393 | if (I915_READ(ISR) & I915_OVERLAY_PLANE_FLIP_PENDING_INTERRUPT) { |
428 | struct drm_i915_gem_request *request; | ||
429 | |||
430 | /* synchronous slowpath */ | 394 | /* synchronous slowpath */ |
431 | request = kzalloc(sizeof(*request), GFP_KERNEL); | ||
432 | if (request == NULL) | ||
433 | return -ENOMEM; | ||
434 | |||
435 | ret = intel_ring_begin(ring, 2); | 395 | ret = intel_ring_begin(ring, 2); |
436 | if (ret) { | 396 | if (ret) |
437 | kfree(request); | ||
438 | return ret; | 397 | return ret; |
439 | } | ||
440 | 398 | ||
441 | intel_ring_emit(ring, MI_WAIT_FOR_EVENT | MI_WAIT_FOR_OVERLAY_FLIP); | 399 | intel_ring_emit(ring, MI_WAIT_FOR_EVENT | MI_WAIT_FOR_OVERLAY_FLIP); |
442 | intel_ring_emit(ring, MI_NOOP); | 400 | intel_ring_emit(ring, MI_NOOP); |
443 | intel_ring_advance(ring); | 401 | intel_ring_advance(ring); |
444 | 402 | ||
445 | ret = intel_overlay_do_wait_request(overlay, request, | 403 | ret = intel_overlay_do_wait_request(overlay, |
446 | intel_overlay_release_old_vid_tail); | 404 | intel_overlay_release_old_vid_tail); |
447 | if (ret) | 405 | if (ret) |
448 | return ret; | 406 | return ret; |
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index b3b4b6cea8b0..72f41aaa71ff 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
@@ -3442,8 +3442,8 @@ static void gen6_init_clock_gating(struct drm_device *dev) | |||
3442 | GEN6_RCCUNIT_CLOCK_GATE_DISABLE); | 3442 | GEN6_RCCUNIT_CLOCK_GATE_DISABLE); |
3443 | 3443 | ||
3444 | /* Bspec says we need to always set all mask bits. */ | 3444 | /* Bspec says we need to always set all mask bits. */ |
3445 | I915_WRITE(_3D_CHICKEN, (0xFFFF << 16) | | 3445 | I915_WRITE(_3D_CHICKEN3, (0xFFFF << 16) | |
3446 | _3D_CHICKEN_SF_DISABLE_FASTCLIP_CULL); | 3446 | _3D_CHICKEN3_SF_DISABLE_FASTCLIP_CULL); |
3447 | 3447 | ||
3448 | /* | 3448 | /* |
3449 | * According to the spec the following bits should be | 3449 | * According to the spec the following bits should be |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c b/drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c index 9ed6e728a94c..7d750382a833 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c | |||
@@ -43,7 +43,7 @@ dcb_table(struct nouveau_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) | |||
43 | *ver = nv_ro08(bios, dcb); | 43 | *ver = nv_ro08(bios, dcb); |
44 | 44 | ||
45 | if (*ver >= 0x41) { | 45 | if (*ver >= 0x41) { |
46 | nv_warn(bios, "DCB *ver 0x%02x unknown\n", *ver); | 46 | nv_warn(bios, "DCB version 0x%02x unknown\n", *ver); |
47 | return 0x0000; | 47 | return 0x0000; |
48 | } else | 48 | } else |
49 | if (*ver >= 0x30) { | 49 | if (*ver >= 0x30) { |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c b/drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c index 436e9efe7ef5..42d7539e6525 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c +++ b/drivers/gpu/drm/nouveau/core/subdev/fb/nv50.c | |||
@@ -277,7 +277,6 @@ nv50_fb_dtor(struct nouveau_object *object) | |||
277 | __free_page(priv->r100c08_page); | 277 | __free_page(priv->r100c08_page); |
278 | } | 278 | } |
279 | 279 | ||
280 | nouveau_mm_fini(&priv->base.vram); | ||
281 | nouveau_fb_destroy(&priv->base); | 280 | nouveau_fb_destroy(&priv->base); |
282 | } | 281 | } |
283 | 282 | ||
diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/fan.c b/drivers/gpu/drm/nouveau/core/subdev/therm/fan.c index b29237970fa0..523178685180 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/therm/fan.c +++ b/drivers/gpu/drm/nouveau/core/subdev/therm/fan.c | |||
@@ -134,7 +134,7 @@ nouveau_therm_fan_sense(struct nouveau_therm *therm) | |||
134 | end = ptimer->read(ptimer); | 134 | end = ptimer->read(ptimer); |
135 | 135 | ||
136 | if (cycles == 5) { | 136 | if (cycles == 5) { |
137 | tach = (u64)60000000000; | 137 | tach = (u64)60000000000ULL; |
138 | do_div(tach, (end - start)); | 138 | do_div(tach, (end - start)); |
139 | return tach; | 139 | return tach; |
140 | } else | 140 | } else |
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 259e5f1adf47..35ac57f0aab6 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -456,6 +456,7 @@ static struct ttm_tt * | |||
456 | nouveau_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size, | 456 | nouveau_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size, |
457 | uint32_t page_flags, struct page *dummy_read) | 457 | uint32_t page_flags, struct page *dummy_read) |
458 | { | 458 | { |
459 | #if __OS_HAS_AGP | ||
459 | struct nouveau_drm *drm = nouveau_bdev(bdev); | 460 | struct nouveau_drm *drm = nouveau_bdev(bdev); |
460 | struct drm_device *dev = drm->dev; | 461 | struct drm_device *dev = drm->dev; |
461 | 462 | ||
@@ -463,6 +464,7 @@ nouveau_ttm_tt_create(struct ttm_bo_device *bdev, unsigned long size, | |||
463 | return ttm_agp_tt_create(bdev, dev->agp->bridge, size, | 464 | return ttm_agp_tt_create(bdev, dev->agp->bridge, size, |
464 | page_flags, dummy_read); | 465 | page_flags, dummy_read); |
465 | } | 466 | } |
467 | #endif | ||
466 | 468 | ||
467 | return nouveau_sgdma_create_ttm(bdev, size, page_flags, dummy_read); | 469 | return nouveau_sgdma_create_ttm(bdev, size, page_flags, dummy_read); |
468 | } | 470 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_pm.c b/drivers/gpu/drm/nouveau/nouveau_pm.c index 0bf64c90aa20..5566172774df 100644 --- a/drivers/gpu/drm/nouveau/nouveau_pm.c +++ b/drivers/gpu/drm/nouveau/nouveau_pm.c | |||
@@ -52,7 +52,7 @@ nouveau_pm_perflvl_aux(struct drm_device *dev, struct nouveau_pm_level *perflvl, | |||
52 | { | 52 | { |
53 | struct nouveau_drm *drm = nouveau_drm(dev); | 53 | struct nouveau_drm *drm = nouveau_drm(dev); |
54 | struct nouveau_pm *pm = nouveau_pm(dev); | 54 | struct nouveau_pm *pm = nouveau_pm(dev); |
55 | struct nouveau_therm *therm = nouveau_therm(drm); | 55 | struct nouveau_therm *therm = nouveau_therm(drm->device); |
56 | int ret; | 56 | int ret; |
57 | 57 | ||
58 | /*XXX: not on all boards, we should control based on temperature | 58 | /*XXX: not on all boards, we should control based on temperature |
@@ -64,7 +64,6 @@ nouveau_pm_perflvl_aux(struct drm_device *dev, struct nouveau_pm_level *perflvl, | |||
64 | ret = therm->fan_set(therm, perflvl->fanspeed); | 64 | ret = therm->fan_set(therm, perflvl->fanspeed); |
65 | if (ret && ret != -ENODEV) { | 65 | if (ret && ret != -ENODEV) { |
66 | NV_ERROR(drm, "fanspeed set failed: %d\n", ret); | 66 | NV_ERROR(drm, "fanspeed set failed: %d\n", ret); |
67 | return ret; | ||
68 | } | 67 | } |
69 | } | 68 | } |
70 | 69 | ||
@@ -706,8 +705,7 @@ nouveau_hwmon_init(struct drm_device *dev) | |||
706 | struct device *hwmon_dev; | 705 | struct device *hwmon_dev; |
707 | int ret = 0; | 706 | int ret = 0; |
708 | 707 | ||
709 | if (!therm || !therm->temp_get || !therm->attr_get || | 708 | if (!therm || !therm->temp_get || !therm->attr_get || !therm->attr_set) |
710 | !therm->attr_set || therm->temp_get(therm) < 0) | ||
711 | return -ENODEV; | 709 | return -ENODEV; |
712 | 710 | ||
713 | hwmon_dev = hwmon_device_register(&dev->pdev->dev); | 711 | hwmon_dev = hwmon_device_register(&dev->pdev->dev); |
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c index 96184d02c8d9..2e566e123e9e 100644 --- a/drivers/gpu/drm/radeon/atombios_crtc.c +++ b/drivers/gpu/drm/radeon/atombios_crtc.c | |||
@@ -1690,10 +1690,10 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc) | |||
1690 | } | 1690 | } |
1691 | /* all other cases */ | 1691 | /* all other cases */ |
1692 | pll_in_use = radeon_get_pll_use_mask(crtc); | 1692 | pll_in_use = radeon_get_pll_use_mask(crtc); |
1693 | if (!(pll_in_use & (1 << ATOM_PPLL2))) | ||
1694 | return ATOM_PPLL2; | ||
1695 | if (!(pll_in_use & (1 << ATOM_PPLL1))) | 1693 | if (!(pll_in_use & (1 << ATOM_PPLL1))) |
1696 | return ATOM_PPLL1; | 1694 | return ATOM_PPLL1; |
1695 | if (!(pll_in_use & (1 << ATOM_PPLL2))) | ||
1696 | return ATOM_PPLL2; | ||
1697 | DRM_ERROR("unable to allocate a PPLL\n"); | 1697 | DRM_ERROR("unable to allocate a PPLL\n"); |
1698 | return ATOM_PPLL_INVALID; | 1698 | return ATOM_PPLL_INVALID; |
1699 | } else { | 1699 | } else { |
@@ -1715,10 +1715,10 @@ static int radeon_atom_pick_pll(struct drm_crtc *crtc) | |||
1715 | } | 1715 | } |
1716 | /* all other cases */ | 1716 | /* all other cases */ |
1717 | pll_in_use = radeon_get_pll_use_mask(crtc); | 1717 | pll_in_use = radeon_get_pll_use_mask(crtc); |
1718 | if (!(pll_in_use & (1 << ATOM_PPLL2))) | ||
1719 | return ATOM_PPLL2; | ||
1720 | if (!(pll_in_use & (1 << ATOM_PPLL1))) | 1718 | if (!(pll_in_use & (1 << ATOM_PPLL1))) |
1721 | return ATOM_PPLL1; | 1719 | return ATOM_PPLL1; |
1720 | if (!(pll_in_use & (1 << ATOM_PPLL2))) | ||
1721 | return ATOM_PPLL2; | ||
1722 | DRM_ERROR("unable to allocate a PPLL\n"); | 1722 | DRM_ERROR("unable to allocate a PPLL\n"); |
1723 | return ATOM_PPLL_INVALID; | 1723 | return ATOM_PPLL_INVALID; |
1724 | } else { | 1724 | } else { |
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index a1f49c5fd74b..14313ad43b76 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
@@ -3431,9 +3431,14 @@ void evergreen_pcie_gen2_enable(struct radeon_device *rdev) | |||
3431 | if (!(mask & DRM_PCIE_SPEED_50)) | 3431 | if (!(mask & DRM_PCIE_SPEED_50)) |
3432 | return; | 3432 | return; |
3433 | 3433 | ||
3434 | speed_cntl = RREG32_PCIE_P(PCIE_LC_SPEED_CNTL); | ||
3435 | if (speed_cntl & LC_CURRENT_DATA_RATE) { | ||
3436 | DRM_INFO("PCIE gen 2 link speeds already enabled\n"); | ||
3437 | return; | ||
3438 | } | ||
3439 | |||
3434 | DRM_INFO("enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0\n"); | 3440 | DRM_INFO("enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0\n"); |
3435 | 3441 | ||
3436 | speed_cntl = RREG32_PCIE_P(PCIE_LC_SPEED_CNTL); | ||
3437 | if ((speed_cntl & LC_OTHER_SIDE_EVER_SENT_GEN2) || | 3442 | if ((speed_cntl & LC_OTHER_SIDE_EVER_SENT_GEN2) || |
3438 | (speed_cntl & LC_OTHER_SIDE_SUPPORTS_GEN2)) { | 3443 | (speed_cntl & LC_OTHER_SIDE_SUPPORTS_GEN2)) { |
3439 | 3444 | ||
diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c index 8bcb554ea0c5..8c74c729586d 100644 --- a/drivers/gpu/drm/radeon/ni.c +++ b/drivers/gpu/drm/radeon/ni.c | |||
@@ -770,9 +770,13 @@ static int cayman_pcie_gart_enable(struct radeon_device *rdev) | |||
770 | WREG32(0x15DC, 0); | 770 | WREG32(0x15DC, 0); |
771 | 771 | ||
772 | /* empty context1-7 */ | 772 | /* empty context1-7 */ |
773 | /* Assign the pt base to something valid for now; the pts used for | ||
774 | * the VMs are determined by the application and setup and assigned | ||
775 | * on the fly in the vm part of radeon_gart.c | ||
776 | */ | ||
773 | for (i = 1; i < 8; i++) { | 777 | for (i = 1; i < 8; i++) { |
774 | WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR + (i << 2), 0); | 778 | WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR + (i << 2), 0); |
775 | WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR + (i << 2), 0); | 779 | WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR + (i << 2), rdev->vm_manager.max_pfn); |
776 | WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (i << 2), | 780 | WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (i << 2), |
777 | rdev->gart.table_addr >> 12); | 781 | rdev->gart.table_addr >> 12); |
778 | } | 782 | } |
@@ -1572,12 +1576,6 @@ void cayman_vm_flush(struct radeon_device *rdev, int ridx, struct radeon_vm *vm) | |||
1572 | if (vm == NULL) | 1576 | if (vm == NULL) |
1573 | return; | 1577 | return; |
1574 | 1578 | ||
1575 | radeon_ring_write(ring, PACKET0(VM_CONTEXT0_PAGE_TABLE_START_ADDR + (vm->id << 2), 0)); | ||
1576 | radeon_ring_write(ring, 0); | ||
1577 | |||
1578 | radeon_ring_write(ring, PACKET0(VM_CONTEXT0_PAGE_TABLE_END_ADDR + (vm->id << 2), 0)); | ||
1579 | radeon_ring_write(ring, vm->last_pfn); | ||
1580 | |||
1581 | radeon_ring_write(ring, PACKET0(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (vm->id << 2), 0)); | 1579 | radeon_ring_write(ring, PACKET0(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (vm->id << 2), 0)); |
1582 | radeon_ring_write(ring, vm->pd_gpu_addr >> 12); | 1580 | radeon_ring_write(ring, vm->pd_gpu_addr >> 12); |
1583 | 1581 | ||
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 70c800ff6190..cda280d157da 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -3703,6 +3703,12 @@ static void r600_pcie_gen2_enable(struct radeon_device *rdev) | |||
3703 | if (!(mask & DRM_PCIE_SPEED_50)) | 3703 | if (!(mask & DRM_PCIE_SPEED_50)) |
3704 | return; | 3704 | return; |
3705 | 3705 | ||
3706 | speed_cntl = RREG32_PCIE_P(PCIE_LC_SPEED_CNTL); | ||
3707 | if (speed_cntl & LC_CURRENT_DATA_RATE) { | ||
3708 | DRM_INFO("PCIE gen 2 link speeds already enabled\n"); | ||
3709 | return; | ||
3710 | } | ||
3711 | |||
3706 | DRM_INFO("enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0\n"); | 3712 | DRM_INFO("enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0\n"); |
3707 | 3713 | ||
3708 | /* 55 nm r6xx asics */ | 3714 | /* 55 nm r6xx asics */ |
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index b04c06444d8b..8c42d54c2e26 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -663,9 +663,14 @@ struct radeon_vm { | |||
663 | struct list_head list; | 663 | struct list_head list; |
664 | struct list_head va; | 664 | struct list_head va; |
665 | unsigned id; | 665 | unsigned id; |
666 | unsigned last_pfn; | 666 | |
667 | u64 pd_gpu_addr; | 667 | /* contains the page directory */ |
668 | struct radeon_sa_bo *sa_bo; | 668 | struct radeon_sa_bo *page_directory; |
669 | uint64_t pd_gpu_addr; | ||
670 | |||
671 | /* array of page tables, one for each page directory entry */ | ||
672 | struct radeon_sa_bo **page_tables; | ||
673 | |||
669 | struct mutex mutex; | 674 | struct mutex mutex; |
670 | /* last fence for cs using this vm */ | 675 | /* last fence for cs using this vm */ |
671 | struct radeon_fence *fence; | 676 | struct radeon_fence *fence; |
@@ -1843,9 +1848,10 @@ extern void radeon_ttm_set_active_vram_size(struct radeon_device *rdev, u64 size | |||
1843 | */ | 1848 | */ |
1844 | int radeon_vm_manager_init(struct radeon_device *rdev); | 1849 | int radeon_vm_manager_init(struct radeon_device *rdev); |
1845 | void radeon_vm_manager_fini(struct radeon_device *rdev); | 1850 | void radeon_vm_manager_fini(struct radeon_device *rdev); |
1846 | int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm); | 1851 | void radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm); |
1847 | void radeon_vm_fini(struct radeon_device *rdev, struct radeon_vm *vm); | 1852 | void radeon_vm_fini(struct radeon_device *rdev, struct radeon_vm *vm); |
1848 | int radeon_vm_alloc_pt(struct radeon_device *rdev, struct radeon_vm *vm); | 1853 | int radeon_vm_alloc_pt(struct radeon_device *rdev, struct radeon_vm *vm); |
1854 | void radeon_vm_add_to_lru(struct radeon_device *rdev, struct radeon_vm *vm); | ||
1849 | struct radeon_fence *radeon_vm_grab_id(struct radeon_device *rdev, | 1855 | struct radeon_fence *radeon_vm_grab_id(struct radeon_device *rdev, |
1850 | struct radeon_vm *vm, int ring); | 1856 | struct radeon_vm *vm, int ring); |
1851 | void radeon_vm_fence(struct radeon_device *rdev, | 1857 | void radeon_vm_fence(struct radeon_device *rdev, |
diff --git a/drivers/gpu/drm/radeon/radeon_acpi.c b/drivers/gpu/drm/radeon/radeon_acpi.c index b0a5688c67f8..196d28d99570 100644 --- a/drivers/gpu/drm/radeon/radeon_acpi.c +++ b/drivers/gpu/drm/radeon/radeon_acpi.c | |||
@@ -201,7 +201,7 @@ static int radeon_atif_verify_interface(acpi_handle handle, | |||
201 | 201 | ||
202 | size = *(u16 *) info->buffer.pointer; | 202 | size = *(u16 *) info->buffer.pointer; |
203 | if (size < 12) { | 203 | if (size < 12) { |
204 | DRM_INFO("ATIF buffer is too small: %lu\n", size); | 204 | DRM_INFO("ATIF buffer is too small: %zu\n", size); |
205 | err = -EINVAL; | 205 | err = -EINVAL; |
206 | goto out; | 206 | goto out; |
207 | } | 207 | } |
@@ -370,6 +370,7 @@ int radeon_atif_handler(struct radeon_device *rdev, | |||
370 | 370 | ||
371 | radeon_set_backlight_level(rdev, enc, req.backlight_level); | 371 | radeon_set_backlight_level(rdev, enc, req.backlight_level); |
372 | 372 | ||
373 | #if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE) | ||
373 | if (rdev->is_atom_bios) { | 374 | if (rdev->is_atom_bios) { |
374 | struct radeon_encoder_atom_dig *dig = enc->enc_priv; | 375 | struct radeon_encoder_atom_dig *dig = enc->enc_priv; |
375 | backlight_force_update(dig->bl_dev, | 376 | backlight_force_update(dig->bl_dev, |
@@ -379,6 +380,7 @@ int radeon_atif_handler(struct radeon_device *rdev, | |||
379 | backlight_force_update(dig->bl_dev, | 380 | backlight_force_update(dig->bl_dev, |
380 | BACKLIGHT_UPDATE_HOTKEY); | 381 | BACKLIGHT_UPDATE_HOTKEY); |
381 | } | 382 | } |
383 | #endif | ||
382 | } | 384 | } |
383 | } | 385 | } |
384 | /* TODO: check other events */ | 386 | /* TODO: check other events */ |
@@ -485,7 +487,7 @@ static int radeon_atcs_verify_interface(acpi_handle handle, | |||
485 | 487 | ||
486 | size = *(u16 *) info->buffer.pointer; | 488 | size = *(u16 *) info->buffer.pointer; |
487 | if (size < 8) { | 489 | if (size < 8) { |
488 | DRM_INFO("ATCS buffer is too small: %lu\n", size); | 490 | DRM_INFO("ATCS buffer is too small: %zu\n", size); |
489 | err = -EINVAL; | 491 | err = -EINVAL; |
490 | goto out; | 492 | goto out; |
491 | } | 493 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_atpx_handler.c b/drivers/gpu/drm/radeon/radeon_atpx_handler.c index 582e99449c12..1aa3f910b993 100644 --- a/drivers/gpu/drm/radeon/radeon_atpx_handler.c +++ b/drivers/gpu/drm/radeon/radeon_atpx_handler.c | |||
@@ -148,7 +148,7 @@ static int radeon_atpx_verify_interface(struct radeon_atpx *atpx) | |||
148 | 148 | ||
149 | size = *(u16 *) info->buffer.pointer; | 149 | size = *(u16 *) info->buffer.pointer; |
150 | if (size < 8) { | 150 | if (size < 8) { |
151 | printk("ATPX buffer is too small: %lu\n", size); | 151 | printk("ATPX buffer is too small: %zu\n", size); |
152 | err = -EINVAL; | 152 | err = -EINVAL; |
153 | goto out; | 153 | goto out; |
154 | } | 154 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c index cb7b7c062fef..41672cc563fb 100644 --- a/drivers/gpu/drm/radeon/radeon_cs.c +++ b/drivers/gpu/drm/radeon/radeon_cs.c | |||
@@ -478,6 +478,7 @@ static int radeon_cs_ib_vm_chunk(struct radeon_device *rdev, | |||
478 | } | 478 | } |
479 | 479 | ||
480 | out: | 480 | out: |
481 | radeon_vm_add_to_lru(rdev, vm); | ||
481 | mutex_unlock(&vm->mutex); | 482 | mutex_unlock(&vm->mutex); |
482 | mutex_unlock(&rdev->vm_manager.lock); | 483 | mutex_unlock(&rdev->vm_manager.lock); |
483 | return r; | 484 | return r; |
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 64a42647f08a..bd13ca09eb62 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c | |||
@@ -1018,6 +1018,10 @@ int radeon_device_init(struct radeon_device *rdev, | |||
1018 | return r; | 1018 | return r; |
1019 | /* initialize vm here */ | 1019 | /* initialize vm here */ |
1020 | mutex_init(&rdev->vm_manager.lock); | 1020 | mutex_init(&rdev->vm_manager.lock); |
1021 | /* Adjust VM size here. | ||
1022 | * Currently set to 4GB ((1 << 20) 4k pages). | ||
1023 | * Max GPUVM size for cayman and SI is 40 bits. | ||
1024 | */ | ||
1021 | rdev->vm_manager.max_pfn = 1 << 20; | 1025 | rdev->vm_manager.max_pfn = 1 << 20; |
1022 | INIT_LIST_HEAD(&rdev->vm_manager.lru_vm); | 1026 | INIT_LIST_HEAD(&rdev->vm_manager.lru_vm); |
1023 | 1027 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index f0c06d196b75..a7677dd1ce98 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c | |||
@@ -423,6 +423,18 @@ void radeon_gart_fini(struct radeon_device *rdev) | |||
423 | */ | 423 | */ |
424 | 424 | ||
425 | /** | 425 | /** |
426 | * radeon_vm_num_pde - return the number of page directory entries | ||
427 | * | ||
428 | * @rdev: radeon_device pointer | ||
429 | * | ||
430 | * Calculate the number of page directory entries (cayman+). | ||
431 | */ | ||
432 | static unsigned radeon_vm_num_pdes(struct radeon_device *rdev) | ||
433 | { | ||
434 | return rdev->vm_manager.max_pfn >> RADEON_VM_BLOCK_SIZE; | ||
435 | } | ||
436 | |||
437 | /** | ||
426 | * radeon_vm_directory_size - returns the size of the page directory in bytes | 438 | * radeon_vm_directory_size - returns the size of the page directory in bytes |
427 | * | 439 | * |
428 | * @rdev: radeon_device pointer | 440 | * @rdev: radeon_device pointer |
@@ -431,7 +443,7 @@ void radeon_gart_fini(struct radeon_device *rdev) | |||
431 | */ | 443 | */ |
432 | static unsigned radeon_vm_directory_size(struct radeon_device *rdev) | 444 | static unsigned radeon_vm_directory_size(struct radeon_device *rdev) |
433 | { | 445 | { |
434 | return (rdev->vm_manager.max_pfn >> RADEON_VM_BLOCK_SIZE) * 8; | 446 | return RADEON_GPU_PAGE_ALIGN(radeon_vm_num_pdes(rdev) * 8); |
435 | } | 447 | } |
436 | 448 | ||
437 | /** | 449 | /** |
@@ -451,11 +463,11 @@ int radeon_vm_manager_init(struct radeon_device *rdev) | |||
451 | 463 | ||
452 | if (!rdev->vm_manager.enabled) { | 464 | if (!rdev->vm_manager.enabled) { |
453 | /* allocate enough for 2 full VM pts */ | 465 | /* allocate enough for 2 full VM pts */ |
454 | size = RADEON_GPU_PAGE_ALIGN(radeon_vm_directory_size(rdev)); | 466 | size = radeon_vm_directory_size(rdev); |
455 | size += RADEON_GPU_PAGE_ALIGN(rdev->vm_manager.max_pfn * 8); | 467 | size += rdev->vm_manager.max_pfn * 8; |
456 | size *= 2; | 468 | size *= 2; |
457 | r = radeon_sa_bo_manager_init(rdev, &rdev->vm_manager.sa_manager, | 469 | r = radeon_sa_bo_manager_init(rdev, &rdev->vm_manager.sa_manager, |
458 | size, | 470 | RADEON_GPU_PAGE_ALIGN(size), |
459 | RADEON_GEM_DOMAIN_VRAM); | 471 | RADEON_GEM_DOMAIN_VRAM); |
460 | if (r) { | 472 | if (r) { |
461 | dev_err(rdev->dev, "failed to allocate vm bo (%dKB)\n", | 473 | dev_err(rdev->dev, "failed to allocate vm bo (%dKB)\n", |
@@ -476,7 +488,7 @@ int radeon_vm_manager_init(struct radeon_device *rdev) | |||
476 | 488 | ||
477 | /* restore page table */ | 489 | /* restore page table */ |
478 | list_for_each_entry(vm, &rdev->vm_manager.lru_vm, list) { | 490 | list_for_each_entry(vm, &rdev->vm_manager.lru_vm, list) { |
479 | if (vm->sa_bo == NULL) | 491 | if (vm->page_directory == NULL) |
480 | continue; | 492 | continue; |
481 | 493 | ||
482 | list_for_each_entry(bo_va, &vm->va, vm_list) { | 494 | list_for_each_entry(bo_va, &vm->va, vm_list) { |
@@ -500,16 +512,25 @@ static void radeon_vm_free_pt(struct radeon_device *rdev, | |||
500 | struct radeon_vm *vm) | 512 | struct radeon_vm *vm) |
501 | { | 513 | { |
502 | struct radeon_bo_va *bo_va; | 514 | struct radeon_bo_va *bo_va; |
515 | int i; | ||
503 | 516 | ||
504 | if (!vm->sa_bo) | 517 | if (!vm->page_directory) |
505 | return; | 518 | return; |
506 | 519 | ||
507 | list_del_init(&vm->list); | 520 | list_del_init(&vm->list); |
508 | radeon_sa_bo_free(rdev, &vm->sa_bo, vm->fence); | 521 | radeon_sa_bo_free(rdev, &vm->page_directory, vm->fence); |
509 | 522 | ||
510 | list_for_each_entry(bo_va, &vm->va, vm_list) { | 523 | list_for_each_entry(bo_va, &vm->va, vm_list) { |
511 | bo_va->valid = false; | 524 | bo_va->valid = false; |
512 | } | 525 | } |
526 | |||
527 | if (vm->page_tables == NULL) | ||
528 | return; | ||
529 | |||
530 | for (i = 0; i < radeon_vm_num_pdes(rdev); i++) | ||
531 | radeon_sa_bo_free(rdev, &vm->page_tables[i], vm->fence); | ||
532 | |||
533 | kfree(vm->page_tables); | ||
513 | } | 534 | } |
514 | 535 | ||
515 | /** | 536 | /** |
@@ -546,63 +567,106 @@ void radeon_vm_manager_fini(struct radeon_device *rdev) | |||
546 | } | 567 | } |
547 | 568 | ||
548 | /** | 569 | /** |
570 | * radeon_vm_evict - evict page table to make room for new one | ||
571 | * | ||
572 | * @rdev: radeon_device pointer | ||
573 | * @vm: VM we want to allocate something for | ||
574 | * | ||
575 | * Evict a VM from the lru, making sure that it isn't @vm. (cayman+). | ||
576 | * Returns 0 for success, -ENOMEM for failure. | ||
577 | * | ||
578 | * Global and local mutex must be locked! | ||
579 | */ | ||
580 | int radeon_vm_evict(struct radeon_device *rdev, struct radeon_vm *vm) | ||
581 | { | ||
582 | struct radeon_vm *vm_evict; | ||
583 | |||
584 | if (list_empty(&rdev->vm_manager.lru_vm)) | ||
585 | return -ENOMEM; | ||
586 | |||
587 | vm_evict = list_first_entry(&rdev->vm_manager.lru_vm, | ||
588 | struct radeon_vm, list); | ||
589 | if (vm_evict == vm) | ||
590 | return -ENOMEM; | ||
591 | |||
592 | mutex_lock(&vm_evict->mutex); | ||
593 | radeon_vm_free_pt(rdev, vm_evict); | ||
594 | mutex_unlock(&vm_evict->mutex); | ||
595 | return 0; | ||
596 | } | ||
597 | |||
598 | /** | ||
549 | * radeon_vm_alloc_pt - allocates a page table for a VM | 599 | * radeon_vm_alloc_pt - allocates a page table for a VM |
550 | * | 600 | * |
551 | * @rdev: radeon_device pointer | 601 | * @rdev: radeon_device pointer |
552 | * @vm: vm to bind | 602 | * @vm: vm to bind |
553 | * | 603 | * |
554 | * Allocate a page table for the requested vm (cayman+). | 604 | * Allocate a page table for the requested vm (cayman+). |
555 | * Also starts to populate the page table. | ||
556 | * Returns 0 for success, error for failure. | 605 | * Returns 0 for success, error for failure. |
557 | * | 606 | * |
558 | * Global and local mutex must be locked! | 607 | * Global and local mutex must be locked! |
559 | */ | 608 | */ |
560 | int radeon_vm_alloc_pt(struct radeon_device *rdev, struct radeon_vm *vm) | 609 | int radeon_vm_alloc_pt(struct radeon_device *rdev, struct radeon_vm *vm) |
561 | { | 610 | { |
562 | struct radeon_vm *vm_evict; | 611 | unsigned pd_size, pts_size; |
563 | int r; | ||
564 | u64 *pd_addr; | 612 | u64 *pd_addr; |
565 | int tables_size; | 613 | int r; |
566 | 614 | ||
567 | if (vm == NULL) { | 615 | if (vm == NULL) { |
568 | return -EINVAL; | 616 | return -EINVAL; |
569 | } | 617 | } |
570 | 618 | ||
571 | /* allocate enough to cover the current VM size */ | 619 | if (vm->page_directory != NULL) { |
572 | tables_size = RADEON_GPU_PAGE_ALIGN(radeon_vm_directory_size(rdev)); | ||
573 | tables_size += RADEON_GPU_PAGE_ALIGN(vm->last_pfn * 8); | ||
574 | |||
575 | if (vm->sa_bo != NULL) { | ||
576 | /* update lru */ | ||
577 | list_del_init(&vm->list); | ||
578 | list_add_tail(&vm->list, &rdev->vm_manager.lru_vm); | ||
579 | return 0; | 620 | return 0; |
580 | } | 621 | } |
581 | 622 | ||
582 | retry: | 623 | retry: |
583 | r = radeon_sa_bo_new(rdev, &rdev->vm_manager.sa_manager, &vm->sa_bo, | 624 | pd_size = RADEON_GPU_PAGE_ALIGN(radeon_vm_directory_size(rdev)); |
584 | tables_size, RADEON_GPU_PAGE_SIZE, false); | 625 | r = radeon_sa_bo_new(rdev, &rdev->vm_manager.sa_manager, |
626 | &vm->page_directory, pd_size, | ||
627 | RADEON_GPU_PAGE_SIZE, false); | ||
585 | if (r == -ENOMEM) { | 628 | if (r == -ENOMEM) { |
586 | if (list_empty(&rdev->vm_manager.lru_vm)) { | 629 | r = radeon_vm_evict(rdev, vm); |
630 | if (r) | ||
587 | return r; | 631 | return r; |
588 | } | ||
589 | vm_evict = list_first_entry(&rdev->vm_manager.lru_vm, struct radeon_vm, list); | ||
590 | mutex_lock(&vm_evict->mutex); | ||
591 | radeon_vm_free_pt(rdev, vm_evict); | ||
592 | mutex_unlock(&vm_evict->mutex); | ||
593 | goto retry; | 632 | goto retry; |
594 | 633 | ||
595 | } else if (r) { | 634 | } else if (r) { |
596 | return r; | 635 | return r; |
597 | } | 636 | } |
598 | 637 | ||
599 | pd_addr = radeon_sa_bo_cpu_addr(vm->sa_bo); | 638 | vm->pd_gpu_addr = radeon_sa_bo_gpu_addr(vm->page_directory); |
600 | vm->pd_gpu_addr = radeon_sa_bo_gpu_addr(vm->sa_bo); | 639 | |
601 | memset(pd_addr, 0, tables_size); | 640 | /* Initially clear the page directory */ |
641 | pd_addr = radeon_sa_bo_cpu_addr(vm->page_directory); | ||
642 | memset(pd_addr, 0, pd_size); | ||
643 | |||
644 | pts_size = radeon_vm_num_pdes(rdev) * sizeof(struct radeon_sa_bo *); | ||
645 | vm->page_tables = kzalloc(pts_size, GFP_KERNEL); | ||
646 | |||
647 | if (vm->page_tables == NULL) { | ||
648 | DRM_ERROR("Cannot allocate memory for page table array\n"); | ||
649 | radeon_sa_bo_free(rdev, &vm->page_directory, vm->fence); | ||
650 | return -ENOMEM; | ||
651 | } | ||
652 | |||
653 | return 0; | ||
654 | } | ||
602 | 655 | ||
656 | /** | ||
657 | * radeon_vm_add_to_lru - add VMs page table to LRU list | ||
658 | * | ||
659 | * @rdev: radeon_device pointer | ||
660 | * @vm: vm to add to LRU | ||
661 | * | ||
662 | * Add the allocated page table to the LRU list (cayman+). | ||
663 | * | ||
664 | * Global mutex must be locked! | ||
665 | */ | ||
666 | void radeon_vm_add_to_lru(struct radeon_device *rdev, struct radeon_vm *vm) | ||
667 | { | ||
668 | list_del_init(&vm->list); | ||
603 | list_add_tail(&vm->list, &rdev->vm_manager.lru_vm); | 669 | list_add_tail(&vm->list, &rdev->vm_manager.lru_vm); |
604 | return radeon_vm_bo_update_pte(rdev, vm, rdev->ring_tmp_bo.bo, | ||
605 | &rdev->ring_tmp_bo.bo->tbo.mem); | ||
606 | } | 670 | } |
607 | 671 | ||
608 | /** | 672 | /** |
@@ -793,20 +857,6 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev, | |||
793 | } | 857 | } |
794 | 858 | ||
795 | mutex_lock(&vm->mutex); | 859 | mutex_lock(&vm->mutex); |
796 | if (last_pfn > vm->last_pfn) { | ||
797 | /* release mutex and lock in right order */ | ||
798 | mutex_unlock(&vm->mutex); | ||
799 | mutex_lock(&rdev->vm_manager.lock); | ||
800 | mutex_lock(&vm->mutex); | ||
801 | /* and check again */ | ||
802 | if (last_pfn > vm->last_pfn) { | ||
803 | /* grow va space 32M by 32M */ | ||
804 | unsigned align = ((32 << 20) >> 12) - 1; | ||
805 | radeon_vm_free_pt(rdev, vm); | ||
806 | vm->last_pfn = (last_pfn + align) & ~align; | ||
807 | } | ||
808 | mutex_unlock(&rdev->vm_manager.lock); | ||
809 | } | ||
810 | head = &vm->va; | 860 | head = &vm->va; |
811 | last_offset = 0; | 861 | last_offset = 0; |
812 | list_for_each_entry(tmp, &vm->va, vm_list) { | 862 | list_for_each_entry(tmp, &vm->va, vm_list) { |
@@ -865,6 +915,155 @@ uint64_t radeon_vm_map_gart(struct radeon_device *rdev, uint64_t addr) | |||
865 | } | 915 | } |
866 | 916 | ||
867 | /** | 917 | /** |
918 | * radeon_vm_update_pdes - make sure that page directory is valid | ||
919 | * | ||
920 | * @rdev: radeon_device pointer | ||
921 | * @vm: requested vm | ||
922 | * @start: start of GPU address range | ||
923 | * @end: end of GPU address range | ||
924 | * | ||
925 | * Allocates new page tables if necessary | ||
926 | * and updates the page directory (cayman+). | ||
927 | * Returns 0 for success, error for failure. | ||
928 | * | ||
929 | * Global and local mutex must be locked! | ||
930 | */ | ||
931 | static int radeon_vm_update_pdes(struct radeon_device *rdev, | ||
932 | struct radeon_vm *vm, | ||
933 | uint64_t start, uint64_t end) | ||
934 | { | ||
935 | static const uint32_t incr = RADEON_VM_PTE_COUNT * 8; | ||
936 | |||
937 | uint64_t last_pde = ~0, last_pt = ~0; | ||
938 | unsigned count = 0; | ||
939 | uint64_t pt_idx; | ||
940 | int r; | ||
941 | |||
942 | start = (start / RADEON_GPU_PAGE_SIZE) >> RADEON_VM_BLOCK_SIZE; | ||
943 | end = (end / RADEON_GPU_PAGE_SIZE) >> RADEON_VM_BLOCK_SIZE; | ||
944 | |||
945 | /* walk over the address space and update the page directory */ | ||
946 | for (pt_idx = start; pt_idx <= end; ++pt_idx) { | ||
947 | uint64_t pde, pt; | ||
948 | |||
949 | if (vm->page_tables[pt_idx]) | ||
950 | continue; | ||
951 | |||
952 | retry: | ||
953 | r = radeon_sa_bo_new(rdev, &rdev->vm_manager.sa_manager, | ||
954 | &vm->page_tables[pt_idx], | ||
955 | RADEON_VM_PTE_COUNT * 8, | ||
956 | RADEON_GPU_PAGE_SIZE, false); | ||
957 | |||
958 | if (r == -ENOMEM) { | ||
959 | r = radeon_vm_evict(rdev, vm); | ||
960 | if (r) | ||
961 | return r; | ||
962 | goto retry; | ||
963 | } else if (r) { | ||
964 | return r; | ||
965 | } | ||
966 | |||
967 | pde = vm->pd_gpu_addr + pt_idx * 8; | ||
968 | |||
969 | pt = radeon_sa_bo_gpu_addr(vm->page_tables[pt_idx]); | ||
970 | |||
971 | if (((last_pde + 8 * count) != pde) || | ||
972 | ((last_pt + incr * count) != pt)) { | ||
973 | |||
974 | if (count) { | ||
975 | radeon_asic_vm_set_page(rdev, last_pde, | ||
976 | last_pt, count, incr, | ||
977 | RADEON_VM_PAGE_VALID); | ||
978 | } | ||
979 | |||
980 | count = 1; | ||
981 | last_pde = pde; | ||
982 | last_pt = pt; | ||
983 | } else { | ||
984 | ++count; | ||
985 | } | ||
986 | } | ||
987 | |||
988 | if (count) { | ||
989 | radeon_asic_vm_set_page(rdev, last_pde, last_pt, count, | ||
990 | incr, RADEON_VM_PAGE_VALID); | ||
991 | |||
992 | } | ||
993 | |||
994 | return 0; | ||
995 | } | ||
996 | |||
997 | /** | ||
998 | * radeon_vm_update_ptes - make sure that page tables are valid | ||
999 | * | ||
1000 | * @rdev: radeon_device pointer | ||
1001 | * @vm: requested vm | ||
1002 | * @start: start of GPU address range | ||
1003 | * @end: end of GPU address range | ||
1004 | * @dst: destination address to map to | ||
1005 | * @flags: mapping flags | ||
1006 | * | ||
1007 | * Update the page tables in the range @start - @end (cayman+). | ||
1008 | * | ||
1009 | * Global and local mutex must be locked! | ||
1010 | */ | ||
1011 | static void radeon_vm_update_ptes(struct radeon_device *rdev, | ||
1012 | struct radeon_vm *vm, | ||
1013 | uint64_t start, uint64_t end, | ||
1014 | uint64_t dst, uint32_t flags) | ||
1015 | { | ||
1016 | static const uint64_t mask = RADEON_VM_PTE_COUNT - 1; | ||
1017 | |||
1018 | uint64_t last_pte = ~0, last_dst = ~0; | ||
1019 | unsigned count = 0; | ||
1020 | uint64_t addr; | ||
1021 | |||
1022 | start = start / RADEON_GPU_PAGE_SIZE; | ||
1023 | end = end / RADEON_GPU_PAGE_SIZE; | ||
1024 | |||
1025 | /* walk over the address space and update the page tables */ | ||
1026 | for (addr = start; addr < end; ) { | ||
1027 | uint64_t pt_idx = addr >> RADEON_VM_BLOCK_SIZE; | ||
1028 | unsigned nptes; | ||
1029 | uint64_t pte; | ||
1030 | |||
1031 | if ((addr & ~mask) == (end & ~mask)) | ||
1032 | nptes = end - addr; | ||
1033 | else | ||
1034 | nptes = RADEON_VM_PTE_COUNT - (addr & mask); | ||
1035 | |||
1036 | pte = radeon_sa_bo_gpu_addr(vm->page_tables[pt_idx]); | ||
1037 | pte += (addr & mask) * 8; | ||
1038 | |||
1039 | if (((last_pte + 8 * count) != pte) || | ||
1040 | ((count + nptes) > 1 << 11)) { | ||
1041 | |||
1042 | if (count) { | ||
1043 | radeon_asic_vm_set_page(rdev, last_pte, | ||
1044 | last_dst, count, | ||
1045 | RADEON_GPU_PAGE_SIZE, | ||
1046 | flags); | ||
1047 | } | ||
1048 | |||
1049 | count = nptes; | ||
1050 | last_pte = pte; | ||
1051 | last_dst = dst; | ||
1052 | } else { | ||
1053 | count += nptes; | ||
1054 | } | ||
1055 | |||
1056 | addr += nptes; | ||
1057 | dst += nptes * RADEON_GPU_PAGE_SIZE; | ||
1058 | } | ||
1059 | |||
1060 | if (count) { | ||
1061 | radeon_asic_vm_set_page(rdev, last_pte, last_dst, count, | ||
1062 | RADEON_GPU_PAGE_SIZE, flags); | ||
1063 | } | ||
1064 | } | ||
1065 | |||
1066 | /** | ||
868 | * radeon_vm_bo_update_pte - map a bo into the vm page table | 1067 | * radeon_vm_bo_update_pte - map a bo into the vm page table |
869 | * | 1068 | * |
870 | * @rdev: radeon_device pointer | 1069 | * @rdev: radeon_device pointer |
@@ -887,12 +1086,11 @@ int radeon_vm_bo_update_pte(struct radeon_device *rdev, | |||
887 | struct radeon_semaphore *sem = NULL; | 1086 | struct radeon_semaphore *sem = NULL; |
888 | struct radeon_bo_va *bo_va; | 1087 | struct radeon_bo_va *bo_va; |
889 | unsigned nptes, npdes, ndw; | 1088 | unsigned nptes, npdes, ndw; |
890 | uint64_t pe, addr; | 1089 | uint64_t addr; |
891 | uint64_t pfn; | ||
892 | int r; | 1090 | int r; |
893 | 1091 | ||
894 | /* nothing to do if vm isn't bound */ | 1092 | /* nothing to do if vm isn't bound */ |
895 | if (vm->sa_bo == NULL) | 1093 | if (vm->page_directory == NULL) |
896 | return 0; | 1094 | return 0; |
897 | 1095 | ||
898 | bo_va = radeon_vm_bo_find(vm, bo); | 1096 | bo_va = radeon_vm_bo_find(vm, bo); |
@@ -939,25 +1137,29 @@ int radeon_vm_bo_update_pte(struct radeon_device *rdev, | |||
939 | } | 1137 | } |
940 | } | 1138 | } |
941 | 1139 | ||
942 | /* estimate number of dw needed */ | ||
943 | /* reserve space for 32-bit padding */ | ||
944 | ndw = 32; | ||
945 | |||
946 | nptes = radeon_bo_ngpu_pages(bo); | 1140 | nptes = radeon_bo_ngpu_pages(bo); |
947 | 1141 | ||
948 | pfn = (bo_va->soffset / RADEON_GPU_PAGE_SIZE); | 1142 | /* assume two extra pdes in case the mapping overlaps the borders */ |
1143 | npdes = (nptes >> RADEON_VM_BLOCK_SIZE) + 2; | ||
949 | 1144 | ||
950 | /* handle cases where a bo spans several pdes */ | 1145 | /* estimate number of dw needed */ |
951 | npdes = (ALIGN(pfn + nptes, RADEON_VM_PTE_COUNT) - | 1146 | /* semaphore, fence and padding */ |
952 | (pfn & ~(RADEON_VM_PTE_COUNT - 1))) >> RADEON_VM_BLOCK_SIZE; | 1147 | ndw = 32; |
1148 | |||
1149 | if (RADEON_VM_BLOCK_SIZE > 11) | ||
1150 | /* reserve space for one header for every 2k dwords */ | ||
1151 | ndw += (nptes >> 11) * 3; | ||
1152 | else | ||
1153 | /* reserve space for one header for | ||
1154 | every (1 << BLOCK_SIZE) entries */ | ||
1155 | ndw += (nptes >> RADEON_VM_BLOCK_SIZE) * 3; | ||
953 | 1156 | ||
954 | /* reserve space for one header for every 2k dwords */ | ||
955 | ndw += (nptes >> 11) * 3; | ||
956 | /* reserve space for pte addresses */ | 1157 | /* reserve space for pte addresses */ |
957 | ndw += nptes * 2; | 1158 | ndw += nptes * 2; |
958 | 1159 | ||
959 | /* reserve space for one header for every 2k dwords */ | 1160 | /* reserve space for one header for every 2k dwords */ |
960 | ndw += (npdes >> 11) * 3; | 1161 | ndw += (npdes >> 11) * 3; |
1162 | |||
961 | /* reserve space for pde addresses */ | 1163 | /* reserve space for pde addresses */ |
962 | ndw += npdes * 2; | 1164 | ndw += npdes * 2; |
963 | 1165 | ||
@@ -971,22 +1173,14 @@ int radeon_vm_bo_update_pte(struct radeon_device *rdev, | |||
971 | radeon_fence_note_sync(vm->fence, ridx); | 1173 | radeon_fence_note_sync(vm->fence, ridx); |
972 | } | 1174 | } |
973 | 1175 | ||
974 | /* update page table entries */ | 1176 | r = radeon_vm_update_pdes(rdev, vm, bo_va->soffset, bo_va->eoffset); |
975 | pe = vm->pd_gpu_addr; | 1177 | if (r) { |
976 | pe += radeon_vm_directory_size(rdev); | 1178 | radeon_ring_unlock_undo(rdev, ring); |
977 | pe += (bo_va->soffset / RADEON_GPU_PAGE_SIZE) * 8; | 1179 | return r; |
978 | 1180 | } | |
979 | radeon_asic_vm_set_page(rdev, pe, addr, nptes, | ||
980 | RADEON_GPU_PAGE_SIZE, bo_va->flags); | ||
981 | |||
982 | /* update page directory entries */ | ||
983 | addr = pe; | ||
984 | |||
985 | pe = vm->pd_gpu_addr; | ||
986 | pe += ((bo_va->soffset / RADEON_GPU_PAGE_SIZE) >> RADEON_VM_BLOCK_SIZE) * 8; | ||
987 | 1181 | ||
988 | radeon_asic_vm_set_page(rdev, pe, addr, npdes, | 1182 | radeon_vm_update_ptes(rdev, vm, bo_va->soffset, bo_va->eoffset, |
989 | RADEON_VM_PTE_COUNT * 8, RADEON_VM_PAGE_VALID); | 1183 | addr, bo_va->flags); |
990 | 1184 | ||
991 | radeon_fence_unref(&vm->fence); | 1185 | radeon_fence_unref(&vm->fence); |
992 | r = radeon_fence_emit(rdev, &vm->fence, ridx); | 1186 | r = radeon_fence_emit(rdev, &vm->fence, ridx); |
@@ -997,6 +1191,7 @@ int radeon_vm_bo_update_pte(struct radeon_device *rdev, | |||
997 | radeon_ring_unlock_commit(rdev, ring); | 1191 | radeon_ring_unlock_commit(rdev, ring); |
998 | radeon_semaphore_free(rdev, &sem, vm->fence); | 1192 | radeon_semaphore_free(rdev, &sem, vm->fence); |
999 | radeon_fence_unref(&vm->last_flush); | 1193 | radeon_fence_unref(&vm->last_flush); |
1194 | |||
1000 | return 0; | 1195 | return 0; |
1001 | } | 1196 | } |
1002 | 1197 | ||
@@ -1056,31 +1251,15 @@ void radeon_vm_bo_invalidate(struct radeon_device *rdev, | |||
1056 | * @rdev: radeon_device pointer | 1251 | * @rdev: radeon_device pointer |
1057 | * @vm: requested vm | 1252 | * @vm: requested vm |
1058 | * | 1253 | * |
1059 | * Init @vm (cayman+). | 1254 | * Init @vm fields (cayman+). |
1060 | * Map the IB pool and any other shared objects into the VM | ||
1061 | * by default as it's used by all VMs. | ||
1062 | * Returns 0 for success, error for failure. | ||
1063 | */ | 1255 | */ |
1064 | int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm) | 1256 | void radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm) |
1065 | { | 1257 | { |
1066 | struct radeon_bo_va *bo_va; | ||
1067 | int r; | ||
1068 | |||
1069 | vm->id = 0; | 1258 | vm->id = 0; |
1070 | vm->fence = NULL; | 1259 | vm->fence = NULL; |
1071 | vm->last_pfn = 0; | ||
1072 | mutex_init(&vm->mutex); | 1260 | mutex_init(&vm->mutex); |
1073 | INIT_LIST_HEAD(&vm->list); | 1261 | INIT_LIST_HEAD(&vm->list); |
1074 | INIT_LIST_HEAD(&vm->va); | 1262 | INIT_LIST_HEAD(&vm->va); |
1075 | |||
1076 | /* map the ib pool buffer at 0 in virtual address space, set | ||
1077 | * read only | ||
1078 | */ | ||
1079 | bo_va = radeon_vm_bo_add(rdev, vm, rdev->ring_tmp_bo.bo); | ||
1080 | r = radeon_vm_bo_set_addr(rdev, bo_va, RADEON_VA_IB_OFFSET, | ||
1081 | RADEON_VM_PAGE_READABLE | | ||
1082 | RADEON_VM_PAGE_SNOOPED); | ||
1083 | return r; | ||
1084 | } | 1263 | } |
1085 | 1264 | ||
1086 | /** | 1265 | /** |
@@ -1102,17 +1281,6 @@ void radeon_vm_fini(struct radeon_device *rdev, struct radeon_vm *vm) | |||
1102 | radeon_vm_free_pt(rdev, vm); | 1281 | radeon_vm_free_pt(rdev, vm); |
1103 | mutex_unlock(&rdev->vm_manager.lock); | 1282 | mutex_unlock(&rdev->vm_manager.lock); |
1104 | 1283 | ||
1105 | /* remove all bo at this point non are busy any more because unbind | ||
1106 | * waited for the last vm fence to signal | ||
1107 | */ | ||
1108 | r = radeon_bo_reserve(rdev->ring_tmp_bo.bo, false); | ||
1109 | if (!r) { | ||
1110 | bo_va = radeon_vm_bo_find(vm, rdev->ring_tmp_bo.bo); | ||
1111 | list_del_init(&bo_va->bo_list); | ||
1112 | list_del_init(&bo_va->vm_list); | ||
1113 | radeon_bo_unreserve(rdev->ring_tmp_bo.bo); | ||
1114 | kfree(bo_va); | ||
1115 | } | ||
1116 | if (!list_empty(&vm->va)) { | 1284 | if (!list_empty(&vm->va)) { |
1117 | dev_err(rdev->dev, "still active bo inside vm\n"); | 1285 | dev_err(rdev->dev, "still active bo inside vm\n"); |
1118 | } | 1286 | } |
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 83b8d8aa71c0..dc781c49b96b 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c | |||
@@ -419,6 +419,7 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) | |||
419 | /* new gpu have virtual address space support */ | 419 | /* new gpu have virtual address space support */ |
420 | if (rdev->family >= CHIP_CAYMAN) { | 420 | if (rdev->family >= CHIP_CAYMAN) { |
421 | struct radeon_fpriv *fpriv; | 421 | struct radeon_fpriv *fpriv; |
422 | struct radeon_bo_va *bo_va; | ||
422 | int r; | 423 | int r; |
423 | 424 | ||
424 | fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL); | 425 | fpriv = kzalloc(sizeof(*fpriv), GFP_KERNEL); |
@@ -426,7 +427,15 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) | |||
426 | return -ENOMEM; | 427 | return -ENOMEM; |
427 | } | 428 | } |
428 | 429 | ||
429 | r = radeon_vm_init(rdev, &fpriv->vm); | 430 | radeon_vm_init(rdev, &fpriv->vm); |
431 | |||
432 | /* map the ib pool buffer read only into | ||
433 | * virtual address space */ | ||
434 | bo_va = radeon_vm_bo_add(rdev, &fpriv->vm, | ||
435 | rdev->ring_tmp_bo.bo); | ||
436 | r = radeon_vm_bo_set_addr(rdev, bo_va, RADEON_VA_IB_OFFSET, | ||
437 | RADEON_VM_PAGE_READABLE | | ||
438 | RADEON_VM_PAGE_SNOOPED); | ||
430 | if (r) { | 439 | if (r) { |
431 | radeon_vm_fini(rdev, &fpriv->vm); | 440 | radeon_vm_fini(rdev, &fpriv->vm); |
432 | kfree(fpriv); | 441 | kfree(fpriv); |
@@ -454,6 +463,17 @@ void radeon_driver_postclose_kms(struct drm_device *dev, | |||
454 | /* new gpu have virtual address space support */ | 463 | /* new gpu have virtual address space support */ |
455 | if (rdev->family >= CHIP_CAYMAN && file_priv->driver_priv) { | 464 | if (rdev->family >= CHIP_CAYMAN && file_priv->driver_priv) { |
456 | struct radeon_fpriv *fpriv = file_priv->driver_priv; | 465 | struct radeon_fpriv *fpriv = file_priv->driver_priv; |
466 | struct radeon_bo_va *bo_va; | ||
467 | int r; | ||
468 | |||
469 | r = radeon_bo_reserve(rdev->ring_tmp_bo.bo, false); | ||
470 | if (!r) { | ||
471 | bo_va = radeon_vm_bo_find(&fpriv->vm, | ||
472 | rdev->ring_tmp_bo.bo); | ||
473 | if (bo_va) | ||
474 | radeon_vm_bo_rmv(rdev, bo_va); | ||
475 | radeon_bo_unreserve(rdev->ring_tmp_bo.bo); | ||
476 | } | ||
457 | 477 | ||
458 | radeon_vm_fini(rdev, &fpriv->vm); | 478 | radeon_vm_fini(rdev, &fpriv->vm); |
459 | kfree(fpriv); | 479 | kfree(fpriv); |
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c index 92487e614778..a13ad9d707cf 100644 --- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c | |||
@@ -269,27 +269,6 @@ static const struct drm_encoder_helper_funcs radeon_legacy_lvds_helper_funcs = { | |||
269 | .disable = radeon_legacy_encoder_disable, | 269 | .disable = radeon_legacy_encoder_disable, |
270 | }; | 270 | }; |
271 | 271 | ||
272 | #if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE) | ||
273 | |||
274 | static uint8_t radeon_legacy_lvds_level(struct backlight_device *bd) | ||
275 | { | ||
276 | struct radeon_backlight_privdata *pdata = bl_get_data(bd); | ||
277 | uint8_t level; | ||
278 | |||
279 | /* Convert brightness to hardware level */ | ||
280 | if (bd->props.brightness < 0) | ||
281 | level = 0; | ||
282 | else if (bd->props.brightness > RADEON_MAX_BL_LEVEL) | ||
283 | level = RADEON_MAX_BL_LEVEL; | ||
284 | else | ||
285 | level = bd->props.brightness; | ||
286 | |||
287 | if (pdata->negative) | ||
288 | level = RADEON_MAX_BL_LEVEL - level; | ||
289 | |||
290 | return level; | ||
291 | } | ||
292 | |||
293 | u8 | 272 | u8 |
294 | radeon_legacy_get_backlight_level(struct radeon_encoder *radeon_encoder) | 273 | radeon_legacy_get_backlight_level(struct radeon_encoder *radeon_encoder) |
295 | { | 274 | { |
@@ -331,6 +310,27 @@ radeon_legacy_set_backlight_level(struct radeon_encoder *radeon_encoder, u8 leve | |||
331 | radeon_legacy_lvds_update(&radeon_encoder->base, dpms_mode); | 310 | radeon_legacy_lvds_update(&radeon_encoder->base, dpms_mode); |
332 | } | 311 | } |
333 | 312 | ||
313 | #if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE) | ||
314 | |||
315 | static uint8_t radeon_legacy_lvds_level(struct backlight_device *bd) | ||
316 | { | ||
317 | struct radeon_backlight_privdata *pdata = bl_get_data(bd); | ||
318 | uint8_t level; | ||
319 | |||
320 | /* Convert brightness to hardware level */ | ||
321 | if (bd->props.brightness < 0) | ||
322 | level = 0; | ||
323 | else if (bd->props.brightness > RADEON_MAX_BL_LEVEL) | ||
324 | level = RADEON_MAX_BL_LEVEL; | ||
325 | else | ||
326 | level = bd->props.brightness; | ||
327 | |||
328 | if (pdata->negative) | ||
329 | level = RADEON_MAX_BL_LEVEL - level; | ||
330 | |||
331 | return level; | ||
332 | } | ||
333 | |||
334 | static int radeon_legacy_backlight_update_status(struct backlight_device *bd) | 334 | static int radeon_legacy_backlight_update_status(struct backlight_device *bd) |
335 | { | 335 | { |
336 | struct radeon_backlight_privdata *pdata = bl_get_data(bd); | 336 | struct radeon_backlight_privdata *pdata = bl_get_data(bd); |
@@ -991,11 +991,7 @@ static void radeon_legacy_tmds_ext_mode_set(struct drm_encoder *encoder, | |||
991 | static void radeon_ext_tmds_enc_destroy(struct drm_encoder *encoder) | 991 | static void radeon_ext_tmds_enc_destroy(struct drm_encoder *encoder) |
992 | { | 992 | { |
993 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); | 993 | struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); |
994 | struct radeon_encoder_ext_tmds *tmds = radeon_encoder->enc_priv; | 994 | /* don't destroy the i2c bus record here, this will be done in radeon_i2c_fini */ |
995 | if (tmds) { | ||
996 | if (tmds->i2c_bus) | ||
997 | radeon_i2c_destroy(tmds->i2c_bus); | ||
998 | } | ||
999 | kfree(radeon_encoder->enc_priv); | 995 | kfree(radeon_encoder->enc_priv); |
1000 | drm_encoder_cleanup(encoder); | 996 | drm_encoder_cleanup(encoder); |
1001 | kfree(radeon_encoder); | 997 | kfree(radeon_encoder); |
diff --git a/drivers/gpu/drm/radeon/radeon_ring.c b/drivers/gpu/drm/radeon/radeon_ring.c index bba66902c83b..47634f27f2e5 100644 --- a/drivers/gpu/drm/radeon/radeon_ring.c +++ b/drivers/gpu/drm/radeon/radeon_ring.c | |||
@@ -305,7 +305,7 @@ void radeon_ring_write(struct radeon_ring *ring, uint32_t v) | |||
305 | { | 305 | { |
306 | #if DRM_DEBUG_CODE | 306 | #if DRM_DEBUG_CODE |
307 | if (ring->count_dw <= 0) { | 307 | if (ring->count_dw <= 0) { |
308 | DRM_ERROR("radeon: writting more dword to ring than expected !\n"); | 308 | DRM_ERROR("radeon: writing more dwords to the ring than expected!\n"); |
309 | } | 309 | } |
310 | #endif | 310 | #endif |
311 | ring->ring[ring->wptr++] = v; | 311 | ring->ring[ring->wptr++] = v; |
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index f79633a036c3..df8dd7701643 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c | |||
@@ -2407,12 +2407,13 @@ static int si_pcie_gart_enable(struct radeon_device *rdev) | |||
2407 | WREG32(0x15DC, 0); | 2407 | WREG32(0x15DC, 0); |
2408 | 2408 | ||
2409 | /* empty context1-15 */ | 2409 | /* empty context1-15 */ |
2410 | /* FIXME start with 4G, once using 2 level pt switch to full | ||
2411 | * vm size space | ||
2412 | */ | ||
2413 | /* set vm size, must be a multiple of 4 */ | 2410 | /* set vm size, must be a multiple of 4 */ |
2414 | WREG32(VM_CONTEXT1_PAGE_TABLE_START_ADDR, 0); | 2411 | WREG32(VM_CONTEXT1_PAGE_TABLE_START_ADDR, 0); |
2415 | WREG32(VM_CONTEXT1_PAGE_TABLE_END_ADDR, rdev->vm_manager.max_pfn); | 2412 | WREG32(VM_CONTEXT1_PAGE_TABLE_END_ADDR, rdev->vm_manager.max_pfn); |
2413 | /* Assign the pt base to something valid for now; the pts used for | ||
2414 | * the VMs are determined by the application and setup and assigned | ||
2415 | * on the fly in the vm part of radeon_gart.c | ||
2416 | */ | ||
2416 | for (i = 1; i < 16; i++) { | 2417 | for (i = 1; i < 16; i++) { |
2417 | if (i < 8) | 2418 | if (i < 8) |
2418 | WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (i << 2), | 2419 | WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (i << 2), |
diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index dd13e3a4c272..4ef0d80b57f4 100644 --- a/drivers/media/Kconfig +++ b/drivers/media/Kconfig | |||
@@ -163,19 +163,21 @@ source "drivers/media/common/Kconfig" | |||
163 | # | 163 | # |
164 | 164 | ||
165 | config MEDIA_SUBDRV_AUTOSELECT | 165 | config MEDIA_SUBDRV_AUTOSELECT |
166 | bool "Autoselect analog and hybrid tuner modules to build" | 166 | bool "Autoselect tuners and i2c modules to build" |
167 | depends on MEDIA_TUNER | 167 | depends on MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT || MEDIA_CAMERA_SUPPORT |
168 | default y | 168 | default y |
169 | help | 169 | help |
170 | By default, a TV driver auto-selects all possible tuners | 170 | By default, a media driver auto-selects all possible i2c |
171 | thar could be used by the driver. | 171 | devices that are used by any of the supported devices. |
172 | 172 | ||
173 | This is generally the right thing to do, except when there | 173 | This is generally the right thing to do, except when there |
174 | are strict constraints with regards to the kernel size. | 174 | are strict constraints with regards to the kernel size, |
175 | like on embedded systems. | ||
175 | 176 | ||
176 | Use this option with care, as deselecting tuner drivers which | 177 | Use this option with care, as deselecting ancillary drivers which |
177 | are in fact necessary will result in TV devices which cannot | 178 | are, in fact, necessary will result in the lack of the needed |
178 | be tuned due to lack of the tuning driver. | 179 | functionality for your device (it may not tune or may not have |
180 | the need demodulers). | ||
179 | 181 | ||
180 | If unsure say Y. | 182 | If unsure say Y. |
181 | 183 | ||
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index b721902bb6b4..b2530b002125 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -1519,7 +1519,7 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev) | |||
1519 | /* no need to lock since we're protected by rtnl_lock */ | 1519 | /* no need to lock since we're protected by rtnl_lock */ |
1520 | if (slave_dev->features & NETIF_F_VLAN_CHALLENGED) { | 1520 | if (slave_dev->features & NETIF_F_VLAN_CHALLENGED) { |
1521 | pr_debug("%s: NETIF_F_VLAN_CHALLENGED\n", slave_dev->name); | 1521 | pr_debug("%s: NETIF_F_VLAN_CHALLENGED\n", slave_dev->name); |
1522 | if (bond_vlan_used(bond)) { | 1522 | if (vlan_uses_dev(bond_dev)) { |
1523 | pr_err("%s: Error: cannot enslave VLAN challenged slave %s on VLAN enabled bond %s\n", | 1523 | pr_err("%s: Error: cannot enslave VLAN challenged slave %s on VLAN enabled bond %s\n", |
1524 | bond_dev->name, slave_dev->name, bond_dev->name); | 1524 | bond_dev->name, slave_dev->name, bond_dev->name); |
1525 | return -EPERM; | 1525 | return -EPERM; |
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 24220992413f..4833b6a9031c 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | |||
@@ -2957,9 +2957,13 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2957 | skb_shinfo(skb)->nr_frags + | 2957 | skb_shinfo(skb)->nr_frags + |
2958 | BDS_PER_TX_PKT + | 2958 | BDS_PER_TX_PKT + |
2959 | NEXT_CNT_PER_TX_PKT(MAX_BDS_PER_TX_PKT))) { | 2959 | NEXT_CNT_PER_TX_PKT(MAX_BDS_PER_TX_PKT))) { |
2960 | bnx2x_fp_qstats(bp, txdata->parent_fp)->driver_xoff++; | 2960 | /* Handle special storage cases separately */ |
2961 | netif_tx_stop_queue(txq); | 2961 | if (txdata->tx_ring_size != 0) { |
2962 | BNX2X_ERR("BUG! Tx ring full when queue awake!\n"); | 2962 | BNX2X_ERR("BUG! Tx ring full when queue awake!\n"); |
2963 | bnx2x_fp_qstats(bp, txdata->parent_fp)->driver_xoff++; | ||
2964 | netif_tx_stop_queue(txq); | ||
2965 | } | ||
2966 | |||
2963 | return NETDEV_TX_BUSY; | 2967 | return NETDEV_TX_BUSY; |
2964 | } | 2968 | } |
2965 | 2969 | ||
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c index 71971a161bd1..614981c02264 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | |||
@@ -126,7 +126,7 @@ static inline int bnx2x_exe_queue_add(struct bnx2x *bp, | |||
126 | /* Check if this request is ok */ | 126 | /* Check if this request is ok */ |
127 | rc = o->validate(bp, o->owner, elem); | 127 | rc = o->validate(bp, o->owner, elem); |
128 | if (rc) { | 128 | if (rc) { |
129 | BNX2X_ERR("Preamble failed: %d\n", rc); | 129 | DP(BNX2X_MSG_SP, "Preamble failed: %d\n", rc); |
130 | goto free_and_exit; | 130 | goto free_and_exit; |
131 | } | 131 | } |
132 | } | 132 | } |
diff --git a/drivers/of/address.c b/drivers/of/address.c index 72e496f1e9b0..0125524c08c4 100644 --- a/drivers/of/address.c +++ b/drivers/of/address.c | |||
@@ -37,9 +37,9 @@ struct of_bus { | |||
37 | int (*match)(struct device_node *parent); | 37 | int (*match)(struct device_node *parent); |
38 | void (*count_cells)(struct device_node *child, | 38 | void (*count_cells)(struct device_node *child, |
39 | int *addrc, int *sizec); | 39 | int *addrc, int *sizec); |
40 | u64 (*map)(u32 *addr, const __be32 *range, | 40 | u64 (*map)(__be32 *addr, const __be32 *range, |
41 | int na, int ns, int pna); | 41 | int na, int ns, int pna); |
42 | int (*translate)(u32 *addr, u64 offset, int na); | 42 | int (*translate)(__be32 *addr, u64 offset, int na); |
43 | unsigned int (*get_flags)(const __be32 *addr); | 43 | unsigned int (*get_flags)(const __be32 *addr); |
44 | }; | 44 | }; |
45 | 45 | ||
@@ -56,7 +56,7 @@ static void of_bus_default_count_cells(struct device_node *dev, | |||
56 | *sizec = of_n_size_cells(dev); | 56 | *sizec = of_n_size_cells(dev); |
57 | } | 57 | } |
58 | 58 | ||
59 | static u64 of_bus_default_map(u32 *addr, const __be32 *range, | 59 | static u64 of_bus_default_map(__be32 *addr, const __be32 *range, |
60 | int na, int ns, int pna) | 60 | int na, int ns, int pna) |
61 | { | 61 | { |
62 | u64 cp, s, da; | 62 | u64 cp, s, da; |
@@ -82,7 +82,7 @@ static u64 of_bus_default_map(u32 *addr, const __be32 *range, | |||
82 | return da - cp; | 82 | return da - cp; |
83 | } | 83 | } |
84 | 84 | ||
85 | static int of_bus_default_translate(u32 *addr, u64 offset, int na) | 85 | static int of_bus_default_translate(__be32 *addr, u64 offset, int na) |
86 | { | 86 | { |
87 | u64 a = of_read_number(addr, na); | 87 | u64 a = of_read_number(addr, na); |
88 | memset(addr, 0, na * 4); | 88 | memset(addr, 0, na * 4); |
@@ -138,7 +138,7 @@ static unsigned int of_bus_pci_get_flags(const __be32 *addr) | |||
138 | return flags; | 138 | return flags; |
139 | } | 139 | } |
140 | 140 | ||
141 | static u64 of_bus_pci_map(u32 *addr, const __be32 *range, int na, int ns, | 141 | static u64 of_bus_pci_map(__be32 *addr, const __be32 *range, int na, int ns, |
142 | int pna) | 142 | int pna) |
143 | { | 143 | { |
144 | u64 cp, s, da; | 144 | u64 cp, s, da; |
@@ -165,7 +165,7 @@ static u64 of_bus_pci_map(u32 *addr, const __be32 *range, int na, int ns, | |||
165 | return da - cp; | 165 | return da - cp; |
166 | } | 166 | } |
167 | 167 | ||
168 | static int of_bus_pci_translate(u32 *addr, u64 offset, int na) | 168 | static int of_bus_pci_translate(__be32 *addr, u64 offset, int na) |
169 | { | 169 | { |
170 | return of_bus_default_translate(addr + 1, offset, na - 1); | 170 | return of_bus_default_translate(addr + 1, offset, na - 1); |
171 | } | 171 | } |
@@ -247,7 +247,7 @@ static void of_bus_isa_count_cells(struct device_node *child, | |||
247 | *sizec = 1; | 247 | *sizec = 1; |
248 | } | 248 | } |
249 | 249 | ||
250 | static u64 of_bus_isa_map(u32 *addr, const __be32 *range, int na, int ns, | 250 | static u64 of_bus_isa_map(__be32 *addr, const __be32 *range, int na, int ns, |
251 | int pna) | 251 | int pna) |
252 | { | 252 | { |
253 | u64 cp, s, da; | 253 | u64 cp, s, da; |
@@ -270,7 +270,7 @@ static u64 of_bus_isa_map(u32 *addr, const __be32 *range, int na, int ns, | |||
270 | return da - cp; | 270 | return da - cp; |
271 | } | 271 | } |
272 | 272 | ||
273 | static int of_bus_isa_translate(u32 *addr, u64 offset, int na) | 273 | static int of_bus_isa_translate(__be32 *addr, u64 offset, int na) |
274 | { | 274 | { |
275 | return of_bus_default_translate(addr + 1, offset, na - 1); | 275 | return of_bus_default_translate(addr + 1, offset, na - 1); |
276 | } | 276 | } |
@@ -338,7 +338,7 @@ static struct of_bus *of_match_bus(struct device_node *np) | |||
338 | } | 338 | } |
339 | 339 | ||
340 | static int of_translate_one(struct device_node *parent, struct of_bus *bus, | 340 | static int of_translate_one(struct device_node *parent, struct of_bus *bus, |
341 | struct of_bus *pbus, u32 *addr, | 341 | struct of_bus *pbus, __be32 *addr, |
342 | int na, int ns, int pna, const char *rprop) | 342 | int na, int ns, int pna, const char *rprop) |
343 | { | 343 | { |
344 | const __be32 *ranges; | 344 | const __be32 *ranges; |
@@ -409,12 +409,12 @@ static int of_translate_one(struct device_node *parent, struct of_bus *bus, | |||
409 | * that can be mapped to a cpu physical address). This is not really specified | 409 | * that can be mapped to a cpu physical address). This is not really specified |
410 | * that way, but this is traditionally the way IBM at least do things | 410 | * that way, but this is traditionally the way IBM at least do things |
411 | */ | 411 | */ |
412 | u64 __of_translate_address(struct device_node *dev, const __be32 *in_addr, | 412 | static u64 __of_translate_address(struct device_node *dev, |
413 | const char *rprop) | 413 | const __be32 *in_addr, const char *rprop) |
414 | { | 414 | { |
415 | struct device_node *parent = NULL; | 415 | struct device_node *parent = NULL; |
416 | struct of_bus *bus, *pbus; | 416 | struct of_bus *bus, *pbus; |
417 | u32 addr[OF_MAX_ADDR_CELLS]; | 417 | __be32 addr[OF_MAX_ADDR_CELLS]; |
418 | int na, ns, pna, pns; | 418 | int na, ns, pna, pns; |
419 | u64 result = OF_BAD_ADDR; | 419 | u64 result = OF_BAD_ADDR; |
420 | 420 | ||
diff --git a/drivers/of/irq.c b/drivers/of/irq.c index a23ec7779997..a3c1c5aae6a9 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c | |||
@@ -192,11 +192,13 @@ int of_irq_map_raw(struct device_node *parent, const __be32 *intspec, | |||
192 | /* Compare specifiers */ | 192 | /* Compare specifiers */ |
193 | match = 1; | 193 | match = 1; |
194 | for (i = 0; i < addrsize && match; ++i) { | 194 | for (i = 0; i < addrsize && match; ++i) { |
195 | u32 mask = imask ? imask[i] : 0xffffffffu; | 195 | __be32 mask = imask ? imask[i] |
196 | : cpu_to_be32(0xffffffffu); | ||
196 | match = ((addr[i] ^ imap[i]) & mask) == 0; | 197 | match = ((addr[i] ^ imap[i]) & mask) == 0; |
197 | } | 198 | } |
198 | for (; i < (addrsize + intsize) && match; ++i) { | 199 | for (; i < (addrsize + intsize) && match; ++i) { |
199 | u32 mask = imask ? imask[i] : 0xffffffffu; | 200 | __be32 mask = imask ? imask[i] |
201 | : cpu_to_be32(0xffffffffu); | ||
200 | match = | 202 | match = |
201 | ((intspec[i-addrsize] ^ imap[i]) & mask) == 0; | 203 | ((intspec[i-addrsize] ^ imap[i]) & mask) == 0; |
202 | } | 204 | } |
@@ -465,7 +467,7 @@ void __init of_irq_init(const struct of_device_id *matches) | |||
465 | pr_debug("of_irq_init: init %s @ %p, parent %p\n", | 467 | pr_debug("of_irq_init: init %s @ %p, parent %p\n", |
466 | match->compatible, | 468 | match->compatible, |
467 | desc->dev, desc->interrupt_parent); | 469 | desc->dev, desc->interrupt_parent); |
468 | irq_init_cb = match->data; | 470 | irq_init_cb = (of_irq_init_cb_t)match->data; |
469 | ret = irq_init_cb(desc->dev, desc->interrupt_parent); | 471 | ret = irq_init_cb(desc->dev, desc->interrupt_parent); |
470 | if (ret) { | 472 | if (ret) { |
471 | kfree(desc); | 473 | kfree(desc); |
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 9bdeaf30b17d..b80891b43816 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c | |||
@@ -76,7 +76,7 @@ void of_device_make_bus_id(struct device *dev) | |||
76 | { | 76 | { |
77 | static atomic_t bus_no_reg_magic; | 77 | static atomic_t bus_no_reg_magic; |
78 | struct device_node *node = dev->of_node; | 78 | struct device_node *node = dev->of_node; |
79 | const u32 *reg; | 79 | const __be32 *reg; |
80 | u64 addr; | 80 | u64 addr; |
81 | const __be32 *addrp; | 81 | const __be32 *addrp; |
82 | int magic; | 82 | int magic; |
diff --git a/drivers/pinctrl/pinctrl-bcm2835.c b/drivers/pinctrl/pinctrl-bcm2835.c index a4adee633fa9..7e9be18ec2d2 100644 --- a/drivers/pinctrl/pinctrl-bcm2835.c +++ b/drivers/pinctrl/pinctrl-bcm2835.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/irq.h> | 29 | #include <linux/irq.h> |
30 | #include <linux/irqdesc.h> | 30 | #include <linux/irqdesc.h> |
31 | #include <linux/irqdomain.h> | 31 | #include <linux/irqdomain.h> |
32 | #include <linux/irq.h> | ||
33 | #include <linux/module.h> | 32 | #include <linux/module.h> |
34 | #include <linux/of_address.h> | 33 | #include <linux/of_address.h> |
35 | #include <linux/of.h> | 34 | #include <linux/of.h> |
@@ -960,7 +959,7 @@ static int __devinit bcm2835_pinctrl_probe(struct platform_device *pdev) | |||
960 | return err; | 959 | return err; |
961 | } | 960 | } |
962 | 961 | ||
963 | pc->base = devm_request_and_ioremap(&pdev->dev, &iomem); | 962 | pc->base = devm_request_and_ioremap(dev, &iomem); |
964 | if (!pc->base) | 963 | if (!pc->base) |
965 | return -EADDRNOTAVAIL; | 964 | return -EADDRNOTAVAIL; |
966 | 965 | ||
@@ -1032,7 +1031,7 @@ static int __devinit bcm2835_pinctrl_probe(struct platform_device *pdev) | |||
1032 | pc->pctl_dev = pinctrl_register(&bcm2835_pinctrl_desc, dev, pc); | 1031 | pc->pctl_dev = pinctrl_register(&bcm2835_pinctrl_desc, dev, pc); |
1033 | if (!pc->pctl_dev) { | 1032 | if (!pc->pctl_dev) { |
1034 | gpiochip_remove(&pc->gpio_chip); | 1033 | gpiochip_remove(&pc->gpio_chip); |
1035 | return PTR_ERR(pc->pctl_dev); | 1034 | return -EINVAL; |
1036 | } | 1035 | } |
1037 | 1036 | ||
1038 | pc->gpio_range = bcm2835_pinctrl_gpio_range; | 1037 | pc->gpio_range = bcm2835_pinctrl_gpio_range; |
diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c index fec9c30133d4..01aea1c3b5fa 100644 --- a/drivers/pinctrl/pinctrl-nomadik.c +++ b/drivers/pinctrl/pinctrl-nomadik.c | |||
@@ -30,7 +30,20 @@ | |||
30 | #include <linux/pinctrl/pinconf.h> | 30 | #include <linux/pinctrl/pinconf.h> |
31 | /* Since we request GPIOs from ourself */ | 31 | /* Since we request GPIOs from ourself */ |
32 | #include <linux/pinctrl/consumer.h> | 32 | #include <linux/pinctrl/consumer.h> |
33 | /* | ||
34 | * For the U8500 archs, use the PRCMU register interface, for the older | ||
35 | * Nomadik, provide some stubs. The functions using these will only be | ||
36 | * called on the U8500 series. | ||
37 | */ | ||
38 | #ifdef CONFIG_ARCH_U8500 | ||
33 | #include <linux/mfd/dbx500-prcmu.h> | 39 | #include <linux/mfd/dbx500-prcmu.h> |
40 | #else | ||
41 | static inline u32 prcmu_read(unsigned int reg) { | ||
42 | return 0; | ||
43 | } | ||
44 | static inline void prcmu_write(unsigned int reg, u32 value) {} | ||
45 | static inline void prcmu_write_masked(unsigned int reg, u32 mask, u32 value) {} | ||
46 | #endif | ||
34 | 47 | ||
35 | #include <asm/mach/irq.h> | 48 | #include <asm/mach/irq.h> |
36 | 49 | ||
@@ -1268,6 +1281,7 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev) | |||
1268 | struct clk *clk; | 1281 | struct clk *clk; |
1269 | int secondary_irq; | 1282 | int secondary_irq; |
1270 | void __iomem *base; | 1283 | void __iomem *base; |
1284 | int irq_start = -1; | ||
1271 | int irq; | 1285 | int irq; |
1272 | int ret; | 1286 | int ret; |
1273 | 1287 | ||
@@ -1371,19 +1385,11 @@ static int __devinit nmk_gpio_probe(struct platform_device *dev) | |||
1371 | 1385 | ||
1372 | platform_set_drvdata(dev, nmk_chip); | 1386 | platform_set_drvdata(dev, nmk_chip); |
1373 | 1387 | ||
1374 | if (np) { | 1388 | if (!np) |
1375 | /* The DT case will just grab a set of IRQ numbers */ | ||
1376 | nmk_chip->domain = irq_domain_add_linear(np, NMK_GPIO_PER_CHIP, | ||
1377 | &nmk_gpio_irq_simple_ops, nmk_chip); | ||
1378 | } else { | ||
1379 | /* Non-DT legacy mode, use hardwired IRQ numbers */ | ||
1380 | int irq_start; | ||
1381 | |||
1382 | irq_start = NOMADIK_GPIO_TO_IRQ(pdata->first_gpio); | 1389 | irq_start = NOMADIK_GPIO_TO_IRQ(pdata->first_gpio); |
1383 | nmk_chip->domain = irq_domain_add_simple(NULL, | 1390 | nmk_chip->domain = irq_domain_add_simple(NULL, |
1384 | NMK_GPIO_PER_CHIP, irq_start, | 1391 | NMK_GPIO_PER_CHIP, irq_start, |
1385 | &nmk_gpio_irq_simple_ops, nmk_chip); | 1392 | &nmk_gpio_irq_simple_ops, nmk_chip); |
1386 | } | ||
1387 | if (!nmk_chip->domain) { | 1393 | if (!nmk_chip->domain) { |
1388 | dev_err(&dev->dev, "failed to create irqdomain\n"); | 1394 | dev_err(&dev->dev, "failed to create irqdomain\n"); |
1389 | ret = -ENOSYS; | 1395 | ret = -ENOSYS; |
diff --git a/drivers/pinctrl/pinctrl-samsung.c b/drivers/pinctrl/pinctrl-samsung.c index dd108a94acf9..861cd5f04d5e 100644 --- a/drivers/pinctrl/pinctrl-samsung.c +++ b/drivers/pinctrl/pinctrl-samsung.c | |||
@@ -513,7 +513,7 @@ static int samsung_gpio_direction_output(struct gpio_chip *gc, unsigned offset, | |||
513 | * Parse the pin names listed in the 'samsung,pins' property and convert it | 513 | * Parse the pin names listed in the 'samsung,pins' property and convert it |
514 | * into a list of gpio numbers are create a pin group from it. | 514 | * into a list of gpio numbers are create a pin group from it. |
515 | */ | 515 | */ |
516 | static int __init samsung_pinctrl_parse_dt_pins(struct platform_device *pdev, | 516 | static int __devinit samsung_pinctrl_parse_dt_pins(struct platform_device *pdev, |
517 | struct device_node *cfg_np, struct pinctrl_desc *pctl, | 517 | struct device_node *cfg_np, struct pinctrl_desc *pctl, |
518 | unsigned int **pin_list, unsigned int *npins) | 518 | unsigned int **pin_list, unsigned int *npins) |
519 | { | 519 | { |
@@ -560,7 +560,7 @@ static int __init samsung_pinctrl_parse_dt_pins(struct platform_device *pdev, | |||
560 | * from device node of the pin-controller. A pin group is formed with all | 560 | * from device node of the pin-controller. A pin group is formed with all |
561 | * the pins listed in the "samsung,pins" property. | 561 | * the pins listed in the "samsung,pins" property. |
562 | */ | 562 | */ |
563 | static int __init samsung_pinctrl_parse_dt(struct platform_device *pdev, | 563 | static int __devinit samsung_pinctrl_parse_dt(struct platform_device *pdev, |
564 | struct samsung_pinctrl_drv_data *drvdata) | 564 | struct samsung_pinctrl_drv_data *drvdata) |
565 | { | 565 | { |
566 | struct device *dev = &pdev->dev; | 566 | struct device *dev = &pdev->dev; |
@@ -655,7 +655,7 @@ static int __init samsung_pinctrl_parse_dt(struct platform_device *pdev, | |||
655 | } | 655 | } |
656 | 656 | ||
657 | /* register the pinctrl interface with the pinctrl subsystem */ | 657 | /* register the pinctrl interface with the pinctrl subsystem */ |
658 | static int __init samsung_pinctrl_register(struct platform_device *pdev, | 658 | static int __devinit samsung_pinctrl_register(struct platform_device *pdev, |
659 | struct samsung_pinctrl_drv_data *drvdata) | 659 | struct samsung_pinctrl_drv_data *drvdata) |
660 | { | 660 | { |
661 | struct pinctrl_desc *ctrldesc = &drvdata->pctl; | 661 | struct pinctrl_desc *ctrldesc = &drvdata->pctl; |
@@ -729,7 +729,7 @@ static int __init samsung_pinctrl_register(struct platform_device *pdev, | |||
729 | } | 729 | } |
730 | 730 | ||
731 | /* register the gpiolib interface with the gpiolib subsystem */ | 731 | /* register the gpiolib interface with the gpiolib subsystem */ |
732 | static int __init samsung_gpiolib_register(struct platform_device *pdev, | 732 | static int __devinit samsung_gpiolib_register(struct platform_device *pdev, |
733 | struct samsung_pinctrl_drv_data *drvdata) | 733 | struct samsung_pinctrl_drv_data *drvdata) |
734 | { | 734 | { |
735 | struct gpio_chip *gc; | 735 | struct gpio_chip *gc; |
@@ -762,7 +762,7 @@ static int __init samsung_gpiolib_register(struct platform_device *pdev, | |||
762 | } | 762 | } |
763 | 763 | ||
764 | /* unregister the gpiolib interface with the gpiolib subsystem */ | 764 | /* unregister the gpiolib interface with the gpiolib subsystem */ |
765 | static int __init samsung_gpiolib_unregister(struct platform_device *pdev, | 765 | static int __devinit samsung_gpiolib_unregister(struct platform_device *pdev, |
766 | struct samsung_pinctrl_drv_data *drvdata) | 766 | struct samsung_pinctrl_drv_data *drvdata) |
767 | { | 767 | { |
768 | int ret = gpiochip_remove(drvdata->gc); | 768 | int ret = gpiochip_remove(drvdata->gc); |
diff --git a/drivers/pinctrl/pinctrl-sirf.c b/drivers/pinctrl/pinctrl-sirf.c index 675497c15149..9ecacf3d0a75 100644 --- a/drivers/pinctrl/pinctrl-sirf.c +++ b/drivers/pinctrl/pinctrl-sirf.c | |||
@@ -1323,41 +1323,6 @@ static inline struct sirfsoc_gpio_bank *sirfsoc_gpio_to_bank(unsigned int gpio) | |||
1323 | return &sgpio_bank[gpio / SIRFSOC_GPIO_BANK_SIZE]; | 1323 | return &sgpio_bank[gpio / SIRFSOC_GPIO_BANK_SIZE]; |
1324 | } | 1324 | } |
1325 | 1325 | ||
1326 | void sirfsoc_gpio_set_pull(unsigned gpio, unsigned mode) | ||
1327 | { | ||
1328 | struct sirfsoc_gpio_bank *bank = sirfsoc_gpio_to_bank(gpio); | ||
1329 | int idx = sirfsoc_gpio_to_offset(gpio); | ||
1330 | u32 val, offset; | ||
1331 | unsigned long flags; | ||
1332 | |||
1333 | offset = SIRFSOC_GPIO_CTRL(bank->id, idx); | ||
1334 | |||
1335 | spin_lock_irqsave(&sgpio_lock, flags); | ||
1336 | |||
1337 | val = readl(bank->chip.regs + offset); | ||
1338 | |||
1339 | switch (mode) { | ||
1340 | case SIRFSOC_GPIO_PULL_NONE: | ||
1341 | val &= ~SIRFSOC_GPIO_CTL_PULL_MASK; | ||
1342 | break; | ||
1343 | case SIRFSOC_GPIO_PULL_UP: | ||
1344 | val |= SIRFSOC_GPIO_CTL_PULL_MASK; | ||
1345 | val |= SIRFSOC_GPIO_CTL_PULL_HIGH; | ||
1346 | break; | ||
1347 | case SIRFSOC_GPIO_PULL_DOWN: | ||
1348 | val |= SIRFSOC_GPIO_CTL_PULL_MASK; | ||
1349 | val &= ~SIRFSOC_GPIO_CTL_PULL_HIGH; | ||
1350 | break; | ||
1351 | default: | ||
1352 | break; | ||
1353 | } | ||
1354 | |||
1355 | writel(val, bank->chip.regs + offset); | ||
1356 | |||
1357 | spin_unlock_irqrestore(&sgpio_lock, flags); | ||
1358 | } | ||
1359 | EXPORT_SYMBOL(sirfsoc_gpio_set_pull); | ||
1360 | |||
1361 | static inline struct sirfsoc_gpio_bank *sirfsoc_irqchip_to_bank(struct gpio_chip *chip) | 1326 | static inline struct sirfsoc_gpio_bank *sirfsoc_irqchip_to_bank(struct gpio_chip *chip) |
1362 | { | 1327 | { |
1363 | return container_of(to_of_mm_gpio_chip(chip), struct sirfsoc_gpio_bank, chip); | 1328 | return container_of(to_of_mm_gpio_chip(chip), struct sirfsoc_gpio_bank, chip); |
diff --git a/drivers/pinctrl/pinctrl-xway.c b/drivers/pinctrl/pinctrl-xway.c index f8d917d40c92..b9bcaec66223 100644 --- a/drivers/pinctrl/pinctrl-xway.c +++ b/drivers/pinctrl/pinctrl-xway.c | |||
@@ -17,8 +17,6 @@ | |||
17 | #include <linux/ioport.h> | 17 | #include <linux/ioport.h> |
18 | #include <linux/io.h> | 18 | #include <linux/io.h> |
19 | #include <linux/device.h> | 19 | #include <linux/device.h> |
20 | #include <linux/module.h> | ||
21 | #include <linux/io.h> | ||
22 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
23 | 21 | ||
24 | #include "pinctrl-lantiq.h" | 22 | #include "pinctrl-lantiq.h" |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 2db409330c21..e67e0258aec5 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -1141,11 +1141,12 @@ static int qeth_l2_recover(void *ptr) | |||
1141 | dev_info(&card->gdev->dev, | 1141 | dev_info(&card->gdev->dev, |
1142 | "Device successfully recovered!\n"); | 1142 | "Device successfully recovered!\n"); |
1143 | else { | 1143 | else { |
1144 | rtnl_lock(); | 1144 | if (rtnl_trylock()) { |
1145 | dev_close(card->dev); | 1145 | dev_close(card->dev); |
1146 | rtnl_unlock(); | 1146 | rtnl_unlock(); |
1147 | dev_warn(&card->gdev->dev, "The qeth device driver " | 1147 | dev_warn(&card->gdev->dev, "The qeth device driver " |
1148 | "failed to recover an error on the device\n"); | 1148 | "failed to recover an error on the device\n"); |
1149 | } | ||
1149 | } | 1150 | } |
1150 | qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD); | 1151 | qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD); |
1151 | qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD); | 1152 | qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD); |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 4cd310cb5bdf..5ba390658498 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -3510,11 +3510,12 @@ static int qeth_l3_recover(void *ptr) | |||
3510 | dev_info(&card->gdev->dev, | 3510 | dev_info(&card->gdev->dev, |
3511 | "Device successfully recovered!\n"); | 3511 | "Device successfully recovered!\n"); |
3512 | else { | 3512 | else { |
3513 | rtnl_lock(); | 3513 | if (rtnl_trylock()) { |
3514 | dev_close(card->dev); | 3514 | dev_close(card->dev); |
3515 | rtnl_unlock(); | 3515 | rtnl_unlock(); |
3516 | dev_warn(&card->gdev->dev, "The qeth device driver " | 3516 | dev_warn(&card->gdev->dev, "The qeth device driver " |
3517 | "failed to recover an error on the device\n"); | 3517 | "failed to recover an error on the device\n"); |
3518 | } | ||
3518 | } | 3519 | } |
3519 | qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD); | 3520 | qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD); |
3520 | qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD); | 3521 | qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD); |
diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c index 207b7d742443..d8f990b6b332 100644 --- a/drivers/s390/net/smsgiucv.c +++ b/drivers/s390/net/smsgiucv.c | |||
@@ -157,7 +157,7 @@ static int smsg_pm_restore_thaw(struct device *dev) | |||
157 | #ifdef CONFIG_PM_DEBUG | 157 | #ifdef CONFIG_PM_DEBUG |
158 | printk(KERN_WARNING "smsg_pm_restore_thaw\n"); | 158 | printk(KERN_WARNING "smsg_pm_restore_thaw\n"); |
159 | #endif | 159 | #endif |
160 | if (smsg_path && iucv_path_connected) { | 160 | if (smsg_path && !iucv_path_connected) { |
161 | memset(smsg_path, 0, sizeof(*smsg_path)); | 161 | memset(smsg_path, 0, sizeof(*smsg_path)); |
162 | smsg_path->msglim = 255; | 162 | smsg_path->msglim = 255; |
163 | smsg_path->flags = 0; | 163 | smsg_path->flags = 0; |
diff --git a/drivers/sh/intc/access.c b/drivers/sh/intc/access.c index f892ae1d212a..114390f967d2 100644 --- a/drivers/sh/intc/access.c +++ b/drivers/sh/intc/access.c | |||
@@ -75,54 +75,61 @@ unsigned long intc_get_field_from_handle(unsigned int value, unsigned int handle | |||
75 | static unsigned long test_8(unsigned long addr, unsigned long h, | 75 | static unsigned long test_8(unsigned long addr, unsigned long h, |
76 | unsigned long ignore) | 76 | unsigned long ignore) |
77 | { | 77 | { |
78 | return intc_get_field_from_handle(__raw_readb(addr), h); | 78 | void __iomem *ptr = (void __iomem *)addr; |
79 | return intc_get_field_from_handle(__raw_readb(ptr), h); | ||
79 | } | 80 | } |
80 | 81 | ||
81 | static unsigned long test_16(unsigned long addr, unsigned long h, | 82 | static unsigned long test_16(unsigned long addr, unsigned long h, |
82 | unsigned long ignore) | 83 | unsigned long ignore) |
83 | { | 84 | { |
84 | return intc_get_field_from_handle(__raw_readw(addr), h); | 85 | void __iomem *ptr = (void __iomem *)addr; |
86 | return intc_get_field_from_handle(__raw_readw(ptr), h); | ||
85 | } | 87 | } |
86 | 88 | ||
87 | static unsigned long test_32(unsigned long addr, unsigned long h, | 89 | static unsigned long test_32(unsigned long addr, unsigned long h, |
88 | unsigned long ignore) | 90 | unsigned long ignore) |
89 | { | 91 | { |
90 | return intc_get_field_from_handle(__raw_readl(addr), h); | 92 | void __iomem *ptr = (void __iomem *)addr; |
93 | return intc_get_field_from_handle(__raw_readl(ptr), h); | ||
91 | } | 94 | } |
92 | 95 | ||
93 | static unsigned long write_8(unsigned long addr, unsigned long h, | 96 | static unsigned long write_8(unsigned long addr, unsigned long h, |
94 | unsigned long data) | 97 | unsigned long data) |
95 | { | 98 | { |
96 | __raw_writeb(intc_set_field_from_handle(0, data, h), addr); | 99 | void __iomem *ptr = (void __iomem *)addr; |
97 | (void)__raw_readb(addr); /* Defeat write posting */ | 100 | __raw_writeb(intc_set_field_from_handle(0, data, h), ptr); |
101 | (void)__raw_readb(ptr); /* Defeat write posting */ | ||
98 | return 0; | 102 | return 0; |
99 | } | 103 | } |
100 | 104 | ||
101 | static unsigned long write_16(unsigned long addr, unsigned long h, | 105 | static unsigned long write_16(unsigned long addr, unsigned long h, |
102 | unsigned long data) | 106 | unsigned long data) |
103 | { | 107 | { |
104 | __raw_writew(intc_set_field_from_handle(0, data, h), addr); | 108 | void __iomem *ptr = (void __iomem *)addr; |
105 | (void)__raw_readw(addr); /* Defeat write posting */ | 109 | __raw_writew(intc_set_field_from_handle(0, data, h), ptr); |
110 | (void)__raw_readw(ptr); /* Defeat write posting */ | ||
106 | return 0; | 111 | return 0; |
107 | } | 112 | } |
108 | 113 | ||
109 | static unsigned long write_32(unsigned long addr, unsigned long h, | 114 | static unsigned long write_32(unsigned long addr, unsigned long h, |
110 | unsigned long data) | 115 | unsigned long data) |
111 | { | 116 | { |
112 | __raw_writel(intc_set_field_from_handle(0, data, h), addr); | 117 | void __iomem *ptr = (void __iomem *)addr; |
113 | (void)__raw_readl(addr); /* Defeat write posting */ | 118 | __raw_writel(intc_set_field_from_handle(0, data, h), ptr); |
119 | (void)__raw_readl(ptr); /* Defeat write posting */ | ||
114 | return 0; | 120 | return 0; |
115 | } | 121 | } |
116 | 122 | ||
117 | static unsigned long modify_8(unsigned long addr, unsigned long h, | 123 | static unsigned long modify_8(unsigned long addr, unsigned long h, |
118 | unsigned long data) | 124 | unsigned long data) |
119 | { | 125 | { |
126 | void __iomem *ptr = (void __iomem *)addr; | ||
120 | unsigned long flags; | 127 | unsigned long flags; |
121 | unsigned int value; | 128 | unsigned int value; |
122 | local_irq_save(flags); | 129 | local_irq_save(flags); |
123 | value = intc_set_field_from_handle(__raw_readb(addr), data, h); | 130 | value = intc_set_field_from_handle(__raw_readb(ptr), data, h); |
124 | __raw_writeb(value, addr); | 131 | __raw_writeb(value, ptr); |
125 | (void)__raw_readb(addr); /* Defeat write posting */ | 132 | (void)__raw_readb(ptr); /* Defeat write posting */ |
126 | local_irq_restore(flags); | 133 | local_irq_restore(flags); |
127 | return 0; | 134 | return 0; |
128 | } | 135 | } |
@@ -130,12 +137,13 @@ static unsigned long modify_8(unsigned long addr, unsigned long h, | |||
130 | static unsigned long modify_16(unsigned long addr, unsigned long h, | 137 | static unsigned long modify_16(unsigned long addr, unsigned long h, |
131 | unsigned long data) | 138 | unsigned long data) |
132 | { | 139 | { |
140 | void __iomem *ptr = (void __iomem *)addr; | ||
133 | unsigned long flags; | 141 | unsigned long flags; |
134 | unsigned int value; | 142 | unsigned int value; |
135 | local_irq_save(flags); | 143 | local_irq_save(flags); |
136 | value = intc_set_field_from_handle(__raw_readw(addr), data, h); | 144 | value = intc_set_field_from_handle(__raw_readw(ptr), data, h); |
137 | __raw_writew(value, addr); | 145 | __raw_writew(value, ptr); |
138 | (void)__raw_readw(addr); /* Defeat write posting */ | 146 | (void)__raw_readw(ptr); /* Defeat write posting */ |
139 | local_irq_restore(flags); | 147 | local_irq_restore(flags); |
140 | return 0; | 148 | return 0; |
141 | } | 149 | } |
@@ -143,12 +151,13 @@ static unsigned long modify_16(unsigned long addr, unsigned long h, | |||
143 | static unsigned long modify_32(unsigned long addr, unsigned long h, | 151 | static unsigned long modify_32(unsigned long addr, unsigned long h, |
144 | unsigned long data) | 152 | unsigned long data) |
145 | { | 153 | { |
154 | void __iomem *ptr = (void __iomem *)addr; | ||
146 | unsigned long flags; | 155 | unsigned long flags; |
147 | unsigned int value; | 156 | unsigned int value; |
148 | local_irq_save(flags); | 157 | local_irq_save(flags); |
149 | value = intc_set_field_from_handle(__raw_readl(addr), data, h); | 158 | value = intc_set_field_from_handle(__raw_readl(ptr), data, h); |
150 | __raw_writel(value, addr); | 159 | __raw_writel(value, ptr); |
151 | (void)__raw_readl(addr); /* Defeat write posting */ | 160 | (void)__raw_readl(ptr); /* Defeat write posting */ |
152 | local_irq_restore(flags); | 161 | local_irq_restore(flags); |
153 | return 0; | 162 | return 0; |
154 | } | 163 | } |
diff --git a/drivers/sh/intc/chip.c b/drivers/sh/intc/chip.c index 012df2676a26..46427b48e2f1 100644 --- a/drivers/sh/intc/chip.c +++ b/drivers/sh/intc/chip.c | |||
@@ -83,7 +83,7 @@ static void intc_mask_ack(struct irq_data *data) | |||
83 | unsigned int irq = data->irq; | 83 | unsigned int irq = data->irq; |
84 | struct intc_desc_int *d = get_intc_desc(irq); | 84 | struct intc_desc_int *d = get_intc_desc(irq); |
85 | unsigned long handle = intc_get_ack_handle(irq); | 85 | unsigned long handle = intc_get_ack_handle(irq); |
86 | unsigned long addr; | 86 | void __iomem *addr; |
87 | 87 | ||
88 | intc_disable(data); | 88 | intc_disable(data); |
89 | 89 | ||
@@ -91,7 +91,7 @@ static void intc_mask_ack(struct irq_data *data) | |||
91 | if (handle) { | 91 | if (handle) { |
92 | unsigned int value; | 92 | unsigned int value; |
93 | 93 | ||
94 | addr = INTC_REG(d, _INTC_ADDR_D(handle), 0); | 94 | addr = (void __iomem *)INTC_REG(d, _INTC_ADDR_D(handle), 0); |
95 | value = intc_set_field_from_handle(0, 1, handle); | 95 | value = intc_set_field_from_handle(0, 1, handle); |
96 | 96 | ||
97 | switch (_INTC_FN(handle)) { | 97 | switch (_INTC_FN(handle)) { |
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index edfd67d25013..e1cb6bd75f60 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig | |||
@@ -22,6 +22,7 @@ config THERMAL_HWMON | |||
22 | config CPU_THERMAL | 22 | config CPU_THERMAL |
23 | bool "generic cpu cooling support" | 23 | bool "generic cpu cooling support" |
24 | depends on THERMAL && CPU_FREQ | 24 | depends on THERMAL && CPU_FREQ |
25 | select CPU_FREQ_TABLE | ||
25 | help | 26 | help |
26 | This implements the generic cpu cooling mechanism through frequency | 27 | This implements the generic cpu cooling mechanism through frequency |
27 | reduction, cpu hotplug and any other ways of reducing temperature. An | 28 | reduction, cpu hotplug and any other ways of reducing temperature. An |
@@ -50,6 +51,7 @@ config RCAR_THERMAL | |||
50 | config EXYNOS_THERMAL | 51 | config EXYNOS_THERMAL |
51 | tristate "Temperature sensor on Samsung EXYNOS" | 52 | tristate "Temperature sensor on Samsung EXYNOS" |
52 | depends on (ARCH_EXYNOS4 || ARCH_EXYNOS5) && THERMAL | 53 | depends on (ARCH_EXYNOS4 || ARCH_EXYNOS5) && THERMAL |
54 | select CPU_FREQ_TABLE | ||
53 | help | 55 | help |
54 | If you say yes here you get support for TMU (Thermal Managment | 56 | If you say yes here you get support for TMU (Thermal Managment |
55 | Unit) on SAMSUNG EXYNOS series of SoC. | 57 | Unit) on SAMSUNG EXYNOS series of SoC. |
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 9be296cf7295..6ee59001d61d 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c | |||
@@ -530,7 +530,8 @@ static inline int sci_rxd_in(struct uart_port *port) | |||
530 | if (s->cfg->port_reg <= 0) | 530 | if (s->cfg->port_reg <= 0) |
531 | return 1; | 531 | return 1; |
532 | 532 | ||
533 | return !!__raw_readb(s->cfg->port_reg); | 533 | /* Cast for ARM damage */ |
534 | return !!__raw_readb((void __iomem *)s->cfg->port_reg); | ||
534 | } | 535 | } |
535 | 536 | ||
536 | /* ********************************************************************** * | 537 | /* ********************************************************************** * |
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 05728894a88c..16ee6cee07da 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c | |||
@@ -452,6 +452,7 @@ static struct sysrq_key_op *sysrq_key_table[36] = { | |||
452 | NULL, /* v */ | 452 | NULL, /* v */ |
453 | &sysrq_showstate_blocked_op, /* w */ | 453 | &sysrq_showstate_blocked_op, /* w */ |
454 | /* x: May be registered on ppc/powerpc for xmon */ | 454 | /* x: May be registered on ppc/powerpc for xmon */ |
455 | /* x: May be registered on sparc64 for global PMU dump */ | ||
455 | NULL, /* x */ | 456 | NULL, /* x */ |
456 | /* y: May be registered on sparc64 for global register dump */ | 457 | /* y: May be registered on sparc64 for global register dump */ |
457 | NULL, /* y */ | 458 | NULL, /* y */ |
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 9bfde82078ec..0d2f35ca93f1 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c | |||
@@ -222,7 +222,7 @@ static int ehci_fsl_setup_phy(struct usb_hcd *hcd, | |||
222 | 222 | ||
223 | if (pdata->controller_ver < 0) { | 223 | if (pdata->controller_ver < 0) { |
224 | dev_warn(hcd->self.controller, "Could not get controller version\n"); | 224 | dev_warn(hcd->self.controller, "Could not get controller version\n"); |
225 | return; | 225 | return -ENODEV; |
226 | } | 226 | } |
227 | 227 | ||
228 | portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]); | 228 | portsc = ehci_readl(ehci, &ehci->regs->port_status[port_offset]); |
diff --git a/fs/coredump.c b/fs/coredump.c index fd37facac8dc..ce47379bfa61 100644 --- a/fs/coredump.c +++ b/fs/coredump.c | |||
@@ -450,11 +450,12 @@ static int umh_pipe_setup(struct subprocess_info *info, struct cred *new) | |||
450 | 450 | ||
451 | cp->file = files[1]; | 451 | cp->file = files[1]; |
452 | 452 | ||
453 | replace_fd(0, files[0], 0); | 453 | err = replace_fd(0, files[0], 0); |
454 | fput(files[0]); | ||
454 | /* and disallow core files too */ | 455 | /* and disallow core files too */ |
455 | current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1}; | 456 | current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1}; |
456 | 457 | ||
457 | return 0; | 458 | return err; |
458 | } | 459 | } |
459 | 460 | ||
460 | void do_coredump(siginfo_t *siginfo, struct pt_regs *regs) | 461 | void do_coredump(siginfo_t *siginfo, struct pt_regs *regs) |
diff --git a/fs/ext2/super.c b/fs/ext2/super.c index 6c205d0c565b..fa04d023177e 100644 --- a/fs/ext2/super.c +++ b/fs/ext2/super.c | |||
@@ -469,7 +469,7 @@ static int parse_options(char *options, struct super_block *sb) | |||
469 | uid = make_kuid(current_user_ns(), option); | 469 | uid = make_kuid(current_user_ns(), option); |
470 | if (!uid_valid(uid)) { | 470 | if (!uid_valid(uid)) { |
471 | ext2_msg(sb, KERN_ERR, "Invalid uid value %d", option); | 471 | ext2_msg(sb, KERN_ERR, "Invalid uid value %d", option); |
472 | return -1; | 472 | return 0; |
473 | 473 | ||
474 | } | 474 | } |
475 | sbi->s_resuid = uid; | 475 | sbi->s_resuid = uid; |
@@ -480,7 +480,7 @@ static int parse_options(char *options, struct super_block *sb) | |||
480 | gid = make_kgid(current_user_ns(), option); | 480 | gid = make_kgid(current_user_ns(), option); |
481 | if (!gid_valid(gid)) { | 481 | if (!gid_valid(gid)) { |
482 | ext2_msg(sb, KERN_ERR, "Invalid gid value %d", option); | 482 | ext2_msg(sb, KERN_ERR, "Invalid gid value %d", option); |
483 | return -1; | 483 | return 0; |
484 | } | 484 | } |
485 | sbi->s_resgid = gid; | 485 | sbi->s_resgid = gid; |
486 | break; | 486 | break; |
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index 8f4fddac01a6..890b8947c546 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c | |||
@@ -46,8 +46,7 @@ static struct buffer_head *ext3_append(handle_t *handle, | |||
46 | 46 | ||
47 | *block = inode->i_size >> inode->i_sb->s_blocksize_bits; | 47 | *block = inode->i_size >> inode->i_sb->s_blocksize_bits; |
48 | 48 | ||
49 | bh = ext3_bread(handle, inode, *block, 1, err); | 49 | if ((bh = ext3_dir_bread(handle, inode, *block, 1, err))) { |
50 | if (bh) { | ||
51 | inode->i_size += inode->i_sb->s_blocksize; | 50 | inode->i_size += inode->i_sb->s_blocksize; |
52 | EXT3_I(inode)->i_disksize = inode->i_size; | 51 | EXT3_I(inode)->i_disksize = inode->i_size; |
53 | *err = ext3_journal_get_write_access(handle, bh); | 52 | *err = ext3_journal_get_write_access(handle, bh); |
@@ -339,8 +338,10 @@ dx_probe(struct qstr *entry, struct inode *dir, | |||
339 | u32 hash; | 338 | u32 hash; |
340 | 339 | ||
341 | frame->bh = NULL; | 340 | frame->bh = NULL; |
342 | if (!(bh = ext3_bread (NULL,dir, 0, 0, err))) | 341 | if (!(bh = ext3_dir_bread(NULL, dir, 0, 0, err))) { |
342 | *err = ERR_BAD_DX_DIR; | ||
343 | goto fail; | 343 | goto fail; |
344 | } | ||
344 | root = (struct dx_root *) bh->b_data; | 345 | root = (struct dx_root *) bh->b_data; |
345 | if (root->info.hash_version != DX_HASH_TEA && | 346 | if (root->info.hash_version != DX_HASH_TEA && |
346 | root->info.hash_version != DX_HASH_HALF_MD4 && | 347 | root->info.hash_version != DX_HASH_HALF_MD4 && |
@@ -436,8 +437,10 @@ dx_probe(struct qstr *entry, struct inode *dir, | |||
436 | frame->entries = entries; | 437 | frame->entries = entries; |
437 | frame->at = at; | 438 | frame->at = at; |
438 | if (!indirect--) return frame; | 439 | if (!indirect--) return frame; |
439 | if (!(bh = ext3_bread (NULL,dir, dx_get_block(at), 0, err))) | 440 | if (!(bh = ext3_dir_bread(NULL, dir, dx_get_block(at), 0, err))) { |
441 | *err = ERR_BAD_DX_DIR; | ||
440 | goto fail2; | 442 | goto fail2; |
443 | } | ||
441 | at = entries = ((struct dx_node *) bh->b_data)->entries; | 444 | at = entries = ((struct dx_node *) bh->b_data)->entries; |
442 | if (dx_get_limit(entries) != dx_node_limit (dir)) { | 445 | if (dx_get_limit(entries) != dx_node_limit (dir)) { |
443 | ext3_warning(dir->i_sb, __func__, | 446 | ext3_warning(dir->i_sb, __func__, |
@@ -535,8 +538,8 @@ static int ext3_htree_next_block(struct inode *dir, __u32 hash, | |||
535 | * block so no check is necessary | 538 | * block so no check is necessary |
536 | */ | 539 | */ |
537 | while (num_frames--) { | 540 | while (num_frames--) { |
538 | if (!(bh = ext3_bread(NULL, dir, dx_get_block(p->at), | 541 | if (!(bh = ext3_dir_bread(NULL, dir, dx_get_block(p->at), |
539 | 0, &err))) | 542 | 0, &err))) |
540 | return err; /* Failure */ | 543 | return err; /* Failure */ |
541 | p++; | 544 | p++; |
542 | brelse (p->bh); | 545 | brelse (p->bh); |
@@ -559,10 +562,11 @@ static int htree_dirblock_to_tree(struct file *dir_file, | |||
559 | { | 562 | { |
560 | struct buffer_head *bh; | 563 | struct buffer_head *bh; |
561 | struct ext3_dir_entry_2 *de, *top; | 564 | struct ext3_dir_entry_2 *de, *top; |
562 | int err, count = 0; | 565 | int err = 0, count = 0; |
563 | 566 | ||
564 | dxtrace(printk("In htree dirblock_to_tree: block %d\n", block)); | 567 | dxtrace(printk("In htree dirblock_to_tree: block %d\n", block)); |
565 | if (!(bh = ext3_bread (NULL, dir, block, 0, &err))) | 568 | |
569 | if (!(bh = ext3_dir_bread(NULL, dir, block, 0, &err))) | ||
566 | return err; | 570 | return err; |
567 | 571 | ||
568 | de = (struct ext3_dir_entry_2 *) bh->b_data; | 572 | de = (struct ext3_dir_entry_2 *) bh->b_data; |
@@ -976,7 +980,7 @@ static struct buffer_head * ext3_dx_find_entry(struct inode *dir, | |||
976 | return NULL; | 980 | return NULL; |
977 | do { | 981 | do { |
978 | block = dx_get_block(frame->at); | 982 | block = dx_get_block(frame->at); |
979 | if (!(bh = ext3_bread (NULL,dir, block, 0, err))) | 983 | if (!(bh = ext3_dir_bread (NULL, dir, block, 0, err))) |
980 | goto errout; | 984 | goto errout; |
981 | 985 | ||
982 | retval = search_dirblock(bh, dir, entry, | 986 | retval = search_dirblock(bh, dir, entry, |
@@ -1458,9 +1462,9 @@ static int ext3_add_entry (handle_t *handle, struct dentry *dentry, | |||
1458 | } | 1462 | } |
1459 | blocks = dir->i_size >> sb->s_blocksize_bits; | 1463 | blocks = dir->i_size >> sb->s_blocksize_bits; |
1460 | for (block = 0; block < blocks; block++) { | 1464 | for (block = 0; block < blocks; block++) { |
1461 | bh = ext3_bread(handle, dir, block, 0, &retval); | 1465 | if (!(bh = ext3_dir_bread(handle, dir, block, 0, &retval))) |
1462 | if(!bh) | ||
1463 | return retval; | 1466 | return retval; |
1467 | |||
1464 | retval = add_dirent_to_buf(handle, dentry, inode, NULL, bh); | 1468 | retval = add_dirent_to_buf(handle, dentry, inode, NULL, bh); |
1465 | if (retval != -ENOSPC) | 1469 | if (retval != -ENOSPC) |
1466 | return retval; | 1470 | return retval; |
@@ -1500,7 +1504,7 @@ static int ext3_dx_add_entry(handle_t *handle, struct dentry *dentry, | |||
1500 | entries = frame->entries; | 1504 | entries = frame->entries; |
1501 | at = frame->at; | 1505 | at = frame->at; |
1502 | 1506 | ||
1503 | if (!(bh = ext3_bread(handle,dir, dx_get_block(frame->at), 0, &err))) | 1507 | if (!(bh = ext3_dir_bread(handle, dir, dx_get_block(frame->at), 0, &err))) |
1504 | goto cleanup; | 1508 | goto cleanup; |
1505 | 1509 | ||
1506 | BUFFER_TRACE(bh, "get_write_access"); | 1510 | BUFFER_TRACE(bh, "get_write_access"); |
@@ -1790,8 +1794,7 @@ retry: | |||
1790 | inode->i_op = &ext3_dir_inode_operations; | 1794 | inode->i_op = &ext3_dir_inode_operations; |
1791 | inode->i_fop = &ext3_dir_operations; | 1795 | inode->i_fop = &ext3_dir_operations; |
1792 | inode->i_size = EXT3_I(inode)->i_disksize = inode->i_sb->s_blocksize; | 1796 | inode->i_size = EXT3_I(inode)->i_disksize = inode->i_sb->s_blocksize; |
1793 | dir_block = ext3_bread (handle, inode, 0, 1, &err); | 1797 | if (!(dir_block = ext3_dir_bread(handle, inode, 0, 1, &err))) |
1794 | if (!dir_block) | ||
1795 | goto out_clear_inode; | 1798 | goto out_clear_inode; |
1796 | 1799 | ||
1797 | BUFFER_TRACE(dir_block, "get_write_access"); | 1800 | BUFFER_TRACE(dir_block, "get_write_access"); |
@@ -1859,7 +1862,7 @@ static int empty_dir (struct inode * inode) | |||
1859 | 1862 | ||
1860 | sb = inode->i_sb; | 1863 | sb = inode->i_sb; |
1861 | if (inode->i_size < EXT3_DIR_REC_LEN(1) + EXT3_DIR_REC_LEN(2) || | 1864 | if (inode->i_size < EXT3_DIR_REC_LEN(1) + EXT3_DIR_REC_LEN(2) || |
1862 | !(bh = ext3_bread (NULL, inode, 0, 0, &err))) { | 1865 | !(bh = ext3_dir_bread(NULL, inode, 0, 0, &err))) { |
1863 | if (err) | 1866 | if (err) |
1864 | ext3_error(inode->i_sb, __func__, | 1867 | ext3_error(inode->i_sb, __func__, |
1865 | "error %d reading directory #%lu offset 0", | 1868 | "error %d reading directory #%lu offset 0", |
@@ -1890,9 +1893,8 @@ static int empty_dir (struct inode * inode) | |||
1890 | (void *) de >= (void *) (bh->b_data+sb->s_blocksize)) { | 1893 | (void *) de >= (void *) (bh->b_data+sb->s_blocksize)) { |
1891 | err = 0; | 1894 | err = 0; |
1892 | brelse (bh); | 1895 | brelse (bh); |
1893 | bh = ext3_bread (NULL, inode, | 1896 | if (!(bh = ext3_dir_bread (NULL, inode, |
1894 | offset >> EXT3_BLOCK_SIZE_BITS(sb), 0, &err); | 1897 | offset >> EXT3_BLOCK_SIZE_BITS(sb), 0, &err))) { |
1895 | if (!bh) { | ||
1896 | if (err) | 1898 | if (err) |
1897 | ext3_error(sb, __func__, | 1899 | ext3_error(sb, __func__, |
1898 | "error %d reading directory" | 1900 | "error %d reading directory" |
@@ -2388,7 +2390,7 @@ static int ext3_rename (struct inode * old_dir, struct dentry *old_dentry, | |||
2388 | goto end_rename; | 2390 | goto end_rename; |
2389 | } | 2391 | } |
2390 | retval = -EIO; | 2392 | retval = -EIO; |
2391 | dir_bh = ext3_bread (handle, old_inode, 0, 0, &retval); | 2393 | dir_bh = ext3_dir_bread(handle, old_inode, 0, 0, &retval); |
2392 | if (!dir_bh) | 2394 | if (!dir_bh) |
2393 | goto end_rename; | 2395 | goto end_rename; |
2394 | if (le32_to_cpu(PARENT_INO(dir_bh->b_data)) != old_dir->i_ino) | 2396 | if (le32_to_cpu(PARENT_INO(dir_bh->b_data)) != old_dir->i_ino) |
diff --git a/fs/ext3/namei.h b/fs/ext3/namei.h index f2ce2b0065c9..46304d8c9f0a 100644 --- a/fs/ext3/namei.h +++ b/fs/ext3/namei.h | |||
@@ -6,3 +6,22 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | extern struct dentry *ext3_get_parent(struct dentry *child); | 8 | extern struct dentry *ext3_get_parent(struct dentry *child); |
9 | |||
10 | static inline struct buffer_head *ext3_dir_bread(handle_t *handle, | ||
11 | struct inode *inode, | ||
12 | int block, int create, | ||
13 | int *err) | ||
14 | { | ||
15 | struct buffer_head *bh; | ||
16 | |||
17 | bh = ext3_bread(handle, inode, block, create, err); | ||
18 | |||
19 | if (!bh && !(*err)) { | ||
20 | *err = -EIO; | ||
21 | ext3_error(inode->i_sb, __func__, | ||
22 | "Directory hole detected on inode %lu\n", | ||
23 | inode->i_ino); | ||
24 | return NULL; | ||
25 | } | ||
26 | return bh; | ||
27 | } | ||
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 29e79713c7eb..5366393528df 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -1001,7 +1001,7 @@ static int parse_options (char *options, struct super_block *sb, | |||
1001 | uid = make_kuid(current_user_ns(), option); | 1001 | uid = make_kuid(current_user_ns(), option); |
1002 | if (!uid_valid(uid)) { | 1002 | if (!uid_valid(uid)) { |
1003 | ext3_msg(sb, KERN_ERR, "Invalid uid value %d", option); | 1003 | ext3_msg(sb, KERN_ERR, "Invalid uid value %d", option); |
1004 | return -1; | 1004 | return 0; |
1005 | 1005 | ||
1006 | } | 1006 | } |
1007 | sbi->s_resuid = uid; | 1007 | sbi->s_resuid = uid; |
@@ -1012,7 +1012,7 @@ static int parse_options (char *options, struct super_block *sb, | |||
1012 | gid = make_kgid(current_user_ns(), option); | 1012 | gid = make_kgid(current_user_ns(), option); |
1013 | if (!gid_valid(gid)) { | 1013 | if (!gid_valid(gid)) { |
1014 | ext3_msg(sb, KERN_ERR, "Invalid gid value %d", option); | 1014 | ext3_msg(sb, KERN_ERR, "Invalid gid value %d", option); |
1015 | return -1; | 1015 | return 0; |
1016 | } | 1016 | } |
1017 | sbi->s_resgid = gid; | 1017 | sbi->s_resgid = gid; |
1018 | break; | 1018 | break; |
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 79827ce03e3b..14df8806ff29 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -1158,6 +1158,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) | |||
1158 | struct vm_area_struct *vma = v; | 1158 | struct vm_area_struct *vma = v; |
1159 | struct numa_maps *md = &numa_priv->md; | 1159 | struct numa_maps *md = &numa_priv->md; |
1160 | struct file *file = vma->vm_file; | 1160 | struct file *file = vma->vm_file; |
1161 | struct task_struct *task = proc_priv->task; | ||
1161 | struct mm_struct *mm = vma->vm_mm; | 1162 | struct mm_struct *mm = vma->vm_mm; |
1162 | struct mm_walk walk = {}; | 1163 | struct mm_walk walk = {}; |
1163 | struct mempolicy *pol; | 1164 | struct mempolicy *pol; |
@@ -1177,9 +1178,11 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) | |||
1177 | walk.private = md; | 1178 | walk.private = md; |
1178 | walk.mm = mm; | 1179 | walk.mm = mm; |
1179 | 1180 | ||
1180 | pol = get_vma_policy(proc_priv->task, vma, vma->vm_start); | 1181 | task_lock(task); |
1182 | pol = get_vma_policy(task, vma, vma->vm_start); | ||
1181 | mpol_to_str(buffer, sizeof(buffer), pol, 0); | 1183 | mpol_to_str(buffer, sizeof(buffer), pol, 0); |
1182 | mpol_cond_put(pol); | 1184 | mpol_cond_put(pol); |
1185 | task_unlock(task); | ||
1183 | 1186 | ||
1184 | seq_printf(m, "%08lx %s", vma->vm_start, buffer); | 1187 | seq_printf(m, "%08lx %s", vma->vm_start, buffer); |
1185 | 1188 | ||
@@ -1189,7 +1192,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) | |||
1189 | } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) { | 1192 | } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) { |
1190 | seq_printf(m, " heap"); | 1193 | seq_printf(m, " heap"); |
1191 | } else { | 1194 | } else { |
1192 | pid_t tid = vm_is_stack(proc_priv->task, vma, is_pid); | 1195 | pid_t tid = vm_is_stack(task, vma, is_pid); |
1193 | if (tid != 0) { | 1196 | if (tid != 0) { |
1194 | /* | 1197 | /* |
1195 | * Thread stack in /proc/PID/task/TID/maps or | 1198 | * Thread stack in /proc/PID/task/TID/maps or |
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index 557a9c20a215..05ae3c97f7a5 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c | |||
@@ -1160,6 +1160,8 @@ static int need_print_warning(struct dquot_warn *warn) | |||
1160 | return uid_eq(current_fsuid(), warn->w_dq_id.uid); | 1160 | return uid_eq(current_fsuid(), warn->w_dq_id.uid); |
1161 | case GRPQUOTA: | 1161 | case GRPQUOTA: |
1162 | return in_group_p(warn->w_dq_id.gid); | 1162 | return in_group_p(warn->w_dq_id.gid); |
1163 | case PRJQUOTA: /* Never taken... Just make gcc happy */ | ||
1164 | return 0; | ||
1163 | } | 1165 | } |
1164 | return 0; | 1166 | return 0; |
1165 | } | 1167 | } |
diff --git a/fs/xattr.c b/fs/xattr.c index e164dddb8e96..e21c119f4f99 100644 --- a/fs/xattr.c +++ b/fs/xattr.c | |||
@@ -846,7 +846,7 @@ static int __simple_xattr_set(struct simple_xattrs *xattrs, const char *name, | |||
846 | const void *value, size_t size, int flags) | 846 | const void *value, size_t size, int flags) |
847 | { | 847 | { |
848 | struct simple_xattr *xattr; | 848 | struct simple_xattr *xattr; |
849 | struct simple_xattr *uninitialized_var(new_xattr); | 849 | struct simple_xattr *new_xattr = NULL; |
850 | int err = 0; | 850 | int err = 0; |
851 | 851 | ||
852 | /* value == NULL means remove */ | 852 | /* value == NULL means remove */ |
diff --git a/include/Kbuild b/include/Kbuild index 8d226bfa2696..83256b64166a 100644 --- a/include/Kbuild +++ b/include/Kbuild | |||
@@ -1,12 +1,8 @@ | |||
1 | # Top-level Makefile calls into asm-$(ARCH) | 1 | # Top-level Makefile calls into asm-$(ARCH) |
2 | # List only non-arch directories below | 2 | # List only non-arch directories below |
3 | 3 | ||
4 | header-y += asm-generic/ | ||
5 | header-y += linux/ | 4 | header-y += linux/ |
6 | header-y += sound/ | 5 | header-y += sound/ |
7 | header-y += mtd/ | ||
8 | header-y += rdma/ | 6 | header-y += rdma/ |
9 | header-y += video/ | 7 | header-y += video/ |
10 | header-y += drm/ | ||
11 | header-y += xen/ | ||
12 | header-y += scsi/ | 8 | header-y += scsi/ |
diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/asm-generic/Kbuild +++ /dev/null | |||
diff --git a/include/drm/Kbuild b/include/drm/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/drm/Kbuild +++ /dev/null | |||
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 5b57367e28db..7fe2dae251e5 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -1,31 +1,5 @@ | |||
1 | header-y += byteorder/ | ||
2 | header-y += can/ | ||
3 | header-y += caif/ | ||
4 | header-y += dvb/ | 1 | header-y += dvb/ |
5 | header-y += hdlc/ | 2 | header-y += hdlc/ |
6 | header-y += hsi/ | 3 | header-y += hsi/ |
7 | header-y += isdn/ | ||
8 | header-y += mmc/ | ||
9 | header-y += nfsd/ | ||
10 | header-y += raid/ | 4 | header-y += raid/ |
11 | header-y += spi/ | ||
12 | header-y += sunrpc/ | ||
13 | header-y += tc_act/ | ||
14 | header-y += tc_ematch/ | ||
15 | header-y += netfilter/ | ||
16 | header-y += netfilter_arp/ | ||
17 | header-y += netfilter_bridge/ | ||
18 | header-y += netfilter_ipv4/ | ||
19 | header-y += netfilter_ipv6/ | ||
20 | header-y += usb/ | 5 | header-y += usb/ |
21 | header-y += wimax/ | ||
22 | |||
23 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \ | ||
24 | $(srctree)/arch/$(SRCARCH)/include/uapi/asm/a.out.h),) | ||
25 | endif | ||
26 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \ | ||
27 | $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm.h),) | ||
28 | endif | ||
29 | ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \ | ||
30 | $(srctree)/arch/$(SRCARCH)/include/uapi/asm/kvm_para.h),) | ||
31 | endif | ||
diff --git a/include/linux/byteorder/Kbuild b/include/linux/byteorder/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/byteorder/Kbuild +++ /dev/null | |||
diff --git a/include/linux/caif/Kbuild b/include/linux/caif/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/caif/Kbuild +++ /dev/null | |||
diff --git a/include/linux/can/Kbuild b/include/linux/can/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/can/Kbuild +++ /dev/null | |||
diff --git a/include/linux/dvb/Kbuild b/include/linux/dvb/Kbuild index f4dba8637f98..e69de29bb2d1 100644 --- a/include/linux/dvb/Kbuild +++ b/include/linux/dvb/Kbuild | |||
@@ -1,8 +0,0 @@ | |||
1 | header-y += audio.h | ||
2 | header-y += ca.h | ||
3 | header-y += dmx.h | ||
4 | header-y += frontend.h | ||
5 | header-y += net.h | ||
6 | header-y += osd.h | ||
7 | header-y += version.h | ||
8 | header-y += video.h | ||
diff --git a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h index f078f3ac82d4..0be6d8f2b52b 100644 --- a/include/linux/dvb/dmx.h +++ b/include/linux/dvb/dmx.h | |||
@@ -20,138 +20,10 @@ | |||
20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | |||
24 | #ifndef _DVBDMX_H_ | 23 | #ifndef _DVBDMX_H_ |
25 | #define _DVBDMX_H_ | 24 | #define _DVBDMX_H_ |
26 | 25 | ||
27 | #include <linux/types.h> | ||
28 | #ifdef __KERNEL__ | ||
29 | #include <linux/time.h> | 26 | #include <linux/time.h> |
30 | #else | 27 | #include <uapi/linux/dvb/dmx.h> |
31 | #include <time.h> | ||
32 | #endif | ||
33 | |||
34 | |||
35 | #define DMX_FILTER_SIZE 16 | ||
36 | |||
37 | typedef enum | ||
38 | { | ||
39 | DMX_OUT_DECODER, /* Streaming directly to decoder. */ | ||
40 | DMX_OUT_TAP, /* Output going to a memory buffer */ | ||
41 | /* (to be retrieved via the read command).*/ | ||
42 | DMX_OUT_TS_TAP, /* Output multiplexed into a new TS */ | ||
43 | /* (to be retrieved by reading from the */ | ||
44 | /* logical DVR device). */ | ||
45 | DMX_OUT_TSDEMUX_TAP /* Like TS_TAP but retrieved from the DMX device */ | ||
46 | } dmx_output_t; | ||
47 | |||
48 | |||
49 | typedef enum | ||
50 | { | ||
51 | DMX_IN_FRONTEND, /* Input from a front-end device. */ | ||
52 | DMX_IN_DVR /* Input from the logical DVR device. */ | ||
53 | } dmx_input_t; | ||
54 | |||
55 | |||
56 | typedef enum | ||
57 | { | ||
58 | DMX_PES_AUDIO0, | ||
59 | DMX_PES_VIDEO0, | ||
60 | DMX_PES_TELETEXT0, | ||
61 | DMX_PES_SUBTITLE0, | ||
62 | DMX_PES_PCR0, | ||
63 | |||
64 | DMX_PES_AUDIO1, | ||
65 | DMX_PES_VIDEO1, | ||
66 | DMX_PES_TELETEXT1, | ||
67 | DMX_PES_SUBTITLE1, | ||
68 | DMX_PES_PCR1, | ||
69 | |||
70 | DMX_PES_AUDIO2, | ||
71 | DMX_PES_VIDEO2, | ||
72 | DMX_PES_TELETEXT2, | ||
73 | DMX_PES_SUBTITLE2, | ||
74 | DMX_PES_PCR2, | ||
75 | |||
76 | DMX_PES_AUDIO3, | ||
77 | DMX_PES_VIDEO3, | ||
78 | DMX_PES_TELETEXT3, | ||
79 | DMX_PES_SUBTITLE3, | ||
80 | DMX_PES_PCR3, | ||
81 | |||
82 | DMX_PES_OTHER | ||
83 | } dmx_pes_type_t; | ||
84 | |||
85 | #define DMX_PES_AUDIO DMX_PES_AUDIO0 | ||
86 | #define DMX_PES_VIDEO DMX_PES_VIDEO0 | ||
87 | #define DMX_PES_TELETEXT DMX_PES_TELETEXT0 | ||
88 | #define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0 | ||
89 | #define DMX_PES_PCR DMX_PES_PCR0 | ||
90 | |||
91 | |||
92 | typedef struct dmx_filter | ||
93 | { | ||
94 | __u8 filter[DMX_FILTER_SIZE]; | ||
95 | __u8 mask[DMX_FILTER_SIZE]; | ||
96 | __u8 mode[DMX_FILTER_SIZE]; | ||
97 | } dmx_filter_t; | ||
98 | |||
99 | |||
100 | struct dmx_sct_filter_params | ||
101 | { | ||
102 | __u16 pid; | ||
103 | dmx_filter_t filter; | ||
104 | __u32 timeout; | ||
105 | __u32 flags; | ||
106 | #define DMX_CHECK_CRC 1 | ||
107 | #define DMX_ONESHOT 2 | ||
108 | #define DMX_IMMEDIATE_START 4 | ||
109 | #define DMX_KERNEL_CLIENT 0x8000 | ||
110 | }; | ||
111 | |||
112 | |||
113 | struct dmx_pes_filter_params | ||
114 | { | ||
115 | __u16 pid; | ||
116 | dmx_input_t input; | ||
117 | dmx_output_t output; | ||
118 | dmx_pes_type_t pes_type; | ||
119 | __u32 flags; | ||
120 | }; | ||
121 | |||
122 | typedef struct dmx_caps { | ||
123 | __u32 caps; | ||
124 | int num_decoders; | ||
125 | } dmx_caps_t; | ||
126 | |||
127 | typedef enum { | ||
128 | DMX_SOURCE_FRONT0 = 0, | ||
129 | DMX_SOURCE_FRONT1, | ||
130 | DMX_SOURCE_FRONT2, | ||
131 | DMX_SOURCE_FRONT3, | ||
132 | DMX_SOURCE_DVR0 = 16, | ||
133 | DMX_SOURCE_DVR1, | ||
134 | DMX_SOURCE_DVR2, | ||
135 | DMX_SOURCE_DVR3 | ||
136 | } dmx_source_t; | ||
137 | |||
138 | struct dmx_stc { | ||
139 | unsigned int num; /* input : which STC? 0..N */ | ||
140 | unsigned int base; /* output: divisor for stc to get 90 kHz clock */ | ||
141 | __u64 stc; /* output: stc in 'base'*90 kHz units */ | ||
142 | }; | ||
143 | |||
144 | |||
145 | #define DMX_START _IO('o', 41) | ||
146 | #define DMX_STOP _IO('o', 42) | ||
147 | #define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params) | ||
148 | #define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params) | ||
149 | #define DMX_SET_BUFFER_SIZE _IO('o', 45) | ||
150 | #define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5]) | ||
151 | #define DMX_GET_CAPS _IOR('o', 48, dmx_caps_t) | ||
152 | #define DMX_SET_SOURCE _IOW('o', 49, dmx_source_t) | ||
153 | #define DMX_GET_STC _IOWR('o', 50, struct dmx_stc) | ||
154 | #define DMX_ADD_PID _IOW('o', 51, __u16) | ||
155 | #define DMX_REMOVE_PID _IOW('o', 52, __u16) | ||
156 | 28 | ||
157 | #endif /*_DVBDMX_H_*/ | 29 | #endif /*_DVBDMX_H_*/ |
diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h index 1d750c0fd86e..85c20d925696 100644 --- a/include/linux/dvb/video.h +++ b/include/linux/dvb/video.h | |||
@@ -20,257 +20,10 @@ | |||
20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 | * | 21 | * |
22 | */ | 22 | */ |
23 | |||
24 | #ifndef _DVBVIDEO_H_ | 23 | #ifndef _DVBVIDEO_H_ |
25 | #define _DVBVIDEO_H_ | 24 | #define _DVBVIDEO_H_ |
26 | 25 | ||
27 | #include <linux/types.h> | ||
28 | #ifdef __KERNEL__ | ||
29 | #include <linux/compiler.h> | 26 | #include <linux/compiler.h> |
30 | #else | 27 | #include <uapi/linux/dvb/video.h> |
31 | #include <stdint.h> | ||
32 | #include <time.h> | ||
33 | #endif | ||
34 | |||
35 | typedef enum { | ||
36 | VIDEO_FORMAT_4_3, /* Select 4:3 format */ | ||
37 | VIDEO_FORMAT_16_9, /* Select 16:9 format. */ | ||
38 | VIDEO_FORMAT_221_1 /* 2.21:1 */ | ||
39 | } video_format_t; | ||
40 | |||
41 | |||
42 | typedef enum { | ||
43 | VIDEO_SYSTEM_PAL, | ||
44 | VIDEO_SYSTEM_NTSC, | ||
45 | VIDEO_SYSTEM_PALN, | ||
46 | VIDEO_SYSTEM_PALNc, | ||
47 | VIDEO_SYSTEM_PALM, | ||
48 | VIDEO_SYSTEM_NTSC60, | ||
49 | VIDEO_SYSTEM_PAL60, | ||
50 | VIDEO_SYSTEM_PALM60 | ||
51 | } video_system_t; | ||
52 | |||
53 | |||
54 | typedef enum { | ||
55 | VIDEO_PAN_SCAN, /* use pan and scan format */ | ||
56 | VIDEO_LETTER_BOX, /* use letterbox format */ | ||
57 | VIDEO_CENTER_CUT_OUT /* use center cut out format */ | ||
58 | } video_displayformat_t; | ||
59 | |||
60 | typedef struct { | ||
61 | int w; | ||
62 | int h; | ||
63 | video_format_t aspect_ratio; | ||
64 | } video_size_t; | ||
65 | |||
66 | typedef enum { | ||
67 | VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */ | ||
68 | VIDEO_SOURCE_MEMORY /* If this source is selected, the stream | ||
69 | comes from the user through the write | ||
70 | system call */ | ||
71 | } video_stream_source_t; | ||
72 | |||
73 | |||
74 | typedef enum { | ||
75 | VIDEO_STOPPED, /* Video is stopped */ | ||
76 | VIDEO_PLAYING, /* Video is currently playing */ | ||
77 | VIDEO_FREEZED /* Video is freezed */ | ||
78 | } video_play_state_t; | ||
79 | |||
80 | |||
81 | /* Decoder commands */ | ||
82 | #define VIDEO_CMD_PLAY (0) | ||
83 | #define VIDEO_CMD_STOP (1) | ||
84 | #define VIDEO_CMD_FREEZE (2) | ||
85 | #define VIDEO_CMD_CONTINUE (3) | ||
86 | |||
87 | /* Flags for VIDEO_CMD_FREEZE */ | ||
88 | #define VIDEO_CMD_FREEZE_TO_BLACK (1 << 0) | ||
89 | |||
90 | /* Flags for VIDEO_CMD_STOP */ | ||
91 | #define VIDEO_CMD_STOP_TO_BLACK (1 << 0) | ||
92 | #define VIDEO_CMD_STOP_IMMEDIATELY (1 << 1) | ||
93 | |||
94 | /* Play input formats: */ | ||
95 | /* The decoder has no special format requirements */ | ||
96 | #define VIDEO_PLAY_FMT_NONE (0) | ||
97 | /* The decoder requires full GOPs */ | ||
98 | #define VIDEO_PLAY_FMT_GOP (1) | ||
99 | |||
100 | /* The structure must be zeroed before use by the application | ||
101 | This ensures it can be extended safely in the future. */ | ||
102 | struct video_command { | ||
103 | __u32 cmd; | ||
104 | __u32 flags; | ||
105 | union { | ||
106 | struct { | ||
107 | __u64 pts; | ||
108 | } stop; | ||
109 | |||
110 | struct { | ||
111 | /* 0 or 1000 specifies normal speed, | ||
112 | 1 specifies forward single stepping, | ||
113 | -1 specifies backward single stepping, | ||
114 | >1: playback at speed/1000 of the normal speed, | ||
115 | <-1: reverse playback at (-speed/1000) of the normal speed. */ | ||
116 | __s32 speed; | ||
117 | __u32 format; | ||
118 | } play; | ||
119 | |||
120 | struct { | ||
121 | __u32 data[16]; | ||
122 | } raw; | ||
123 | }; | ||
124 | }; | ||
125 | |||
126 | /* FIELD_UNKNOWN can be used if the hardware does not know whether | ||
127 | the Vsync is for an odd, even or progressive (i.e. non-interlaced) | ||
128 | field. */ | ||
129 | #define VIDEO_VSYNC_FIELD_UNKNOWN (0) | ||
130 | #define VIDEO_VSYNC_FIELD_ODD (1) | ||
131 | #define VIDEO_VSYNC_FIELD_EVEN (2) | ||
132 | #define VIDEO_VSYNC_FIELD_PROGRESSIVE (3) | ||
133 | |||
134 | struct video_event { | ||
135 | __s32 type; | ||
136 | #define VIDEO_EVENT_SIZE_CHANGED 1 | ||
137 | #define VIDEO_EVENT_FRAME_RATE_CHANGED 2 | ||
138 | #define VIDEO_EVENT_DECODER_STOPPED 3 | ||
139 | #define VIDEO_EVENT_VSYNC 4 | ||
140 | __kernel_time_t timestamp; | ||
141 | union { | ||
142 | video_size_t size; | ||
143 | unsigned int frame_rate; /* in frames per 1000sec */ | ||
144 | unsigned char vsync_field; /* unknown/odd/even/progressive */ | ||
145 | } u; | ||
146 | }; | ||
147 | |||
148 | |||
149 | struct video_status { | ||
150 | int video_blank; /* blank video on freeze? */ | ||
151 | video_play_state_t play_state; /* current state of playback */ | ||
152 | video_stream_source_t stream_source; /* current source (demux/memory) */ | ||
153 | video_format_t video_format; /* current aspect ratio of stream*/ | ||
154 | video_displayformat_t display_format;/* selected cropping mode */ | ||
155 | }; | ||
156 | |||
157 | |||
158 | struct video_still_picture { | ||
159 | char __user *iFrame; /* pointer to a single iframe in memory */ | ||
160 | __s32 size; | ||
161 | }; | ||
162 | |||
163 | |||
164 | typedef | ||
165 | struct video_highlight { | ||
166 | int active; /* 1=show highlight, 0=hide highlight */ | ||
167 | __u8 contrast1; /* 7- 4 Pattern pixel contrast */ | ||
168 | /* 3- 0 Background pixel contrast */ | ||
169 | __u8 contrast2; /* 7- 4 Emphasis pixel-2 contrast */ | ||
170 | /* 3- 0 Emphasis pixel-1 contrast */ | ||
171 | __u8 color1; /* 7- 4 Pattern pixel color */ | ||
172 | /* 3- 0 Background pixel color */ | ||
173 | __u8 color2; /* 7- 4 Emphasis pixel-2 color */ | ||
174 | /* 3- 0 Emphasis pixel-1 color */ | ||
175 | __u32 ypos; /* 23-22 auto action mode */ | ||
176 | /* 21-12 start y */ | ||
177 | /* 9- 0 end y */ | ||
178 | __u32 xpos; /* 23-22 button color number */ | ||
179 | /* 21-12 start x */ | ||
180 | /* 9- 0 end x */ | ||
181 | } video_highlight_t; | ||
182 | |||
183 | |||
184 | typedef struct video_spu { | ||
185 | int active; | ||
186 | int stream_id; | ||
187 | } video_spu_t; | ||
188 | |||
189 | |||
190 | typedef struct video_spu_palette { /* SPU Palette information */ | ||
191 | int length; | ||
192 | __u8 __user *palette; | ||
193 | } video_spu_palette_t; | ||
194 | |||
195 | |||
196 | typedef struct video_navi_pack { | ||
197 | int length; /* 0 ... 1024 */ | ||
198 | __u8 data[1024]; | ||
199 | } video_navi_pack_t; | ||
200 | |||
201 | |||
202 | typedef __u16 video_attributes_t; | ||
203 | /* bits: descr. */ | ||
204 | /* 15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) */ | ||
205 | /* 13-12 TV system (0=525/60, 1=625/50) */ | ||
206 | /* 11-10 Aspect ratio (0=4:3, 3=16:9) */ | ||
207 | /* 9- 8 permitted display mode on 4:3 monitor (0=both, 1=only pan-sca */ | ||
208 | /* 7 line 21-1 data present in GOP (1=yes, 0=no) */ | ||
209 | /* 6 line 21-2 data present in GOP (1=yes, 0=no) */ | ||
210 | /* 5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 */ | ||
211 | /* 2 source letterboxed (1=yes, 0=no) */ | ||
212 | /* 0 film/camera mode (0=camera, 1=film (625/50 only)) */ | ||
213 | |||
214 | |||
215 | /* bit definitions for capabilities: */ | ||
216 | /* can the hardware decode MPEG1 and/or MPEG2? */ | ||
217 | #define VIDEO_CAP_MPEG1 1 | ||
218 | #define VIDEO_CAP_MPEG2 2 | ||
219 | /* can you send a system and/or program stream to video device? | ||
220 | (you still have to open the video and the audio device but only | ||
221 | send the stream to the video device) */ | ||
222 | #define VIDEO_CAP_SYS 4 | ||
223 | #define VIDEO_CAP_PROG 8 | ||
224 | /* can the driver also handle SPU, NAVI and CSS encoded data? | ||
225 | (CSS API is not present yet) */ | ||
226 | #define VIDEO_CAP_SPU 16 | ||
227 | #define VIDEO_CAP_NAVI 32 | ||
228 | #define VIDEO_CAP_CSS 64 | ||
229 | |||
230 | |||
231 | #define VIDEO_STOP _IO('o', 21) | ||
232 | #define VIDEO_PLAY _IO('o', 22) | ||
233 | #define VIDEO_FREEZE _IO('o', 23) | ||
234 | #define VIDEO_CONTINUE _IO('o', 24) | ||
235 | #define VIDEO_SELECT_SOURCE _IO('o', 25) | ||
236 | #define VIDEO_SET_BLANK _IO('o', 26) | ||
237 | #define VIDEO_GET_STATUS _IOR('o', 27, struct video_status) | ||
238 | #define VIDEO_GET_EVENT _IOR('o', 28, struct video_event) | ||
239 | #define VIDEO_SET_DISPLAY_FORMAT _IO('o', 29) | ||
240 | #define VIDEO_STILLPICTURE _IOW('o', 30, struct video_still_picture) | ||
241 | #define VIDEO_FAST_FORWARD _IO('o', 31) | ||
242 | #define VIDEO_SLOWMOTION _IO('o', 32) | ||
243 | #define VIDEO_GET_CAPABILITIES _IOR('o', 33, unsigned int) | ||
244 | #define VIDEO_CLEAR_BUFFER _IO('o', 34) | ||
245 | #define VIDEO_SET_ID _IO('o', 35) | ||
246 | #define VIDEO_SET_STREAMTYPE _IO('o', 36) | ||
247 | #define VIDEO_SET_FORMAT _IO('o', 37) | ||
248 | #define VIDEO_SET_SYSTEM _IO('o', 38) | ||
249 | #define VIDEO_SET_HIGHLIGHT _IOW('o', 39, video_highlight_t) | ||
250 | #define VIDEO_SET_SPU _IOW('o', 50, video_spu_t) | ||
251 | #define VIDEO_SET_SPU_PALETTE _IOW('o', 51, video_spu_palette_t) | ||
252 | #define VIDEO_GET_NAVI _IOR('o', 52, video_navi_pack_t) | ||
253 | #define VIDEO_SET_ATTRIBUTES _IO('o', 53) | ||
254 | #define VIDEO_GET_SIZE _IOR('o', 55, video_size_t) | ||
255 | #define VIDEO_GET_FRAME_RATE _IOR('o', 56, unsigned int) | ||
256 | |||
257 | /** | ||
258 | * VIDEO_GET_PTS | ||
259 | * | ||
260 | * Read the 33 bit presentation time stamp as defined | ||
261 | * in ITU T-REC-H.222.0 / ISO/IEC 13818-1. | ||
262 | * | ||
263 | * The PTS should belong to the currently played | ||
264 | * frame if possible, but may also be a value close to it | ||
265 | * like the PTS of the last decoded frame or the last PTS | ||
266 | * extracted by the PES parser. | ||
267 | */ | ||
268 | #define VIDEO_GET_PTS _IOR('o', 57, __u64) | ||
269 | |||
270 | /* Read the number of displayed frames since the decoder was started */ | ||
271 | #define VIDEO_GET_FRAME_COUNT _IOR('o', 58, __u64) | ||
272 | |||
273 | #define VIDEO_COMMAND _IOWR('o', 59, struct video_command) | ||
274 | #define VIDEO_TRY_COMMAND _IOWR('o', 60, struct video_command) | ||
275 | 28 | ||
276 | #endif /*_DVBVIDEO_H_*/ | 29 | #endif /*_DVBVIDEO_H_*/ |
diff --git a/include/linux/elf-fdpic.h b/include/linux/elf-fdpic.h new file mode 100644 index 000000000000..386440317b0c --- /dev/null +++ b/include/linux/elf-fdpic.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* FDPIC ELF load map | ||
2 | * | ||
3 | * Copyright (C) 2003 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef _LINUX_ELF_FDPIC_H | ||
13 | #define _LINUX_ELF_FDPIC_H | ||
14 | |||
15 | #include <uapi/linux/elf-fdpic.h> | ||
16 | |||
17 | /* | ||
18 | * binfmt binary parameters structure | ||
19 | */ | ||
20 | struct elf_fdpic_params { | ||
21 | struct elfhdr hdr; /* ref copy of ELF header */ | ||
22 | struct elf_phdr *phdrs; /* ref copy of PT_PHDR table */ | ||
23 | struct elf32_fdpic_loadmap *loadmap; /* loadmap to be passed to userspace */ | ||
24 | unsigned long elfhdr_addr; /* mapped ELF header user address */ | ||
25 | unsigned long ph_addr; /* mapped PT_PHDR user address */ | ||
26 | unsigned long map_addr; /* mapped loadmap user address */ | ||
27 | unsigned long entry_addr; /* mapped entry user address */ | ||
28 | unsigned long stack_size; /* stack size requested (PT_GNU_STACK) */ | ||
29 | unsigned long dynamic_addr; /* mapped PT_DYNAMIC user address */ | ||
30 | unsigned long load_addr; /* user address at which to map binary */ | ||
31 | unsigned long flags; | ||
32 | #define ELF_FDPIC_FLAG_ARRANGEMENT 0x0000000f /* PT_LOAD arrangement flags */ | ||
33 | #define ELF_FDPIC_FLAG_INDEPENDENT 0x00000000 /* PT_LOADs can be put anywhere */ | ||
34 | #define ELF_FDPIC_FLAG_HONOURVADDR 0x00000001 /* PT_LOAD.vaddr must be honoured */ | ||
35 | #define ELF_FDPIC_FLAG_CONSTDISP 0x00000002 /* PT_LOADs require constant | ||
36 | * displacement */ | ||
37 | #define ELF_FDPIC_FLAG_CONTIGUOUS 0x00000003 /* PT_LOADs should be contiguous */ | ||
38 | #define ELF_FDPIC_FLAG_EXEC_STACK 0x00000010 /* T if stack to be executable */ | ||
39 | #define ELF_FDPIC_FLAG_NOEXEC_STACK 0x00000020 /* T if stack not to be executable */ | ||
40 | #define ELF_FDPIC_FLAG_EXECUTABLE 0x00000040 /* T if this object is the executable */ | ||
41 | #define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */ | ||
42 | }; | ||
43 | |||
44 | #ifdef CONFIG_MMU | ||
45 | extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params, | ||
46 | struct elf_fdpic_params *interp_params, | ||
47 | unsigned long *start_stack, | ||
48 | unsigned long *start_brk); | ||
49 | #endif | ||
50 | |||
51 | #endif /* _LINUX_ELF_FDPIC_H */ | ||
diff --git a/include/linux/fs.h b/include/linux/fs.h index 001c7cff2d48..b33cfc97b9ca 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -64,6 +64,73 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, | |||
64 | ssize_t bytes, void *private, int ret, | 64 | ssize_t bytes, void *private, int ret, |
65 | bool is_async); | 65 | bool is_async); |
66 | 66 | ||
67 | #define MAY_EXEC 0x00000001 | ||
68 | #define MAY_WRITE 0x00000002 | ||
69 | #define MAY_READ 0x00000004 | ||
70 | #define MAY_APPEND 0x00000008 | ||
71 | #define MAY_ACCESS 0x00000010 | ||
72 | #define MAY_OPEN 0x00000020 | ||
73 | #define MAY_CHDIR 0x00000040 | ||
74 | /* called from RCU mode, don't block */ | ||
75 | #define MAY_NOT_BLOCK 0x00000080 | ||
76 | |||
77 | /* | ||
78 | * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond | ||
79 | * to O_WRONLY and O_RDWR via the strange trick in __dentry_open() | ||
80 | */ | ||
81 | |||
82 | /* file is open for reading */ | ||
83 | #define FMODE_READ ((__force fmode_t)0x1) | ||
84 | /* file is open for writing */ | ||
85 | #define FMODE_WRITE ((__force fmode_t)0x2) | ||
86 | /* file is seekable */ | ||
87 | #define FMODE_LSEEK ((__force fmode_t)0x4) | ||
88 | /* file can be accessed using pread */ | ||
89 | #define FMODE_PREAD ((__force fmode_t)0x8) | ||
90 | /* file can be accessed using pwrite */ | ||
91 | #define FMODE_PWRITE ((__force fmode_t)0x10) | ||
92 | /* File is opened for execution with sys_execve / sys_uselib */ | ||
93 | #define FMODE_EXEC ((__force fmode_t)0x20) | ||
94 | /* File is opened with O_NDELAY (only set for block devices) */ | ||
95 | #define FMODE_NDELAY ((__force fmode_t)0x40) | ||
96 | /* File is opened with O_EXCL (only set for block devices) */ | ||
97 | #define FMODE_EXCL ((__force fmode_t)0x80) | ||
98 | /* File is opened using open(.., 3, ..) and is writeable only for ioctls | ||
99 | (specialy hack for floppy.c) */ | ||
100 | #define FMODE_WRITE_IOCTL ((__force fmode_t)0x100) | ||
101 | /* 32bit hashes as llseek() offset (for directories) */ | ||
102 | #define FMODE_32BITHASH ((__force fmode_t)0x200) | ||
103 | /* 64bit hashes as llseek() offset (for directories) */ | ||
104 | #define FMODE_64BITHASH ((__force fmode_t)0x400) | ||
105 | |||
106 | /* | ||
107 | * Don't update ctime and mtime. | ||
108 | * | ||
109 | * Currently a special hack for the XFS open_by_handle ioctl, but we'll | ||
110 | * hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon. | ||
111 | */ | ||
112 | #define FMODE_NOCMTIME ((__force fmode_t)0x800) | ||
113 | |||
114 | /* Expect random access pattern */ | ||
115 | #define FMODE_RANDOM ((__force fmode_t)0x1000) | ||
116 | |||
117 | /* File is huge (eg. /dev/kmem): treat loff_t as unsigned */ | ||
118 | #define FMODE_UNSIGNED_OFFSET ((__force fmode_t)0x2000) | ||
119 | |||
120 | /* File is opened with O_PATH; almost nothing can be done with it */ | ||
121 | #define FMODE_PATH ((__force fmode_t)0x4000) | ||
122 | |||
123 | /* File was opened by fanotify and shouldn't generate fanotify events */ | ||
124 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) | ||
125 | |||
126 | /* | ||
127 | * Flag for rw_copy_check_uvector and compat_rw_copy_check_uvector | ||
128 | * that indicates that they should check the contents of the iovec are | ||
129 | * valid, but not check the memory that the iovec elements | ||
130 | * points too. | ||
131 | */ | ||
132 | #define CHECK_IOVEC_ONLY -1 | ||
133 | |||
67 | /* | 134 | /* |
68 | * The below are the various read and write types that we support. Some of | 135 | * The below are the various read and write types that we support. Some of |
69 | * them include behavioral modifiers that send information down to the | 136 | * them include behavioral modifiers that send information down to the |
@@ -1557,6 +1624,60 @@ struct super_operations { | |||
1557 | }; | 1624 | }; |
1558 | 1625 | ||
1559 | /* | 1626 | /* |
1627 | * Inode flags - they have no relation to superblock flags now | ||
1628 | */ | ||
1629 | #define S_SYNC 1 /* Writes are synced at once */ | ||
1630 | #define S_NOATIME 2 /* Do not update access times */ | ||
1631 | #define S_APPEND 4 /* Append-only file */ | ||
1632 | #define S_IMMUTABLE 8 /* Immutable file */ | ||
1633 | #define S_DEAD 16 /* removed, but still open directory */ | ||
1634 | #define S_NOQUOTA 32 /* Inode is not counted to quota */ | ||
1635 | #define S_DIRSYNC 64 /* Directory modifications are synchronous */ | ||
1636 | #define S_NOCMTIME 128 /* Do not update file c/mtime */ | ||
1637 | #define S_SWAPFILE 256 /* Do not truncate: swapon got its bmaps */ | ||
1638 | #define S_PRIVATE 512 /* Inode is fs-internal */ | ||
1639 | #define S_IMA 1024 /* Inode has an associated IMA struct */ | ||
1640 | #define S_AUTOMOUNT 2048 /* Automount/referral quasi-directory */ | ||
1641 | #define S_NOSEC 4096 /* no suid or xattr security attributes */ | ||
1642 | |||
1643 | /* | ||
1644 | * Note that nosuid etc flags are inode-specific: setting some file-system | ||
1645 | * flags just means all the inodes inherit those flags by default. It might be | ||
1646 | * possible to override it selectively if you really wanted to with some | ||
1647 | * ioctl() that is not currently implemented. | ||
1648 | * | ||
1649 | * Exception: MS_RDONLY is always applied to the entire file system. | ||
1650 | * | ||
1651 | * Unfortunately, it is possible to change a filesystems flags with it mounted | ||
1652 | * with files in use. This means that all of the inodes will not have their | ||
1653 | * i_flags updated. Hence, i_flags no longer inherit the superblock mount | ||
1654 | * flags, so these have to be checked separately. -- rmk@arm.uk.linux.org | ||
1655 | */ | ||
1656 | #define __IS_FLG(inode, flg) ((inode)->i_sb->s_flags & (flg)) | ||
1657 | |||
1658 | #define IS_RDONLY(inode) ((inode)->i_sb->s_flags & MS_RDONLY) | ||
1659 | #define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) || \ | ||
1660 | ((inode)->i_flags & S_SYNC)) | ||
1661 | #define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \ | ||
1662 | ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) | ||
1663 | #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) | ||
1664 | #define IS_NOATIME(inode) __IS_FLG(inode, MS_RDONLY|MS_NOATIME) | ||
1665 | #define IS_I_VERSION(inode) __IS_FLG(inode, MS_I_VERSION) | ||
1666 | |||
1667 | #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) | ||
1668 | #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) | ||
1669 | #define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) | ||
1670 | #define IS_POSIXACL(inode) __IS_FLG(inode, MS_POSIXACL) | ||
1671 | |||
1672 | #define IS_DEADDIR(inode) ((inode)->i_flags & S_DEAD) | ||
1673 | #define IS_NOCMTIME(inode) ((inode)->i_flags & S_NOCMTIME) | ||
1674 | #define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE) | ||
1675 | #define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE) | ||
1676 | #define IS_IMA(inode) ((inode)->i_flags & S_IMA) | ||
1677 | #define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT) | ||
1678 | #define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC) | ||
1679 | |||
1680 | /* | ||
1560 | * Inode state bits. Protected by inode->i_lock | 1681 | * Inode state bits. Protected by inode->i_lock |
1561 | * | 1682 | * |
1562 | * Three bits determine the dirty state of the inode, I_DIRTY_SYNC, | 1683 | * Three bits determine the dirty state of the inode, I_DIRTY_SYNC, |
@@ -1688,6 +1809,11 @@ int sync_inode_metadata(struct inode *inode, int wait); | |||
1688 | struct file_system_type { | 1809 | struct file_system_type { |
1689 | const char *name; | 1810 | const char *name; |
1690 | int fs_flags; | 1811 | int fs_flags; |
1812 | #define FS_REQUIRES_DEV 1 | ||
1813 | #define FS_BINARY_MOUNTDATA 2 | ||
1814 | #define FS_HAS_SUBTYPE 4 | ||
1815 | #define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */ | ||
1816 | #define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() during rename() internally. */ | ||
1691 | struct dentry *(*mount) (struct file_system_type *, int, | 1817 | struct dentry *(*mount) (struct file_system_type *, int, |
1692 | const char *, void *); | 1818 | const char *, void *); |
1693 | void (*kill_sb) (struct super_block *); | 1819 | void (*kill_sb) (struct super_block *); |
diff --git a/include/linux/isdn/Kbuild b/include/linux/isdn/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/isdn/Kbuild +++ /dev/null | |||
diff --git a/include/linux/mmc/Kbuild b/include/linux/mmc/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/mmc/Kbuild +++ /dev/null | |||
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild deleted file mode 100644 index b3322023e9a5..000000000000 --- a/include/linux/netfilter/Kbuild +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | header-y += ipset/ | ||
diff --git a/include/linux/netfilter/ipset/Kbuild b/include/linux/netfilter/ipset/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/netfilter/ipset/Kbuild +++ /dev/null | |||
diff --git a/include/linux/netfilter_arp/Kbuild b/include/linux/netfilter_arp/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/netfilter_arp/Kbuild +++ /dev/null | |||
diff --git a/include/linux/netfilter_bridge/Kbuild b/include/linux/netfilter_bridge/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/netfilter_bridge/Kbuild +++ /dev/null | |||
diff --git a/include/linux/netfilter_ipv4/Kbuild b/include/linux/netfilter_ipv4/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/netfilter_ipv4/Kbuild +++ /dev/null | |||
diff --git a/include/linux/netfilter_ipv6/Kbuild b/include/linux/netfilter_ipv6/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/netfilter_ipv6/Kbuild +++ /dev/null | |||
diff --git a/include/linux/nfsd/Kbuild b/include/linux/nfsd/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/nfsd/Kbuild +++ /dev/null | |||
diff --git a/include/linux/of.h b/include/linux/of.h index 72843b72a2b2..b4e50d56fc74 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -331,6 +331,13 @@ static inline bool of_have_populated_dt(void) | |||
331 | #define for_each_child_of_node(parent, child) \ | 331 | #define for_each_child_of_node(parent, child) \ |
332 | while (0) | 332 | while (0) |
333 | 333 | ||
334 | static inline struct device_node *of_get_child_by_name( | ||
335 | const struct device_node *node, | ||
336 | const char *name) | ||
337 | { | ||
338 | return NULL; | ||
339 | } | ||
340 | |||
334 | static inline int of_get_child_count(const struct device_node *np) | 341 | static inline int of_get_child_count(const struct device_node *np) |
335 | { | 342 | { |
336 | return 0; | 343 | return 0; |
diff --git a/include/linux/of_address.h b/include/linux/of_address.h index c3cdc1025c30..a1984dd037da 100644 --- a/include/linux/of_address.h +++ b/include/linux/of_address.h | |||
@@ -19,7 +19,7 @@ extern void __iomem *of_iomap(struct device_node *device, int index); | |||
19 | * the address space flags too. The PCI version uses a BAR number | 19 | * the address space flags too. The PCI version uses a BAR number |
20 | * instead of an absolute index | 20 | * instead of an absolute index |
21 | */ | 21 | */ |
22 | extern const u32 *of_get_address(struct device_node *dev, int index, | 22 | extern const __be32 *of_get_address(struct device_node *dev, int index, |
23 | u64 *size, unsigned int *flags); | 23 | u64 *size, unsigned int *flags); |
24 | 24 | ||
25 | #ifndef pci_address_to_pio | 25 | #ifndef pci_address_to_pio |
@@ -44,7 +44,7 @@ static inline void __iomem *of_iomap(struct device_node *device, int index) | |||
44 | { | 44 | { |
45 | return NULL; | 45 | return NULL; |
46 | } | 46 | } |
47 | static inline const u32 *of_get_address(struct device_node *dev, int index, | 47 | static inline const __be32 *of_get_address(struct device_node *dev, int index, |
48 | u64 *size, unsigned int *flags) | 48 | u64 *size, unsigned int *flags) |
49 | { | 49 | { |
50 | return NULL; | 50 | return NULL; |
diff --git a/include/linux/of_irq.h b/include/linux/of_irq.h index b8e241125201..535cecf1e02f 100644 --- a/include/linux/of_irq.h +++ b/include/linux/of_irq.h | |||
@@ -58,8 +58,8 @@ static inline int of_irq_map_oldworld(struct device_node *device, int index, | |||
58 | #endif /* CONFIG_PPC32 && CONFIG_PPC_PMAC */ | 58 | #endif /* CONFIG_PPC32 && CONFIG_PPC_PMAC */ |
59 | 59 | ||
60 | 60 | ||
61 | extern int of_irq_map_raw(struct device_node *parent, const u32 *intspec, | 61 | extern int of_irq_map_raw(struct device_node *parent, const __be32 *intspec, |
62 | u32 ointsize, const u32 *addr, | 62 | u32 ointsize, const __be32 *addr, |
63 | struct of_irq *out_irq); | 63 | struct of_irq *out_irq); |
64 | extern int of_irq_map_one(struct device_node *device, int index, | 64 | extern int of_irq_map_one(struct device_node *device, int index, |
65 | struct of_irq *out_irq); | 65 | struct of_irq *out_irq); |
diff --git a/include/linux/spi/Kbuild b/include/linux/spi/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/spi/Kbuild +++ /dev/null | |||
diff --git a/include/linux/sunrpc/Kbuild b/include/linux/sunrpc/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/sunrpc/Kbuild +++ /dev/null | |||
diff --git a/include/linux/tc_act/Kbuild b/include/linux/tc_act/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/tc_act/Kbuild +++ /dev/null | |||
diff --git a/include/linux/tc_ematch/Kbuild b/include/linux/tc_ematch/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/tc_ematch/Kbuild +++ /dev/null | |||
diff --git a/include/linux/wimax/Kbuild b/include/linux/wimax/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/linux/wimax/Kbuild +++ /dev/null | |||
diff --git a/include/mtd/Kbuild b/include/mtd/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/mtd/Kbuild +++ /dev/null | |||
diff --git a/include/uapi/asm-generic/kvm_para.h b/include/uapi/asm-generic/kvm_para.h index e69de29bb2d1..486f0af73c39 100644 --- a/include/uapi/asm-generic/kvm_para.h +++ b/include/uapi/asm-generic/kvm_para.h | |||
@@ -0,0 +1,4 @@ | |||
1 | /* | ||
2 | * There isn't anything here, but the file must not be empty or patch | ||
3 | * will delete it. | ||
4 | */ | ||
diff --git a/include/uapi/linux/dvb/Kbuild b/include/uapi/linux/dvb/Kbuild index aafaa5aa54d4..d40942cfc627 100644 --- a/include/uapi/linux/dvb/Kbuild +++ b/include/uapi/linux/dvb/Kbuild | |||
@@ -1 +1,9 @@ | |||
1 | # UAPI Header export list | 1 | # UAPI Header export list |
2 | header-y += audio.h | ||
3 | header-y += ca.h | ||
4 | header-y += dmx.h | ||
5 | header-y += frontend.h | ||
6 | header-y += net.h | ||
7 | header-y += osd.h | ||
8 | header-y += version.h | ||
9 | header-y += video.h | ||
diff --git a/include/linux/dvb/audio.h b/include/uapi/linux/dvb/audio.h index d47bccd604e4..d47bccd604e4 100644 --- a/include/linux/dvb/audio.h +++ b/include/uapi/linux/dvb/audio.h | |||
diff --git a/include/linux/dvb/ca.h b/include/uapi/linux/dvb/ca.h index c18537f3e449..c18537f3e449 100644 --- a/include/linux/dvb/ca.h +++ b/include/uapi/linux/dvb/ca.h | |||
diff --git a/include/uapi/linux/dvb/dmx.h b/include/uapi/linux/dvb/dmx.h new file mode 100644 index 000000000000..b2a9ad8cafdc --- /dev/null +++ b/include/uapi/linux/dvb/dmx.h | |||
@@ -0,0 +1,155 @@ | |||
1 | /* | ||
2 | * dmx.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de> | ||
5 | * & Ralph Metzler <ralph@convergence.de> | ||
6 | * for convergence integrated media GmbH | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU Lesser General Public License | ||
10 | * as published by the Free Software Foundation; either version 2.1 | ||
11 | * of the License, or (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU Lesser General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #ifndef _UAPI_DVBDMX_H_ | ||
25 | #define _UAPI_DVBDMX_H_ | ||
26 | |||
27 | #include <linux/types.h> | ||
28 | #ifndef __KERNEL__ | ||
29 | #include <time.h> | ||
30 | #endif | ||
31 | |||
32 | |||
33 | #define DMX_FILTER_SIZE 16 | ||
34 | |||
35 | typedef enum | ||
36 | { | ||
37 | DMX_OUT_DECODER, /* Streaming directly to decoder. */ | ||
38 | DMX_OUT_TAP, /* Output going to a memory buffer */ | ||
39 | /* (to be retrieved via the read command).*/ | ||
40 | DMX_OUT_TS_TAP, /* Output multiplexed into a new TS */ | ||
41 | /* (to be retrieved by reading from the */ | ||
42 | /* logical DVR device). */ | ||
43 | DMX_OUT_TSDEMUX_TAP /* Like TS_TAP but retrieved from the DMX device */ | ||
44 | } dmx_output_t; | ||
45 | |||
46 | |||
47 | typedef enum | ||
48 | { | ||
49 | DMX_IN_FRONTEND, /* Input from a front-end device. */ | ||
50 | DMX_IN_DVR /* Input from the logical DVR device. */ | ||
51 | } dmx_input_t; | ||
52 | |||
53 | |||
54 | typedef enum | ||
55 | { | ||
56 | DMX_PES_AUDIO0, | ||
57 | DMX_PES_VIDEO0, | ||
58 | DMX_PES_TELETEXT0, | ||
59 | DMX_PES_SUBTITLE0, | ||
60 | DMX_PES_PCR0, | ||
61 | |||
62 | DMX_PES_AUDIO1, | ||
63 | DMX_PES_VIDEO1, | ||
64 | DMX_PES_TELETEXT1, | ||
65 | DMX_PES_SUBTITLE1, | ||
66 | DMX_PES_PCR1, | ||
67 | |||
68 | DMX_PES_AUDIO2, | ||
69 | DMX_PES_VIDEO2, | ||
70 | DMX_PES_TELETEXT2, | ||
71 | DMX_PES_SUBTITLE2, | ||
72 | DMX_PES_PCR2, | ||
73 | |||
74 | DMX_PES_AUDIO3, | ||
75 | DMX_PES_VIDEO3, | ||
76 | DMX_PES_TELETEXT3, | ||
77 | DMX_PES_SUBTITLE3, | ||
78 | DMX_PES_PCR3, | ||
79 | |||
80 | DMX_PES_OTHER | ||
81 | } dmx_pes_type_t; | ||
82 | |||
83 | #define DMX_PES_AUDIO DMX_PES_AUDIO0 | ||
84 | #define DMX_PES_VIDEO DMX_PES_VIDEO0 | ||
85 | #define DMX_PES_TELETEXT DMX_PES_TELETEXT0 | ||
86 | #define DMX_PES_SUBTITLE DMX_PES_SUBTITLE0 | ||
87 | #define DMX_PES_PCR DMX_PES_PCR0 | ||
88 | |||
89 | |||
90 | typedef struct dmx_filter | ||
91 | { | ||
92 | __u8 filter[DMX_FILTER_SIZE]; | ||
93 | __u8 mask[DMX_FILTER_SIZE]; | ||
94 | __u8 mode[DMX_FILTER_SIZE]; | ||
95 | } dmx_filter_t; | ||
96 | |||
97 | |||
98 | struct dmx_sct_filter_params | ||
99 | { | ||
100 | __u16 pid; | ||
101 | dmx_filter_t filter; | ||
102 | __u32 timeout; | ||
103 | __u32 flags; | ||
104 | #define DMX_CHECK_CRC 1 | ||
105 | #define DMX_ONESHOT 2 | ||
106 | #define DMX_IMMEDIATE_START 4 | ||
107 | #define DMX_KERNEL_CLIENT 0x8000 | ||
108 | }; | ||
109 | |||
110 | |||
111 | struct dmx_pes_filter_params | ||
112 | { | ||
113 | __u16 pid; | ||
114 | dmx_input_t input; | ||
115 | dmx_output_t output; | ||
116 | dmx_pes_type_t pes_type; | ||
117 | __u32 flags; | ||
118 | }; | ||
119 | |||
120 | typedef struct dmx_caps { | ||
121 | __u32 caps; | ||
122 | int num_decoders; | ||
123 | } dmx_caps_t; | ||
124 | |||
125 | typedef enum { | ||
126 | DMX_SOURCE_FRONT0 = 0, | ||
127 | DMX_SOURCE_FRONT1, | ||
128 | DMX_SOURCE_FRONT2, | ||
129 | DMX_SOURCE_FRONT3, | ||
130 | DMX_SOURCE_DVR0 = 16, | ||
131 | DMX_SOURCE_DVR1, | ||
132 | DMX_SOURCE_DVR2, | ||
133 | DMX_SOURCE_DVR3 | ||
134 | } dmx_source_t; | ||
135 | |||
136 | struct dmx_stc { | ||
137 | unsigned int num; /* input : which STC? 0..N */ | ||
138 | unsigned int base; /* output: divisor for stc to get 90 kHz clock */ | ||
139 | __u64 stc; /* output: stc in 'base'*90 kHz units */ | ||
140 | }; | ||
141 | |||
142 | |||
143 | #define DMX_START _IO('o', 41) | ||
144 | #define DMX_STOP _IO('o', 42) | ||
145 | #define DMX_SET_FILTER _IOW('o', 43, struct dmx_sct_filter_params) | ||
146 | #define DMX_SET_PES_FILTER _IOW('o', 44, struct dmx_pes_filter_params) | ||
147 | #define DMX_SET_BUFFER_SIZE _IO('o', 45) | ||
148 | #define DMX_GET_PES_PIDS _IOR('o', 47, __u16[5]) | ||
149 | #define DMX_GET_CAPS _IOR('o', 48, dmx_caps_t) | ||
150 | #define DMX_SET_SOURCE _IOW('o', 49, dmx_source_t) | ||
151 | #define DMX_GET_STC _IOWR('o', 50, struct dmx_stc) | ||
152 | #define DMX_ADD_PID _IOW('o', 51, __u16) | ||
153 | #define DMX_REMOVE_PID _IOW('o', 52, __u16) | ||
154 | |||
155 | #endif /* _UAPI_DVBDMX_H_ */ | ||
diff --git a/include/linux/dvb/frontend.h b/include/uapi/linux/dvb/frontend.h index c12d452cb40d..c12d452cb40d 100644 --- a/include/linux/dvb/frontend.h +++ b/include/uapi/linux/dvb/frontend.h | |||
diff --git a/include/linux/dvb/net.h b/include/uapi/linux/dvb/net.h index f451e7eb0b0b..f451e7eb0b0b 100644 --- a/include/linux/dvb/net.h +++ b/include/uapi/linux/dvb/net.h | |||
diff --git a/include/linux/dvb/osd.h b/include/uapi/linux/dvb/osd.h index 880e68435832..880e68435832 100644 --- a/include/linux/dvb/osd.h +++ b/include/uapi/linux/dvb/osd.h | |||
diff --git a/include/linux/dvb/version.h b/include/uapi/linux/dvb/version.h index 827cce7e33e3..827cce7e33e3 100644 --- a/include/linux/dvb/version.h +++ b/include/uapi/linux/dvb/version.h | |||
diff --git a/include/uapi/linux/dvb/video.h b/include/uapi/linux/dvb/video.h new file mode 100644 index 000000000000..d3d14a59d2d5 --- /dev/null +++ b/include/uapi/linux/dvb/video.h | |||
@@ -0,0 +1,274 @@ | |||
1 | /* | ||
2 | * video.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Marcus Metzler <marcus@convergence.de> | ||
5 | * & Ralph Metzler <ralph@convergence.de> | ||
6 | * for convergence integrated media GmbH | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU Lesser General Public License | ||
10 | * as published by the Free Software Foundation; either version 2.1 | ||
11 | * of the License, or (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU Lesser General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #ifndef _UAPI_DVBVIDEO_H_ | ||
25 | #define _UAPI_DVBVIDEO_H_ | ||
26 | |||
27 | #include <linux/types.h> | ||
28 | #ifndef __KERNEL__ | ||
29 | #include <stdint.h> | ||
30 | #include <time.h> | ||
31 | #endif | ||
32 | |||
33 | typedef enum { | ||
34 | VIDEO_FORMAT_4_3, /* Select 4:3 format */ | ||
35 | VIDEO_FORMAT_16_9, /* Select 16:9 format. */ | ||
36 | VIDEO_FORMAT_221_1 /* 2.21:1 */ | ||
37 | } video_format_t; | ||
38 | |||
39 | |||
40 | typedef enum { | ||
41 | VIDEO_SYSTEM_PAL, | ||
42 | VIDEO_SYSTEM_NTSC, | ||
43 | VIDEO_SYSTEM_PALN, | ||
44 | VIDEO_SYSTEM_PALNc, | ||
45 | VIDEO_SYSTEM_PALM, | ||
46 | VIDEO_SYSTEM_NTSC60, | ||
47 | VIDEO_SYSTEM_PAL60, | ||
48 | VIDEO_SYSTEM_PALM60 | ||
49 | } video_system_t; | ||
50 | |||
51 | |||
52 | typedef enum { | ||
53 | VIDEO_PAN_SCAN, /* use pan and scan format */ | ||
54 | VIDEO_LETTER_BOX, /* use letterbox format */ | ||
55 | VIDEO_CENTER_CUT_OUT /* use center cut out format */ | ||
56 | } video_displayformat_t; | ||
57 | |||
58 | typedef struct { | ||
59 | int w; | ||
60 | int h; | ||
61 | video_format_t aspect_ratio; | ||
62 | } video_size_t; | ||
63 | |||
64 | typedef enum { | ||
65 | VIDEO_SOURCE_DEMUX, /* Select the demux as the main source */ | ||
66 | VIDEO_SOURCE_MEMORY /* If this source is selected, the stream | ||
67 | comes from the user through the write | ||
68 | system call */ | ||
69 | } video_stream_source_t; | ||
70 | |||
71 | |||
72 | typedef enum { | ||
73 | VIDEO_STOPPED, /* Video is stopped */ | ||
74 | VIDEO_PLAYING, /* Video is currently playing */ | ||
75 | VIDEO_FREEZED /* Video is freezed */ | ||
76 | } video_play_state_t; | ||
77 | |||
78 | |||
79 | /* Decoder commands */ | ||
80 | #define VIDEO_CMD_PLAY (0) | ||
81 | #define VIDEO_CMD_STOP (1) | ||
82 | #define VIDEO_CMD_FREEZE (2) | ||
83 | #define VIDEO_CMD_CONTINUE (3) | ||
84 | |||
85 | /* Flags for VIDEO_CMD_FREEZE */ | ||
86 | #define VIDEO_CMD_FREEZE_TO_BLACK (1 << 0) | ||
87 | |||
88 | /* Flags for VIDEO_CMD_STOP */ | ||
89 | #define VIDEO_CMD_STOP_TO_BLACK (1 << 0) | ||
90 | #define VIDEO_CMD_STOP_IMMEDIATELY (1 << 1) | ||
91 | |||
92 | /* Play input formats: */ | ||
93 | /* The decoder has no special format requirements */ | ||
94 | #define VIDEO_PLAY_FMT_NONE (0) | ||
95 | /* The decoder requires full GOPs */ | ||
96 | #define VIDEO_PLAY_FMT_GOP (1) | ||
97 | |||
98 | /* The structure must be zeroed before use by the application | ||
99 | This ensures it can be extended safely in the future. */ | ||
100 | struct video_command { | ||
101 | __u32 cmd; | ||
102 | __u32 flags; | ||
103 | union { | ||
104 | struct { | ||
105 | __u64 pts; | ||
106 | } stop; | ||
107 | |||
108 | struct { | ||
109 | /* 0 or 1000 specifies normal speed, | ||
110 | 1 specifies forward single stepping, | ||
111 | -1 specifies backward single stepping, | ||
112 | >1: playback at speed/1000 of the normal speed, | ||
113 | <-1: reverse playback at (-speed/1000) of the normal speed. */ | ||
114 | __s32 speed; | ||
115 | __u32 format; | ||
116 | } play; | ||
117 | |||
118 | struct { | ||
119 | __u32 data[16]; | ||
120 | } raw; | ||
121 | }; | ||
122 | }; | ||
123 | |||
124 | /* FIELD_UNKNOWN can be used if the hardware does not know whether | ||
125 | the Vsync is for an odd, even or progressive (i.e. non-interlaced) | ||
126 | field. */ | ||
127 | #define VIDEO_VSYNC_FIELD_UNKNOWN (0) | ||
128 | #define VIDEO_VSYNC_FIELD_ODD (1) | ||
129 | #define VIDEO_VSYNC_FIELD_EVEN (2) | ||
130 | #define VIDEO_VSYNC_FIELD_PROGRESSIVE (3) | ||
131 | |||
132 | struct video_event { | ||
133 | __s32 type; | ||
134 | #define VIDEO_EVENT_SIZE_CHANGED 1 | ||
135 | #define VIDEO_EVENT_FRAME_RATE_CHANGED 2 | ||
136 | #define VIDEO_EVENT_DECODER_STOPPED 3 | ||
137 | #define VIDEO_EVENT_VSYNC 4 | ||
138 | __kernel_time_t timestamp; | ||
139 | union { | ||
140 | video_size_t size; | ||
141 | unsigned int frame_rate; /* in frames per 1000sec */ | ||
142 | unsigned char vsync_field; /* unknown/odd/even/progressive */ | ||
143 | } u; | ||
144 | }; | ||
145 | |||
146 | |||
147 | struct video_status { | ||
148 | int video_blank; /* blank video on freeze? */ | ||
149 | video_play_state_t play_state; /* current state of playback */ | ||
150 | video_stream_source_t stream_source; /* current source (demux/memory) */ | ||
151 | video_format_t video_format; /* current aspect ratio of stream*/ | ||
152 | video_displayformat_t display_format;/* selected cropping mode */ | ||
153 | }; | ||
154 | |||
155 | |||
156 | struct video_still_picture { | ||
157 | char __user *iFrame; /* pointer to a single iframe in memory */ | ||
158 | __s32 size; | ||
159 | }; | ||
160 | |||
161 | |||
162 | typedef | ||
163 | struct video_highlight { | ||
164 | int active; /* 1=show highlight, 0=hide highlight */ | ||
165 | __u8 contrast1; /* 7- 4 Pattern pixel contrast */ | ||
166 | /* 3- 0 Background pixel contrast */ | ||
167 | __u8 contrast2; /* 7- 4 Emphasis pixel-2 contrast */ | ||
168 | /* 3- 0 Emphasis pixel-1 contrast */ | ||
169 | __u8 color1; /* 7- 4 Pattern pixel color */ | ||
170 | /* 3- 0 Background pixel color */ | ||
171 | __u8 color2; /* 7- 4 Emphasis pixel-2 color */ | ||
172 | /* 3- 0 Emphasis pixel-1 color */ | ||
173 | __u32 ypos; /* 23-22 auto action mode */ | ||
174 | /* 21-12 start y */ | ||
175 | /* 9- 0 end y */ | ||
176 | __u32 xpos; /* 23-22 button color number */ | ||
177 | /* 21-12 start x */ | ||
178 | /* 9- 0 end x */ | ||
179 | } video_highlight_t; | ||
180 | |||
181 | |||
182 | typedef struct video_spu { | ||
183 | int active; | ||
184 | int stream_id; | ||
185 | } video_spu_t; | ||
186 | |||
187 | |||
188 | typedef struct video_spu_palette { /* SPU Palette information */ | ||
189 | int length; | ||
190 | __u8 __user *palette; | ||
191 | } video_spu_palette_t; | ||
192 | |||
193 | |||
194 | typedef struct video_navi_pack { | ||
195 | int length; /* 0 ... 1024 */ | ||
196 | __u8 data[1024]; | ||
197 | } video_navi_pack_t; | ||
198 | |||
199 | |||
200 | typedef __u16 video_attributes_t; | ||
201 | /* bits: descr. */ | ||
202 | /* 15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) */ | ||
203 | /* 13-12 TV system (0=525/60, 1=625/50) */ | ||
204 | /* 11-10 Aspect ratio (0=4:3, 3=16:9) */ | ||
205 | /* 9- 8 permitted display mode on 4:3 monitor (0=both, 1=only pan-sca */ | ||
206 | /* 7 line 21-1 data present in GOP (1=yes, 0=no) */ | ||
207 | /* 6 line 21-2 data present in GOP (1=yes, 0=no) */ | ||
208 | /* 5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 */ | ||
209 | /* 2 source letterboxed (1=yes, 0=no) */ | ||
210 | /* 0 film/camera mode (0=camera, 1=film (625/50 only)) */ | ||
211 | |||
212 | |||
213 | /* bit definitions for capabilities: */ | ||
214 | /* can the hardware decode MPEG1 and/or MPEG2? */ | ||
215 | #define VIDEO_CAP_MPEG1 1 | ||
216 | #define VIDEO_CAP_MPEG2 2 | ||
217 | /* can you send a system and/or program stream to video device? | ||
218 | (you still have to open the video and the audio device but only | ||
219 | send the stream to the video device) */ | ||
220 | #define VIDEO_CAP_SYS 4 | ||
221 | #define VIDEO_CAP_PROG 8 | ||
222 | /* can the driver also handle SPU, NAVI and CSS encoded data? | ||
223 | (CSS API is not present yet) */ | ||
224 | #define VIDEO_CAP_SPU 16 | ||
225 | #define VIDEO_CAP_NAVI 32 | ||
226 | #define VIDEO_CAP_CSS 64 | ||
227 | |||
228 | |||
229 | #define VIDEO_STOP _IO('o', 21) | ||
230 | #define VIDEO_PLAY _IO('o', 22) | ||
231 | #define VIDEO_FREEZE _IO('o', 23) | ||
232 | #define VIDEO_CONTINUE _IO('o', 24) | ||
233 | #define VIDEO_SELECT_SOURCE _IO('o', 25) | ||
234 | #define VIDEO_SET_BLANK _IO('o', 26) | ||
235 | #define VIDEO_GET_STATUS _IOR('o', 27, struct video_status) | ||
236 | #define VIDEO_GET_EVENT _IOR('o', 28, struct video_event) | ||
237 | #define VIDEO_SET_DISPLAY_FORMAT _IO('o', 29) | ||
238 | #define VIDEO_STILLPICTURE _IOW('o', 30, struct video_still_picture) | ||
239 | #define VIDEO_FAST_FORWARD _IO('o', 31) | ||
240 | #define VIDEO_SLOWMOTION _IO('o', 32) | ||
241 | #define VIDEO_GET_CAPABILITIES _IOR('o', 33, unsigned int) | ||
242 | #define VIDEO_CLEAR_BUFFER _IO('o', 34) | ||
243 | #define VIDEO_SET_ID _IO('o', 35) | ||
244 | #define VIDEO_SET_STREAMTYPE _IO('o', 36) | ||
245 | #define VIDEO_SET_FORMAT _IO('o', 37) | ||
246 | #define VIDEO_SET_SYSTEM _IO('o', 38) | ||
247 | #define VIDEO_SET_HIGHLIGHT _IOW('o', 39, video_highlight_t) | ||
248 | #define VIDEO_SET_SPU _IOW('o', 50, video_spu_t) | ||
249 | #define VIDEO_SET_SPU_PALETTE _IOW('o', 51, video_spu_palette_t) | ||
250 | #define VIDEO_GET_NAVI _IOR('o', 52, video_navi_pack_t) | ||
251 | #define VIDEO_SET_ATTRIBUTES _IO('o', 53) | ||
252 | #define VIDEO_GET_SIZE _IOR('o', 55, video_size_t) | ||
253 | #define VIDEO_GET_FRAME_RATE _IOR('o', 56, unsigned int) | ||
254 | |||
255 | /** | ||
256 | * VIDEO_GET_PTS | ||
257 | * | ||
258 | * Read the 33 bit presentation time stamp as defined | ||
259 | * in ITU T-REC-H.222.0 / ISO/IEC 13818-1. | ||
260 | * | ||
261 | * The PTS should belong to the currently played | ||
262 | * frame if possible, but may also be a value close to it | ||
263 | * like the PTS of the last decoded frame or the last PTS | ||
264 | * extracted by the PES parser. | ||
265 | */ | ||
266 | #define VIDEO_GET_PTS _IOR('o', 57, __u64) | ||
267 | |||
268 | /* Read the number of displayed frames since the decoder was started */ | ||
269 | #define VIDEO_GET_FRAME_COUNT _IOR('o', 58, __u64) | ||
270 | |||
271 | #define VIDEO_COMMAND _IOWR('o', 59, struct video_command) | ||
272 | #define VIDEO_TRY_COMMAND _IOWR('o', 60, struct video_command) | ||
273 | |||
274 | #endif /* _UAPI_DVBVIDEO_H_ */ | ||
diff --git a/include/uapi/linux/elf-fdpic.h b/include/uapi/linux/elf-fdpic.h index 1065078938f9..3921e33aec8e 100644 --- a/include/uapi/linux/elf-fdpic.h +++ b/include/uapi/linux/elf-fdpic.h | |||
@@ -9,8 +9,8 @@ | |||
9 | * 2 of the License, or (at your option) any later version. | 9 | * 2 of the License, or (at your option) any later version. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef _LINUX_ELF_FDPIC_H | 12 | #ifndef _UAPI_LINUX_ELF_FDPIC_H |
13 | #define _LINUX_ELF_FDPIC_H | 13 | #define _UAPI_LINUX_ELF_FDPIC_H |
14 | 14 | ||
15 | #include <linux/elf.h> | 15 | #include <linux/elf.h> |
16 | 16 | ||
@@ -31,40 +31,4 @@ struct elf32_fdpic_loadmap { | |||
31 | 31 | ||
32 | #define ELF32_FDPIC_LOADMAP_VERSION 0x0000 | 32 | #define ELF32_FDPIC_LOADMAP_VERSION 0x0000 |
33 | 33 | ||
34 | #ifndef __KERNEL__ | 34 | #endif /* _UAPI_LINUX_ELF_FDPIC_H */ |
35 | /* | ||
36 | * binfmt binary parameters structure | ||
37 | */ | ||
38 | struct elf_fdpic_params { | ||
39 | struct elfhdr hdr; /* ref copy of ELF header */ | ||
40 | struct elf_phdr *phdrs; /* ref copy of PT_PHDR table */ | ||
41 | struct elf32_fdpic_loadmap *loadmap; /* loadmap to be passed to userspace */ | ||
42 | unsigned long elfhdr_addr; /* mapped ELF header user address */ | ||
43 | unsigned long ph_addr; /* mapped PT_PHDR user address */ | ||
44 | unsigned long map_addr; /* mapped loadmap user address */ | ||
45 | unsigned long entry_addr; /* mapped entry user address */ | ||
46 | unsigned long stack_size; /* stack size requested (PT_GNU_STACK) */ | ||
47 | unsigned long dynamic_addr; /* mapped PT_DYNAMIC user address */ | ||
48 | unsigned long load_addr; /* user address at which to map binary */ | ||
49 | unsigned long flags; | ||
50 | #define ELF_FDPIC_FLAG_ARRANGEMENT 0x0000000f /* PT_LOAD arrangement flags */ | ||
51 | #define ELF_FDPIC_FLAG_INDEPENDENT 0x00000000 /* PT_LOADs can be put anywhere */ | ||
52 | #define ELF_FDPIC_FLAG_HONOURVADDR 0x00000001 /* PT_LOAD.vaddr must be honoured */ | ||
53 | #define ELF_FDPIC_FLAG_CONSTDISP 0x00000002 /* PT_LOADs require constant | ||
54 | * displacement */ | ||
55 | #define ELF_FDPIC_FLAG_CONTIGUOUS 0x00000003 /* PT_LOADs should be contiguous */ | ||
56 | #define ELF_FDPIC_FLAG_EXEC_STACK 0x00000010 /* T if stack to be executable */ | ||
57 | #define ELF_FDPIC_FLAG_NOEXEC_STACK 0x00000020 /* T if stack not to be executable */ | ||
58 | #define ELF_FDPIC_FLAG_EXECUTABLE 0x00000040 /* T if this object is the executable */ | ||
59 | #define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */ | ||
60 | }; | ||
61 | |||
62 | #ifdef CONFIG_MMU | ||
63 | extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params, | ||
64 | struct elf_fdpic_params *interp_params, | ||
65 | unsigned long *start_stack, | ||
66 | unsigned long *start_brk); | ||
67 | #endif | ||
68 | #endif /* __KERNEL__ */ | ||
69 | |||
70 | #endif /* _LINUX_ELF_FDPIC_H */ | ||
diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h index 9fcc880d4be2..780d4c6093eb 100644 --- a/include/uapi/linux/fs.h +++ b/include/uapi/linux/fs.h | |||
@@ -57,85 +57,6 @@ struct inodes_stat_t { | |||
57 | 57 | ||
58 | #define NR_FILE 8192 /* this can well be larger on a larger system */ | 58 | #define NR_FILE 8192 /* this can well be larger on a larger system */ |
59 | 59 | ||
60 | #define MAY_EXEC 0x00000001 | ||
61 | #define MAY_WRITE 0x00000002 | ||
62 | #define MAY_READ 0x00000004 | ||
63 | #define MAY_APPEND 0x00000008 | ||
64 | #define MAY_ACCESS 0x00000010 | ||
65 | #define MAY_OPEN 0x00000020 | ||
66 | #define MAY_CHDIR 0x00000040 | ||
67 | /* called from RCU mode, don't block */ | ||
68 | #define MAY_NOT_BLOCK 0x00000080 | ||
69 | |||
70 | /* | ||
71 | * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond | ||
72 | * to O_WRONLY and O_RDWR via the strange trick in __dentry_open() | ||
73 | */ | ||
74 | |||
75 | /* file is open for reading */ | ||
76 | #define FMODE_READ ((__force fmode_t)0x1) | ||
77 | /* file is open for writing */ | ||
78 | #define FMODE_WRITE ((__force fmode_t)0x2) | ||
79 | /* file is seekable */ | ||
80 | #define FMODE_LSEEK ((__force fmode_t)0x4) | ||
81 | /* file can be accessed using pread */ | ||
82 | #define FMODE_PREAD ((__force fmode_t)0x8) | ||
83 | /* file can be accessed using pwrite */ | ||
84 | #define FMODE_PWRITE ((__force fmode_t)0x10) | ||
85 | /* File is opened for execution with sys_execve / sys_uselib */ | ||
86 | #define FMODE_EXEC ((__force fmode_t)0x20) | ||
87 | /* File is opened with O_NDELAY (only set for block devices) */ | ||
88 | #define FMODE_NDELAY ((__force fmode_t)0x40) | ||
89 | /* File is opened with O_EXCL (only set for block devices) */ | ||
90 | #define FMODE_EXCL ((__force fmode_t)0x80) | ||
91 | /* File is opened using open(.., 3, ..) and is writeable only for ioctls | ||
92 | (specialy hack for floppy.c) */ | ||
93 | #define FMODE_WRITE_IOCTL ((__force fmode_t)0x100) | ||
94 | /* 32bit hashes as llseek() offset (for directories) */ | ||
95 | #define FMODE_32BITHASH ((__force fmode_t)0x200) | ||
96 | /* 64bit hashes as llseek() offset (for directories) */ | ||
97 | #define FMODE_64BITHASH ((__force fmode_t)0x400) | ||
98 | |||
99 | /* | ||
100 | * Don't update ctime and mtime. | ||
101 | * | ||
102 | * Currently a special hack for the XFS open_by_handle ioctl, but we'll | ||
103 | * hopefully graduate it to a proper O_CMTIME flag supported by open(2) soon. | ||
104 | */ | ||
105 | #define FMODE_NOCMTIME ((__force fmode_t)0x800) | ||
106 | |||
107 | /* Expect random access pattern */ | ||
108 | #define FMODE_RANDOM ((__force fmode_t)0x1000) | ||
109 | |||
110 | /* File is huge (eg. /dev/kmem): treat loff_t as unsigned */ | ||
111 | #define FMODE_UNSIGNED_OFFSET ((__force fmode_t)0x2000) | ||
112 | |||
113 | /* File is opened with O_PATH; almost nothing can be done with it */ | ||
114 | #define FMODE_PATH ((__force fmode_t)0x4000) | ||
115 | |||
116 | /* File was opened by fanotify and shouldn't generate fanotify events */ | ||
117 | #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) | ||
118 | |||
119 | /* | ||
120 | * Flag for rw_copy_check_uvector and compat_rw_copy_check_uvector | ||
121 | * that indicates that they should check the contents of the iovec are | ||
122 | * valid, but not check the memory that the iovec elements | ||
123 | * points too. | ||
124 | */ | ||
125 | #define CHECK_IOVEC_ONLY -1 | ||
126 | |||
127 | #define SEL_IN 1 | ||
128 | #define SEL_OUT 2 | ||
129 | #define SEL_EX 4 | ||
130 | |||
131 | /* public flags for file_system_type */ | ||
132 | #define FS_REQUIRES_DEV 1 | ||
133 | #define FS_BINARY_MOUNTDATA 2 | ||
134 | #define FS_HAS_SUBTYPE 4 | ||
135 | #define FS_REVAL_DOT 16384 /* Check the paths ".", ".." for staleness */ | ||
136 | #define FS_RENAME_DOES_D_MOVE 32768 /* FS will handle d_move() | ||
137 | * during rename() internally. | ||
138 | */ | ||
139 | 60 | ||
140 | /* | 61 | /* |
141 | * These are the fs-independent mount-flags: up to 32 flags are supported | 62 | * These are the fs-independent mount-flags: up to 32 flags are supported |
@@ -181,59 +102,6 @@ struct inodes_stat_t { | |||
181 | #define MS_MGC_VAL 0xC0ED0000 | 102 | #define MS_MGC_VAL 0xC0ED0000 |
182 | #define MS_MGC_MSK 0xffff0000 | 103 | #define MS_MGC_MSK 0xffff0000 |
183 | 104 | ||
184 | /* Inode flags - they have nothing to superblock flags now */ | ||
185 | |||
186 | #define S_SYNC 1 /* Writes are synced at once */ | ||
187 | #define S_NOATIME 2 /* Do not update access times */ | ||
188 | #define S_APPEND 4 /* Append-only file */ | ||
189 | #define S_IMMUTABLE 8 /* Immutable file */ | ||
190 | #define S_DEAD 16 /* removed, but still open directory */ | ||
191 | #define S_NOQUOTA 32 /* Inode is not counted to quota */ | ||
192 | #define S_DIRSYNC 64 /* Directory modifications are synchronous */ | ||
193 | #define S_NOCMTIME 128 /* Do not update file c/mtime */ | ||
194 | #define S_SWAPFILE 256 /* Do not truncate: swapon got its bmaps */ | ||
195 | #define S_PRIVATE 512 /* Inode is fs-internal */ | ||
196 | #define S_IMA 1024 /* Inode has an associated IMA struct */ | ||
197 | #define S_AUTOMOUNT 2048 /* Automount/referral quasi-directory */ | ||
198 | #define S_NOSEC 4096 /* no suid or xattr security attributes */ | ||
199 | |||
200 | /* | ||
201 | * Note that nosuid etc flags are inode-specific: setting some file-system | ||
202 | * flags just means all the inodes inherit those flags by default. It might be | ||
203 | * possible to override it selectively if you really wanted to with some | ||
204 | * ioctl() that is not currently implemented. | ||
205 | * | ||
206 | * Exception: MS_RDONLY is always applied to the entire file system. | ||
207 | * | ||
208 | * Unfortunately, it is possible to change a filesystems flags with it mounted | ||
209 | * with files in use. This means that all of the inodes will not have their | ||
210 | * i_flags updated. Hence, i_flags no longer inherit the superblock mount | ||
211 | * flags, so these have to be checked separately. -- rmk@arm.uk.linux.org | ||
212 | */ | ||
213 | #define __IS_FLG(inode,flg) ((inode)->i_sb->s_flags & (flg)) | ||
214 | |||
215 | #define IS_RDONLY(inode) ((inode)->i_sb->s_flags & MS_RDONLY) | ||
216 | #define IS_SYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS) || \ | ||
217 | ((inode)->i_flags & S_SYNC)) | ||
218 | #define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \ | ||
219 | ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) | ||
220 | #define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) | ||
221 | #define IS_NOATIME(inode) __IS_FLG(inode, MS_RDONLY|MS_NOATIME) | ||
222 | #define IS_I_VERSION(inode) __IS_FLG(inode, MS_I_VERSION) | ||
223 | |||
224 | #define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) | ||
225 | #define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) | ||
226 | #define IS_IMMUTABLE(inode) ((inode)->i_flags & S_IMMUTABLE) | ||
227 | #define IS_POSIXACL(inode) __IS_FLG(inode, MS_POSIXACL) | ||
228 | |||
229 | #define IS_DEADDIR(inode) ((inode)->i_flags & S_DEAD) | ||
230 | #define IS_NOCMTIME(inode) ((inode)->i_flags & S_NOCMTIME) | ||
231 | #define IS_SWAPFILE(inode) ((inode)->i_flags & S_SWAPFILE) | ||
232 | #define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE) | ||
233 | #define IS_IMA(inode) ((inode)->i_flags & S_IMA) | ||
234 | #define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT) | ||
235 | #define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC) | ||
236 | |||
237 | /* the read-only stuff doesn't really belong here, but any other place is | 105 | /* the read-only stuff doesn't really belong here, but any other place is |
238 | probably as bad and I don't want to create yet another include file. */ | 106 | probably as bad and I don't want to create yet another include file. */ |
239 | 107 | ||
diff --git a/include/uapi/linux/irqnr.h b/include/uapi/linux/irqnr.h index e69de29bb2d1..ae5704fa77ad 100644 --- a/include/uapi/linux/irqnr.h +++ b/include/uapi/linux/irqnr.h | |||
@@ -0,0 +1,4 @@ | |||
1 | /* | ||
2 | * There isn't anything here anymore, but the file must not be empty or patch | ||
3 | * will delete it. | ||
4 | */ | ||
diff --git a/include/xen/Kbuild b/include/xen/Kbuild deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/include/xen/Kbuild +++ /dev/null | |||
diff --git a/kernel/printk.c b/kernel/printk.c index 66a2ea37b576..2d607f4d1797 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -1890,7 +1890,6 @@ static int __cpuinit console_cpu_notify(struct notifier_block *self, | |||
1890 | switch (action) { | 1890 | switch (action) { |
1891 | case CPU_ONLINE: | 1891 | case CPU_ONLINE: |
1892 | case CPU_DEAD: | 1892 | case CPU_DEAD: |
1893 | case CPU_DYING: | ||
1894 | case CPU_DOWN_FAILED: | 1893 | case CPU_DOWN_FAILED: |
1895 | case CPU_UP_CANCELED: | 1894 | case CPU_UP_CANCELED: |
1896 | console_lock(); | 1895 | console_lock(); |
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index a863af26c79c..40f17c34b415 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/khugepaged.h> | 17 | #include <linux/khugepaged.h> |
18 | #include <linux/freezer.h> | 18 | #include <linux/freezer.h> |
19 | #include <linux/mman.h> | 19 | #include <linux/mman.h> |
20 | #include <linux/pagemap.h> | ||
20 | #include <asm/tlb.h> | 21 | #include <asm/tlb.h> |
21 | #include <asm/pgalloc.h> | 22 | #include <asm/pgalloc.h> |
22 | #include "internal.h" | 23 | #include "internal.h" |
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 0b78fb9ea65b..d04a8a54c294 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -1536,9 +1536,8 @@ asmlinkage long compat_sys_mbind(compat_ulong_t start, compat_ulong_t len, | |||
1536 | * | 1536 | * |
1537 | * Returns effective policy for a VMA at specified address. | 1537 | * Returns effective policy for a VMA at specified address. |
1538 | * Falls back to @task or system default policy, as necessary. | 1538 | * Falls back to @task or system default policy, as necessary. |
1539 | * Current or other task's task mempolicy and non-shared vma policies | 1539 | * Current or other task's task mempolicy and non-shared vma policies must be |
1540 | * are protected by the task's mmap_sem, which must be held for read by | 1540 | * protected by task_lock(task) by the caller. |
1541 | * the caller. | ||
1542 | * Shared policies [those marked as MPOL_F_SHARED] require an extra reference | 1541 | * Shared policies [those marked as MPOL_F_SHARED] require an extra reference |
1543 | * count--added by the get_policy() vm_op, as appropriate--to protect against | 1542 | * count--added by the get_policy() vm_op, as appropriate--to protect against |
1544 | * freeing by another task. It is the caller's responsibility to free the | 1543 | * freeing by another task. It is the caller's responsibility to free the |
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index fbbf1fa00940..65e06abe023f 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c | |||
@@ -366,6 +366,13 @@ EXPORT_SYMBOL(vlan_vids_del_by_dev); | |||
366 | 366 | ||
367 | bool vlan_uses_dev(const struct net_device *dev) | 367 | bool vlan_uses_dev(const struct net_device *dev) |
368 | { | 368 | { |
369 | return rtnl_dereference(dev->vlan_info) ? true : false; | 369 | struct vlan_info *vlan_info; |
370 | |||
371 | ASSERT_RTNL(); | ||
372 | |||
373 | vlan_info = rtnl_dereference(dev->vlan_info); | ||
374 | if (!vlan_info) | ||
375 | return false; | ||
376 | return vlan_info->grp.nr_vlan_devs ? true : false; | ||
370 | } | 377 | } |
371 | EXPORT_SYMBOL(vlan_uses_dev); | 378 | EXPORT_SYMBOL(vlan_uses_dev); |
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index d7c56f8a5b4e..0424e4e27414 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -3064,14 +3064,15 @@ static struct inet6_ifaddr *if6_get_first(struct seq_file *seq, loff_t pos) | |||
3064 | struct hlist_node *n; | 3064 | struct hlist_node *n; |
3065 | hlist_for_each_entry_rcu_bh(ifa, n, &inet6_addr_lst[state->bucket], | 3065 | hlist_for_each_entry_rcu_bh(ifa, n, &inet6_addr_lst[state->bucket], |
3066 | addr_lst) { | 3066 | addr_lst) { |
3067 | if (!net_eq(dev_net(ifa->idev->dev), net)) | ||
3068 | continue; | ||
3067 | /* sync with offset */ | 3069 | /* sync with offset */ |
3068 | if (p < state->offset) { | 3070 | if (p < state->offset) { |
3069 | p++; | 3071 | p++; |
3070 | continue; | 3072 | continue; |
3071 | } | 3073 | } |
3072 | state->offset++; | 3074 | state->offset++; |
3073 | if (net_eq(dev_net(ifa->idev->dev), net)) | 3075 | return ifa; |
3074 | return ifa; | ||
3075 | } | 3076 | } |
3076 | 3077 | ||
3077 | /* prepare for next bucket */ | 3078 | /* prepare for next bucket */ |
@@ -3089,18 +3090,20 @@ static struct inet6_ifaddr *if6_get_next(struct seq_file *seq, | |||
3089 | struct hlist_node *n = &ifa->addr_lst; | 3090 | struct hlist_node *n = &ifa->addr_lst; |
3090 | 3091 | ||
3091 | hlist_for_each_entry_continue_rcu_bh(ifa, n, addr_lst) { | 3092 | hlist_for_each_entry_continue_rcu_bh(ifa, n, addr_lst) { |
3093 | if (!net_eq(dev_net(ifa->idev->dev), net)) | ||
3094 | continue; | ||
3092 | state->offset++; | 3095 | state->offset++; |
3093 | if (net_eq(dev_net(ifa->idev->dev), net)) | 3096 | return ifa; |
3094 | return ifa; | ||
3095 | } | 3097 | } |
3096 | 3098 | ||
3097 | while (++state->bucket < IN6_ADDR_HSIZE) { | 3099 | while (++state->bucket < IN6_ADDR_HSIZE) { |
3098 | state->offset = 0; | 3100 | state->offset = 0; |
3099 | hlist_for_each_entry_rcu_bh(ifa, n, | 3101 | hlist_for_each_entry_rcu_bh(ifa, n, |
3100 | &inet6_addr_lst[state->bucket], addr_lst) { | 3102 | &inet6_addr_lst[state->bucket], addr_lst) { |
3103 | if (!net_eq(dev_net(ifa->idev->dev), net)) | ||
3104 | continue; | ||
3101 | state->offset++; | 3105 | state->offset++; |
3102 | if (net_eq(dev_net(ifa->idev->dev), net)) | 3106 | return ifa; |
3103 | return ifa; | ||
3104 | } | 3107 | } |
3105 | } | 3108 | } |
3106 | 3109 | ||
diff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c index 57f7de839b03..6773d7803627 100644 --- a/net/sctp/sm_sideeffect.c +++ b/net/sctp/sm_sideeffect.c | |||
@@ -1642,8 +1642,9 @@ static int sctp_cmd_interpreter(sctp_event_t event_type, | |||
1642 | asoc->outqueue.outstanding_bytes; | 1642 | asoc->outqueue.outstanding_bytes; |
1643 | sackh.num_gap_ack_blocks = 0; | 1643 | sackh.num_gap_ack_blocks = 0; |
1644 | sackh.num_dup_tsns = 0; | 1644 | sackh.num_dup_tsns = 0; |
1645 | chunk->subh.sack_hdr = &sackh; | ||
1645 | sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_SACK, | 1646 | sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_SACK, |
1646 | SCTP_SACKH(&sackh)); | 1647 | SCTP_CHUNK(chunk)); |
1647 | break; | 1648 | break; |
1648 | 1649 | ||
1649 | case SCTP_CMD_DISCARD_PACKET: | 1650 | case SCTP_CMD_DISCARD_PACKET: |
diff --git a/scripts/Makefile.asm-generic b/scripts/Makefile.asm-generic index 40caf3c26cd5..d17e0ea911ed 100644 --- a/scripts/Makefile.asm-generic +++ b/scripts/Makefile.asm-generic | |||
@@ -5,7 +5,7 @@ | |||
5 | # and for each file listed in this file with generic-y creates | 5 | # and for each file listed in this file with generic-y creates |
6 | # a small wrapper file in $(obj) (arch/$(SRCARCH)/include/generated/asm) | 6 | # a small wrapper file in $(obj) (arch/$(SRCARCH)/include/generated/asm) |
7 | 7 | ||
8 | kbuild-file := $(srctree)/arch/$(SRCARCH)/include/asm/Kbuild | 8 | kbuild-file := $(srctree)/arch/$(SRCARCH)/include/$(src)/Kbuild |
9 | -include $(kbuild-file) | 9 | -include $(kbuild-file) |
10 | 10 | ||
11 | include scripts/Kbuild.include | 11 | include scripts/Kbuild.include |
diff --git a/scripts/Makefile.fwinst b/scripts/Makefile.fwinst index c3f69ae275d1..4d908d16c035 100644 --- a/scripts/Makefile.fwinst +++ b/scripts/Makefile.fwinst | |||
@@ -27,7 +27,7 @@ endif | |||
27 | installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw)) | 27 | installed-mod-fw := $(addprefix $(INSTALL_FW_PATH)/,$(mod-fw)) |
28 | 28 | ||
29 | installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all)) | 29 | installed-fw := $(addprefix $(INSTALL_FW_PATH)/,$(fw-shipped-all)) |
30 | installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/. | 30 | installed-fw-dirs := $(sort $(dir $(installed-fw))) $(INSTALL_FW_PATH)/./ |
31 | 31 | ||
32 | # Workaround for make < 3.81, where .SECONDEXPANSION doesn't work. | 32 | # Workaround for make < 3.81, where .SECONDEXPANSION doesn't work. |
33 | PHONY += $(INSTALL_FW_PATH)/$$(%) install-all-dirs | 33 | PHONY += $(INSTALL_FW_PATH)/$$(%) install-all-dirs |
@@ -42,7 +42,7 @@ quiet_cmd_install = INSTALL $(subst $(srctree)/,,$@) | |||
42 | $(installed-fw-dirs): | 42 | $(installed-fw-dirs): |
43 | $(call cmd,mkdir) | 43 | $(call cmd,mkdir) |
44 | 44 | ||
45 | $(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $$(dir $(INSTALL_FW_PATH)/%) | 45 | $(installed-fw): $(INSTALL_FW_PATH)/%: $(obj)/% | $(INSTALL_FW_PATH)/$$(dir %) |
46 | $(call cmd,install) | 46 | $(call cmd,install) |
47 | 47 | ||
48 | PHONY += __fw_install __fw_modinst FORCE | 48 | PHONY += __fw_install __fw_modinst FORCE |
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index 3d13d3a3edfe..dda4b2b61927 100644 --- a/scripts/Makefile.modinst +++ b/scripts/Makefile.modinst | |||
@@ -17,7 +17,7 @@ __modinst: $(modules) | |||
17 | @: | 17 | @: |
18 | 18 | ||
19 | quiet_cmd_modules_install = INSTALL $@ | 19 | quiet_cmd_modules_install = INSTALL $@ |
20 | cmd_modules_install = mkdir -p $(2); cp $@ $(2) ; $(mod_strip_cmd) $(2)/$(notdir $@) | 20 | cmd_modules_install = mkdir -p $(2); cp $@ $(2) ; $(mod_strip_cmd) $(2)/$(notdir $@) ; $(mod_sign_cmd) $(2)/$(notdir $@) |
21 | 21 | ||
22 | # Modules built outside the kernel source tree go into extra by default | 22 | # Modules built outside the kernel source tree go into extra by default |
23 | INSTALL_MOD_DIR ?= extra | 23 | INSTALL_MOD_DIR ?= extra |
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 002089141df4..a1cb0222ebe6 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost | |||
@@ -14,8 +14,7 @@ | |||
14 | # 3) create one <module>.mod.c file pr. module | 14 | # 3) create one <module>.mod.c file pr. module |
15 | # 4) create one Module.symvers file with CRC for all exported symbols | 15 | # 4) create one Module.symvers file with CRC for all exported symbols |
16 | # 5) compile all <module>.mod.c files | 16 | # 5) compile all <module>.mod.c files |
17 | # 6) final link of the module to a <module.ko> (or <module.unsigned>) file | 17 | # 6) final link of the module to a <module.ko> file |
18 | # 7) signs the modules to a <module.ko> file | ||
19 | 18 | ||
20 | # Step 3 is used to place certain information in the module's ELF | 19 | # Step 3 is used to place certain information in the module's ELF |
21 | # section, including information such as: | 20 | # section, including information such as: |
@@ -33,8 +32,6 @@ | |||
33 | # Step 4 is solely used to allow module versioning in external modules, | 32 | # Step 4 is solely used to allow module versioning in external modules, |
34 | # where the CRC of each module is retrieved from the Module.symvers file. | 33 | # where the CRC of each module is retrieved from the Module.symvers file. |
35 | 34 | ||
36 | # Step 7 is dependent on CONFIG_MODULE_SIG being enabled. | ||
37 | |||
38 | # KBUILD_MODPOST_WARN can be set to avoid error out in case of undefined | 35 | # KBUILD_MODPOST_WARN can be set to avoid error out in case of undefined |
39 | # symbols in the final module linking stage | 36 | # symbols in the final module linking stage |
40 | # KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules. | 37 | # KBUILD_MODPOST_NOFINAL can be set to skip the final link of modules. |
@@ -119,7 +116,6 @@ $(modules:.ko=.mod.o): %.mod.o: %.mod.c FORCE | |||
119 | targets += $(modules:.ko=.mod.o) | 116 | targets += $(modules:.ko=.mod.o) |
120 | 117 | ||
121 | # Step 6), final link of the modules | 118 | # Step 6), final link of the modules |
122 | ifneq ($(CONFIG_MODULE_SIG),y) | ||
123 | quiet_cmd_ld_ko_o = LD [M] $@ | 119 | quiet_cmd_ld_ko_o = LD [M] $@ |
124 | cmd_ld_ko_o = $(LD) -r $(LDFLAGS) \ | 120 | cmd_ld_ko_o = $(LD) -r $(LDFLAGS) \ |
125 | $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \ | 121 | $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \ |
@@ -129,78 +125,7 @@ $(modules): %.ko :%.o %.mod.o FORCE | |||
129 | $(call if_changed,ld_ko_o) | 125 | $(call if_changed,ld_ko_o) |
130 | 126 | ||
131 | targets += $(modules) | 127 | targets += $(modules) |
132 | else | ||
133 | quiet_cmd_ld_ko_unsigned_o = LD [M] $@ | ||
134 | cmd_ld_ko_unsigned_o = \ | ||
135 | $(LD) -r $(LDFLAGS) \ | ||
136 | $(KBUILD_LDFLAGS_MODULE) $(LDFLAGS_MODULE) \ | ||
137 | -o $@ $(filter-out FORCE,$^) \ | ||
138 | $(if $(AFTER_LINK),; $(AFTER_LINK)) | ||
139 | |||
140 | $(modules:.ko=.ko.unsigned): %.ko.unsigned :%.o %.mod.o FORCE | ||
141 | $(call if_changed,ld_ko_unsigned_o) | ||
142 | |||
143 | targets += $(modules:.ko=.ko.unsigned) | ||
144 | |||
145 | # Step 7), sign the modules | ||
146 | MODSECKEY = ./signing_key.priv | ||
147 | MODPUBKEY = ./signing_key.x509 | ||
148 | |||
149 | ifeq ($(wildcard $(MODSECKEY))+$(wildcard $(MODPUBKEY)),$(MODSECKEY)+$(MODPUBKEY)) | ||
150 | ifeq ($(KBUILD_SRC),) | ||
151 | # no O= is being used | ||
152 | SCRIPTS_DIR := scripts | ||
153 | else | ||
154 | SCRIPTS_DIR := $(KBUILD_SRC)/scripts | ||
155 | endif | ||
156 | SIGN_MODULES := 1 | ||
157 | else | ||
158 | SIGN_MODULES := 0 | ||
159 | endif | ||
160 | |||
161 | # only sign if it's an in-tree module | ||
162 | ifneq ($(KBUILD_EXTMOD),) | ||
163 | SIGN_MODULES := 0 | ||
164 | endif | ||
165 | 128 | ||
166 | # We strip the module as best we can - note that using both strip and eu-strip | ||
167 | # results in a smaller module than using either alone. | ||
168 | EU_STRIP = $(shell which eu-strip || echo true) | ||
169 | |||
170 | quiet_cmd_sign_ko_stripped_ko_unsigned = STRIP [M] $@ | ||
171 | cmd_sign_ko_stripped_ko_unsigned = \ | ||
172 | cp $< $@ && \ | ||
173 | strip -x -g $@ && \ | ||
174 | $(EU_STRIP) $@ | ||
175 | |||
176 | ifeq ($(SIGN_MODULES),1) | ||
177 | |||
178 | quiet_cmd_genkeyid = GENKEYID $@ | ||
179 | cmd_genkeyid = \ | ||
180 | perl $(SCRIPTS_DIR)/x509keyid $< $<.signer $<.keyid | ||
181 | |||
182 | %.signer %.keyid: % | ||
183 | $(call if_changed,genkeyid) | ||
184 | |||
185 | KEYRING_DEP := $(MODSECKEY) $(MODPUBKEY) $(MODPUBKEY).signer $(MODPUBKEY).keyid | ||
186 | quiet_cmd_sign_ko_ko_stripped = SIGN [M] $@ | ||
187 | cmd_sign_ko_ko_stripped = \ | ||
188 | sh $(SCRIPTS_DIR)/sign-file $(MODSECKEY) $(MODPUBKEY) $< $@ | ||
189 | else | ||
190 | KEYRING_DEP := | ||
191 | quiet_cmd_sign_ko_ko_unsigned = NO SIGN [M] $@ | ||
192 | cmd_sign_ko_ko_unsigned = \ | ||
193 | cp $< $@ | ||
194 | endif | ||
195 | |||
196 | $(modules): %.ko :%.ko.stripped $(KEYRING_DEP) FORCE | ||
197 | $(call if_changed,sign_ko_ko_stripped) | ||
198 | |||
199 | $(patsubst %.ko,%.ko.stripped,$(modules)): %.ko.stripped :%.ko.unsigned FORCE | ||
200 | $(call if_changed,sign_ko_stripped_ko_unsigned) | ||
201 | |||
202 | targets += $(modules) | ||
203 | endif | ||
204 | 129 | ||
205 | # Add FORCE to the prequisites of a target to force it to be always rebuilt. | 130 | # Add FORCE to the prequisites of a target to force it to be always rebuilt. |
206 | # --------------------------------------------------------------------------- | 131 | # --------------------------------------------------------------------------- |
diff --git a/scripts/dtc/dtc.h b/scripts/dtc/dtc.h index d501c8605f26..3e42a071070e 100644 --- a/scripts/dtc/dtc.h +++ b/scripts/dtc/dtc.h | |||
@@ -161,51 +161,27 @@ struct node { | |||
161 | struct label *labels; | 161 | struct label *labels; |
162 | }; | 162 | }; |
163 | 163 | ||
164 | static inline struct label *for_each_label_next(struct label *l) | ||
165 | { | ||
166 | do { | ||
167 | l = l->next; | ||
168 | } while (l && l->deleted); | ||
169 | |||
170 | return l; | ||
171 | } | ||
172 | |||
173 | #define for_each_label(l0, l) \ | ||
174 | for ((l) = (l0); (l); (l) = for_each_label_next(l)) | ||
175 | |||
176 | #define for_each_label_withdel(l0, l) \ | 164 | #define for_each_label_withdel(l0, l) \ |
177 | for ((l) = (l0); (l); (l) = (l)->next) | 165 | for ((l) = (l0); (l); (l) = (l)->next) |
178 | 166 | ||
179 | static inline struct property *for_each_property_next(struct property *p) | 167 | #define for_each_label(l0, l) \ |
180 | { | 168 | for_each_label_withdel(l0, l) \ |
181 | do { | 169 | if (!(l)->deleted) |
182 | p = p->next; | ||
183 | } while (p && p->deleted); | ||
184 | |||
185 | return p; | ||
186 | } | ||
187 | |||
188 | #define for_each_property(n, p) \ | ||
189 | for ((p) = (n)->proplist; (p); (p) = for_each_property_next(p)) | ||
190 | 170 | ||
191 | #define for_each_property_withdel(n, p) \ | 171 | #define for_each_property_withdel(n, p) \ |
192 | for ((p) = (n)->proplist; (p); (p) = (p)->next) | 172 | for ((p) = (n)->proplist; (p); (p) = (p)->next) |
193 | 173 | ||
194 | static inline struct node *for_each_child_next(struct node *c) | 174 | #define for_each_property(n, p) \ |
195 | { | 175 | for_each_property_withdel(n, p) \ |
196 | do { | 176 | if (!(p)->deleted) |
197 | c = c->next_sibling; | ||
198 | } while (c && c->deleted); | ||
199 | |||
200 | return c; | ||
201 | } | ||
202 | |||
203 | #define for_each_child(n, c) \ | ||
204 | for ((c) = (n)->children; (c); (c) = for_each_child_next(c)) | ||
205 | 177 | ||
206 | #define for_each_child_withdel(n, c) \ | 178 | #define for_each_child_withdel(n, c) \ |
207 | for ((c) = (n)->children; (c); (c) = (c)->next_sibling) | 179 | for ((c) = (n)->children; (c); (c) = (c)->next_sibling) |
208 | 180 | ||
181 | #define for_each_child(n, c) \ | ||
182 | for_each_child_withdel(n, c) \ | ||
183 | if (!(c)->deleted) | ||
184 | |||
209 | void add_label(struct label **labels, char *label); | 185 | void add_label(struct label **labels, char *label); |
210 | void delete_labels(struct label **labels); | 186 | void delete_labels(struct label **labels); |
211 | 187 | ||
diff --git a/scripts/sign-file b/scripts/sign-file index e58e34e50ac5..095a953bdb8e 100644 --- a/scripts/sign-file +++ b/scripts/sign-file | |||
@@ -1,8 +1,8 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/bash |
2 | # | 2 | # |
3 | # Sign a module file using the given key. | 3 | # Sign a module file using the given key. |
4 | # | 4 | # |
5 | # Format: sign-file <key> <x509> <src-file> <dst-file> | 5 | # Format: sign-file <key> <x509> <keyid-script> <module> |
6 | # | 6 | # |
7 | 7 | ||
8 | scripts=`dirname $0` | 8 | scripts=`dirname $0` |
@@ -15,8 +15,8 @@ fi | |||
15 | 15 | ||
16 | key="$1" | 16 | key="$1" |
17 | x509="$2" | 17 | x509="$2" |
18 | src="$3" | 18 | keyid_script="$3" |
19 | dst="$4" | 19 | mod="$4" |
20 | 20 | ||
21 | if [ ! -r "$key" ] | 21 | if [ ! -r "$key" ] |
22 | then | 22 | then |
@@ -29,16 +29,6 @@ then | |||
29 | echo "Can't read X.509 certificate" >&2 | 29 | echo "Can't read X.509 certificate" >&2 |
30 | exit 2 | 30 | exit 2 |
31 | fi | 31 | fi |
32 | if [ ! -r "$x509.signer" ] | ||
33 | then | ||
34 | echo "Can't read Signer name" >&2 | ||
35 | exit 2; | ||
36 | fi | ||
37 | if [ ! -r "$x509.keyid" ] | ||
38 | then | ||
39 | echo "Can't read Key identifier" >&2 | ||
40 | exit 2; | ||
41 | fi | ||
42 | 32 | ||
43 | # | 33 | # |
44 | # Signature parameters | 34 | # Signature parameters |
@@ -83,33 +73,35 @@ fi | |||
83 | 73 | ||
84 | ( | 74 | ( |
85 | perl -e "binmode STDOUT; print pack(\"C*\", $prologue)" || exit $? | 75 | perl -e "binmode STDOUT; print pack(\"C*\", $prologue)" || exit $? |
86 | openssl dgst $dgst -binary $src || exit $? | 76 | openssl dgst $dgst -binary $mod || exit $? |
87 | ) >$src.dig || exit $? | 77 | ) >$mod.dig || exit $? |
88 | 78 | ||
89 | # | 79 | # |
90 | # Generate the binary signature, which will be just the integer that comprises | 80 | # Generate the binary signature, which will be just the integer that comprises |
91 | # the signature with no metadata attached. | 81 | # the signature with no metadata attached. |
92 | # | 82 | # |
93 | openssl rsautl -sign -inkey $key -keyform PEM -in $src.dig -out $src.sig || exit $? | 83 | openssl rsautl -sign -inkey $key -keyform PEM -in $mod.dig -out $mod.sig || exit $? |
94 | signerlen=`stat -c %s $x509.signer` | 84 | |
95 | keyidlen=`stat -c %s $x509.keyid` | 85 | SIGNER="`perl $keyid_script $x509 signer-name`" |
96 | siglen=`stat -c %s $src.sig` | 86 | KEYID="`perl $keyid_script $x509 keyid`" |
87 | keyidlen=${#KEYID} | ||
88 | siglen=${#SIGNER} | ||
97 | 89 | ||
98 | # | 90 | # |
99 | # Build the signed binary | 91 | # Build the signed binary |
100 | # | 92 | # |
101 | ( | 93 | ( |
102 | cat $src || exit $? | 94 | cat $mod || exit $? |
103 | echo '~Module signature appended~' || exit $? | 95 | echo '~Module signature appended~' || exit $? |
104 | cat $x509.signer $x509.keyid || exit $? | 96 | echo -n "$SIGNER" || exit $? |
97 | echo -n "$KEYID" || exit $? | ||
105 | 98 | ||
106 | # Preface each signature integer with a 2-byte BE length | 99 | # Preface each signature integer with a 2-byte BE length |
107 | perl -e "binmode STDOUT; print pack(\"n\", $siglen)" || exit $? | 100 | perl -e "binmode STDOUT; print pack(\"n\", $siglen)" || exit $? |
108 | cat $src.sig || exit $? | 101 | cat $mod.sig || exit $? |
109 | 102 | ||
110 | # Generate the information block | 103 | # Generate the information block |
111 | perl -e "binmode STDOUT; print pack(\"CCCCCxxxN\", $algo, $hash, $id_type, $signerlen, $keyidlen, $siglen + 2)" || exit $? | 104 | perl -e "binmode STDOUT; print pack(\"CCCCCxxxN\", $algo, $hash, $id_type, $signerlen, $keyidlen, $siglen + 2)" || exit $? |
112 | ) >$dst~ || exit $? | 105 | ) >$mod~ || exit $? |
113 | 106 | ||
114 | # Permit in-place signing | 107 | mv $mod~ $mod || exit $? |
115 | mv $dst~ $dst || exit $? | ||
diff --git a/scripts/x509keyid b/scripts/x509keyid index c8e91a4af385..4241ec6c64b1 100755 --- a/scripts/x509keyid +++ b/scripts/x509keyid | |||
@@ -22,7 +22,7 @@ use strict; | |||
22 | 22 | ||
23 | my $raw_data; | 23 | my $raw_data; |
24 | 24 | ||
25 | die "Need three filenames\n" if ($#ARGV != 2); | 25 | die "Need a filename [keyid|signer-name]\n" if ($#ARGV != 1); |
26 | 26 | ||
27 | my $src = $ARGV[0]; | 27 | my $src = $ARGV[0]; |
28 | 28 | ||
@@ -259,10 +259,10 @@ die $src, ": ", "X.509: Couldn't find the Subject Key Identifier extension\n" | |||
259 | 259 | ||
260 | my $id_key_id = asn1_retrieve($subject_key_id->[1]); | 260 | my $id_key_id = asn1_retrieve($subject_key_id->[1]); |
261 | 261 | ||
262 | open(OUTFD, ">$ARGV[1]") || die $ARGV[1]; | 262 | if ($ARGV[1] eq "signer-name") { |
263 | print OUTFD $id_name; | 263 | print $id_name; |
264 | close OUTFD || die $ARGV[1]; | 264 | } elsif ($ARGV[1] eq "keyid") { |
265 | 265 | print $id_key_id; | |
266 | open(OUTFD, ">$ARGV[2]") || die $ARGV[2]; | 266 | } else { |
267 | print OUTFD $id_key_id; | 267 | die "Unknown arg"; |
268 | close OUTFD || die $ARGV[2]; | 268 | } |
diff --git a/security/apparmor/Makefile b/security/apparmor/Makefile index 7b3021cebbea..5706b74c857f 100644 --- a/security/apparmor/Makefile +++ b/security/apparmor/Makefile | |||
@@ -57,7 +57,7 @@ cmd_make-rlim = echo "static const char *const rlim_names[RLIM_NLIMITS] = {" \ | |||
57 | 57 | ||
58 | $(obj)/capability.o : $(obj)/capability_names.h | 58 | $(obj)/capability.o : $(obj)/capability_names.h |
59 | $(obj)/resource.o : $(obj)/rlim_names.h | 59 | $(obj)/resource.o : $(obj)/rlim_names.h |
60 | $(obj)/capability_names.h : $(srctree)/include/linux/capability.h \ | 60 | $(obj)/capability_names.h : $(srctree)/include/uapi/linux/capability.h \ |
61 | $(src)/Makefile | 61 | $(src)/Makefile |
62 | $(call cmd,make-caps) | 62 | $(call cmd,make-caps) |
63 | $(obj)/rlim_names.h : $(srctree)/include/uapi/asm-generic/resource.h \ | 63 | $(obj)/rlim_names.h : $(srctree)/include/uapi/asm-generic/resource.h \ |
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 24ab4148547c..61a53367d029 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -2132,18 +2132,14 @@ static inline void flush_unauthorized_files(const struct cred *cred, | |||
2132 | return; | 2132 | return; |
2133 | 2133 | ||
2134 | devnull = dentry_open(&selinux_null, O_RDWR, cred); | 2134 | devnull = dentry_open(&selinux_null, O_RDWR, cred); |
2135 | if (!IS_ERR(devnull)) { | 2135 | if (IS_ERR(devnull)) |
2136 | /* replace all the matching ones with this */ | 2136 | devnull = NULL; |
2137 | do { | 2137 | /* replace all the matching ones with this */ |
2138 | replace_fd(n - 1, get_file(devnull), 0); | 2138 | do { |
2139 | } while ((n = iterate_fd(files, n, match_file, cred)) != 0); | 2139 | replace_fd(n - 1, devnull, 0); |
2140 | } while ((n = iterate_fd(files, n, match_file, cred)) != 0); | ||
2141 | if (devnull) | ||
2140 | fput(devnull); | 2142 | fput(devnull); |
2141 | } else { | ||
2142 | /* just close all the matching ones */ | ||
2143 | do { | ||
2144 | replace_fd(n - 1, NULL, 0); | ||
2145 | } while ((n = iterate_fd(files, n, match_file, cred)) != 0); | ||
2146 | } | ||
2147 | } | 2143 | } |
2148 | 2144 | ||
2149 | /* | 2145 | /* |
diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c index 9473fca9681d..8b0f99688303 100644 --- a/sound/pci/ac97/ac97_codec.c +++ b/sound/pci/ac97/ac97_codec.c | |||
@@ -1271,6 +1271,8 @@ static int snd_ac97_cvol_new(struct snd_card *card, char *name, int reg, unsigne | |||
1271 | tmp.index = ac97->num; | 1271 | tmp.index = ac97->num; |
1272 | kctl = snd_ctl_new1(&tmp, ac97); | 1272 | kctl = snd_ctl_new1(&tmp, ac97); |
1273 | } | 1273 | } |
1274 | if (!kctl) | ||
1275 | return -ENOMEM; | ||
1274 | if (reg >= AC97_PHONE && reg <= AC97_PCM) | 1276 | if (reg >= AC97_PHONE && reg <= AC97_PCM) |
1275 | set_tlv_db_scale(kctl, db_scale_5bit_12db_max); | 1277 | set_tlv_db_scale(kctl, db_scale_5bit_12db_max); |
1276 | else | 1278 | else |
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index bed4485f34f6..c21adb6ef1d5 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c | |||
@@ -1416,6 +1416,15 @@ static struct snd_emu_chip_details emu_chip_details[] = { | |||
1416 | .ca0108_chip = 1, | 1416 | .ca0108_chip = 1, |
1417 | .spk71 = 1, | 1417 | .spk71 = 1, |
1418 | .emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 new revision */ | 1418 | .emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 new revision */ |
1419 | /* Tested by Maxim Kachur <mcdebugger@duganet.ru> 17th Oct 2012. */ | ||
1420 | /* This is MAEM8986, 0202 is MAEM8980 */ | ||
1421 | {.vendor = 0x1102, .device = 0x0008, .subsystem = 0x40071102, | ||
1422 | .driver = "Audigy2", .name = "E-mu 1010 PCIe [MAEM8986]", | ||
1423 | .id = "EMU1010", | ||
1424 | .emu10k2_chip = 1, | ||
1425 | .ca0108_chip = 1, | ||
1426 | .spk71 = 1, | ||
1427 | .emu_model = EMU_MODEL_EMU1010B}, /* EMU 1010 PCIe */ | ||
1419 | /* Tested by James@superbug.co.uk 8th July 2005. */ | 1428 | /* Tested by James@superbug.co.uk 8th July 2005. */ |
1420 | /* This is MAEM8810, 0202 is MAEM8820 */ | 1429 | /* This is MAEM8810, 0202 is MAEM8820 */ |
1421 | {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40011102, | 1430 | {.vendor = 0x1102, .device = 0x0004, .subsystem = 0x40011102, |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 6833835a218b..72b085ae7d46 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -501,6 +501,7 @@ struct azx { | |||
501 | 501 | ||
502 | /* VGA-switcheroo setup */ | 502 | /* VGA-switcheroo setup */ |
503 | unsigned int use_vga_switcheroo:1; | 503 | unsigned int use_vga_switcheroo:1; |
504 | unsigned int vga_switcheroo_registered:1; | ||
504 | unsigned int init_failed:1; /* delayed init failed */ | 505 | unsigned int init_failed:1; /* delayed init failed */ |
505 | unsigned int disabled:1; /* disabled by VGA-switcher */ | 506 | unsigned int disabled:1; /* disabled by VGA-switcher */ |
506 | 507 | ||
@@ -2157,9 +2158,12 @@ static unsigned int azx_get_position(struct azx *chip, | |||
2157 | if (delay < 0) | 2158 | if (delay < 0) |
2158 | delay += azx_dev->bufsize; | 2159 | delay += azx_dev->bufsize; |
2159 | if (delay >= azx_dev->period_bytes) { | 2160 | if (delay >= azx_dev->period_bytes) { |
2160 | snd_printdd("delay %d > period_bytes %d\n", | 2161 | snd_printk(KERN_WARNING SFX |
2161 | delay, azx_dev->period_bytes); | 2162 | "Unstable LPIB (%d >= %d); " |
2162 | delay = 0; /* something is wrong */ | 2163 | "disabling LPIB delay counting\n", |
2164 | delay, azx_dev->period_bytes); | ||
2165 | delay = 0; | ||
2166 | chip->driver_caps &= ~AZX_DCAPS_COUNT_LPIB_DELAY; | ||
2163 | } | 2167 | } |
2164 | azx_dev->substream->runtime->delay = | 2168 | azx_dev->substream->runtime->delay = |
2165 | bytes_to_frames(azx_dev->substream->runtime, delay); | 2169 | bytes_to_frames(azx_dev->substream->runtime, delay); |
@@ -2640,7 +2644,9 @@ static void azx_vs_set_state(struct pci_dev *pci, | |||
2640 | if (disabled) { | 2644 | if (disabled) { |
2641 | azx_suspend(&pci->dev); | 2645 | azx_suspend(&pci->dev); |
2642 | chip->disabled = true; | 2646 | chip->disabled = true; |
2643 | snd_hda_lock_devices(chip->bus); | 2647 | if (snd_hda_lock_devices(chip->bus)) |
2648 | snd_printk(KERN_WARNING SFX | ||
2649 | "Cannot lock devices!\n"); | ||
2644 | } else { | 2650 | } else { |
2645 | snd_hda_unlock_devices(chip->bus); | 2651 | snd_hda_unlock_devices(chip->bus); |
2646 | chip->disabled = false; | 2652 | chip->disabled = false; |
@@ -2683,14 +2689,20 @@ static const struct vga_switcheroo_client_ops azx_vs_ops = { | |||
2683 | 2689 | ||
2684 | static int __devinit register_vga_switcheroo(struct azx *chip) | 2690 | static int __devinit register_vga_switcheroo(struct azx *chip) |
2685 | { | 2691 | { |
2692 | int err; | ||
2693 | |||
2686 | if (!chip->use_vga_switcheroo) | 2694 | if (!chip->use_vga_switcheroo) |
2687 | return 0; | 2695 | return 0; |
2688 | /* FIXME: currently only handling DIS controller | 2696 | /* FIXME: currently only handling DIS controller |
2689 | * is there any machine with two switchable HDMI audio controllers? | 2697 | * is there any machine with two switchable HDMI audio controllers? |
2690 | */ | 2698 | */ |
2691 | return vga_switcheroo_register_audio_client(chip->pci, &azx_vs_ops, | 2699 | err = vga_switcheroo_register_audio_client(chip->pci, &azx_vs_ops, |
2692 | VGA_SWITCHEROO_DIS, | 2700 | VGA_SWITCHEROO_DIS, |
2693 | chip->bus != NULL); | 2701 | chip->bus != NULL); |
2702 | if (err < 0) | ||
2703 | return err; | ||
2704 | chip->vga_switcheroo_registered = 1; | ||
2705 | return 0; | ||
2694 | } | 2706 | } |
2695 | #else | 2707 | #else |
2696 | #define init_vga_switcheroo(chip) /* NOP */ | 2708 | #define init_vga_switcheroo(chip) /* NOP */ |
@@ -2712,7 +2724,8 @@ static int azx_free(struct azx *chip) | |||
2712 | if (use_vga_switcheroo(chip)) { | 2724 | if (use_vga_switcheroo(chip)) { |
2713 | if (chip->disabled && chip->bus) | 2725 | if (chip->disabled && chip->bus) |
2714 | snd_hda_unlock_devices(chip->bus); | 2726 | snd_hda_unlock_devices(chip->bus); |
2715 | vga_switcheroo_unregister_client(chip->pci); | 2727 | if (chip->vga_switcheroo_registered) |
2728 | vga_switcheroo_unregister_client(chip->pci); | ||
2716 | } | 2729 | } |
2717 | 2730 | ||
2718 | if (chip->initialized) { | 2731 | if (chip->initialized) { |
@@ -2813,8 +2826,6 @@ static struct snd_pci_quirk position_fix_list[] __devinitdata = { | |||
2813 | SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), | 2826 | SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB), |
2814 | SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB), | 2827 | SND_PCI_QUIRK(0x1043, 0x81b3, "ASUS", POS_FIX_LPIB), |
2815 | SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB), | 2828 | SND_PCI_QUIRK(0x1043, 0x81e7, "ASUS M2V", POS_FIX_LPIB), |
2816 | SND_PCI_QUIRK(0x1043, 0x1ac3, "ASUS X53S", POS_FIX_POSBUF), | ||
2817 | SND_PCI_QUIRK(0x1043, 0x1b43, "ASUS K53E", POS_FIX_POSBUF), | ||
2818 | SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB), | 2829 | SND_PCI_QUIRK(0x104d, 0x9069, "Sony VPCS11V9E", POS_FIX_LPIB), |
2819 | SND_PCI_QUIRK(0x10de, 0xcb89, "Macbook Pro 7,1", POS_FIX_LPIB), | 2830 | SND_PCI_QUIRK(0x10de, 0xcb89, "Macbook Pro 7,1", POS_FIX_LPIB), |
2820 | SND_PCI_QUIRK(0x1297, 0x3166, "Shuttle", POS_FIX_LPIB), | 2831 | SND_PCI_QUIRK(0x1297, 0x3166, "Shuttle", POS_FIX_LPIB), |
@@ -3062,14 +3073,6 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
3062 | } | 3073 | } |
3063 | 3074 | ||
3064 | ok: | 3075 | ok: |
3065 | err = register_vga_switcheroo(chip); | ||
3066 | if (err < 0) { | ||
3067 | snd_printk(KERN_ERR SFX | ||
3068 | "Error registering VGA-switcheroo client\n"); | ||
3069 | azx_free(chip); | ||
3070 | return err; | ||
3071 | } | ||
3072 | |||
3073 | err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); | 3076 | err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); |
3074 | if (err < 0) { | 3077 | if (err < 0) { |
3075 | snd_printk(KERN_ERR SFX "Error creating device [card]!\n"); | 3078 | snd_printk(KERN_ERR SFX "Error creating device [card]!\n"); |
@@ -3340,6 +3343,13 @@ static int __devinit azx_probe(struct pci_dev *pci, | |||
3340 | if (pci_dev_run_wake(pci)) | 3343 | if (pci_dev_run_wake(pci)) |
3341 | pm_runtime_put_noidle(&pci->dev); | 3344 | pm_runtime_put_noidle(&pci->dev); |
3342 | 3345 | ||
3346 | err = register_vga_switcheroo(chip); | ||
3347 | if (err < 0) { | ||
3348 | snd_printk(KERN_ERR SFX | ||
3349 | "Error registering VGA-switcheroo client\n"); | ||
3350 | goto out_free; | ||
3351 | } | ||
3352 | |||
3343 | dev++; | 3353 | dev++; |
3344 | return 0; | 3354 | return 0; |
3345 | 3355 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 8253b4eeb6a1..48d9d609f89b 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -2598,8 +2598,10 @@ static const char *alc_get_line_out_pfx(struct alc_spec *spec, int ch, | |||
2598 | return "PCM"; | 2598 | return "PCM"; |
2599 | break; | 2599 | break; |
2600 | } | 2600 | } |
2601 | if (snd_BUG_ON(ch >= ARRAY_SIZE(channel_name))) | 2601 | if (ch >= ARRAY_SIZE(channel_name)) { |
2602 | snd_BUG(); | ||
2602 | return "PCM"; | 2603 | return "PCM"; |
2604 | } | ||
2603 | 2605 | ||
2604 | return channel_name[ch]; | 2606 | return channel_name[ch]; |
2605 | } | 2607 | } |
diff --git a/sound/soc/Makefile b/sound/soc/Makefile index bcbf1d00aa85..99f32f7c0692 100644 --- a/sound/soc/Makefile +++ b/sound/soc/Makefile | |||
@@ -1,8 +1,9 @@ | |||
1 | snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-cache.o soc-utils.o | 1 | snd-soc-core-objs := soc-core.o soc-dapm.o soc-jack.o soc-cache.o soc-utils.o |
2 | snd-soc-core-objs += soc-pcm.o soc-compress.o soc-io.o | 2 | snd-soc-core-objs += soc-pcm.o soc-compress.o soc-io.o |
3 | 3 | ||
4 | snd-soc-dmaengine-pcm-objs := soc-dmaengine-pcm.o | 4 | ifneq ($(CONFIG_SND_SOC_DMAENGINE_PCM),) |
5 | obj-$(CONFIG_SND_SOC_DMAENGINE_PCM) += snd-soc-dmaengine-pcm.o | 5 | snd-soc-core-objs += soc-dmaengine-pcm.o |
6 | endif | ||
6 | 7 | ||
7 | obj-$(CONFIG_SND_SOC) += snd-soc-core.o | 8 | obj-$(CONFIG_SND_SOC) += snd-soc-core.o |
8 | obj-$(CONFIG_SND_SOC) += codecs/ | 9 | obj-$(CONFIG_SND_SOC) += codecs/ |
diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c index 185d8dd36399..f379b085c392 100644 --- a/sound/soc/codecs/da9055.c +++ b/sound/soc/codecs/da9055.c | |||
@@ -178,6 +178,12 @@ | |||
178 | #define DA9055_AIF_WORD_S24_LE (2 << 2) | 178 | #define DA9055_AIF_WORD_S24_LE (2 << 2) |
179 | #define DA9055_AIF_WORD_S32_LE (3 << 2) | 179 | #define DA9055_AIF_WORD_S32_LE (3 << 2) |
180 | 180 | ||
181 | /* MIC_L_CTRL bit fields */ | ||
182 | #define DA9055_MIC_L_MUTE_EN (1 << 6) | ||
183 | |||
184 | /* MIC_R_CTRL bit fields */ | ||
185 | #define DA9055_MIC_R_MUTE_EN (1 << 6) | ||
186 | |||
181 | /* MIXIN_L_CTRL bit fields */ | 187 | /* MIXIN_L_CTRL bit fields */ |
182 | #define DA9055_MIXIN_L_MIX_EN (1 << 3) | 188 | #define DA9055_MIXIN_L_MIX_EN (1 << 3) |
183 | 189 | ||
@@ -476,7 +482,7 @@ static int da9055_put_alc_sw(struct snd_kcontrol *kcontrol, | |||
476 | struct snd_ctl_elem_value *ucontrol) | 482 | struct snd_ctl_elem_value *ucontrol) |
477 | { | 483 | { |
478 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); | 484 | struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); |
479 | u8 reg_val, adc_left, adc_right; | 485 | u8 reg_val, adc_left, adc_right, mic_left, mic_right; |
480 | int avg_left_data, avg_right_data, offset_l, offset_r; | 486 | int avg_left_data, avg_right_data, offset_l, offset_r; |
481 | 487 | ||
482 | if (ucontrol->value.integer.value[0]) { | 488 | if (ucontrol->value.integer.value[0]) { |
@@ -485,6 +491,16 @@ static int da9055_put_alc_sw(struct snd_kcontrol *kcontrol, | |||
485 | * offsets must be done first | 491 | * offsets must be done first |
486 | */ | 492 | */ |
487 | 493 | ||
494 | /* Save current values from Mic control registers */ | ||
495 | mic_left = snd_soc_read(codec, DA9055_MIC_L_CTRL); | ||
496 | mic_right = snd_soc_read(codec, DA9055_MIC_R_CTRL); | ||
497 | |||
498 | /* Mute Mic PGA Left and Right */ | ||
499 | snd_soc_update_bits(codec, DA9055_MIC_L_CTRL, | ||
500 | DA9055_MIC_L_MUTE_EN, DA9055_MIC_L_MUTE_EN); | ||
501 | snd_soc_update_bits(codec, DA9055_MIC_R_CTRL, | ||
502 | DA9055_MIC_R_MUTE_EN, DA9055_MIC_R_MUTE_EN); | ||
503 | |||
488 | /* Save current values from ADC control registers */ | 504 | /* Save current values from ADC control registers */ |
489 | adc_left = snd_soc_read(codec, DA9055_ADC_L_CTRL); | 505 | adc_left = snd_soc_read(codec, DA9055_ADC_L_CTRL); |
490 | adc_right = snd_soc_read(codec, DA9055_ADC_R_CTRL); | 506 | adc_right = snd_soc_read(codec, DA9055_ADC_R_CTRL); |
@@ -520,6 +536,10 @@ static int da9055_put_alc_sw(struct snd_kcontrol *kcontrol, | |||
520 | /* Restore original values of ADC control registers */ | 536 | /* Restore original values of ADC control registers */ |
521 | snd_soc_write(codec, DA9055_ADC_L_CTRL, adc_left); | 537 | snd_soc_write(codec, DA9055_ADC_L_CTRL, adc_left); |
522 | snd_soc_write(codec, DA9055_ADC_R_CTRL, adc_right); | 538 | snd_soc_write(codec, DA9055_ADC_R_CTRL, adc_right); |
539 | |||
540 | /* Restore original values of Mic control registers */ | ||
541 | snd_soc_write(codec, DA9055_MIC_L_CTRL, mic_left); | ||
542 | snd_soc_write(codec, DA9055_MIC_R_CTRL, mic_right); | ||
523 | } | 543 | } |
524 | 544 | ||
525 | return snd_soc_put_volsw(kcontrol, ucontrol); | 545 | return snd_soc_put_volsw(kcontrol, ucontrol); |
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index e8f97af75928..00b85cc1b9a3 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c | |||
@@ -820,10 +820,10 @@ static const struct snd_soc_dapm_route intercon[] = { | |||
820 | {"VIBRA DAC", NULL, "Vibra Playback"}, | 820 | {"VIBRA DAC", NULL, "Vibra Playback"}, |
821 | 821 | ||
822 | /* ADC -> Stream mapping */ | 822 | /* ADC -> Stream mapping */ |
823 | {"ADC Left", NULL, "Legacy Capture"}, | 823 | {"Legacy Capture" , NULL, "ADC Left"}, |
824 | {"ADC Left", NULL, "Capture"}, | 824 | {"Capture", NULL, "ADC Left"}, |
825 | {"ADC Right", NULL, "Legacy Capture"}, | 825 | {"Legacy Capture", NULL, "ADC Right"}, |
826 | {"ADC Right", NULL, "Capture"}, | 826 | {"Capture" , NULL, "ADC Right"}, |
827 | 827 | ||
828 | /* Capture path */ | 828 | /* Capture path */ |
829 | {"Analog Left Capture Route", "Headset Mic", "HSMIC"}, | 829 | {"Analog Left Capture Route", "Headset Mic", "HSMIC"}, |
diff --git a/sound/soc/codecs/wm2200.c b/sound/soc/codecs/wm2200.c index efa93dbb0191..eab64a193989 100644 --- a/sound/soc/codecs/wm2200.c +++ b/sound/soc/codecs/wm2200.c | |||
@@ -1028,7 +1028,7 @@ SOC_DOUBLE_R_TLV("OUT2 Digital Volume", WM2200_DAC_DIGITAL_VOLUME_2L, | |||
1028 | WM2200_DAC_DIGITAL_VOLUME_2R, WM2200_OUT2L_VOL_SHIFT, 0x9f, 0, | 1028 | WM2200_DAC_DIGITAL_VOLUME_2R, WM2200_OUT2L_VOL_SHIFT, 0x9f, 0, |
1029 | digital_tlv), | 1029 | digital_tlv), |
1030 | SOC_DOUBLE("OUT2 Switch", WM2200_PDM_1, WM2200_SPK1L_MUTE_SHIFT, | 1030 | SOC_DOUBLE("OUT2 Switch", WM2200_PDM_1, WM2200_SPK1L_MUTE_SHIFT, |
1031 | WM2200_SPK1R_MUTE_SHIFT, 1, 0), | 1031 | WM2200_SPK1R_MUTE_SHIFT, 1, 1), |
1032 | }; | 1032 | }; |
1033 | 1033 | ||
1034 | WM2200_MIXER_ENUMS(OUT1L, WM2200_OUT1LMIX_INPUT_1_SOURCE); | 1034 | WM2200_MIXER_ENUMS(OUT1L, WM2200_OUT1LMIX_INPUT_1_SOURCE); |
@@ -2091,6 +2091,7 @@ static __devinit int wm2200_i2c_probe(struct i2c_client *i2c, | |||
2091 | 2091 | ||
2092 | switch (wm2200->rev) { | 2092 | switch (wm2200->rev) { |
2093 | case 0: | 2093 | case 0: |
2094 | case 1: | ||
2094 | ret = regmap_register_patch(wm2200->regmap, wm2200_reva_patch, | 2095 | ret = regmap_register_patch(wm2200->regmap, wm2200_reva_patch, |
2095 | ARRAY_SIZE(wm2200_reva_patch)); | 2096 | ARRAY_SIZE(wm2200_reva_patch)); |
2096 | if (ret != 0) { | 2097 | if (ret != 0) { |
diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c index dc0ee7626626..d8e96b2cd03e 100644 --- a/sound/soc/omap/ams-delta.c +++ b/sound/soc/omap/ams-delta.c | |||
@@ -575,56 +575,53 @@ static struct snd_soc_card ams_delta_audio_card = { | |||
575 | }; | 575 | }; |
576 | 576 | ||
577 | /* Module init/exit */ | 577 | /* Module init/exit */ |
578 | static struct platform_device *ams_delta_audio_platform_device; | 578 | static __devinit int ams_delta_probe(struct platform_device *pdev) |
579 | static struct platform_device *cx20442_platform_device; | ||
580 | |||
581 | static int __init ams_delta_module_init(void) | ||
582 | { | 579 | { |
580 | struct snd_soc_card *card = &ams_delta_audio_card; | ||
583 | int ret; | 581 | int ret; |
584 | 582 | ||
585 | if (!(machine_is_ams_delta())) | 583 | card->dev = &pdev->dev; |
586 | return -ENODEV; | ||
587 | |||
588 | ams_delta_audio_platform_device = | ||
589 | platform_device_alloc("soc-audio", -1); | ||
590 | if (!ams_delta_audio_platform_device) | ||
591 | return -ENOMEM; | ||
592 | 584 | ||
593 | platform_set_drvdata(ams_delta_audio_platform_device, | 585 | ret = snd_soc_register_card(card); |
594 | &ams_delta_audio_card); | 586 | if (ret) { |
595 | 587 | dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); | |
596 | ret = platform_device_add(ams_delta_audio_platform_device); | 588 | card->dev = NULL; |
597 | if (ret) | 589 | return ret; |
598 | goto err; | 590 | } |
599 | |||
600 | /* | ||
601 | * Codec platform device could be registered from elsewhere (board?), | ||
602 | * but I do it here as it makes sense only if used with the card. | ||
603 | */ | ||
604 | cx20442_platform_device = | ||
605 | platform_device_register_simple("cx20442-codec", -1, NULL, 0); | ||
606 | return 0; | 591 | return 0; |
607 | err: | ||
608 | platform_device_put(ams_delta_audio_platform_device); | ||
609 | return ret; | ||
610 | } | 592 | } |
611 | late_initcall(ams_delta_module_init); | ||
612 | 593 | ||
613 | static void __exit ams_delta_module_exit(void) | 594 | static int __devexit ams_delta_remove(struct platform_device *pdev) |
614 | { | 595 | { |
596 | struct snd_soc_card *card = platform_get_drvdata(pdev); | ||
597 | |||
615 | if (tty_unregister_ldisc(N_V253) != 0) | 598 | if (tty_unregister_ldisc(N_V253) != 0) |
616 | dev_warn(&ams_delta_audio_platform_device->dev, | 599 | dev_warn(&pdev->dev, |
617 | "failed to unregister V253 line discipline\n"); | 600 | "failed to unregister V253 line discipline\n"); |
618 | 601 | ||
619 | snd_soc_jack_free_gpios(&ams_delta_hook_switch, | 602 | snd_soc_jack_free_gpios(&ams_delta_hook_switch, |
620 | ARRAY_SIZE(ams_delta_hook_switch_gpios), | 603 | ARRAY_SIZE(ams_delta_hook_switch_gpios), |
621 | ams_delta_hook_switch_gpios); | 604 | ams_delta_hook_switch_gpios); |
622 | 605 | ||
623 | platform_device_unregister(cx20442_platform_device); | 606 | snd_soc_unregister_card(card); |
624 | platform_device_unregister(ams_delta_audio_platform_device); | 607 | card->dev = NULL; |
608 | return 0; | ||
625 | } | 609 | } |
626 | module_exit(ams_delta_module_exit); | 610 | |
611 | #define DRV_NAME "ams-delta-audio" | ||
612 | |||
613 | static struct platform_driver ams_delta_driver = { | ||
614 | .driver = { | ||
615 | .name = DRV_NAME, | ||
616 | .owner = THIS_MODULE, | ||
617 | }, | ||
618 | .probe = ams_delta_probe, | ||
619 | .remove = __devexit_p(ams_delta_remove), | ||
620 | }; | ||
621 | |||
622 | module_platform_driver(ams_delta_driver); | ||
627 | 623 | ||
628 | MODULE_AUTHOR("Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>"); | 624 | MODULE_AUTHOR("Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>"); |
629 | MODULE_DESCRIPTION("ALSA SoC driver for Amstrad E3 (Delta) videophone"); | 625 | MODULE_DESCRIPTION("ALSA SoC driver for Amstrad E3 (Delta) videophone"); |
630 | MODULE_LICENSE("GPL"); | 626 | MODULE_LICENSE("GPL"); |
627 | MODULE_ALIAS("platform:" DRV_NAME); | ||
diff --git a/sound/soc/omap/omap-abe-twl6040.c b/sound/soc/omap/omap-abe-twl6040.c index 4a73ef3ae12f..a57a4e68dcc6 100644 --- a/sound/soc/omap/omap-abe-twl6040.c +++ b/sound/soc/omap/omap-abe-twl6040.c | |||
@@ -216,7 +216,7 @@ static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd) | |||
216 | twl6040_disconnect_pin(dapm, pdata->has_hf, "Ext Spk"); | 216 | twl6040_disconnect_pin(dapm, pdata->has_hf, "Ext Spk"); |
217 | twl6040_disconnect_pin(dapm, pdata->has_ep, "Earphone Spk"); | 217 | twl6040_disconnect_pin(dapm, pdata->has_ep, "Earphone Spk"); |
218 | twl6040_disconnect_pin(dapm, pdata->has_aux, "Line Out"); | 218 | twl6040_disconnect_pin(dapm, pdata->has_aux, "Line Out"); |
219 | twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vinrator"); | 219 | twl6040_disconnect_pin(dapm, pdata->has_vibra, "Vibrator"); |
220 | twl6040_disconnect_pin(dapm, pdata->has_hsmic, "Headset Mic"); | 220 | twl6040_disconnect_pin(dapm, pdata->has_hsmic, "Headset Mic"); |
221 | twl6040_disconnect_pin(dapm, pdata->has_mainmic, "Main Handset Mic"); | 221 | twl6040_disconnect_pin(dapm, pdata->has_mainmic, "Main Handset Mic"); |
222 | twl6040_disconnect_pin(dapm, pdata->has_submic, "Sub Handset Mic"); | 222 | twl6040_disconnect_pin(dapm, pdata->has_submic, "Sub Handset Mic"); |
diff --git a/sound/soc/omap/omap-mcpdm.c b/sound/soc/omap/omap-mcpdm.c index c02b001ee4b5..56965bb3275c 100644 --- a/sound/soc/omap/omap-mcpdm.c +++ b/sound/soc/omap/omap-mcpdm.c | |||
@@ -40,7 +40,6 @@ | |||
40 | #include <sound/pcm_params.h> | 40 | #include <sound/pcm_params.h> |
41 | #include <sound/soc.h> | 41 | #include <sound/soc.h> |
42 | 42 | ||
43 | #include <plat/omap_hwmod.h> | ||
44 | #include "omap-mcpdm.h" | 43 | #include "omap-mcpdm.h" |
45 | #include "omap-pcm.h" | 44 | #include "omap-pcm.h" |
46 | 45 | ||
@@ -260,13 +259,9 @@ static int omap_mcpdm_dai_startup(struct snd_pcm_substream *substream, | |||
260 | mutex_lock(&mcpdm->mutex); | 259 | mutex_lock(&mcpdm->mutex); |
261 | 260 | ||
262 | if (!dai->active) { | 261 | if (!dai->active) { |
263 | /* Enable watch dog for ES above ES 1.0 to avoid saturation */ | 262 | u32 ctrl = omap_mcpdm_read(mcpdm, MCPDM_REG_CTRL); |
264 | if (omap_rev() != OMAP4430_REV_ES1_0) { | ||
265 | u32 ctrl = omap_mcpdm_read(mcpdm, MCPDM_REG_CTRL); | ||
266 | 263 | ||
267 | omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL, | 264 | omap_mcpdm_write(mcpdm, MCPDM_REG_CTRL, ctrl | MCPDM_WD_EN); |
268 | ctrl | MCPDM_WD_EN); | ||
269 | } | ||
270 | omap_mcpdm_open_streams(mcpdm); | 265 | omap_mcpdm_open_streams(mcpdm); |
271 | } | 266 | } |
272 | mutex_unlock(&mcpdm->mutex); | 267 | mutex_unlock(&mcpdm->mutex); |
diff --git a/sound/soc/pxa/mmp-pcm.c b/sound/soc/pxa/mmp-pcm.c index 73ac5463c9e4..e834faf859fd 100644 --- a/sound/soc/pxa/mmp-pcm.c +++ b/sound/soc/pxa/mmp-pcm.c | |||
@@ -15,13 +15,13 @@ | |||
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/dma-mapping.h> | 16 | #include <linux/dma-mapping.h> |
17 | #include <linux/dmaengine.h> | 17 | #include <linux/dmaengine.h> |
18 | #include <linux/platform_data/dma-mmp_tdma.h> | ||
18 | #include <linux/platform_data/mmp_audio.h> | 19 | #include <linux/platform_data/mmp_audio.h> |
19 | #include <sound/pxa2xx-lib.h> | 20 | #include <sound/pxa2xx-lib.h> |
20 | #include <sound/core.h> | 21 | #include <sound/core.h> |
21 | #include <sound/pcm.h> | 22 | #include <sound/pcm.h> |
22 | #include <sound/pcm_params.h> | 23 | #include <sound/pcm_params.h> |
23 | #include <sound/soc.h> | 24 | #include <sound/soc.h> |
24 | #include <mach/sram.h> | ||
25 | #include <sound/dmaengine_pcm.h> | 25 | #include <sound/dmaengine_pcm.h> |
26 | 26 | ||
27 | struct mmp_dma_data { | 27 | struct mmp_dma_data { |
diff --git a/sound/soc/samsung/bells.c b/sound/soc/samsung/bells.c index 5dc10dfc0d42..b0d46d63d55e 100644 --- a/sound/soc/samsung/bells.c +++ b/sound/soc/samsung/bells.c | |||
@@ -212,7 +212,7 @@ static struct snd_soc_dai_link bells_dai_wm5102[] = { | |||
212 | { | 212 | { |
213 | .name = "Sub", | 213 | .name = "Sub", |
214 | .stream_name = "Sub", | 214 | .stream_name = "Sub", |
215 | .cpu_dai_name = "wm5102-aif3", | 215 | .cpu_dai_name = "wm5110-aif3", |
216 | .codec_dai_name = "wm9081-hifi", | 216 | .codec_dai_name = "wm9081-hifi", |
217 | .codec_name = "wm9081.1-006c", | 217 | .codec_name = "wm9081.1-006c", |
218 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | 218 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
@@ -247,7 +247,7 @@ static struct snd_soc_dai_link bells_dai_wm5110[] = { | |||
247 | { | 247 | { |
248 | .name = "Sub", | 248 | .name = "Sub", |
249 | .stream_name = "Sub", | 249 | .stream_name = "Sub", |
250 | .cpu_dai_name = "wm5102-aif3", | 250 | .cpu_dai_name = "wm5110-aif3", |
251 | .codec_dai_name = "wm9081-hifi", | 251 | .codec_dai_name = "wm9081-hifi", |
252 | .codec_name = "wm9081.1-006c", | 252 | .codec_name = "wm9081.1-006c", |
253 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | 253 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c index 5328ae5539f1..9d7f30774a44 100644 --- a/sound/soc/sh/fsi.c +++ b/sound/soc/sh/fsi.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/sh_dma.h> | 20 | #include <linux/sh_dma.h> |
21 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/workqueue.h> | ||
23 | #include <sound/soc.h> | 24 | #include <sound/soc.h> |
24 | #include <sound/sh_fsi.h> | 25 | #include <sound/sh_fsi.h> |
25 | 26 | ||
@@ -223,7 +224,7 @@ struct fsi_stream { | |||
223 | */ | 224 | */ |
224 | struct dma_chan *chan; | 225 | struct dma_chan *chan; |
225 | struct sh_dmae_slave slave; /* see fsi_handler_init() */ | 226 | struct sh_dmae_slave slave; /* see fsi_handler_init() */ |
226 | struct tasklet_struct tasklet; | 227 | struct work_struct work; |
227 | dma_addr_t dma; | 228 | dma_addr_t dma; |
228 | }; | 229 | }; |
229 | 230 | ||
@@ -1085,9 +1086,9 @@ static void fsi_dma_complete(void *data) | |||
1085 | snd_pcm_period_elapsed(io->substream); | 1086 | snd_pcm_period_elapsed(io->substream); |
1086 | } | 1087 | } |
1087 | 1088 | ||
1088 | static void fsi_dma_do_tasklet(unsigned long data) | 1089 | static void fsi_dma_do_work(struct work_struct *work) |
1089 | { | 1090 | { |
1090 | struct fsi_stream *io = (struct fsi_stream *)data; | 1091 | struct fsi_stream *io = container_of(work, struct fsi_stream, work); |
1091 | struct fsi_priv *fsi = fsi_stream_to_priv(io); | 1092 | struct fsi_priv *fsi = fsi_stream_to_priv(io); |
1092 | struct snd_soc_dai *dai; | 1093 | struct snd_soc_dai *dai; |
1093 | struct dma_async_tx_descriptor *desc; | 1094 | struct dma_async_tx_descriptor *desc; |
@@ -1129,7 +1130,7 @@ static void fsi_dma_do_tasklet(unsigned long data) | |||
1129 | * FIXME | 1130 | * FIXME |
1130 | * | 1131 | * |
1131 | * In DMAEngine case, codec and FSI cannot be started simultaneously | 1132 | * In DMAEngine case, codec and FSI cannot be started simultaneously |
1132 | * since FSI is using tasklet. | 1133 | * since FSI is using the scheduler work queue. |
1133 | * Therefore, in capture case, probably FSI FIFO will have got | 1134 | * Therefore, in capture case, probably FSI FIFO will have got |
1134 | * overflow error in this point. | 1135 | * overflow error in this point. |
1135 | * in that case, DMA cannot start transfer until error was cleared. | 1136 | * in that case, DMA cannot start transfer until error was cleared. |
@@ -1153,7 +1154,7 @@ static bool fsi_dma_filter(struct dma_chan *chan, void *param) | |||
1153 | 1154 | ||
1154 | static int fsi_dma_transfer(struct fsi_priv *fsi, struct fsi_stream *io) | 1155 | static int fsi_dma_transfer(struct fsi_priv *fsi, struct fsi_stream *io) |
1155 | { | 1156 | { |
1156 | tasklet_schedule(&io->tasklet); | 1157 | schedule_work(&io->work); |
1157 | 1158 | ||
1158 | return 0; | 1159 | return 0; |
1159 | } | 1160 | } |
@@ -1195,14 +1196,14 @@ static int fsi_dma_probe(struct fsi_priv *fsi, struct fsi_stream *io, struct dev | |||
1195 | return fsi_stream_probe(fsi, dev); | 1196 | return fsi_stream_probe(fsi, dev); |
1196 | } | 1197 | } |
1197 | 1198 | ||
1198 | tasklet_init(&io->tasklet, fsi_dma_do_tasklet, (unsigned long)io); | 1199 | INIT_WORK(&io->work, fsi_dma_do_work); |
1199 | 1200 | ||
1200 | return 0; | 1201 | return 0; |
1201 | } | 1202 | } |
1202 | 1203 | ||
1203 | static int fsi_dma_remove(struct fsi_priv *fsi, struct fsi_stream *io) | 1204 | static int fsi_dma_remove(struct fsi_priv *fsi, struct fsi_stream *io) |
1204 | { | 1205 | { |
1205 | tasklet_kill(&io->tasklet); | 1206 | cancel_work_sync(&io->work); |
1206 | 1207 | ||
1207 | fsi_stream_stop(fsi, io); | 1208 | fsi_stream_stop(fsi, io); |
1208 | 1209 | ||
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index fa0fd8ddae90..1ab5fe04bfcc 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | /** | 23 | /** |
24 | * snd_soc_jack_new - Create a new jack | 24 | * snd_soc_jack_new - Create a new jack |
25 | * @card: ASoC card | 25 | * @codec: ASoC codec |
26 | * @id: an identifying string for this jack | 26 | * @id: an identifying string for this jack |
27 | * @type: a bitmask of enum snd_jack_type values that can be detected by | 27 | * @type: a bitmask of enum snd_jack_type values that can be detected by |
28 | * this jack | 28 | * this jack |
@@ -133,12 +133,13 @@ EXPORT_SYMBOL_GPL(snd_soc_jack_add_zones); | |||
133 | 133 | ||
134 | /** | 134 | /** |
135 | * snd_soc_jack_get_type - Based on the mic bias value, this function returns | 135 | * snd_soc_jack_get_type - Based on the mic bias value, this function returns |
136 | * the type of jack from the zones delcared in the jack type | 136 | * the type of jack from the zones declared in the jack type |
137 | * | 137 | * |
138 | * @jack: ASoC jack | ||
138 | * @micbias_voltage: mic bias voltage at adc channel when jack is plugged in | 139 | * @micbias_voltage: mic bias voltage at adc channel when jack is plugged in |
139 | * | 140 | * |
140 | * Based on the mic bias value passed, this function helps identify | 141 | * Based on the mic bias value passed, this function helps identify |
141 | * the type of jack from the already delcared jack zones | 142 | * the type of jack from the already declared jack zones |
142 | */ | 143 | */ |
143 | int snd_soc_jack_get_type(struct snd_soc_jack *jack, int micbias_voltage) | 144 | int snd_soc_jack_get_type(struct snd_soc_jack *jack, int micbias_voltage) |
144 | { | 145 | { |