diff options
129 files changed, 3489 insertions, 1077 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index dc3154e49279..1462ed86d40a 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | # To add a new book the only step required is to add the book to the | 6 | # To add a new book the only step required is to add the book to the |
| 7 | # list of DOCBOOKS. | 7 | # list of DOCBOOKS. |
| 8 | 8 | ||
| 9 | DOCBOOKS := z8530book.xml mcabook.xml \ | 9 | DOCBOOKS := z8530book.xml mcabook.xml device-drivers.xml \ |
| 10 | kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ | 10 | kernel-hacking.xml kernel-locking.xml deviceiobook.xml \ |
| 11 | procfs-guide.xml writing_usb_driver.xml networking.xml \ | 11 | procfs-guide.xml writing_usb_driver.xml networking.xml \ |
| 12 | kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \ | 12 | kernel-api.xml filesystems.xml lsm.xml usb.xml kgdb.xml \ |
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl new file mode 100644 index 000000000000..94a20fe8fedf --- /dev/null +++ b/Documentation/DocBook/device-drivers.tmpl | |||
| @@ -0,0 +1,418 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | ||
| 3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> | ||
| 4 | |||
| 5 | <book id="LinuxDriversAPI"> | ||
| 6 | <bookinfo> | ||
| 7 | <title>Linux Device Drivers</title> | ||
| 8 | |||
| 9 | <legalnotice> | ||
| 10 | <para> | ||
| 11 | This documentation is free software; you can redistribute | ||
| 12 | it and/or modify it under the terms of the GNU General Public | ||
| 13 | License as published by the Free Software Foundation; either | ||
| 14 | version 2 of the License, or (at your option) any later | ||
| 15 | version. | ||
| 16 | </para> | ||
| 17 | |||
| 18 | <para> | ||
| 19 | This program is distributed in the hope that it will be | ||
| 20 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||
| 21 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| 22 | See the GNU General Public License for more details. | ||
| 23 | </para> | ||
| 24 | |||
| 25 | <para> | ||
| 26 | You should have received a copy of the GNU General Public | ||
| 27 | License along with this program; if not, write to the Free | ||
| 28 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
| 29 | MA 02111-1307 USA | ||
| 30 | </para> | ||
| 31 | |||
| 32 | <para> | ||
| 33 | For more details see the file COPYING in the source | ||
| 34 | distribution of Linux. | ||
| 35 | </para> | ||
| 36 | </legalnotice> | ||
| 37 | </bookinfo> | ||
| 38 | |||
| 39 | <toc></toc> | ||
| 40 | |||
| 41 | <chapter id="Basics"> | ||
| 42 | <title>Driver Basics</title> | ||
| 43 | <sect1><title>Driver Entry and Exit points</title> | ||
| 44 | !Iinclude/linux/init.h | ||
| 45 | </sect1> | ||
| 46 | |||
| 47 | <sect1><title>Atomic and pointer manipulation</title> | ||
| 48 | !Iarch/x86/include/asm/atomic_32.h | ||
| 49 | !Iarch/x86/include/asm/unaligned.h | ||
| 50 | </sect1> | ||
| 51 | |||
| 52 | <sect1><title>Delaying, scheduling, and timer routines</title> | ||
| 53 | !Iinclude/linux/sched.h | ||
| 54 | !Ekernel/sched.c | ||
| 55 | !Ekernel/timer.c | ||
| 56 | </sect1> | ||
| 57 | <sect1><title>High-resolution timers</title> | ||
| 58 | !Iinclude/linux/ktime.h | ||
| 59 | !Iinclude/linux/hrtimer.h | ||
| 60 | !Ekernel/hrtimer.c | ||
| 61 | </sect1> | ||
| 62 | <sect1><title>Workqueues and Kevents</title> | ||
| 63 | !Ekernel/workqueue.c | ||
| 64 | </sect1> | ||
| 65 | <sect1><title>Internal Functions</title> | ||
| 66 | !Ikernel/exit.c | ||
| 67 | !Ikernel/signal.c | ||
| 68 | !Iinclude/linux/kthread.h | ||
| 69 | !Ekernel/kthread.c | ||
| 70 | </sect1> | ||
| 71 | |||
| 72 | <sect1><title>Kernel objects manipulation</title> | ||
| 73 | <!-- | ||
| 74 | X!Iinclude/linux/kobject.h | ||
| 75 | --> | ||
| 76 | !Elib/kobject.c | ||
| 77 | </sect1> | ||
| 78 | |||
| 79 | <sect1><title>Kernel utility functions</title> | ||
| 80 | !Iinclude/linux/kernel.h | ||
| 81 | !Ekernel/printk.c | ||
| 82 | !Ekernel/panic.c | ||
| 83 | !Ekernel/sys.c | ||
| 84 | !Ekernel/rcupdate.c | ||
| 85 | </sect1> | ||
| 86 | |||
| 87 | <sect1><title>Device Resource Management</title> | ||
| 88 | !Edrivers/base/devres.c | ||
| 89 | </sect1> | ||
| 90 | |||
| 91 | </chapter> | ||
| 92 | |||
| 93 | <chapter id="devdrivers"> | ||
| 94 | <title>Device drivers infrastructure</title> | ||
| 95 | <sect1><title>Device Drivers Base</title> | ||
| 96 | <!-- | ||
| 97 | X!Iinclude/linux/device.h | ||
| 98 | --> | ||
| 99 | !Edrivers/base/driver.c | ||
| 100 | !Edrivers/base/core.c | ||
| 101 | !Edrivers/base/class.c | ||
| 102 | !Edrivers/base/firmware_class.c | ||
| 103 | !Edrivers/base/transport_class.c | ||
| 104 | <!-- Cannot be included, because | ||
| 105 | attribute_container_add_class_device_adapter | ||
| 106 | and attribute_container_classdev_to_container | ||
| 107 | exceed allowed 44 characters maximum | ||
| 108 | X!Edrivers/base/attribute_container.c | ||
| 109 | --> | ||
| 110 | !Edrivers/base/sys.c | ||
| 111 | <!-- | ||
| 112 | X!Edrivers/base/interface.c | ||
| 113 | --> | ||
| 114 | !Edrivers/base/platform.c | ||
| 115 | !Edrivers/base/bus.c | ||
| 116 | </sect1> | ||
| 117 | <sect1><title>Device Drivers Power Management</title> | ||
| 118 | !Edrivers/base/power/main.c | ||
| 119 | </sect1> | ||
| 120 | <sect1><title>Device Drivers ACPI Support</title> | ||
| 121 | <!-- Internal functions only | ||
| 122 | X!Edrivers/acpi/sleep/main.c | ||
| 123 | X!Edrivers/acpi/sleep/wakeup.c | ||
| 124 | X!Edrivers/acpi/motherboard.c | ||
| 125 | X!Edrivers/acpi/bus.c | ||
| 126 | --> | ||
| 127 | !Edrivers/acpi/scan.c | ||
| 128 | !Idrivers/acpi/scan.c | ||
| 129 | <!-- No correct structured comments | ||
| 130 | X!Edrivers/acpi/pci_bind.c | ||
| 131 | --> | ||
| 132 | </sect1> | ||
| 133 | <sect1><title>Device drivers PnP support</title> | ||
| 134 | !Idrivers/pnp/core.c | ||
| 135 | <!-- No correct structured comments | ||
| 136 | X!Edrivers/pnp/system.c | ||
| 137 | --> | ||
| 138 | !Edrivers/pnp/card.c | ||
| 139 | !Idrivers/pnp/driver.c | ||
| 140 | !Edrivers/pnp/manager.c | ||
| 141 | !Edrivers/pnp/support.c | ||
| 142 | </sect1> | ||
| 143 | <sect1><title>Userspace IO devices</title> | ||
| 144 | !Edrivers/uio/uio.c | ||
| 145 | !Iinclude/linux/uio_driver.h | ||
| 146 | </sect1> | ||
| 147 | </chapter> | ||
| 148 | |||
| 149 | <chapter id="parportdev"> | ||
| 150 | <title>Parallel Port Devices</title> | ||
| 151 | !Iinclude/linux/parport.h | ||
| 152 | !Edrivers/parport/ieee1284.c | ||
| 153 | !Edrivers/parport/share.c | ||
| 154 | !Idrivers/parport/daisy.c | ||
| 155 | </chapter> | ||
| 156 | |||
| 157 | <chapter id="message_devices"> | ||
| 158 | <title>Message-based devices</title> | ||
| 159 | <sect1><title>Fusion message devices</title> | ||
| 160 | !Edrivers/message/fusion/mptbase.c | ||
| 161 | !Idrivers/message/fusion/mptbase.c | ||
| 162 | !Edrivers/message/fusion/mptscsih.c | ||
| 163 | !Idrivers/message/fusion/mptscsih.c | ||
| 164 | !Idrivers/message/fusion/mptctl.c | ||
| 165 | !Idrivers/message/fusion/mptspi.c | ||
| 166 | !Idrivers/message/fusion/mptfc.c | ||
| 167 | !Idrivers/message/fusion/mptlan.c | ||
| 168 | </sect1> | ||
| 169 | <sect1><title>I2O message devices</title> | ||
| 170 | !Iinclude/linux/i2o.h | ||
| 171 | !Idrivers/message/i2o/core.h | ||
| 172 | !Edrivers/message/i2o/iop.c | ||
| 173 | !Idrivers/message/i2o/iop.c | ||
| 174 | !Idrivers/message/i2o/config-osm.c | ||
| 175 | !Edrivers/message/i2o/exec-osm.c | ||
| 176 | !Idrivers/message/i2o/exec-osm.c | ||
| 177 | !Idrivers/message/i2o/bus-osm.c | ||
| 178 | !Edrivers/message/i2o/device.c | ||
| 179 | !Idrivers/message/i2o/device.c | ||
| 180 | !Idrivers/message/i2o/driver.c | ||
| 181 | !Idrivers/message/i2o/pci.c | ||
| 182 | !Idrivers/message/i2o/i2o_block.c | ||
| 183 | !Idrivers/message/i2o/i2o_scsi.c | ||
| 184 | !Idrivers/message/i2o/i2o_proc.c | ||
| 185 | </sect1> | ||
| 186 | </chapter> | ||
| 187 | |||
| 188 | <chapter id="snddev"> | ||
| 189 | <title>Sound Devices</title> | ||
| 190 | !Iinclude/sound/core.h | ||
| 191 | !Esound/sound_core.c | ||
| 192 | !Iinclude/sound/pcm.h | ||
| 193 | !Esound/core/pcm.c | ||
| 194 | !Esound/core/device.c | ||
| 195 | !Esound/core/info.c | ||
| 196 | !Esound/core/rawmidi.c | ||
| 197 | !Esound/core/sound.c | ||
| 198 | !Esound/core/memory.c | ||
| 199 | !Esound/core/pcm_memory.c | ||
| 200 | !Esound/core/init.c | ||
| 201 | !Esound/core/isadma.c | ||
| 202 | !Esound/core/control.c | ||
| 203 | !Esound/core/pcm_lib.c | ||
| 204 | !Esound/core/hwdep.c | ||
| 205 | !Esound/core/pcm_native.c | ||
| 206 | !Esound/core/memalloc.c | ||
| 207 | <!-- FIXME: Removed for now since no structured comments in source | ||
| 208 | X!Isound/sound_firmware.c | ||
| 209 | --> | ||
| 210 | </chapter> | ||
| 211 | |||
| 212 | <chapter id="uart16x50"> | ||
| 213 | <title>16x50 UART Driver</title> | ||
| 214 | !Iinclude/linux/serial_core.h | ||
| 215 | !Edrivers/serial/serial_core.c | ||
| 216 | !Edrivers/serial/8250.c | ||
| 217 | </chapter> | ||
| 218 | |||
| 219 | <chapter id="fbdev"> | ||
| 220 | <title>Frame Buffer Library</title> | ||
| 221 | |||
| 222 | <para> | ||
| 223 | The frame buffer drivers depend heavily on four data structures. | ||
| 224 | These structures are declared in include/linux/fb.h. They are | ||
| 225 | fb_info, fb_var_screeninfo, fb_fix_screeninfo and fb_monospecs. | ||
| 226 | The last three can be made available to and from userland. | ||
| 227 | </para> | ||
| 228 | |||
| 229 | <para> | ||
| 230 | fb_info defines the current state of a particular video card. | ||
| 231 | Inside fb_info, there exists a fb_ops structure which is a | ||
| 232 | collection of needed functions to make fbdev and fbcon work. | ||
| 233 | fb_info is only visible to the kernel. | ||
| 234 | </para> | ||
| 235 | |||
| 236 | <para> | ||
| 237 | fb_var_screeninfo is used to describe the features of a video card | ||
| 238 | that are user defined. With fb_var_screeninfo, things such as | ||
| 239 | depth and the resolution may be defined. | ||
| 240 | </para> | ||
| 241 | |||
| 242 | <para> | ||
| 243 | The next structure is fb_fix_screeninfo. This defines the | ||
| 244 | properties of a card that are created when a mode is set and can't | ||
| 245 | be changed otherwise. A good example of this is the start of the | ||
| 246 | frame buffer memory. This "locks" the address of the frame buffer | ||
| 247 | memory, so that it cannot be changed or moved. | ||
| 248 | </para> | ||
| 249 | |||
| 250 | <para> | ||
| 251 | The last structure is fb_monospecs. In the old API, there was | ||
| 252 | little importance for fb_monospecs. This allowed for forbidden things | ||
| 253 | such as setting a mode of 800x600 on a fix frequency monitor. With | ||
| 254 | the new API, fb_monospecs prevents such things, and if used | ||
| 255 | correctly, can prevent a monitor from being cooked. fb_monospecs | ||
| 256 | will not be useful until kernels 2.5.x. | ||
| 257 | </para> | ||
| 258 | |||
| 259 | <sect1><title>Frame Buffer Memory</title> | ||
| 260 | !Edrivers/video/fbmem.c | ||
| 261 | </sect1> | ||
| 262 | <!-- | ||
| 263 | <sect1><title>Frame Buffer Console</title> | ||
| 264 | X!Edrivers/video/console/fbcon.c | ||
| 265 | </sect1> | ||
| 266 | --> | ||
| 267 | <sect1><title>Frame Buffer Colormap</title> | ||
| 268 | !Edrivers/video/fbcmap.c | ||
| 269 | </sect1> | ||
| 270 | <!-- FIXME: | ||
| 271 | drivers/video/fbgen.c has no docs, which stuffs up the sgml. Comment | ||
| 272 | out until somebody adds docs. KAO | ||
| 273 | <sect1><title>Frame Buffer Generic Functions</title> | ||
| 274 | X!Idrivers/video/fbgen.c | ||
| 275 | </sect1> | ||
| 276 | KAO --> | ||
| 277 | <sect1><title>Frame Buffer Video Mode Database</title> | ||
| 278 | !Idrivers/video/modedb.c | ||
| 279 | !Edrivers/video/modedb.c | ||
| 280 | </sect1> | ||
| 281 | <sect1><title>Frame Buffer Macintosh Video Mode Database</title> | ||
| 282 | !Edrivers/video/macmodes.c | ||
| 283 | </sect1> | ||
| 284 | <sect1><title>Frame Buffer Fonts</title> | ||
| 285 | <para> | ||
| 286 | Refer to the file drivers/video/console/fonts.c for more information. | ||
| 287 | </para> | ||
| 288 | <!-- FIXME: Removed for now since no structured comments in source | ||
| 289 | X!Idrivers/video/console/fonts.c | ||
| 290 | --> | ||
| 291 | </sect1> | ||
| 292 | </chapter> | ||
| 293 | |||
| 294 | <chapter id="input_subsystem"> | ||
| 295 | <title>Input Subsystem</title> | ||
| 296 | !Iinclude/linux/input.h | ||
| 297 | !Edrivers/input/input.c | ||
| 298 | !Edrivers/input/ff-core.c | ||
| 299 | !Edrivers/input/ff-memless.c | ||
| 300 | </chapter> | ||
| 301 | |||
| 302 | <chapter id="spi"> | ||
| 303 | <title>Serial Peripheral Interface (SPI)</title> | ||
| 304 | <para> | ||
| 305 | SPI is the "Serial Peripheral Interface", widely used with | ||
| 306 | embedded systems because it is a simple and efficient | ||
| 307 | interface: basically a multiplexed shift register. | ||
| 308 | Its three signal wires hold a clock (SCK, often in the range | ||
| 309 | of 1-20 MHz), a "Master Out, Slave In" (MOSI) data line, and | ||
| 310 | a "Master In, Slave Out" (MISO) data line. | ||
| 311 | SPI is a full duplex protocol; for each bit shifted out the | ||
| 312 | MOSI line (one per clock) another is shifted in on the MISO line. | ||
| 313 | Those bits are assembled into words of various sizes on the | ||
| 314 | way to and from system memory. | ||
| 315 | An additional chipselect line is usually active-low (nCS); | ||
| 316 | four signals are normally used for each peripheral, plus | ||
| 317 | sometimes an interrupt. | ||
| 318 | </para> | ||
| 319 | <para> | ||
| 320 | The SPI bus facilities listed here provide a generalized | ||
| 321 | interface to declare SPI busses and devices, manage them | ||
| 322 | according to the standard Linux driver model, and perform | ||
| 323 | input/output operations. | ||
| 324 | At this time, only "master" side interfaces are supported, | ||
| 325 | where Linux talks to SPI peripherals and does not implement | ||
| 326 | such a peripheral itself. | ||
| 327 | (Interfaces to support implementing SPI slaves would | ||
| 328 | necessarily look different.) | ||
| 329 | </para> | ||
| 330 | <para> | ||
| 331 | The programming interface is structured around two kinds of driver, | ||
| 332 | and two kinds of device. | ||
| 333 | A "Controller Driver" abstracts the controller hardware, which may | ||
| 334 | be as simple as a set of GPIO pins or as complex as a pair of FIFOs | ||
| 335 | connected to dual DMA engines on the other side of the SPI shift | ||
| 336 | register (maximizing throughput). Such drivers bridge between | ||
| 337 | whatever bus they sit on (often the platform bus) and SPI, and | ||
| 338 | expose the SPI side of their device as a | ||
| 339 | <structname>struct spi_master</structname>. | ||
| 340 | SPI devices are children of that master, represented as a | ||
| 341 | <structname>struct spi_device</structname> and manufactured from | ||
| 342 | <structname>struct spi_board_info</structname> descriptors which | ||
| 343 | are usually provided by board-specific initialization code. | ||
| 344 | A <structname>struct spi_driver</structname> is called a | ||
| 345 | "Protocol Driver", and is bound to a spi_device using normal | ||
| 346 | driver model calls. | ||
| 347 | </para> | ||
| 348 | <para> | ||
| 349 | The I/O model is a set of queued messages. Protocol drivers | ||
| 350 | submit one or more <structname>struct spi_message</structname> | ||
| 351 | objects, which are processed and completed asynchronously. | ||
| 352 | (There are synchronous wrappers, however.) Messages are | ||
| 353 | built from one or more <structname>struct spi_transfer</structname> | ||
| 354 | objects, each of which wraps a full duplex SPI transfer. | ||
| 355 | A variety of protocol tweaking options are needed, because | ||
| 356 | different chips adopt very different policies for how they | ||
| 357 | use the bits transferred with SPI. | ||
| 358 | </para> | ||
| 359 | !Iinclude/linux/spi/spi.h | ||
| 360 | !Fdrivers/spi/spi.c spi_register_board_info | ||
| 361 | !Edrivers/spi/spi.c | ||
| 362 | </chapter> | ||
| 363 | |||
| 364 | <chapter id="i2c"> | ||
| 365 | <title>I<superscript>2</superscript>C and SMBus Subsystem</title> | ||
| 366 | |||
| 367 | <para> | ||
| 368 | I<superscript>2</superscript>C (or without fancy typography, "I2C") | ||
| 369 | is an acronym for the "Inter-IC" bus, a simple bus protocol which is | ||
| 370 | widely used where low data rate communications suffice. | ||
| 371 | Since it's also a licensed trademark, some vendors use another | ||
| 372 | name (such as "Two-Wire Interface", TWI) for the same bus. | ||
| 373 | I2C only needs two signals (SCL for clock, SDA for data), conserving | ||
| 374 | board real estate and minimizing signal quality issues. | ||
| 375 | Most I2C devices use seven bit addresses, and bus speeds of up | ||
| 376 | to 400 kHz; there's a high speed extension (3.4 MHz) that's not yet | ||
| 377 | found wide use. | ||
| 378 | I2C is a multi-master bus; open drain signaling is used to | ||
| 379 | arbitrate between masters, as well as to handshake and to | ||
| 380 | synchronize clocks from slower clients. | ||
| 381 | </para> | ||
| 382 | |||
| 383 | <para> | ||
| 384 | The Linux I2C programming interfaces support only the master | ||
| 385 | side of bus interactions, not the slave side. | ||
| 386 | The programming interface is structured around two kinds of driver, | ||
| 387 | and two kinds of device. | ||
| 388 | An I2C "Adapter Driver" abstracts the controller hardware; it binds | ||
| 389 | to a physical device (perhaps a PCI device or platform_device) and | ||
| 390 | exposes a <structname>struct i2c_adapter</structname> representing | ||
| 391 | each I2C bus segment it manages. | ||
| 392 | On each I2C bus segment will be I2C devices represented by a | ||
| 393 | <structname>struct i2c_client</structname>. Those devices will | ||
| 394 | be bound to a <structname>struct i2c_driver</structname>, | ||
| 395 | which should follow the standard Linux driver model. | ||
| 396 | (At this writing, a legacy model is more widely used.) | ||
| 397 | There are functions to perform various I2C protocol operations; at | ||
| 398 | this writing all such functions are usable only from task context. | ||
| 399 | </para> | ||
| 400 | |||
| 401 | <para> | ||
| 402 | The System Management Bus (SMBus) is a sibling protocol. Most SMBus | ||
| 403 | systems are also I2C conformant. The electrical constraints are | ||
| 404 | tighter for SMBus, and it standardizes particular protocol messages | ||
| 405 | and idioms. Controllers that support I2C can also support most | ||
| 406 | SMBus operations, but SMBus controllers don't support all the protocol | ||
| 407 | options that an I2C controller will. | ||
| 408 | There are functions to perform various SMBus protocol operations, | ||
| 409 | either using I2C primitives or by issuing SMBus commands to | ||
| 410 | i2c_adapter devices which don't support those I2C operations. | ||
| 411 | </para> | ||
| 412 | |||
| 413 | !Iinclude/linux/i2c.h | ||
| 414 | !Fdrivers/i2c/i2c-boardinfo.c i2c_register_board_info | ||
| 415 | !Edrivers/i2c/i2c-core.c | ||
| 416 | </chapter> | ||
| 417 | |||
| 418 | </book> | ||
diff --git a/Documentation/DocBook/kernel-api.tmpl b/Documentation/DocBook/kernel-api.tmpl index 5818ff75786a..bc962cda6504 100644 --- a/Documentation/DocBook/kernel-api.tmpl +++ b/Documentation/DocBook/kernel-api.tmpl | |||
| @@ -38,58 +38,6 @@ | |||
| 38 | 38 | ||
| 39 | <toc></toc> | 39 | <toc></toc> |
| 40 | 40 | ||
| 41 | <chapter id="Basics"> | ||
| 42 | <title>Driver Basics</title> | ||
| 43 | <sect1><title>Driver Entry and Exit points</title> | ||
| 44 | !Iinclude/linux/init.h | ||
| 45 | </sect1> | ||
| 46 | |||
| 47 | <sect1><title>Atomic and pointer manipulation</title> | ||
| 48 | !Iarch/x86/include/asm/atomic_32.h | ||
| 49 | !Iarch/x86/include/asm/unaligned.h | ||
| 50 | </sect1> | ||
| 51 | |||
| 52 | <sect1><title>Delaying, scheduling, and timer routines</title> | ||
| 53 | !Iinclude/linux/sched.h | ||
| 54 | !Ekernel/sched.c | ||
| 55 | !Ekernel/timer.c | ||
| 56 | </sect1> | ||
| 57 | <sect1><title>High-resolution timers</title> | ||
| 58 | !Iinclude/linux/ktime.h | ||
| 59 | !Iinclude/linux/hrtimer.h | ||
| 60 | !Ekernel/hrtimer.c | ||
| 61 | </sect1> | ||
| 62 | <sect1><title>Workqueues and Kevents</title> | ||
| 63 | !Ekernel/workqueue.c | ||
| 64 | </sect1> | ||
| 65 | <sect1><title>Internal Functions</title> | ||
| 66 | !Ikernel/exit.c | ||
| 67 | !Ikernel/signal.c | ||
| 68 | !Iinclude/linux/kthread.h | ||
| 69 | !Ekernel/kthread.c | ||
| 70 | </sect1> | ||
| 71 | |||
| 72 | <sect1><title>Kernel objects manipulation</title> | ||
| 73 | <!-- | ||
| 74 | X!Iinclude/linux/kobject.h | ||
| 75 | --> | ||
| 76 | !Elib/kobject.c | ||
| 77 | </sect1> | ||
| 78 | |||
| 79 | <sect1><title>Kernel utility functions</title> | ||
| 80 | !Iinclude/linux/kernel.h | ||
| 81 | !Ekernel/printk.c | ||
| 82 | !Ekernel/panic.c | ||
| 83 | !Ekernel/sys.c | ||
| 84 | !Ekernel/rcupdate.c | ||
| 85 | </sect1> | ||
| 86 | |||
| 87 | <sect1><title>Device Resource Management</title> | ||
| 88 | !Edrivers/base/devres.c | ||
| 89 | </sect1> | ||
| 90 | |||
| 91 | </chapter> | ||
| 92 | |||
| 93 | <chapter id="adt"> | 41 | <chapter id="adt"> |
| 94 | <title>Data Types</title> | 42 | <title>Data Types</title> |
| 95 | <sect1><title>Doubly Linked Lists</title> | 43 | <sect1><title>Doubly Linked Lists</title> |
| @@ -298,62 +246,6 @@ X!Earch/x86/kernel/mca_32.c | |||
| 298 | !Ikernel/acct.c | 246 | !Ikernel/acct.c |
| 299 | </chapter> | 247 | </chapter> |
| 300 | 248 | ||
| 301 | <chapter id="devdrivers"> | ||
| 302 | <title>Device drivers infrastructure</title> | ||
| 303 | <sect1><title>Device Drivers Base</title> | ||
| 304 | <!-- | ||
| 305 | X!Iinclude/linux/device.h | ||
| 306 | --> | ||
| 307 | !Edrivers/base/driver.c | ||
| 308 | !Edrivers/base/core.c | ||
| 309 | !Edrivers/base/class.c | ||
| 310 | !Edrivers/base/firmware_class.c | ||
| 311 | !Edrivers/base/transport_class.c | ||
| 312 | <!-- Cannot be included, because | ||
| 313 | attribute_container_add_class_device_adapter | ||
| 314 | and attribute_container_classdev_to_container | ||
| 315 | exceed allowed 44 characters maximum | ||
| 316 | X!Edrivers/base/attribute_container.c | ||
| 317 | --> | ||
| 318 | !Edrivers/base/sys.c | ||
| 319 | <!-- | ||
| 320 | X!Edrivers/base/interface.c | ||
| 321 | --> | ||
| 322 | !Edrivers/base/platform.c | ||
| 323 | !Edrivers/base/bus.c | ||
| 324 | </sect1> | ||
| 325 | <sect1><title>Device Drivers Power Management</title> | ||
| 326 | !Edrivers/base/power/main.c | ||
| 327 | </sect1> | ||
| 328 | <sect1><title>Device Drivers ACPI Support</title> | ||
| 329 | <!-- Internal functions only | ||
| 330 | X!Edrivers/acpi/sleep/main.c | ||
| 331 | X!Edrivers/acpi/sleep/wakeup.c | ||
| 332 | X!Edrivers/acpi/motherboard.c | ||
| 333 | X!Edrivers/acpi/bus.c | ||
| 334 | --> | ||
| 335 | !Edrivers/acpi/scan.c | ||
| 336 | !Idrivers/acpi/scan.c | ||
| 337 | <!-- No correct structured comments | ||
| 338 | X!Edrivers/acpi/pci_bind.c | ||
| 339 | --> | ||
| 340 | </sect1> | ||
| 341 | <sect1><title>Device drivers PnP support</title> | ||
| 342 | !Idrivers/pnp/core.c | ||
| 343 | <!-- No correct structured comments | ||
| 344 | X!Edrivers/pnp/system.c | ||
| 345 | --> | ||
| 346 | !Edrivers/pnp/card.c | ||
| 347 | !Idrivers/pnp/driver.c | ||
| 348 | !Edrivers/pnp/manager.c | ||
| 349 | !Edrivers/pnp/support.c | ||
| 350 | </sect1> | ||
| 351 | <sect1><title>Userspace IO devices</title> | ||
| 352 | !Edrivers/uio/uio.c | ||
| 353 | !Iinclude/linux/uio_driver.h | ||
| 354 | </sect1> | ||
| 355 | </chapter> | ||
| 356 | |||
| 357 | <chapter id="blkdev"> | 249 | <chapter id="blkdev"> |
| 358 | <title>Block Devices</title> | 250 | <title>Block Devices</title> |
| 359 | !Eblock/blk-core.c | 251 | !Eblock/blk-core.c |
| @@ -381,275 +273,6 @@ X!Edrivers/pnp/system.c | |||
| 381 | !Edrivers/char/misc.c | 273 | !Edrivers/char/misc.c |
| 382 | </chapter> | 274 | </chapter> |
| 383 | 275 | ||
| 384 | <chapter id="parportdev"> | ||
| 385 | <title>Parallel Port Devices</title> | ||
| 386 | !Iinclude/linux/parport.h | ||
| 387 | !Edrivers/parport/ieee1284.c | ||
| 388 | !Edrivers/parport/share.c | ||
| 389 | !Idrivers/parport/daisy.c | ||
| 390 | </chapter> | ||
| 391 | |||
| 392 | <chapter id="message_devices"> | ||
| 393 | <title>Message-based devices</title> | ||
| 394 | <sect1><title>Fusion message devices</title> | ||
| 395 | !Edrivers/message/fusion/mptbase.c | ||
| 396 | !Idrivers/message/fusion/mptbase.c | ||
| 397 | !Edrivers/message/fusion/mptscsih.c | ||
| 398 | !Idrivers/message/fusion/mptscsih.c | ||
| 399 | !Idrivers/message/fusion/mptctl.c | ||
| 400 | !Idrivers/message/fusion/mptspi.c | ||
| 401 | !Idrivers/message/fusion/mptfc.c | ||
| 402 | !Idrivers/message/fusion/mptlan.c | ||
| 403 | </sect1> | ||
| 404 | <sect1><title>I2O message devices</title> | ||
| 405 | !Iinclude/linux/i2o.h | ||
| 406 | !Idrivers/message/i2o/core.h | ||
| 407 | !Edrivers/message/i2o/iop.c | ||
| 408 | !Idrivers/message/i2o/iop.c | ||
| 409 | !Idrivers/message/i2o/config-osm.c | ||
| 410 | !Edrivers/message/i2o/exec-osm.c | ||
| 411 | !Idrivers/message/i2o/exec-osm.c | ||
| 412 | !Idrivers/message/i2o/bus-osm.c | ||
| 413 | !Edrivers/message/i2o/device.c | ||
| 414 | !Idrivers/message/i2o/device.c | ||
| 415 | !Idrivers/message/i2o/driver.c | ||
| 416 | !Idrivers/message/i2o/pci.c | ||
| 417 | !Idrivers/message/i2o/i2o_block.c | ||
| 418 | !Idrivers/message/i2o/i2o_scsi.c | ||
| 419 | !Idrivers/message/i2o/i2o_proc.c | ||
| 420 | </sect1> | ||
| 421 | </chapter> | ||
| 422 | |||
| 423 | <chapter id="snddev"> | ||
| 424 | <title>Sound Devices</title> | ||
| 425 | !Iinclude/sound/core.h | ||
| 426 | !Esound/sound_core.c | ||
| 427 | !Iinclude/sound/pcm.h | ||
| 428 | !Esound/core/pcm.c | ||
| 429 | !Esound/core/device.c | ||
| 430 | !Esound/core/info.c | ||
| 431 | !Esound/core/rawmidi.c | ||
| 432 | !Esound/core/sound.c | ||
| 433 | !Esound/core/memory.c | ||
| 434 | !Esound/core/pcm_memory.c | ||
| 435 | !Esound/core/init.c | ||
| 436 | !Esound/core/isadma.c | ||
| 437 | !Esound/core/control.c | ||
| 438 | !Esound/core/pcm_lib.c | ||
| 439 | !Esound/core/hwdep.c | ||
| 440 | !Esound/core/pcm_native.c | ||
| 441 | !Esound/core/memalloc.c | ||
| 442 | <!-- FIXME: Removed for now since no structured comments in source | ||
| 443 | X!Isound/sound_firmware.c | ||
| 444 | --> | ||
| 445 | </chapter> | ||
| 446 | |||
| 447 | <chapter id="uart16x50"> | ||
| 448 | <title>16x50 UART Driver</title> | ||
| 449 | !Iinclude/linux/serial_core.h | ||
| 450 | !Edrivers/serial/serial_core.c | ||
| 451 | !Edrivers/serial/8250.c | ||
| 452 | </chapter> | ||
| 453 | |||
| 454 | <chapter id="fbdev"> | ||
| 455 | <title>Frame Buffer Library</title> | ||
| 456 | |||
| 457 | <para> | ||
| 458 | The frame buffer drivers depend heavily on four data structures. | ||
| 459 | These structures are declared in include/linux/fb.h. They are | ||
| 460 | fb_info, fb_var_screeninfo, fb_fix_screeninfo and fb_monospecs. | ||
| 461 | The last three can be made available to and from userland. | ||
| 462 | </para> | ||
| 463 | |||
| 464 | <para> | ||
| 465 | fb_info defines the current state of a particular video card. | ||
| 466 | Inside fb_info, there exists a fb_ops structure which is a | ||
| 467 | collection of needed functions to make fbdev and fbcon work. | ||
| 468 | fb_info is only visible to the kernel. | ||
| 469 | </para> | ||
| 470 | |||
| 471 | <para> | ||
| 472 | fb_var_screeninfo is used to describe the features of a video card | ||
| 473 | that are user defined. With fb_var_screeninfo, things such as | ||
| 474 | depth and the resolution may be defined. | ||
| 475 | </para> | ||
| 476 | |||
| 477 | <para> | ||
| 478 | The next structure is fb_fix_screeninfo. This defines the | ||
| 479 | properties of a card that are created when a mode is set and can't | ||
| 480 | be changed otherwise. A good example of this is the start of the | ||
| 481 | frame buffer memory. This "locks" the address of the frame buffer | ||
| 482 | memory, so that it cannot be changed or moved. | ||
| 483 | </para> | ||
| 484 | |||
| 485 | <para> | ||
| 486 | The last structure is fb_monospecs. In the old API, there was | ||
| 487 | little importance for fb_monospecs. This allowed for forbidden things | ||
| 488 | such as setting a mode of 800x600 on a fix frequency monitor. With | ||
| 489 | the new API, fb_monospecs prevents such things, and if used | ||
| 490 | correctly, can prevent a monitor from being cooked. fb_monospecs | ||
| 491 | will not be useful until kernels 2.5.x. | ||
| 492 | </para> | ||
| 493 | |||
| 494 | <sect1><title>Frame Buffer Memory</title> | ||
| 495 | !Edrivers/video/fbmem.c | ||
| 496 | </sect1> | ||
| 497 | <!-- | ||
| 498 | <sect1><title>Frame Buffer Console</title> | ||
| 499 | X!Edrivers/video/console/fbcon.c | ||
| 500 | </sect1> | ||
| 501 | --> | ||
| 502 | <sect1><title>Frame Buffer Colormap</title> | ||
| 503 | !Edrivers/video/fbcmap.c | ||
| 504 | </sect1> | ||
| 505 | <!-- FIXME: | ||
| 506 | drivers/video/fbgen.c has no docs, which stuffs up the sgml. Comment | ||
| 507 | out until somebody adds docs. KAO | ||
| 508 | <sect1><title>Frame Buffer Generic Functions</title> | ||
| 509 | X!Idrivers/video/fbgen.c | ||
| 510 | </sect1> | ||
| 511 | KAO --> | ||
| 512 | <sect1><title>Frame Buffer Video Mode Database</title> | ||
| 513 | !Idrivers/video/modedb.c | ||
| 514 | !Edrivers/video/modedb.c | ||
| 515 | </sect1> | ||
| 516 | <sect1><title>Frame Buffer Macintosh Video Mode Database</title> | ||
| 517 | !Edrivers/video/macmodes.c | ||
| 518 | </sect1> | ||
| 519 | <sect1><title>Frame Buffer Fonts</title> | ||
| 520 | <para> | ||
| 521 | Refer to the file drivers/video/console/fonts.c for more information. | ||
| 522 | </para> | ||
| 523 | <!-- FIXME: Removed for now since no structured comments in source | ||
| 524 | X!Idrivers/video/console/fonts.c | ||
| 525 | --> | ||
| 526 | </sect1> | ||
| 527 | </chapter> | ||
| 528 | |||
| 529 | <chapter id="input_subsystem"> | ||
| 530 | <title>Input Subsystem</title> | ||
| 531 | !Iinclude/linux/input.h | ||
| 532 | !Edrivers/input/input.c | ||
| 533 | !Edrivers/input/ff-core.c | ||
| 534 | !Edrivers/input/ff-memless.c | ||
| 535 | </chapter> | ||
| 536 | |||
| 537 | <chapter id="spi"> | ||
| 538 | <title>Serial Peripheral Interface (SPI)</title> | ||
| 539 | <para> | ||
| 540 | SPI is the "Serial Peripheral Interface", widely used with | ||
| 541 | embedded systems because it is a simple and efficient | ||
| 542 | interface: basically a multiplexed shift register. | ||
| 543 | Its three signal wires hold a clock (SCK, often in the range | ||
| 544 | of 1-20 MHz), a "Master Out, Slave In" (MOSI) data line, and | ||
| 545 | a "Master In, Slave Out" (MISO) data line. | ||
| 546 | SPI is a full duplex protocol; for each bit shifted out the | ||
| 547 | MOSI line (one per clock) another is shifted in on the MISO line. | ||
| 548 | Those bits are assembled into words of various sizes on the | ||
| 549 | way to and from system memory. | ||
| 550 | An additional chipselect line is usually active-low (nCS); | ||
| 551 | four signals are normally used for each peripheral, plus | ||
| 552 | sometimes an interrupt. | ||
| 553 | </para> | ||
| 554 | <para> | ||
| 555 | The SPI bus facilities listed here provide a generalized | ||
| 556 | interface to declare SPI busses and devices, manage them | ||
| 557 | according to the standard Linux driver model, and perform | ||
| 558 | input/output operations. | ||
| 559 | At this time, only "master" side interfaces are supported, | ||
| 560 | where Linux talks to SPI peripherals and does not implement | ||
| 561 | such a peripheral itself. | ||
| 562 | (Interfaces to support implementing SPI slaves would | ||
| 563 | necessarily look different.) | ||
| 564 | </para> | ||
| 565 | <para> | ||
| 566 | The programming interface is structured around two kinds of driver, | ||
| 567 | and two kinds of device. | ||
| 568 | A "Controller Driver" abstracts the controller hardware, which may | ||
| 569 | be as simple as a set of GPIO pins or as complex as a pair of FIFOs | ||
| 570 | connected to dual DMA engines on the other side of the SPI shift | ||
| 571 | register (maximizing throughput). Such drivers bridge between | ||
| 572 | whatever bus they sit on (often the platform bus) and SPI, and | ||
| 573 | expose the SPI side of their device as a | ||
| 574 | <structname>struct spi_master</structname>. | ||
| 575 | SPI devices are children of that master, represented as a | ||
| 576 | <structname>struct spi_device</structname> and manufactured from | ||
| 577 | <structname>struct spi_board_info</structname> descriptors which | ||
| 578 | are usually provided by board-specific initialization code. | ||
| 579 | A <structname>struct spi_driver</structname> is called a | ||
| 580 | "Protocol Driver", and is bound to a spi_device using normal | ||
| 581 | driver model calls. | ||
| 582 | </para> | ||
| 583 | <para> | ||
| 584 | The I/O model is a set of queued messages. Protocol drivers | ||
| 585 | submit one or more <structname>struct spi_message</structname> | ||
| 586 | objects, which are processed and completed asynchronously. | ||
| 587 | (There are synchronous wrappers, however.) Messages are | ||
| 588 | built from one or more <structname>struct spi_transfer</structname> | ||
| 589 | objects, each of which wraps a full duplex SPI transfer. | ||
| 590 | A variety of protocol tweaking options are needed, because | ||
| 591 | different chips adopt very different policies for how they | ||
| 592 | use the bits transferred with SPI. | ||
| 593 | </para> | ||
| 594 | !Iinclude/linux/spi/spi.h | ||
| 595 | !Fdrivers/spi/spi.c spi_register_board_info | ||
| 596 | !Edrivers/spi/spi.c | ||
| 597 | </chapter> | ||
| 598 | |||
| 599 | <chapter id="i2c"> | ||
| 600 | <title>I<superscript>2</superscript>C and SMBus Subsystem</title> | ||
| 601 | |||
| 602 | <para> | ||
| 603 | I<superscript>2</superscript>C (or without fancy typography, "I2C") | ||
| 604 | is an acronym for the "Inter-IC" bus, a simple bus protocol which is | ||
| 605 | widely used where low data rate communications suffice. | ||
| 606 | Since it's also a licensed trademark, some vendors use another | ||
| 607 | name (such as "Two-Wire Interface", TWI) for the same bus. | ||
| 608 | I2C only needs two signals (SCL for clock, SDA for data), conserving | ||
| 609 | board real estate and minimizing signal quality issues. | ||
| 610 | Most I2C devices use seven bit addresses, and bus speeds of up | ||
| 611 | to 400 kHz; there's a high speed extension (3.4 MHz) that's not yet | ||
| 612 | found wide use. | ||
| 613 | I2C is a multi-master bus; open drain signaling is used to | ||
| 614 | arbitrate between masters, as well as to handshake and to | ||
| 615 | synchronize clocks from slower clients. | ||
| 616 | </para> | ||
| 617 | |||
| 618 | <para> | ||
| 619 | The Linux I2C programming interfaces support only the master | ||
| 620 | side of bus interactions, not the slave side. | ||
| 621 | The programming interface is structured around two kinds of driver, | ||
| 622 | and two kinds of device. | ||
| 623 | An I2C "Adapter Driver" abstracts the controller hardware; it binds | ||
| 624 | to a physical device (perhaps a PCI device or platform_device) and | ||
| 625 | exposes a <structname>struct i2c_adapter</structname> representing | ||
| 626 | each I2C bus segment it manages. | ||
| 627 | On each I2C bus segment will be I2C devices represented by a | ||
| 628 | <structname>struct i2c_client</structname>. Those devices will | ||
| 629 | be bound to a <structname>struct i2c_driver</structname>, | ||
| 630 | which should follow the standard Linux driver model. | ||
| 631 | (At this writing, a legacy model is more widely used.) | ||
| 632 | There are functions to perform various I2C protocol operations; at | ||
| 633 | this writing all such functions are usable only from task context. | ||
| 634 | </para> | ||
| 635 | |||
| 636 | <para> | ||
| 637 | The System Management Bus (SMBus) is a sibling protocol. Most SMBus | ||
| 638 | systems are also I2C conformant. The electrical constraints are | ||
| 639 | tighter for SMBus, and it standardizes particular protocol messages | ||
| 640 | and idioms. Controllers that support I2C can also support most | ||
| 641 | SMBus operations, but SMBus controllers don't support all the protocol | ||
| 642 | options that an I2C controller will. | ||
| 643 | There are functions to perform various SMBus protocol operations, | ||
| 644 | either using I2C primitives or by issuing SMBus commands to | ||
| 645 | i2c_adapter devices which don't support those I2C operations. | ||
| 646 | </para> | ||
| 647 | |||
| 648 | !Iinclude/linux/i2c.h | ||
| 649 | !Fdrivers/i2c/i2c-boardinfo.c i2c_register_board_info | ||
| 650 | !Edrivers/i2c/i2c-core.c | ||
| 651 | </chapter> | ||
| 652 | |||
| 653 | <chapter id="clk"> | 276 | <chapter id="clk"> |
| 654 | <title>Clock Framework</title> | 277 | <title>Clock Framework</title> |
| 655 | 278 | ||
diff --git a/Documentation/cgroups/cpusets.txt b/Documentation/cgroups/cpusets.txt index 5c86c258c791..0611e9528c7c 100644 --- a/Documentation/cgroups/cpusets.txt +++ b/Documentation/cgroups/cpusets.txt | |||
| @@ -142,7 +142,7 @@ into the rest of the kernel, none in performance critical paths: | |||
| 142 | - in fork and exit, to attach and detach a task from its cpuset. | 142 | - in fork and exit, to attach and detach a task from its cpuset. |
| 143 | - in sched_setaffinity, to mask the requested CPUs by what's | 143 | - in sched_setaffinity, to mask the requested CPUs by what's |
| 144 | allowed in that tasks cpuset. | 144 | allowed in that tasks cpuset. |
| 145 | - in sched.c migrate_all_tasks(), to keep migrating tasks within | 145 | - in sched.c migrate_live_tasks(), to keep migrating tasks within |
| 146 | the CPUs allowed by their cpuset, if possible. | 146 | the CPUs allowed by their cpuset, if possible. |
| 147 | - in the mbind and set_mempolicy system calls, to mask the requested | 147 | - in the mbind and set_mempolicy system calls, to mask the requested |
| 148 | Memory Nodes by what's allowed in that tasks cpuset. | 148 | Memory Nodes by what's allowed in that tasks cpuset. |
| @@ -175,6 +175,10 @@ files describing that cpuset: | |||
| 175 | - mem_exclusive flag: is memory placement exclusive? | 175 | - mem_exclusive flag: is memory placement exclusive? |
| 176 | - mem_hardwall flag: is memory allocation hardwalled | 176 | - mem_hardwall flag: is memory allocation hardwalled |
| 177 | - memory_pressure: measure of how much paging pressure in cpuset | 177 | - memory_pressure: measure of how much paging pressure in cpuset |
| 178 | - memory_spread_page flag: if set, spread page cache evenly on allowed nodes | ||
| 179 | - memory_spread_slab flag: if set, spread slab cache evenly on allowed nodes | ||
| 180 | - sched_load_balance flag: if set, load balance within CPUs on that cpuset | ||
| 181 | - sched_relax_domain_level: the searching range when migrating tasks | ||
| 178 | 182 | ||
| 179 | In addition, the root cpuset only has the following file: | 183 | In addition, the root cpuset only has the following file: |
| 180 | - memory_pressure_enabled flag: compute memory_pressure? | 184 | - memory_pressure_enabled flag: compute memory_pressure? |
| @@ -252,7 +256,7 @@ is causing. | |||
| 252 | 256 | ||
| 253 | This is useful both on tightly managed systems running a wide mix of | 257 | This is useful both on tightly managed systems running a wide mix of |
| 254 | submitted jobs, which may choose to terminate or re-prioritize jobs that | 258 | submitted jobs, which may choose to terminate or re-prioritize jobs that |
| 255 | are trying to use more memory than allowed on the nodes assigned them, | 259 | are trying to use more memory than allowed on the nodes assigned to them, |
| 256 | and with tightly coupled, long running, massively parallel scientific | 260 | and with tightly coupled, long running, massively parallel scientific |
| 257 | computing jobs that will dramatically fail to meet required performance | 261 | computing jobs that will dramatically fail to meet required performance |
| 258 | goals if they start to use more memory than allowed to them. | 262 | goals if they start to use more memory than allowed to them. |
| @@ -378,7 +382,7 @@ as cpusets and sched_setaffinity. | |||
| 378 | The algorithmic cost of load balancing and its impact on key shared | 382 | The algorithmic cost of load balancing and its impact on key shared |
| 379 | kernel data structures such as the task list increases more than | 383 | kernel data structures such as the task list increases more than |
| 380 | linearly with the number of CPUs being balanced. So the scheduler | 384 | linearly with the number of CPUs being balanced. So the scheduler |
| 381 | has support to partition the systems CPUs into a number of sched | 385 | has support to partition the systems CPUs into a number of sched |
| 382 | domains such that it only load balances within each sched domain. | 386 | domains such that it only load balances within each sched domain. |
| 383 | Each sched domain covers some subset of the CPUs in the system; | 387 | Each sched domain covers some subset of the CPUs in the system; |
| 384 | no two sched domains overlap; some CPUs might not be in any sched | 388 | no two sched domains overlap; some CPUs might not be in any sched |
| @@ -485,17 +489,22 @@ of CPUs allowed to a cpuset having 'sched_load_balance' enabled. | |||
| 485 | The internal kernel cpuset to scheduler interface passes from the | 489 | The internal kernel cpuset to scheduler interface passes from the |
| 486 | cpuset code to the scheduler code a partition of the load balanced | 490 | cpuset code to the scheduler code a partition of the load balanced |
| 487 | CPUs in the system. This partition is a set of subsets (represented | 491 | CPUs in the system. This partition is a set of subsets (represented |
| 488 | as an array of cpumask_t) of CPUs, pairwise disjoint, that cover all | 492 | as an array of struct cpumask) of CPUs, pairwise disjoint, that cover |
| 489 | the CPUs that must be load balanced. | 493 | all the CPUs that must be load balanced. |
| 490 | 494 | ||
| 491 | Whenever the 'sched_load_balance' flag changes, or CPUs come or go | 495 | The cpuset code builds a new such partition and passes it to the |
| 492 | from a cpuset with this flag enabled, or a cpuset with this flag | 496 | scheduler sched domain setup code, to have the sched domains rebuilt |
| 493 | enabled is removed, the cpuset code builds a new such partition and | 497 | as necessary, whenever: |
| 494 | passes it to the scheduler sched domain setup code, to have the sched | 498 | - the 'sched_load_balance' flag of a cpuset with non-empty CPUs changes, |
| 495 | domains rebuilt as necessary. | 499 | - or CPUs come or go from a cpuset with this flag enabled, |
| 500 | - or 'sched_relax_domain_level' value of a cpuset with non-empty CPUs | ||
| 501 | and with this flag enabled changes, | ||
| 502 | - or a cpuset with non-empty CPUs and with this flag enabled is removed, | ||
| 503 | - or a cpu is offlined/onlined. | ||
| 496 | 504 | ||
| 497 | This partition exactly defines what sched domains the scheduler should | 505 | This partition exactly defines what sched domains the scheduler should |
| 498 | setup - one sched domain for each element (cpumask_t) in the partition. | 506 | setup - one sched domain for each element (struct cpumask) in the |
| 507 | partition. | ||
| 499 | 508 | ||
| 500 | The scheduler remembers the currently active sched domain partitions. | 509 | The scheduler remembers the currently active sched domain partitions. |
| 501 | When the scheduler routine partition_sched_domains() is invoked from | 510 | When the scheduler routine partition_sched_domains() is invoked from |
| @@ -559,7 +568,7 @@ domain, the largest value among those is used. Be careful, if one | |||
| 559 | requests 0 and others are -1 then 0 is used. | 568 | requests 0 and others are -1 then 0 is used. |
| 560 | 569 | ||
| 561 | Note that modifying this file will have both good and bad effects, | 570 | Note that modifying this file will have both good and bad effects, |
| 562 | and whether it is acceptable or not will be depend on your situation. | 571 | and whether it is acceptable or not depends on your situation. |
| 563 | Don't modify this file if you are not sure. | 572 | Don't modify this file if you are not sure. |
| 564 | 573 | ||
| 565 | If your situation is: | 574 | If your situation is: |
| @@ -600,19 +609,15 @@ to allocate a page of memory for that task. | |||
| 600 | 609 | ||
| 601 | If a cpuset has its 'cpus' modified, then each task in that cpuset | 610 | If a cpuset has its 'cpus' modified, then each task in that cpuset |
| 602 | will have its allowed CPU placement changed immediately. Similarly, | 611 | will have its allowed CPU placement changed immediately. Similarly, |
| 603 | if a tasks pid is written to a cpusets 'tasks' file, in either its | 612 | if a tasks pid is written to another cpusets 'tasks' file, then its |
| 604 | current cpuset or another cpuset, then its allowed CPU placement is | 613 | allowed CPU placement is changed immediately. If such a task had been |
| 605 | changed immediately. If such a task had been bound to some subset | 614 | bound to some subset of its cpuset using the sched_setaffinity() call, |
| 606 | of its cpuset using the sched_setaffinity() call, the task will be | 615 | the task will be allowed to run on any CPU allowed in its new cpuset, |
| 607 | allowed to run on any CPU allowed in its new cpuset, negating the | 616 | negating the effect of the prior sched_setaffinity() call. |
| 608 | affect of the prior sched_setaffinity() call. | ||
| 609 | 617 | ||
| 610 | In summary, the memory placement of a task whose cpuset is changed is | 618 | In summary, the memory placement of a task whose cpuset is changed is |
| 611 | updated by the kernel, on the next allocation of a page for that task, | 619 | updated by the kernel, on the next allocation of a page for that task, |
| 612 | but the processor placement is not updated, until that tasks pid is | 620 | and the processor placement is updated immediately. |
| 613 | rewritten to the 'tasks' file of its cpuset. This is done to avoid | ||
| 614 | impacting the scheduler code in the kernel with a check for changes | ||
| 615 | in a tasks processor placement. | ||
| 616 | 621 | ||
| 617 | Normally, once a page is allocated (given a physical page | 622 | Normally, once a page is allocated (given a physical page |
| 618 | of main memory) then that page stays on whatever node it | 623 | of main memory) then that page stays on whatever node it |
| @@ -681,10 +686,14 @@ and then start a subshell 'sh' in that cpuset: | |||
| 681 | # The next line should display '/Charlie' | 686 | # The next line should display '/Charlie' |
| 682 | cat /proc/self/cpuset | 687 | cat /proc/self/cpuset |
| 683 | 688 | ||
| 684 | In the future, a C library interface to cpusets will likely be | 689 | There are ways to query or modify cpusets: |
| 685 | available. For now, the only way to query or modify cpusets is | 690 | - via the cpuset file system directly, using the various cd, mkdir, echo, |
| 686 | via the cpuset file system, using the various cd, mkdir, echo, cat, | 691 | cat, rmdir commands from the shell, or their equivalent from C. |
| 687 | rmdir commands from the shell, or their equivalent from C. | 692 | - via the C library libcpuset. |
| 693 | - via the C library libcgroup. | ||
| 694 | (http://sourceforge.net/proects/libcg/) | ||
| 695 | - via the python application cset. | ||
| 696 | (http://developer.novell.com/wiki/index.php/Cpuset) | ||
| 688 | 697 | ||
| 689 | The sched_setaffinity calls can also be done at the shell prompt using | 698 | The sched_setaffinity calls can also be done at the shell prompt using |
| 690 | SGI's runon or Robert Love's taskset. The mbind and set_mempolicy | 699 | SGI's runon or Robert Love's taskset. The mbind and set_mempolicy |
| @@ -756,7 +765,7 @@ mount -t cpuset X /dev/cpuset | |||
| 756 | 765 | ||
| 757 | is equivalent to | 766 | is equivalent to |
| 758 | 767 | ||
| 759 | mount -t cgroup -ocpuset X /dev/cpuset | 768 | mount -t cgroup -ocpuset,noprefix X /dev/cpuset |
| 760 | echo "/sbin/cpuset_release_agent" > /dev/cpuset/release_agent | 769 | echo "/sbin/cpuset_release_agent" > /dev/cpuset/release_agent |
| 761 | 770 | ||
| 762 | 2.2 Adding/removing cpus | 771 | 2.2 Adding/removing cpus |
diff --git a/Documentation/driver-model/device.txt b/Documentation/driver-model/device.txt index a05ec50f8004..a7cbfff40d07 100644 --- a/Documentation/driver-model/device.txt +++ b/Documentation/driver-model/device.txt | |||
| @@ -127,9 +127,11 @@ void unlock_device(struct device * dev); | |||
| 127 | Attributes | 127 | Attributes |
| 128 | ~~~~~~~~~~ | 128 | ~~~~~~~~~~ |
| 129 | struct device_attribute { | 129 | struct device_attribute { |
| 130 | struct attribute attr; | 130 | struct attribute attr; |
| 131 | ssize_t (*show)(struct device * dev, char * buf, size_t count, loff_t off); | 131 | ssize_t (*show)(struct device *dev, struct device_attribute *attr, |
| 132 | ssize_t (*store)(struct device * dev, const char * buf, size_t count, loff_t off); | 132 | char *buf); |
| 133 | ssize_t (*store)(struct device *dev, struct device_attribute *attr, | ||
| 134 | const char *buf, size_t count); | ||
| 133 | }; | 135 | }; |
| 134 | 136 | ||
| 135 | Attributes of devices can be exported via drivers using a simple | 137 | Attributes of devices can be exported via drivers using a simple |
diff --git a/Documentation/filesystems/sysfs.txt b/Documentation/filesystems/sysfs.txt index 9e9c348275a9..7e81e37c0b1e 100644 --- a/Documentation/filesystems/sysfs.txt +++ b/Documentation/filesystems/sysfs.txt | |||
| @@ -2,8 +2,10 @@ | |||
| 2 | sysfs - _The_ filesystem for exporting kernel objects. | 2 | sysfs - _The_ filesystem for exporting kernel objects. |
| 3 | 3 | ||
| 4 | Patrick Mochel <mochel@osdl.org> | 4 | Patrick Mochel <mochel@osdl.org> |
| 5 | Mike Murphy <mamurph@cs.clemson.edu> | ||
| 5 | 6 | ||
| 6 | 10 January 2003 | 7 | Revised: 22 February 2009 |
| 8 | Original: 10 January 2003 | ||
| 7 | 9 | ||
| 8 | 10 | ||
| 9 | What it is: | 11 | What it is: |
| @@ -64,12 +66,13 @@ An attribute definition is simply: | |||
| 64 | 66 | ||
| 65 | struct attribute { | 67 | struct attribute { |
| 66 | char * name; | 68 | char * name; |
| 69 | struct module *owner; | ||
| 67 | mode_t mode; | 70 | mode_t mode; |
| 68 | }; | 71 | }; |
| 69 | 72 | ||
| 70 | 73 | ||
| 71 | int sysfs_create_file(struct kobject * kobj, struct attribute * attr); | 74 | int sysfs_create_file(struct kobject * kobj, const struct attribute * attr); |
| 72 | void sysfs_remove_file(struct kobject * kobj, struct attribute * attr); | 75 | void sysfs_remove_file(struct kobject * kobj, const struct attribute * attr); |
| 73 | 76 | ||
| 74 | 77 | ||
| 75 | A bare attribute contains no means to read or write the value of the | 78 | A bare attribute contains no means to read or write the value of the |
| @@ -80,9 +83,11 @@ a specific object type. | |||
| 80 | For example, the driver model defines struct device_attribute like: | 83 | For example, the driver model defines struct device_attribute like: |
| 81 | 84 | ||
| 82 | struct device_attribute { | 85 | struct device_attribute { |
| 83 | struct attribute attr; | 86 | struct attribute attr; |
| 84 | ssize_t (*show)(struct device * dev, char * buf); | 87 | ssize_t (*show)(struct device *dev, struct device_attribute *attr, |
| 85 | ssize_t (*store)(struct device * dev, const char * buf); | 88 | char *buf); |
| 89 | ssize_t (*store)(struct device *dev, struct device_attribute *attr, | ||
| 90 | const char *buf, size_t count); | ||
| 86 | }; | 91 | }; |
| 87 | 92 | ||
| 88 | int device_create_file(struct device *, struct device_attribute *); | 93 | int device_create_file(struct device *, struct device_attribute *); |
| @@ -90,12 +95,8 @@ void device_remove_file(struct device *, struct device_attribute *); | |||
| 90 | 95 | ||
| 91 | It also defines this helper for defining device attributes: | 96 | It also defines this helper for defining device attributes: |
| 92 | 97 | ||
| 93 | #define DEVICE_ATTR(_name, _mode, _show, _store) \ | 98 | #define DEVICE_ATTR(_name, _mode, _show, _store) \ |
| 94 | struct device_attribute dev_attr_##_name = { \ | 99 | struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store) |
| 95 | .attr = {.name = __stringify(_name) , .mode = _mode }, \ | ||
| 96 | .show = _show, \ | ||
| 97 | .store = _store, \ | ||
| 98 | }; | ||
| 99 | 100 | ||
| 100 | For example, declaring | 101 | For example, declaring |
| 101 | 102 | ||
| @@ -107,9 +108,9 @@ static struct device_attribute dev_attr_foo = { | |||
| 107 | .attr = { | 108 | .attr = { |
| 108 | .name = "foo", | 109 | .name = "foo", |
| 109 | .mode = S_IWUSR | S_IRUGO, | 110 | .mode = S_IWUSR | S_IRUGO, |
| 111 | .show = show_foo, | ||
| 112 | .store = store_foo, | ||
| 110 | }, | 113 | }, |
| 111 | .show = show_foo, | ||
| 112 | .store = store_foo, | ||
| 113 | }; | 114 | }; |
| 114 | 115 | ||
| 115 | 116 | ||
| @@ -161,10 +162,12 @@ To read or write attributes, show() or store() methods must be | |||
| 161 | specified when declaring the attribute. The method types should be as | 162 | specified when declaring the attribute. The method types should be as |
| 162 | simple as those defined for device attributes: | 163 | simple as those defined for device attributes: |
| 163 | 164 | ||
| 164 | ssize_t (*show)(struct device * dev, char * buf); | 165 | ssize_t (*show)(struct device * dev, struct device_attribute * attr, |
| 165 | ssize_t (*store)(struct device * dev, const char * buf); | 166 | char * buf); |
| 167 | ssize_t (*store)(struct device * dev, struct device_attribute * attr, | ||
| 168 | const char * buf); | ||
| 166 | 169 | ||
| 167 | IOW, they should take only an object and a buffer as parameters. | 170 | IOW, they should take only an object, an attribute, and a buffer as parameters. |
| 168 | 171 | ||
| 169 | 172 | ||
| 170 | sysfs allocates a buffer of size (PAGE_SIZE) and passes it to the | 173 | sysfs allocates a buffer of size (PAGE_SIZE) and passes it to the |
| @@ -299,14 +302,16 @@ The following interface layers currently exist in sysfs: | |||
| 299 | Structure: | 302 | Structure: |
| 300 | 303 | ||
| 301 | struct device_attribute { | 304 | struct device_attribute { |
| 302 | struct attribute attr; | 305 | struct attribute attr; |
| 303 | ssize_t (*show)(struct device * dev, char * buf); | 306 | ssize_t (*show)(struct device *dev, struct device_attribute *attr, |
| 304 | ssize_t (*store)(struct device * dev, const char * buf); | 307 | char *buf); |
| 308 | ssize_t (*store)(struct device *dev, struct device_attribute *attr, | ||
| 309 | const char *buf, size_t count); | ||
| 305 | }; | 310 | }; |
| 306 | 311 | ||
| 307 | Declaring: | 312 | Declaring: |
| 308 | 313 | ||
| 309 | DEVICE_ATTR(_name, _str, _mode, _show, _store); | 314 | DEVICE_ATTR(_name, _mode, _show, _store); |
| 310 | 315 | ||
| 311 | Creation/Removal: | 316 | Creation/Removal: |
| 312 | 317 | ||
| @@ -342,7 +347,8 @@ Structure: | |||
| 342 | struct driver_attribute { | 347 | struct driver_attribute { |
| 343 | struct attribute attr; | 348 | struct attribute attr; |
| 344 | ssize_t (*show)(struct device_driver *, char * buf); | 349 | ssize_t (*show)(struct device_driver *, char * buf); |
| 345 | ssize_t (*store)(struct device_driver *, const char * buf); | 350 | ssize_t (*store)(struct device_driver *, const char * buf, |
| 351 | size_t count); | ||
| 346 | }; | 352 | }; |
| 347 | 353 | ||
| 348 | Declaring: | 354 | Declaring: |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index b182626739ea..319785b6dcb1 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
| @@ -134,7 +134,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
| 134 | 134 | ||
| 135 | acpi= [HW,ACPI,X86-64,i386] | 135 | acpi= [HW,ACPI,X86-64,i386] |
| 136 | Advanced Configuration and Power Interface | 136 | Advanced Configuration and Power Interface |
| 137 | Format: { force | off | ht | strict | noirq } | 137 | Format: { force | off | ht | strict | noirq | rsdt } |
| 138 | force -- enable ACPI if default was off | 138 | force -- enable ACPI if default was off |
| 139 | off -- disable ACPI if default was on | 139 | off -- disable ACPI if default was on |
| 140 | noirq -- do not use ACPI for IRQ routing | 140 | noirq -- do not use ACPI for IRQ routing |
diff --git a/MAINTAINERS b/MAINTAINERS index 06e03913d2d3..59fd2d1d94a7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -3334,8 +3334,8 @@ P: Jeremy Fitzhardinge | |||
| 3334 | M: jeremy@xensource.com | 3334 | M: jeremy@xensource.com |
| 3335 | P: Chris Wright | 3335 | P: Chris Wright |
| 3336 | M: chrisw@sous-sol.org | 3336 | M: chrisw@sous-sol.org |
| 3337 | P: Zachary Amsden | 3337 | P: Alok Kataria |
| 3338 | M: zach@vmware.com | 3338 | M: akataria@vmware.com |
| 3339 | P: Rusty Russell | 3339 | P: Rusty Russell |
| 3340 | M: rusty@rustcorp.com.au | 3340 | M: rusty@rustcorp.com.au |
| 3341 | L: virtualization@lists.osdl.org | 3341 | L: virtualization@lists.osdl.org |
| @@ -1,7 +1,7 @@ | |||
| 1 | VERSION = 2 | 1 | VERSION = 2 |
| 2 | PATCHLEVEL = 6 | 2 | PATCHLEVEL = 6 |
| 3 | SUBLEVEL = 29 | 3 | SUBLEVEL = 29 |
| 4 | EXTRAVERSION = -rc5 | 4 | EXTRAVERSION = -rc6 |
| 5 | NAME = Erotic Pickled Herring | 5 | NAME = Erotic Pickled Herring |
| 6 | 6 | ||
| 7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
| @@ -188,7 +188,7 @@ CONFIGURING the kernel: | |||
| 188 | values to random values. | 188 | values to random values. |
| 189 | 189 | ||
| 190 | You can find more information on using the Linux kernel config tools | 190 | You can find more information on using the Linux kernel config tools |
| 191 | in Documentation/kbuild/make-configs.txt. | 191 | in Documentation/kbuild/kconfig.txt. |
| 192 | 192 | ||
| 193 | NOTES on "make config": | 193 | NOTES on "make config": |
| 194 | - having unnecessary drivers will make the kernel bigger, and can | 194 | - having unnecessary drivers will make the kernel bigger, and can |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 6183aeccecf1..4eb45c012498 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
| @@ -221,7 +221,11 @@ config IA64_HP_SIM | |||
| 221 | 221 | ||
| 222 | config IA64_XEN_GUEST | 222 | config IA64_XEN_GUEST |
| 223 | bool "Xen guest" | 223 | bool "Xen guest" |
| 224 | select SWIOTLB | ||
| 224 | depends on XEN | 225 | depends on XEN |
| 226 | help | ||
| 227 | Build a kernel that runs on Xen guest domain. At this moment only | ||
| 228 | 16KB page size in supported. | ||
| 225 | 229 | ||
| 226 | endchoice | 230 | endchoice |
| 227 | 231 | ||
| @@ -479,8 +483,7 @@ config HOLES_IN_ZONE | |||
| 479 | default y if VIRTUAL_MEM_MAP | 483 | default y if VIRTUAL_MEM_MAP |
| 480 | 484 | ||
| 481 | config HAVE_ARCH_EARLY_PFN_TO_NID | 485 | config HAVE_ARCH_EARLY_PFN_TO_NID |
| 482 | def_bool y | 486 | def_bool NUMA && SPARSEMEM |
| 483 | depends on NEED_MULTIPLE_NODES | ||
| 484 | 487 | ||
| 485 | config HAVE_ARCH_NODEDATA_EXTENSION | 488 | config HAVE_ARCH_NODEDATA_EXTENSION |
| 486 | def_bool y | 489 | def_bool y |
diff --git a/arch/ia64/configs/xen_domu_defconfig b/arch/ia64/configs/xen_domu_defconfig new file mode 100644 index 000000000000..0bb0714dc19d --- /dev/null +++ b/arch/ia64/configs/xen_domu_defconfig | |||
| @@ -0,0 +1,1601 @@ | |||
| 1 | # | ||
| 2 | # Automatically generated make config: don't edit | ||
| 3 | # Linux kernel version: 2.6.29-rc1 | ||
| 4 | # Fri Jan 16 11:49:59 2009 | ||
| 5 | # | ||
| 6 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
| 7 | |||
| 8 | # | ||
| 9 | # General setup | ||
| 10 | # | ||
| 11 | CONFIG_EXPERIMENTAL=y | ||
| 12 | CONFIG_LOCK_KERNEL=y | ||
| 13 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
| 14 | CONFIG_LOCALVERSION="" | ||
| 15 | CONFIG_LOCALVERSION_AUTO=y | ||
| 16 | CONFIG_SWAP=y | ||
| 17 | CONFIG_SYSVIPC=y | ||
| 18 | CONFIG_SYSVIPC_SYSCTL=y | ||
| 19 | CONFIG_POSIX_MQUEUE=y | ||
| 20 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
| 21 | # CONFIG_TASKSTATS is not set | ||
| 22 | # CONFIG_AUDIT is not set | ||
| 23 | CONFIG_IKCONFIG=y | ||
| 24 | CONFIG_IKCONFIG_PROC=y | ||
| 25 | CONFIG_LOG_BUF_SHIFT=20 | ||
| 26 | CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y | ||
| 27 | # CONFIG_GROUP_SCHED is not set | ||
| 28 | |||
| 29 | # | ||
| 30 | # Control Group support | ||
| 31 | # | ||
| 32 | # CONFIG_CGROUPS is not set | ||
| 33 | CONFIG_SYSFS_DEPRECATED=y | ||
| 34 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
| 35 | # CONFIG_RELAY is not set | ||
| 36 | CONFIG_NAMESPACES=y | ||
| 37 | # CONFIG_UTS_NS is not set | ||
| 38 | # CONFIG_IPC_NS is not set | ||
| 39 | # CONFIG_USER_NS is not set | ||
| 40 | # CONFIG_PID_NS is not set | ||
| 41 | CONFIG_BLK_DEV_INITRD=y | ||
| 42 | CONFIG_INITRAMFS_SOURCE="" | ||
| 43 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
| 44 | CONFIG_SYSCTL=y | ||
| 45 | # CONFIG_EMBEDDED is not set | ||
| 46 | CONFIG_SYSCTL_SYSCALL=y | ||
| 47 | CONFIG_KALLSYMS=y | ||
| 48 | CONFIG_KALLSYMS_ALL=y | ||
| 49 | CONFIG_KALLSYMS_STRIP_GENERATED=y | ||
| 50 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
| 51 | CONFIG_HOTPLUG=y | ||
| 52 | CONFIG_PRINTK=y | ||
| 53 | CONFIG_BUG=y | ||
| 54 | CONFIG_ELF_CORE=y | ||
| 55 | CONFIG_COMPAT_BRK=y | ||
| 56 | CONFIG_BASE_FULL=y | ||
| 57 | CONFIG_FUTEX=y | ||
| 58 | CONFIG_ANON_INODES=y | ||
| 59 | CONFIG_EPOLL=y | ||
| 60 | CONFIG_SIGNALFD=y | ||
| 61 | CONFIG_TIMERFD=y | ||
| 62 | CONFIG_EVENTFD=y | ||
| 63 | CONFIG_SHMEM=y | ||
| 64 | CONFIG_AIO=y | ||
| 65 | CONFIG_VM_EVENT_COUNTERS=y | ||
| 66 | CONFIG_PCI_QUIRKS=y | ||
| 67 | CONFIG_SLUB_DEBUG=y | ||
| 68 | # CONFIG_SLAB is not set | ||
| 69 | CONFIG_SLUB=y | ||
| 70 | # CONFIG_SLOB is not set | ||
| 71 | # CONFIG_PROFILING is not set | ||
| 72 | CONFIG_HAVE_OPROFILE=y | ||
| 73 | # CONFIG_KPROBES is not set | ||
| 74 | CONFIG_HAVE_KPROBES=y | ||
| 75 | CONFIG_HAVE_KRETPROBES=y | ||
| 76 | CONFIG_HAVE_ARCH_TRACEHOOK=y | ||
| 77 | CONFIG_HAVE_DMA_ATTRS=y | ||
| 78 | CONFIG_USE_GENERIC_SMP_HELPERS=y | ||
| 79 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | ||
| 80 | CONFIG_SLABINFO=y | ||
| 81 | CONFIG_RT_MUTEXES=y | ||
| 82 | CONFIG_BASE_SMALL=0 | ||
| 83 | CONFIG_MODULES=y | ||
| 84 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
| 85 | CONFIG_MODULE_UNLOAD=y | ||
| 86 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
| 87 | CONFIG_MODVERSIONS=y | ||
| 88 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
| 89 | CONFIG_STOP_MACHINE=y | ||
| 90 | CONFIG_BLOCK=y | ||
| 91 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
| 92 | # CONFIG_BLK_DEV_BSG is not set | ||
| 93 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
| 94 | |||
| 95 | # | ||
| 96 | # IO Schedulers | ||
| 97 | # | ||
| 98 | CONFIG_IOSCHED_NOOP=y | ||
| 99 | CONFIG_IOSCHED_AS=y | ||
| 100 | CONFIG_IOSCHED_DEADLINE=y | ||
| 101 | CONFIG_IOSCHED_CFQ=y | ||
| 102 | CONFIG_DEFAULT_AS=y | ||
| 103 | # CONFIG_DEFAULT_DEADLINE is not set | ||
| 104 | # CONFIG_DEFAULT_CFQ is not set | ||
| 105 | # CONFIG_DEFAULT_NOOP is not set | ||
| 106 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
| 107 | CONFIG_CLASSIC_RCU=y | ||
| 108 | # CONFIG_TREE_RCU is not set | ||
| 109 | # CONFIG_PREEMPT_RCU is not set | ||
| 110 | # CONFIG_TREE_RCU_TRACE is not set | ||
| 111 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
| 112 | CONFIG_FREEZER=y | ||
| 113 | |||
| 114 | # | ||
| 115 | # Processor type and features | ||
| 116 | # | ||
| 117 | CONFIG_IA64=y | ||
| 118 | CONFIG_64BIT=y | ||
| 119 | CONFIG_ZONE_DMA=y | ||
| 120 | CONFIG_QUICKLIST=y | ||
| 121 | CONFIG_MMU=y | ||
| 122 | CONFIG_SWIOTLB=y | ||
| 123 | CONFIG_IOMMU_HELPER=y | ||
| 124 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
| 125 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y | ||
| 126 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
| 127 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
| 128 | CONFIG_GENERIC_TIME=y | ||
| 129 | CONFIG_GENERIC_TIME_VSYSCALL=y | ||
| 130 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y | ||
| 131 | CONFIG_DMI=y | ||
| 132 | CONFIG_EFI=y | ||
| 133 | CONFIG_GENERIC_IOMAP=y | ||
| 134 | CONFIG_SCHED_OMIT_FRAME_POINTER=y | ||
| 135 | CONFIG_AUDIT_ARCH=y | ||
| 136 | CONFIG_PARAVIRT_GUEST=y | ||
| 137 | CONFIG_PARAVIRT=y | ||
| 138 | CONFIG_XEN=y | ||
| 139 | CONFIG_XEN_XENCOMM=y | ||
| 140 | CONFIG_NO_IDLE_HZ=y | ||
| 141 | # CONFIG_IA64_GENERIC is not set | ||
| 142 | # CONFIG_IA64_DIG is not set | ||
| 143 | # CONFIG_IA64_DIG_VTD is not set | ||
| 144 | # CONFIG_IA64_HP_ZX1 is not set | ||
| 145 | # CONFIG_IA64_HP_ZX1_SWIOTLB is not set | ||
| 146 | # CONFIG_IA64_SGI_SN2 is not set | ||
| 147 | # CONFIG_IA64_SGI_UV is not set | ||
| 148 | # CONFIG_IA64_HP_SIM is not set | ||
| 149 | CONFIG_IA64_XEN_GUEST=y | ||
| 150 | # CONFIG_ITANIUM is not set | ||
| 151 | CONFIG_MCKINLEY=y | ||
| 152 | # CONFIG_IA64_PAGE_SIZE_4KB is not set | ||
| 153 | # CONFIG_IA64_PAGE_SIZE_8KB is not set | ||
| 154 | CONFIG_IA64_PAGE_SIZE_16KB=y | ||
| 155 | # CONFIG_IA64_PAGE_SIZE_64KB is not set | ||
| 156 | CONFIG_PGTABLE_3=y | ||
| 157 | # CONFIG_PGTABLE_4 is not set | ||
| 158 | CONFIG_HZ=250 | ||
| 159 | # CONFIG_HZ_100 is not set | ||
| 160 | CONFIG_HZ_250=y | ||
| 161 | # CONFIG_HZ_300 is not set | ||
| 162 | # CONFIG_HZ_1000 is not set | ||
| 163 | # CONFIG_SCHED_HRTICK is not set | ||
| 164 | CONFIG_IA64_L1_CACHE_SHIFT=7 | ||
| 165 | CONFIG_IA64_CYCLONE=y | ||
| 166 | CONFIG_IOSAPIC=y | ||
| 167 | CONFIG_FORCE_MAX_ZONEORDER=17 | ||
| 168 | # CONFIG_VIRT_CPU_ACCOUNTING is not set | ||
| 169 | CONFIG_SMP=y | ||
| 170 | CONFIG_NR_CPUS=16 | ||
| 171 | CONFIG_HOTPLUG_CPU=y | ||
| 172 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
| 173 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | ||
| 174 | # CONFIG_SCHED_SMT is not set | ||
| 175 | CONFIG_PERMIT_BSP_REMOVE=y | ||
| 176 | CONFIG_FORCE_CPEI_RETARGET=y | ||
| 177 | CONFIG_PREEMPT_NONE=y | ||
| 178 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
| 179 | # CONFIG_PREEMPT is not set | ||
| 180 | CONFIG_SELECT_MEMORY_MODEL=y | ||
| 181 | CONFIG_FLATMEM_MANUAL=y | ||
| 182 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
| 183 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
| 184 | CONFIG_FLATMEM=y | ||
| 185 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
| 186 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y | ||
| 187 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
| 188 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
| 189 | CONFIG_MIGRATION=y | ||
| 190 | CONFIG_PHYS_ADDR_T_64BIT=y | ||
| 191 | CONFIG_ZONE_DMA_FLAG=1 | ||
| 192 | CONFIG_BOUNCE=y | ||
| 193 | CONFIG_NR_QUICK=1 | ||
| 194 | CONFIG_VIRT_TO_BUS=y | ||
| 195 | CONFIG_UNEVICTABLE_LRU=y | ||
| 196 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | ||
| 197 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y | ||
| 198 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
| 199 | CONFIG_ARCH_SPARSEMEM_ENABLE=y | ||
| 200 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
| 201 | CONFIG_VIRTUAL_MEM_MAP=y | ||
| 202 | CONFIG_HOLES_IN_ZONE=y | ||
| 203 | # CONFIG_IA32_SUPPORT is not set | ||
| 204 | # CONFIG_COMPAT_FOR_U64_ALIGNMENT is not set | ||
| 205 | CONFIG_IA64_MCA_RECOVERY=y | ||
| 206 | CONFIG_PERFMON=y | ||
| 207 | CONFIG_IA64_PALINFO=y | ||
| 208 | # CONFIG_IA64_MC_ERR_INJECT is not set | ||
| 209 | # CONFIG_IA64_ESI is not set | ||
| 210 | # CONFIG_IA64_HP_AML_NFW is not set | ||
| 211 | CONFIG_KEXEC=y | ||
| 212 | # CONFIG_CRASH_DUMP is not set | ||
| 213 | |||
| 214 | # | ||
| 215 | # Firmware Drivers | ||
| 216 | # | ||
| 217 | # CONFIG_FIRMWARE_MEMMAP is not set | ||
| 218 | CONFIG_EFI_VARS=y | ||
| 219 | CONFIG_EFI_PCDP=y | ||
| 220 | CONFIG_DMIID=y | ||
| 221 | CONFIG_BINFMT_ELF=y | ||
| 222 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | ||
| 223 | # CONFIG_HAVE_AOUT is not set | ||
| 224 | CONFIG_BINFMT_MISC=m | ||
| 225 | |||
| 226 | # | ||
| 227 | # Power management and ACPI options | ||
| 228 | # | ||
| 229 | CONFIG_PM=y | ||
| 230 | # CONFIG_PM_DEBUG is not set | ||
| 231 | CONFIG_PM_SLEEP=y | ||
| 232 | CONFIG_SUSPEND=y | ||
| 233 | CONFIG_SUSPEND_FREEZER=y | ||
| 234 | CONFIG_ACPI=y | ||
| 235 | CONFIG_ACPI_SLEEP=y | ||
| 236 | CONFIG_ACPI_PROCFS=y | ||
| 237 | CONFIG_ACPI_PROCFS_POWER=y | ||
| 238 | CONFIG_ACPI_SYSFS_POWER=y | ||
| 239 | CONFIG_ACPI_PROC_EVENT=y | ||
| 240 | CONFIG_ACPI_BUTTON=m | ||
| 241 | CONFIG_ACPI_FAN=m | ||
| 242 | # CONFIG_ACPI_DOCK is not set | ||
| 243 | CONFIG_ACPI_PROCESSOR=m | ||
| 244 | CONFIG_ACPI_HOTPLUG_CPU=y | ||
| 245 | CONFIG_ACPI_THERMAL=m | ||
| 246 | # CONFIG_ACPI_CUSTOM_DSDT is not set | ||
| 247 | CONFIG_ACPI_BLACKLIST_YEAR=0 | ||
| 248 | # CONFIG_ACPI_DEBUG is not set | ||
| 249 | # CONFIG_ACPI_PCI_SLOT is not set | ||
| 250 | CONFIG_ACPI_SYSTEM=y | ||
| 251 | CONFIG_ACPI_CONTAINER=m | ||
| 252 | |||
| 253 | # | ||
| 254 | # CPU Frequency scaling | ||
| 255 | # | ||
| 256 | # CONFIG_CPU_FREQ is not set | ||
| 257 | |||
| 258 | # | ||
| 259 | # Bus options (PCI, PCMCIA) | ||
| 260 | # | ||
| 261 | CONFIG_PCI=y | ||
| 262 | CONFIG_PCI_DOMAINS=y | ||
| 263 | CONFIG_PCI_SYSCALL=y | ||
| 264 | # CONFIG_PCIEPORTBUS is not set | ||
| 265 | CONFIG_ARCH_SUPPORTS_MSI=y | ||
| 266 | # CONFIG_PCI_MSI is not set | ||
| 267 | CONFIG_PCI_LEGACY=y | ||
| 268 | # CONFIG_PCI_DEBUG is not set | ||
| 269 | # CONFIG_PCI_STUB is not set | ||
| 270 | CONFIG_HOTPLUG_PCI=m | ||
| 271 | # CONFIG_HOTPLUG_PCI_FAKE is not set | ||
| 272 | CONFIG_HOTPLUG_PCI_ACPI=m | ||
| 273 | # CONFIG_HOTPLUG_PCI_ACPI_IBM is not set | ||
| 274 | # CONFIG_HOTPLUG_PCI_CPCI is not set | ||
| 275 | # CONFIG_HOTPLUG_PCI_SHPC is not set | ||
| 276 | # CONFIG_PCCARD is not set | ||
| 277 | CONFIG_NET=y | ||
| 278 | |||
| 279 | # | ||
| 280 | # Networking options | ||
| 281 | # | ||
| 282 | # CONFIG_NET_NS is not set | ||
| 283 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
| 284 | CONFIG_PACKET=y | ||
| 285 | # CONFIG_PACKET_MMAP is not set | ||
| 286 | CONFIG_UNIX=y | ||
| 287 | CONFIG_XFRM=y | ||
| 288 | # CONFIG_XFRM_USER is not set | ||
| 289 | # CONFIG_XFRM_SUB_POLICY is not set | ||
| 290 | # CONFIG_XFRM_MIGRATE is not set | ||
| 291 | # CONFIG_XFRM_STATISTICS is not set | ||
| 292 | # CONFIG_NET_KEY is not set | ||
| 293 | CONFIG_INET=y | ||
| 294 | CONFIG_IP_MULTICAST=y | ||
| 295 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
| 296 | CONFIG_IP_FIB_HASH=y | ||
| 297 | # CONFIG_IP_PNP is not set | ||
| 298 | # CONFIG_NET_IPIP is not set | ||
| 299 | # CONFIG_NET_IPGRE is not set | ||
| 300 | # CONFIG_IP_MROUTE is not set | ||
| 301 | CONFIG_ARPD=y | ||
| 302 | CONFIG_SYN_COOKIES=y | ||
| 303 | # CONFIG_INET_AH is not set | ||
| 304 | # CONFIG_INET_ESP is not set | ||
| 305 | # CONFIG_INET_IPCOMP is not set | ||
| 306 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
| 307 | # CONFIG_INET_TUNNEL is not set | ||
| 308 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
| 309 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
| 310 | CONFIG_INET_XFRM_MODE_BEET=y | ||
| 311 | # CONFIG_INET_LRO is not set | ||
| 312 | CONFIG_INET_DIAG=y | ||
| 313 | CONFIG_INET_TCP_DIAG=y | ||
| 314 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
| 315 | CONFIG_TCP_CONG_CUBIC=y | ||
| 316 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
| 317 | # CONFIG_TCP_MD5SIG is not set | ||
| 318 | # CONFIG_IPV6 is not set | ||
| 319 | # CONFIG_NETWORK_SECMARK is not set | ||
| 320 | # CONFIG_NETFILTER is not set | ||
| 321 | # CONFIG_IP_DCCP is not set | ||
| 322 | # CONFIG_IP_SCTP is not set | ||
| 323 | # CONFIG_TIPC is not set | ||
| 324 | # CONFIG_ATM is not set | ||
| 325 | # CONFIG_BRIDGE is not set | ||
| 326 | # CONFIG_NET_DSA is not set | ||
| 327 | # CONFIG_VLAN_8021Q is not set | ||
| 328 | # CONFIG_DECNET is not set | ||
| 329 | # CONFIG_LLC2 is not set | ||
| 330 | # CONFIG_IPX is not set | ||
| 331 | # CONFIG_ATALK is not set | ||
| 332 | # CONFIG_X25 is not set | ||
| 333 | # CONFIG_LAPB is not set | ||
| 334 | # CONFIG_ECONET is not set | ||
| 335 | # CONFIG_WAN_ROUTER is not set | ||
| 336 | # CONFIG_NET_SCHED is not set | ||
| 337 | # CONFIG_DCB is not set | ||
| 338 | |||
| 339 | # | ||
| 340 | # Network testing | ||
| 341 | # | ||
| 342 | # CONFIG_NET_PKTGEN is not set | ||
| 343 | # CONFIG_HAMRADIO is not set | ||
| 344 | # CONFIG_CAN is not set | ||
| 345 | # CONFIG_IRDA is not set | ||
| 346 | # CONFIG_BT is not set | ||
| 347 | # CONFIG_AF_RXRPC is not set | ||
| 348 | # CONFIG_PHONET is not set | ||
| 349 | # CONFIG_WIRELESS is not set | ||
| 350 | # CONFIG_WIMAX is not set | ||
| 351 | # CONFIG_RFKILL is not set | ||
| 352 | # CONFIG_NET_9P is not set | ||
| 353 | |||
| 354 | # | ||
| 355 | # Device Drivers | ||
| 356 | # | ||
| 357 | |||
| 358 | # | ||
| 359 | # Generic Driver Options | ||
| 360 | # | ||
| 361 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
| 362 | CONFIG_STANDALONE=y | ||
| 363 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
| 364 | CONFIG_FW_LOADER=y | ||
| 365 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
| 366 | CONFIG_EXTRA_FIRMWARE="" | ||
| 367 | # CONFIG_DEBUG_DRIVER is not set | ||
| 368 | # CONFIG_DEBUG_DEVRES is not set | ||
| 369 | # CONFIG_SYS_HYPERVISOR is not set | ||
| 370 | # CONFIG_CONNECTOR is not set | ||
| 371 | # CONFIG_MTD is not set | ||
| 372 | # CONFIG_PARPORT is not set | ||
| 373 | CONFIG_PNP=y | ||
| 374 | CONFIG_PNP_DEBUG_MESSAGES=y | ||
| 375 | |||
| 376 | # | ||
| 377 | # Protocols | ||
| 378 | # | ||
| 379 | CONFIG_PNPACPI=y | ||
| 380 | CONFIG_BLK_DEV=y | ||
| 381 | # CONFIG_BLK_CPQ_DA is not set | ||
| 382 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
| 383 | # CONFIG_BLK_DEV_DAC960 is not set | ||
| 384 | # CONFIG_BLK_DEV_UMEM is not set | ||
| 385 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
| 386 | CONFIG_BLK_DEV_LOOP=m | ||
| 387 | CONFIG_BLK_DEV_CRYPTOLOOP=m | ||
| 388 | CONFIG_BLK_DEV_NBD=m | ||
| 389 | # CONFIG_BLK_DEV_SX8 is not set | ||
| 390 | # CONFIG_BLK_DEV_UB is not set | ||
| 391 | CONFIG_BLK_DEV_RAM=y | ||
| 392 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
| 393 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
| 394 | # CONFIG_BLK_DEV_XIP is not set | ||
| 395 | # CONFIG_CDROM_PKTCDVD is not set | ||
| 396 | # CONFIG_ATA_OVER_ETH is not set | ||
| 397 | CONFIG_XEN_BLKDEV_FRONTEND=y | ||
| 398 | # CONFIG_BLK_DEV_HD is not set | ||
| 399 | CONFIG_MISC_DEVICES=y | ||
| 400 | # CONFIG_PHANTOM is not set | ||
| 401 | # CONFIG_EEPROM_93CX6 is not set | ||
| 402 | # CONFIG_SGI_IOC4 is not set | ||
| 403 | # CONFIG_TIFM_CORE is not set | ||
| 404 | # CONFIG_ICS932S401 is not set | ||
| 405 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
| 406 | # CONFIG_HP_ILO is not set | ||
| 407 | # CONFIG_C2PORT is not set | ||
| 408 | CONFIG_HAVE_IDE=y | ||
| 409 | CONFIG_IDE=y | ||
| 410 | |||
| 411 | # | ||
| 412 | # Please see Documentation/ide/ide.txt for help/info on IDE drives | ||
| 413 | # | ||
| 414 | CONFIG_IDE_TIMINGS=y | ||
| 415 | CONFIG_IDE_ATAPI=y | ||
| 416 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
| 417 | CONFIG_IDE_GD=y | ||
| 418 | CONFIG_IDE_GD_ATA=y | ||
| 419 | # CONFIG_IDE_GD_ATAPI is not set | ||
| 420 | CONFIG_BLK_DEV_IDECD=y | ||
| 421 | CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y | ||
| 422 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
| 423 | # CONFIG_BLK_DEV_IDEACPI is not set | ||
| 424 | # CONFIG_IDE_TASK_IOCTL is not set | ||
| 425 | CONFIG_IDE_PROC_FS=y | ||
| 426 | |||
| 427 | # | ||
| 428 | # IDE chipset support/bugfixes | ||
| 429 | # | ||
| 430 | # CONFIG_IDE_GENERIC is not set | ||
| 431 | # CONFIG_BLK_DEV_PLATFORM is not set | ||
| 432 | # CONFIG_BLK_DEV_IDEPNP is not set | ||
| 433 | CONFIG_BLK_DEV_IDEDMA_SFF=y | ||
| 434 | |||
| 435 | # | ||
| 436 | # PCI IDE chipsets support | ||
| 437 | # | ||
| 438 | CONFIG_BLK_DEV_IDEPCI=y | ||
| 439 | CONFIG_IDEPCI_PCIBUS_ORDER=y | ||
| 440 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
| 441 | CONFIG_BLK_DEV_GENERIC=y | ||
| 442 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
| 443 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
| 444 | # CONFIG_BLK_DEV_AEC62XX is not set | ||
| 445 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
| 446 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
| 447 | CONFIG_BLK_DEV_CMD64X=y | ||
| 448 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
| 449 | # CONFIG_BLK_DEV_CS5520 is not set | ||
| 450 | # CONFIG_BLK_DEV_CS5530 is not set | ||
| 451 | # CONFIG_BLK_DEV_HPT366 is not set | ||
| 452 | # CONFIG_BLK_DEV_JMICRON is not set | ||
| 453 | # CONFIG_BLK_DEV_SC1200 is not set | ||
| 454 | CONFIG_BLK_DEV_PIIX=y | ||
| 455 | # CONFIG_BLK_DEV_IT8172 is not set | ||
| 456 | # CONFIG_BLK_DEV_IT8213 is not set | ||
| 457 | # CONFIG_BLK_DEV_IT821X is not set | ||
| 458 | # CONFIG_BLK_DEV_NS87415 is not set | ||
| 459 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
| 460 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
| 461 | # CONFIG_BLK_DEV_SVWKS is not set | ||
| 462 | # CONFIG_BLK_DEV_SIIMAGE is not set | ||
| 463 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
| 464 | # CONFIG_BLK_DEV_TRM290 is not set | ||
| 465 | # CONFIG_BLK_DEV_VIA82CXXX is not set | ||
| 466 | # CONFIG_BLK_DEV_TC86C001 is not set | ||
| 467 | CONFIG_BLK_DEV_IDEDMA=y | ||
| 468 | |||
| 469 | # | ||
| 470 | # SCSI device support | ||
| 471 | # | ||
| 472 | # CONFIG_RAID_ATTRS is not set | ||
| 473 | CONFIG_SCSI=y | ||
| 474 | CONFIG_SCSI_DMA=y | ||
| 475 | # CONFIG_SCSI_TGT is not set | ||
| 476 | CONFIG_SCSI_NETLINK=y | ||
| 477 | CONFIG_SCSI_PROC_FS=y | ||
| 478 | |||
| 479 | # | ||
| 480 | # SCSI support type (disk, tape, CD-ROM) | ||
| 481 | # | ||
| 482 | CONFIG_BLK_DEV_SD=y | ||
| 483 | CONFIG_CHR_DEV_ST=m | ||
| 484 | # CONFIG_CHR_DEV_OSST is not set | ||
| 485 | CONFIG_BLK_DEV_SR=m | ||
| 486 | # CONFIG_BLK_DEV_SR_VENDOR is not set | ||
| 487 | CONFIG_CHR_DEV_SG=m | ||
| 488 | # CONFIG_CHR_DEV_SCH is not set | ||
| 489 | |||
| 490 | # | ||
| 491 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
| 492 | # | ||
| 493 | # CONFIG_SCSI_MULTI_LUN is not set | ||
| 494 | # CONFIG_SCSI_CONSTANTS is not set | ||
| 495 | # CONFIG_SCSI_LOGGING is not set | ||
| 496 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
| 497 | CONFIG_SCSI_WAIT_SCAN=m | ||
| 498 | |||
| 499 | # | ||
| 500 | # SCSI Transports | ||
| 501 | # | ||
| 502 | CONFIG_SCSI_SPI_ATTRS=y | ||
| 503 | CONFIG_SCSI_FC_ATTRS=y | ||
| 504 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
| 505 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
| 506 | # CONFIG_SCSI_SRP_ATTRS is not set | ||
| 507 | CONFIG_SCSI_LOWLEVEL=y | ||
| 508 | # CONFIG_ISCSI_TCP is not set | ||
| 509 | # CONFIG_SCSI_CXGB3_ISCSI is not set | ||
| 510 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
| 511 | # CONFIG_SCSI_3W_9XXX is not set | ||
| 512 | # CONFIG_SCSI_ACARD is not set | ||
| 513 | # CONFIG_SCSI_AACRAID is not set | ||
| 514 | # CONFIG_SCSI_AIC7XXX is not set | ||
| 515 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
| 516 | # CONFIG_SCSI_AIC79XX is not set | ||
| 517 | # CONFIG_SCSI_AIC94XX is not set | ||
| 518 | # CONFIG_SCSI_DPT_I2O is not set | ||
| 519 | # CONFIG_SCSI_ADVANSYS is not set | ||
| 520 | # CONFIG_SCSI_ARCMSR is not set | ||
| 521 | # CONFIG_MEGARAID_NEWGEN is not set | ||
| 522 | # CONFIG_MEGARAID_LEGACY is not set | ||
| 523 | # CONFIG_MEGARAID_SAS is not set | ||
| 524 | # CONFIG_SCSI_HPTIOP is not set | ||
| 525 | # CONFIG_LIBFC is not set | ||
| 526 | # CONFIG_FCOE is not set | ||
| 527 | # CONFIG_SCSI_DMX3191D is not set | ||
| 528 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
| 529 | # CONFIG_SCSI_IPS is not set | ||
| 530 | # CONFIG_SCSI_INITIO is not set | ||
| 531 | # CONFIG_SCSI_INIA100 is not set | ||
| 532 | # CONFIG_SCSI_MVSAS is not set | ||
| 533 | # CONFIG_SCSI_STEX is not set | ||
| 534 | CONFIG_SCSI_SYM53C8XX_2=y | ||
| 535 | CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 | ||
| 536 | CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 | ||
| 537 | CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 | ||
| 538 | CONFIG_SCSI_SYM53C8XX_MMIO=y | ||
| 539 | CONFIG_SCSI_QLOGIC_1280=y | ||
| 540 | # CONFIG_SCSI_QLA_FC is not set | ||
| 541 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
| 542 | # CONFIG_SCSI_LPFC is not set | ||
| 543 | # CONFIG_SCSI_DC395x is not set | ||
| 544 | # CONFIG_SCSI_DC390T is not set | ||
| 545 | # CONFIG_SCSI_DEBUG is not set | ||
| 546 | # CONFIG_SCSI_SRP is not set | ||
| 547 | # CONFIG_SCSI_DH is not set | ||
| 548 | # CONFIG_ATA is not set | ||
| 549 | CONFIG_MD=y | ||
| 550 | CONFIG_BLK_DEV_MD=m | ||
| 551 | CONFIG_MD_LINEAR=m | ||
| 552 | CONFIG_MD_RAID0=m | ||
| 553 | CONFIG_MD_RAID1=m | ||
| 554 | # CONFIG_MD_RAID10 is not set | ||
| 555 | # CONFIG_MD_RAID456 is not set | ||
| 556 | CONFIG_MD_MULTIPATH=m | ||
| 557 | # CONFIG_MD_FAULTY is not set | ||
| 558 | CONFIG_BLK_DEV_DM=m | ||
| 559 | # CONFIG_DM_DEBUG is not set | ||
| 560 | CONFIG_DM_CRYPT=m | ||
| 561 | CONFIG_DM_SNAPSHOT=m | ||
| 562 | CONFIG_DM_MIRROR=m | ||
| 563 | CONFIG_DM_ZERO=m | ||
| 564 | # CONFIG_DM_MULTIPATH is not set | ||
| 565 | # CONFIG_DM_DELAY is not set | ||
| 566 | # CONFIG_DM_UEVENT is not set | ||
| 567 | CONFIG_FUSION=y | ||
| 568 | CONFIG_FUSION_SPI=y | ||
| 569 | CONFIG_FUSION_FC=y | ||
| 570 | # CONFIG_FUSION_SAS is not set | ||
| 571 | CONFIG_FUSION_MAX_SGE=128 | ||
| 572 | CONFIG_FUSION_CTL=y | ||
| 573 | # CONFIG_FUSION_LOGGING is not set | ||
| 574 | |||
| 575 | # | ||
| 576 | # IEEE 1394 (FireWire) support | ||
| 577 | # | ||
| 578 | |||
| 579 | # | ||
| 580 | # Enable only one of the two stacks, unless you know what you are doing | ||
| 581 | # | ||
| 582 | # CONFIG_FIREWIRE is not set | ||
| 583 | # CONFIG_IEEE1394 is not set | ||
| 584 | # CONFIG_I2O is not set | ||
| 585 | CONFIG_NETDEVICES=y | ||
| 586 | CONFIG_DUMMY=m | ||
| 587 | # CONFIG_BONDING is not set | ||
| 588 | # CONFIG_MACVLAN is not set | ||
| 589 | # CONFIG_EQUALIZER is not set | ||
| 590 | # CONFIG_TUN is not set | ||
| 591 | # CONFIG_VETH is not set | ||
| 592 | # CONFIG_NET_SB1000 is not set | ||
| 593 | # CONFIG_ARCNET is not set | ||
| 594 | CONFIG_PHYLIB=y | ||
| 595 | |||
| 596 | # | ||
| 597 | # MII PHY device drivers | ||
| 598 | # | ||
| 599 | # CONFIG_MARVELL_PHY is not set | ||
| 600 | # CONFIG_DAVICOM_PHY is not set | ||
| 601 | # CONFIG_QSEMI_PHY is not set | ||
| 602 | # CONFIG_LXT_PHY is not set | ||
| 603 | # CONFIG_CICADA_PHY is not set | ||
| 604 | # CONFIG_VITESSE_PHY is not set | ||
| 605 | # CONFIG_SMSC_PHY is not set | ||
| 606 | # CONFIG_BROADCOM_PHY is not set | ||
| 607 | # CONFIG_ICPLUS_PHY is not set | ||
| 608 | # CONFIG_REALTEK_PHY is not set | ||
| 609 | # CONFIG_NATIONAL_PHY is not set | ||
| 610 | # CONFIG_STE10XP is not set | ||
| 611 | # CONFIG_LSI_ET1011C_PHY is not set | ||
| 612 | # CONFIG_FIXED_PHY is not set | ||
| 613 | # CONFIG_MDIO_BITBANG is not set | ||
| 614 | CONFIG_NET_ETHERNET=y | ||
| 615 | CONFIG_MII=m | ||
| 616 | # CONFIG_HAPPYMEAL is not set | ||
| 617 | # CONFIG_SUNGEM is not set | ||
| 618 | # CONFIG_CASSINI is not set | ||
| 619 | # CONFIG_NET_VENDOR_3COM is not set | ||
| 620 | CONFIG_NET_TULIP=y | ||
| 621 | # CONFIG_DE2104X is not set | ||
| 622 | CONFIG_TULIP=m | ||
| 623 | # CONFIG_TULIP_MWI is not set | ||
| 624 | # CONFIG_TULIP_MMIO is not set | ||
| 625 | # CONFIG_TULIP_NAPI is not set | ||
| 626 | # CONFIG_DE4X5 is not set | ||
| 627 | # CONFIG_WINBOND_840 is not set | ||
| 628 | # CONFIG_DM9102 is not set | ||
| 629 | # CONFIG_ULI526X is not set | ||
| 630 | # CONFIG_HP100 is not set | ||
| 631 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
| 632 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
| 633 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
| 634 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
| 635 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set | ||
| 636 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | ||
| 637 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | ||
| 638 | CONFIG_NET_PCI=y | ||
| 639 | # CONFIG_PCNET32 is not set | ||
| 640 | # CONFIG_AMD8111_ETH is not set | ||
| 641 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
| 642 | # CONFIG_B44 is not set | ||
| 643 | # CONFIG_FORCEDETH is not set | ||
| 644 | CONFIG_E100=m | ||
| 645 | # CONFIG_FEALNX is not set | ||
| 646 | # CONFIG_NATSEMI is not set | ||
| 647 | # CONFIG_NE2K_PCI is not set | ||
| 648 | # CONFIG_8139CP is not set | ||
| 649 | # CONFIG_8139TOO is not set | ||
| 650 | # CONFIG_R6040 is not set | ||
| 651 | # CONFIG_SIS900 is not set | ||
| 652 | # CONFIG_EPIC100 is not set | ||
| 653 | # CONFIG_SMSC9420 is not set | ||
| 654 | # CONFIG_SUNDANCE is not set | ||
| 655 | # CONFIG_TLAN is not set | ||
| 656 | # CONFIG_VIA_RHINE is not set | ||
| 657 | # CONFIG_SC92031 is not set | ||
| 658 | # CONFIG_ATL2 is not set | ||
| 659 | CONFIG_NETDEV_1000=y | ||
| 660 | # CONFIG_ACENIC is not set | ||
| 661 | # CONFIG_DL2K is not set | ||
| 662 | CONFIG_E1000=y | ||
| 663 | # CONFIG_E1000E is not set | ||
| 664 | # CONFIG_IP1000 is not set | ||
| 665 | # CONFIG_IGB is not set | ||
| 666 | # CONFIG_NS83820 is not set | ||
| 667 | # CONFIG_HAMACHI is not set | ||
| 668 | # CONFIG_YELLOWFIN is not set | ||
| 669 | # CONFIG_R8169 is not set | ||
| 670 | # CONFIG_SIS190 is not set | ||
| 671 | # CONFIG_SKGE is not set | ||
| 672 | # CONFIG_SKY2 is not set | ||
| 673 | # CONFIG_VIA_VELOCITY is not set | ||
| 674 | CONFIG_TIGON3=y | ||
| 675 | # CONFIG_BNX2 is not set | ||
| 676 | # CONFIG_QLA3XXX is not set | ||
| 677 | # CONFIG_ATL1 is not set | ||
| 678 | # CONFIG_ATL1E is not set | ||
| 679 | # CONFIG_JME is not set | ||
| 680 | CONFIG_NETDEV_10000=y | ||
| 681 | # CONFIG_CHELSIO_T1 is not set | ||
| 682 | CONFIG_CHELSIO_T3_DEPENDS=y | ||
| 683 | # CONFIG_CHELSIO_T3 is not set | ||
| 684 | # CONFIG_ENIC is not set | ||
| 685 | # CONFIG_IXGBE is not set | ||
| 686 | # CONFIG_IXGB is not set | ||
| 687 | # CONFIG_S2IO is not set | ||
| 688 | # CONFIG_MYRI10GE is not set | ||
| 689 | # CONFIG_NETXEN_NIC is not set | ||
| 690 | # CONFIG_NIU is not set | ||
| 691 | # CONFIG_MLX4_EN is not set | ||
| 692 | # CONFIG_MLX4_CORE is not set | ||
| 693 | # CONFIG_TEHUTI is not set | ||
| 694 | # CONFIG_BNX2X is not set | ||
| 695 | # CONFIG_QLGE is not set | ||
| 696 | # CONFIG_SFC is not set | ||
| 697 | # CONFIG_TR is not set | ||
| 698 | |||
| 699 | # | ||
| 700 | # Wireless LAN | ||
| 701 | # | ||
| 702 | # CONFIG_WLAN_PRE80211 is not set | ||
| 703 | # CONFIG_WLAN_80211 is not set | ||
| 704 | # CONFIG_IWLWIFI_LEDS is not set | ||
| 705 | |||
| 706 | # | ||
| 707 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
| 708 | # | ||
| 709 | |||
| 710 | # | ||
| 711 | # USB Network Adapters | ||
| 712 | # | ||
| 713 | # CONFIG_USB_CATC is not set | ||
| 714 | # CONFIG_USB_KAWETH is not set | ||
| 715 | # CONFIG_USB_PEGASUS is not set | ||
| 716 | # CONFIG_USB_RTL8150 is not set | ||
| 717 | # CONFIG_USB_USBNET is not set | ||
| 718 | # CONFIG_WAN is not set | ||
| 719 | CONFIG_XEN_NETDEV_FRONTEND=y | ||
| 720 | # CONFIG_FDDI is not set | ||
| 721 | # CONFIG_HIPPI is not set | ||
| 722 | # CONFIG_PPP is not set | ||
| 723 | # CONFIG_SLIP is not set | ||
| 724 | # CONFIG_NET_FC is not set | ||
| 725 | CONFIG_NETCONSOLE=y | ||
| 726 | # CONFIG_NETCONSOLE_DYNAMIC is not set | ||
| 727 | CONFIG_NETPOLL=y | ||
| 728 | # CONFIG_NETPOLL_TRAP is not set | ||
| 729 | CONFIG_NET_POLL_CONTROLLER=y | ||
| 730 | # CONFIG_ISDN is not set | ||
| 731 | # CONFIG_PHONE is not set | ||
| 732 | |||
| 733 | # | ||
| 734 | # Input device support | ||
| 735 | # | ||
| 736 | CONFIG_INPUT=y | ||
| 737 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
| 738 | # CONFIG_INPUT_POLLDEV is not set | ||
| 739 | |||
| 740 | # | ||
| 741 | # Userland interfaces | ||
| 742 | # | ||
| 743 | CONFIG_INPUT_MOUSEDEV=y | ||
| 744 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
| 745 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
| 746 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
| 747 | # CONFIG_INPUT_JOYDEV is not set | ||
| 748 | # CONFIG_INPUT_EVDEV is not set | ||
| 749 | # CONFIG_INPUT_EVBUG is not set | ||
| 750 | |||
| 751 | # | ||
| 752 | # Input Device Drivers | ||
| 753 | # | ||
| 754 | CONFIG_INPUT_KEYBOARD=y | ||
| 755 | CONFIG_KEYBOARD_ATKBD=y | ||
| 756 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
| 757 | # CONFIG_KEYBOARD_LKKBD is not set | ||
| 758 | # CONFIG_KEYBOARD_XTKBD is not set | ||
| 759 | # CONFIG_KEYBOARD_NEWTON is not set | ||
| 760 | # CONFIG_KEYBOARD_STOWAWAY is not set | ||
| 761 | CONFIG_INPUT_MOUSE=y | ||
| 762 | CONFIG_MOUSE_PS2=y | ||
| 763 | CONFIG_MOUSE_PS2_ALPS=y | ||
| 764 | CONFIG_MOUSE_PS2_LOGIPS2PP=y | ||
| 765 | CONFIG_MOUSE_PS2_SYNAPTICS=y | ||
| 766 | CONFIG_MOUSE_PS2_LIFEBOOK=y | ||
| 767 | CONFIG_MOUSE_PS2_TRACKPOINT=y | ||
| 768 | # CONFIG_MOUSE_PS2_ELANTECH is not set | ||
| 769 | # CONFIG_MOUSE_PS2_TOUCHKIT is not set | ||
| 770 | # CONFIG_MOUSE_SERIAL is not set | ||
| 771 | # CONFIG_MOUSE_APPLETOUCH is not set | ||
| 772 | # CONFIG_MOUSE_BCM5974 is not set | ||
| 773 | # CONFIG_MOUSE_VSXXXAA is not set | ||
| 774 | # CONFIG_INPUT_JOYSTICK is not set | ||
| 775 | # CONFIG_INPUT_TABLET is not set | ||
| 776 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
| 777 | # CONFIG_INPUT_MISC is not set | ||
| 778 | |||
| 779 | # | ||
| 780 | # Hardware I/O ports | ||
| 781 | # | ||
| 782 | CONFIG_SERIO=y | ||
| 783 | CONFIG_SERIO_I8042=y | ||
| 784 | # CONFIG_SERIO_SERPORT is not set | ||
| 785 | # CONFIG_SERIO_PCIPS2 is not set | ||
| 786 | CONFIG_SERIO_LIBPS2=y | ||
| 787 | # CONFIG_SERIO_RAW is not set | ||
| 788 | CONFIG_GAMEPORT=m | ||
| 789 | # CONFIG_GAMEPORT_NS558 is not set | ||
| 790 | # CONFIG_GAMEPORT_L4 is not set | ||
| 791 | # CONFIG_GAMEPORT_EMU10K1 is not set | ||
| 792 | # CONFIG_GAMEPORT_FM801 is not set | ||
| 793 | |||
| 794 | # | ||
| 795 | # Character devices | ||
| 796 | # | ||
| 797 | CONFIG_VT=y | ||
| 798 | CONFIG_CONSOLE_TRANSLATIONS=y | ||
| 799 | CONFIG_VT_CONSOLE=y | ||
| 800 | CONFIG_HW_CONSOLE=y | ||
| 801 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
| 802 | CONFIG_DEVKMEM=y | ||
| 803 | CONFIG_SERIAL_NONSTANDARD=y | ||
| 804 | # CONFIG_COMPUTONE is not set | ||
| 805 | # CONFIG_ROCKETPORT is not set | ||
| 806 | # CONFIG_CYCLADES is not set | ||
| 807 | # CONFIG_DIGIEPCA is not set | ||
| 808 | # CONFIG_MOXA_INTELLIO is not set | ||
| 809 | # CONFIG_MOXA_SMARTIO is not set | ||
| 810 | # CONFIG_ISI is not set | ||
| 811 | # CONFIG_SYNCLINKMP is not set | ||
| 812 | # CONFIG_SYNCLINK_GT is not set | ||
| 813 | # CONFIG_N_HDLC is not set | ||
| 814 | # CONFIG_RISCOM8 is not set | ||
| 815 | # CONFIG_SPECIALIX is not set | ||
| 816 | # CONFIG_SX is not set | ||
| 817 | # CONFIG_RIO is not set | ||
| 818 | # CONFIG_STALDRV is not set | ||
| 819 | # CONFIG_NOZOMI is not set | ||
| 820 | |||
| 821 | # | ||
| 822 | # Serial drivers | ||
| 823 | # | ||
| 824 | CONFIG_SERIAL_8250=y | ||
| 825 | CONFIG_SERIAL_8250_CONSOLE=y | ||
| 826 | CONFIG_SERIAL_8250_PCI=y | ||
| 827 | CONFIG_SERIAL_8250_PNP=y | ||
| 828 | CONFIG_SERIAL_8250_NR_UARTS=6 | ||
| 829 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
| 830 | CONFIG_SERIAL_8250_EXTENDED=y | ||
| 831 | CONFIG_SERIAL_8250_SHARE_IRQ=y | ||
| 832 | # CONFIG_SERIAL_8250_DETECT_IRQ is not set | ||
| 833 | # CONFIG_SERIAL_8250_RSA is not set | ||
| 834 | |||
| 835 | # | ||
| 836 | # Non-8250 serial port support | ||
| 837 | # | ||
| 838 | CONFIG_SERIAL_CORE=y | ||
| 839 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
| 840 | # CONFIG_SERIAL_JSM is not set | ||
| 841 | CONFIG_UNIX98_PTYS=y | ||
| 842 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
| 843 | CONFIG_LEGACY_PTYS=y | ||
| 844 | CONFIG_LEGACY_PTY_COUNT=256 | ||
| 845 | CONFIG_HVC_DRIVER=y | ||
| 846 | CONFIG_HVC_IRQ=y | ||
| 847 | CONFIG_HVC_XEN=y | ||
| 848 | # CONFIG_IPMI_HANDLER is not set | ||
| 849 | # CONFIG_HW_RANDOM is not set | ||
| 850 | CONFIG_EFI_RTC=y | ||
| 851 | # CONFIG_R3964 is not set | ||
| 852 | # CONFIG_APPLICOM is not set | ||
| 853 | CONFIG_RAW_DRIVER=m | ||
| 854 | CONFIG_MAX_RAW_DEVS=256 | ||
| 855 | CONFIG_HPET=y | ||
| 856 | CONFIG_HPET_MMAP=y | ||
| 857 | # CONFIG_HANGCHECK_TIMER is not set | ||
| 858 | # CONFIG_TCG_TPM is not set | ||
| 859 | CONFIG_DEVPORT=y | ||
| 860 | CONFIG_I2C=m | ||
| 861 | CONFIG_I2C_BOARDINFO=y | ||
| 862 | # CONFIG_I2C_CHARDEV is not set | ||
| 863 | CONFIG_I2C_HELPER_AUTO=y | ||
| 864 | CONFIG_I2C_ALGOBIT=m | ||
| 865 | |||
| 866 | # | ||
| 867 | # I2C Hardware Bus support | ||
| 868 | # | ||
| 869 | |||
| 870 | # | ||
| 871 | # PC SMBus host controller drivers | ||
| 872 | # | ||
| 873 | # CONFIG_I2C_ALI1535 is not set | ||
| 874 | # CONFIG_I2C_ALI1563 is not set | ||
| 875 | # CONFIG_I2C_ALI15X3 is not set | ||
| 876 | # CONFIG_I2C_AMD756 is not set | ||
| 877 | # CONFIG_I2C_AMD8111 is not set | ||
| 878 | # CONFIG_I2C_I801 is not set | ||
| 879 | # CONFIG_I2C_ISCH is not set | ||
| 880 | # CONFIG_I2C_PIIX4 is not set | ||
| 881 | # CONFIG_I2C_NFORCE2 is not set | ||
| 882 | # CONFIG_I2C_SIS5595 is not set | ||
| 883 | # CONFIG_I2C_SIS630 is not set | ||
| 884 | # CONFIG_I2C_SIS96X is not set | ||
| 885 | # CONFIG_I2C_VIA is not set | ||
| 886 | # CONFIG_I2C_VIAPRO is not set | ||
| 887 | |||
| 888 | # | ||
| 889 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
| 890 | # | ||
| 891 | # CONFIG_I2C_OCORES is not set | ||
| 892 | # CONFIG_I2C_SIMTEC is not set | ||
| 893 | |||
| 894 | # | ||
| 895 | # External I2C/SMBus adapter drivers | ||
| 896 | # | ||
| 897 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
| 898 | # CONFIG_I2C_TAOS_EVM is not set | ||
| 899 | # CONFIG_I2C_TINY_USB is not set | ||
| 900 | |||
| 901 | # | ||
| 902 | # Graphics adapter I2C/DDC channel drivers | ||
| 903 | # | ||
| 904 | # CONFIG_I2C_VOODOO3 is not set | ||
| 905 | |||
| 906 | # | ||
| 907 | # Other I2C/SMBus bus drivers | ||
| 908 | # | ||
| 909 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
| 910 | # CONFIG_I2C_STUB is not set | ||
| 911 | |||
| 912 | # | ||
| 913 | # Miscellaneous I2C Chip support | ||
| 914 | # | ||
| 915 | # CONFIG_DS1682 is not set | ||
| 916 | # CONFIG_AT24 is not set | ||
| 917 | # CONFIG_SENSORS_EEPROM is not set | ||
| 918 | # CONFIG_SENSORS_PCF8574 is not set | ||
| 919 | # CONFIG_PCF8575 is not set | ||
| 920 | # CONFIG_SENSORS_PCA9539 is not set | ||
| 921 | # CONFIG_SENSORS_PCF8591 is not set | ||
| 922 | # CONFIG_SENSORS_MAX6875 is not set | ||
| 923 | # CONFIG_SENSORS_TSL2550 is not set | ||
| 924 | # CONFIG_I2C_DEBUG_CORE is not set | ||
| 925 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
| 926 | # CONFIG_I2C_DEBUG_BUS is not set | ||
| 927 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
| 928 | # CONFIG_SPI is not set | ||
| 929 | # CONFIG_W1 is not set | ||
| 930 | CONFIG_POWER_SUPPLY=y | ||
| 931 | # CONFIG_POWER_SUPPLY_DEBUG is not set | ||
| 932 | # CONFIG_PDA_POWER is not set | ||
| 933 | # CONFIG_BATTERY_DS2760 is not set | ||
| 934 | # CONFIG_BATTERY_BQ27x00 is not set | ||
| 935 | CONFIG_HWMON=y | ||
| 936 | # CONFIG_HWMON_VID is not set | ||
| 937 | # CONFIG_SENSORS_AD7414 is not set | ||
| 938 | # CONFIG_SENSORS_AD7418 is not set | ||
| 939 | # CONFIG_SENSORS_ADM1021 is not set | ||
| 940 | # CONFIG_SENSORS_ADM1025 is not set | ||
| 941 | # CONFIG_SENSORS_ADM1026 is not set | ||
| 942 | # CONFIG_SENSORS_ADM1029 is not set | ||
| 943 | # CONFIG_SENSORS_ADM1031 is not set | ||
| 944 | # CONFIG_SENSORS_ADM9240 is not set | ||
| 945 | # CONFIG_SENSORS_ADT7462 is not set | ||
| 946 | # CONFIG_SENSORS_ADT7470 is not set | ||
| 947 | # CONFIG_SENSORS_ADT7473 is not set | ||
| 948 | # CONFIG_SENSORS_ATXP1 is not set | ||
| 949 | # CONFIG_SENSORS_DS1621 is not set | ||
| 950 | # CONFIG_SENSORS_I5K_AMB is not set | ||
| 951 | # CONFIG_SENSORS_F71805F is not set | ||
| 952 | # CONFIG_SENSORS_F71882FG is not set | ||
| 953 | # CONFIG_SENSORS_F75375S is not set | ||
| 954 | # CONFIG_SENSORS_GL518SM is not set | ||
| 955 | # CONFIG_SENSORS_GL520SM is not set | ||
| 956 | # CONFIG_SENSORS_IT87 is not set | ||
| 957 | # CONFIG_SENSORS_LM63 is not set | ||
| 958 | # CONFIG_SENSORS_LM75 is not set | ||
| 959 | # CONFIG_SENSORS_LM77 is not set | ||
| 960 | # CONFIG_SENSORS_LM78 is not set | ||
| 961 | # CONFIG_SENSORS_LM80 is not set | ||
| 962 | # CONFIG_SENSORS_LM83 is not set | ||
| 963 | # CONFIG_SENSORS_LM85 is not set | ||
| 964 | # CONFIG_SENSORS_LM87 is not set | ||
| 965 | # CONFIG_SENSORS_LM90 is not set | ||
| 966 | # CONFIG_SENSORS_LM92 is not set | ||
| 967 | # CONFIG_SENSORS_LM93 is not set | ||
| 968 | # CONFIG_SENSORS_LTC4245 is not set | ||
| 969 | # CONFIG_SENSORS_MAX1619 is not set | ||
| 970 | # CONFIG_SENSORS_MAX6650 is not set | ||
| 971 | # CONFIG_SENSORS_PC87360 is not set | ||
| 972 | # CONFIG_SENSORS_PC87427 is not set | ||
| 973 | # CONFIG_SENSORS_SIS5595 is not set | ||
| 974 | # CONFIG_SENSORS_DME1737 is not set | ||
| 975 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
| 976 | # CONFIG_SENSORS_SMSC47M192 is not set | ||
| 977 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
| 978 | # CONFIG_SENSORS_ADS7828 is not set | ||
| 979 | # CONFIG_SENSORS_THMC50 is not set | ||
| 980 | # CONFIG_SENSORS_VIA686A is not set | ||
| 981 | # CONFIG_SENSORS_VT1211 is not set | ||
| 982 | # CONFIG_SENSORS_VT8231 is not set | ||
| 983 | # CONFIG_SENSORS_W83781D is not set | ||
| 984 | # CONFIG_SENSORS_W83791D is not set | ||
| 985 | # CONFIG_SENSORS_W83792D is not set | ||
| 986 | # CONFIG_SENSORS_W83793 is not set | ||
| 987 | # CONFIG_SENSORS_W83L785TS is not set | ||
| 988 | # CONFIG_SENSORS_W83L786NG is not set | ||
| 989 | # CONFIG_SENSORS_W83627HF is not set | ||
| 990 | # CONFIG_SENSORS_W83627EHF is not set | ||
| 991 | # CONFIG_SENSORS_LIS3LV02D is not set | ||
| 992 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
| 993 | CONFIG_THERMAL=m | ||
| 994 | # CONFIG_THERMAL_HWMON is not set | ||
| 995 | # CONFIG_WATCHDOG is not set | ||
| 996 | CONFIG_SSB_POSSIBLE=y | ||
| 997 | |||
| 998 | # | ||
| 999 | # Sonics Silicon Backplane | ||
| 1000 | # | ||
| 1001 | # CONFIG_SSB is not set | ||
| 1002 | |||
| 1003 | # | ||
| 1004 | # Multifunction device drivers | ||
| 1005 | # | ||
| 1006 | # CONFIG_MFD_CORE is not set | ||
| 1007 | # CONFIG_MFD_SM501 is not set | ||
| 1008 | # CONFIG_HTC_PASIC3 is not set | ||
| 1009 | # CONFIG_MFD_TMIO is not set | ||
| 1010 | # CONFIG_MFD_WM8400 is not set | ||
| 1011 | # CONFIG_MFD_WM8350_I2C is not set | ||
| 1012 | # CONFIG_MFD_PCF50633 is not set | ||
| 1013 | # CONFIG_REGULATOR is not set | ||
| 1014 | |||
| 1015 | # | ||
| 1016 | # Multimedia devices | ||
| 1017 | # | ||
| 1018 | |||
| 1019 | # | ||
| 1020 | # Multimedia core support | ||
| 1021 | # | ||
| 1022 | # CONFIG_VIDEO_DEV is not set | ||
| 1023 | # CONFIG_DVB_CORE is not set | ||
| 1024 | # CONFIG_VIDEO_MEDIA is not set | ||
| 1025 | |||
| 1026 | # | ||
| 1027 | # Multimedia drivers | ||
| 1028 | # | ||
| 1029 | CONFIG_DAB=y | ||
| 1030 | # CONFIG_USB_DABUSB is not set | ||
| 1031 | |||
| 1032 | # | ||
| 1033 | # Graphics support | ||
| 1034 | # | ||
| 1035 | CONFIG_AGP=m | ||
| 1036 | CONFIG_DRM=m | ||
| 1037 | CONFIG_DRM_TDFX=m | ||
| 1038 | CONFIG_DRM_R128=m | ||
| 1039 | CONFIG_DRM_RADEON=m | ||
| 1040 | CONFIG_DRM_MGA=m | ||
| 1041 | CONFIG_DRM_SIS=m | ||
| 1042 | # CONFIG_DRM_VIA is not set | ||
| 1043 | # CONFIG_DRM_SAVAGE is not set | ||
| 1044 | # CONFIG_VGASTATE is not set | ||
| 1045 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
| 1046 | # CONFIG_FB is not set | ||
| 1047 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
| 1048 | |||
| 1049 | # | ||
| 1050 | # Display device support | ||
| 1051 | # | ||
| 1052 | # CONFIG_DISPLAY_SUPPORT is not set | ||
| 1053 | |||
| 1054 | # | ||
| 1055 | # Console display driver support | ||
| 1056 | # | ||
| 1057 | CONFIG_VGA_CONSOLE=y | ||
| 1058 | # CONFIG_VGACON_SOFT_SCROLLBACK is not set | ||
| 1059 | CONFIG_DUMMY_CONSOLE=y | ||
| 1060 | # CONFIG_SOUND is not set | ||
| 1061 | CONFIG_HID_SUPPORT=y | ||
| 1062 | CONFIG_HID=y | ||
| 1063 | # CONFIG_HID_DEBUG is not set | ||
| 1064 | # CONFIG_HIDRAW is not set | ||
| 1065 | |||
| 1066 | # | ||
| 1067 | # USB Input Devices | ||
| 1068 | # | ||
| 1069 | CONFIG_USB_HID=y | ||
| 1070 | # CONFIG_HID_PID is not set | ||
| 1071 | # CONFIG_USB_HIDDEV is not set | ||
| 1072 | |||
| 1073 | # | ||
| 1074 | # Special HID drivers | ||
| 1075 | # | ||
| 1076 | CONFIG_HID_COMPAT=y | ||
| 1077 | CONFIG_HID_A4TECH=y | ||
| 1078 | CONFIG_HID_APPLE=y | ||
| 1079 | CONFIG_HID_BELKIN=y | ||
| 1080 | CONFIG_HID_CHERRY=y | ||
| 1081 | CONFIG_HID_CHICONY=y | ||
| 1082 | CONFIG_HID_CYPRESS=y | ||
| 1083 | CONFIG_HID_EZKEY=y | ||
| 1084 | CONFIG_HID_GYRATION=y | ||
| 1085 | CONFIG_HID_LOGITECH=y | ||
| 1086 | # CONFIG_LOGITECH_FF is not set | ||
| 1087 | # CONFIG_LOGIRUMBLEPAD2_FF is not set | ||
| 1088 | CONFIG_HID_MICROSOFT=y | ||
| 1089 | CONFIG_HID_MONTEREY=y | ||
| 1090 | CONFIG_HID_NTRIG=y | ||
| 1091 | CONFIG_HID_PANTHERLORD=y | ||
| 1092 | # CONFIG_PANTHERLORD_FF is not set | ||
| 1093 | CONFIG_HID_PETALYNX=y | ||
| 1094 | CONFIG_HID_SAMSUNG=y | ||
| 1095 | CONFIG_HID_SONY=y | ||
| 1096 | CONFIG_HID_SUNPLUS=y | ||
| 1097 | # CONFIG_GREENASIA_FF is not set | ||
| 1098 | CONFIG_HID_TOPSEED=y | ||
| 1099 | # CONFIG_THRUSTMASTER_FF is not set | ||
| 1100 | # CONFIG_ZEROPLUS_FF is not set | ||
| 1101 | CONFIG_USB_SUPPORT=y | ||
| 1102 | CONFIG_USB_ARCH_HAS_HCD=y | ||
| 1103 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
| 1104 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
| 1105 | CONFIG_USB=y | ||
| 1106 | # CONFIG_USB_DEBUG is not set | ||
| 1107 | # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set | ||
| 1108 | |||
| 1109 | # | ||
| 1110 | # Miscellaneous USB options | ||
| 1111 | # | ||
| 1112 | CONFIG_USB_DEVICEFS=y | ||
| 1113 | CONFIG_USB_DEVICE_CLASS=y | ||
| 1114 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
| 1115 | # CONFIG_USB_SUSPEND is not set | ||
| 1116 | # CONFIG_USB_OTG is not set | ||
| 1117 | # CONFIG_USB_MON is not set | ||
| 1118 | # CONFIG_USB_WUSB is not set | ||
| 1119 | # CONFIG_USB_WUSB_CBAF is not set | ||
| 1120 | |||
| 1121 | # | ||
| 1122 | # USB Host Controller Drivers | ||
| 1123 | # | ||
| 1124 | # CONFIG_USB_C67X00_HCD is not set | ||
| 1125 | CONFIG_USB_EHCI_HCD=m | ||
| 1126 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | ||
| 1127 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | ||
| 1128 | # CONFIG_USB_OXU210HP_HCD is not set | ||
| 1129 | # CONFIG_USB_ISP116X_HCD is not set | ||
| 1130 | # CONFIG_USB_ISP1760_HCD is not set | ||
| 1131 | CONFIG_USB_OHCI_HCD=m | ||
| 1132 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set | ||
| 1133 | # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set | ||
| 1134 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
| 1135 | CONFIG_USB_UHCI_HCD=y | ||
| 1136 | # CONFIG_USB_SL811_HCD is not set | ||
| 1137 | # CONFIG_USB_R8A66597_HCD is not set | ||
| 1138 | # CONFIG_USB_WHCI_HCD is not set | ||
| 1139 | # CONFIG_USB_HWA_HCD is not set | ||
| 1140 | |||
| 1141 | # | ||
| 1142 | # USB Device Class drivers | ||
| 1143 | # | ||
| 1144 | # CONFIG_USB_ACM is not set | ||
| 1145 | # CONFIG_USB_PRINTER is not set | ||
| 1146 | # CONFIG_USB_WDM is not set | ||
| 1147 | # CONFIG_USB_TMC is not set | ||
| 1148 | |||
| 1149 | # | ||
| 1150 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; | ||
| 1151 | # | ||
| 1152 | |||
| 1153 | # | ||
| 1154 | # see USB_STORAGE Help for more information | ||
| 1155 | # | ||
| 1156 | CONFIG_USB_STORAGE=m | ||
| 1157 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
| 1158 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
| 1159 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
| 1160 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
| 1161 | # CONFIG_USB_STORAGE_USBAT is not set | ||
| 1162 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
| 1163 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
| 1164 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
| 1165 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
| 1166 | # CONFIG_USB_STORAGE_ONETOUCH is not set | ||
| 1167 | # CONFIG_USB_STORAGE_KARMA is not set | ||
| 1168 | # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set | ||
| 1169 | # CONFIG_USB_LIBUSUAL is not set | ||
| 1170 | |||
| 1171 | # | ||
| 1172 | # USB Imaging devices | ||
| 1173 | # | ||
| 1174 | # CONFIG_USB_MDC800 is not set | ||
| 1175 | # CONFIG_USB_MICROTEK is not set | ||
| 1176 | |||
| 1177 | # | ||
| 1178 | # USB port drivers | ||
| 1179 | # | ||
| 1180 | # CONFIG_USB_SERIAL is not set | ||
| 1181 | |||
| 1182 | # | ||
| 1183 | # USB Miscellaneous drivers | ||
| 1184 | # | ||
| 1185 | # CONFIG_USB_EMI62 is not set | ||
| 1186 | # CONFIG_USB_EMI26 is not set | ||
| 1187 | # CONFIG_USB_ADUTUX is not set | ||
| 1188 | # CONFIG_USB_SEVSEG is not set | ||
| 1189 | # CONFIG_USB_RIO500 is not set | ||
| 1190 | # CONFIG_USB_LEGOTOWER is not set | ||
| 1191 | # CONFIG_USB_LCD is not set | ||
| 1192 | # CONFIG_USB_BERRY_CHARGE is not set | ||
| 1193 | # CONFIG_USB_LED is not set | ||
| 1194 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
| 1195 | # CONFIG_USB_CYTHERM is not set | ||
| 1196 | # CONFIG_USB_PHIDGET is not set | ||
| 1197 | # CONFIG_USB_IDMOUSE is not set | ||
| 1198 | # CONFIG_USB_FTDI_ELAN is not set | ||
| 1199 | # CONFIG_USB_APPLEDISPLAY is not set | ||
| 1200 | # CONFIG_USB_SISUSBVGA is not set | ||
| 1201 | # CONFIG_USB_LD is not set | ||
| 1202 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
| 1203 | # CONFIG_USB_IOWARRIOR is not set | ||
| 1204 | # CONFIG_USB_TEST is not set | ||
| 1205 | # CONFIG_USB_ISIGHTFW is not set | ||
| 1206 | # CONFIG_USB_VST is not set | ||
| 1207 | # CONFIG_USB_GADGET is not set | ||
| 1208 | |||
| 1209 | # | ||
| 1210 | # OTG and related infrastructure | ||
| 1211 | # | ||
| 1212 | # CONFIG_UWB is not set | ||
| 1213 | # CONFIG_MMC is not set | ||
| 1214 | # CONFIG_MEMSTICK is not set | ||
| 1215 | # CONFIG_NEW_LEDS is not set | ||
| 1216 | # CONFIG_ACCESSIBILITY is not set | ||
| 1217 | # CONFIG_INFINIBAND is not set | ||
| 1218 | # CONFIG_RTC_CLASS is not set | ||
| 1219 | # CONFIG_DMADEVICES is not set | ||
| 1220 | # CONFIG_UIO is not set | ||
| 1221 | CONFIG_XEN_BALLOON=y | ||
| 1222 | CONFIG_XEN_SCRUB_PAGES=y | ||
| 1223 | CONFIG_XENFS=y | ||
| 1224 | CONFIG_XEN_COMPAT_XENFS=y | ||
| 1225 | # CONFIG_STAGING is not set | ||
| 1226 | # CONFIG_MSPEC is not set | ||
| 1227 | |||
| 1228 | # | ||
| 1229 | # File systems | ||
| 1230 | # | ||
| 1231 | CONFIG_EXT2_FS=y | ||
| 1232 | CONFIG_EXT2_FS_XATTR=y | ||
| 1233 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
| 1234 | CONFIG_EXT2_FS_SECURITY=y | ||
| 1235 | # CONFIG_EXT2_FS_XIP is not set | ||
| 1236 | CONFIG_EXT3_FS=y | ||
| 1237 | CONFIG_EXT3_FS_XATTR=y | ||
| 1238 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
| 1239 | CONFIG_EXT3_FS_SECURITY=y | ||
| 1240 | # CONFIG_EXT4_FS is not set | ||
| 1241 | CONFIG_JBD=y | ||
| 1242 | CONFIG_FS_MBCACHE=y | ||
| 1243 | CONFIG_REISERFS_FS=y | ||
| 1244 | # CONFIG_REISERFS_CHECK is not set | ||
| 1245 | # CONFIG_REISERFS_PROC_INFO is not set | ||
| 1246 | CONFIG_REISERFS_FS_XATTR=y | ||
| 1247 | CONFIG_REISERFS_FS_POSIX_ACL=y | ||
| 1248 | CONFIG_REISERFS_FS_SECURITY=y | ||
| 1249 | # CONFIG_JFS_FS is not set | ||
| 1250 | CONFIG_FS_POSIX_ACL=y | ||
| 1251 | CONFIG_FILE_LOCKING=y | ||
| 1252 | CONFIG_XFS_FS=y | ||
| 1253 | # CONFIG_XFS_QUOTA is not set | ||
| 1254 | # CONFIG_XFS_POSIX_ACL is not set | ||
| 1255 | # CONFIG_XFS_RT is not set | ||
| 1256 | # CONFIG_XFS_DEBUG is not set | ||
| 1257 | # CONFIG_GFS2_FS is not set | ||
| 1258 | # CONFIG_OCFS2_FS is not set | ||
| 1259 | # CONFIG_BTRFS_FS is not set | ||
| 1260 | CONFIG_DNOTIFY=y | ||
| 1261 | CONFIG_INOTIFY=y | ||
| 1262 | CONFIG_INOTIFY_USER=y | ||
| 1263 | # CONFIG_QUOTA is not set | ||
| 1264 | CONFIG_AUTOFS_FS=y | ||
| 1265 | CONFIG_AUTOFS4_FS=y | ||
| 1266 | # CONFIG_FUSE_FS is not set | ||
| 1267 | |||
| 1268 | # | ||
| 1269 | # CD-ROM/DVD Filesystems | ||
| 1270 | # | ||
| 1271 | CONFIG_ISO9660_FS=m | ||
| 1272 | CONFIG_JOLIET=y | ||
| 1273 | # CONFIG_ZISOFS is not set | ||
| 1274 | CONFIG_UDF_FS=m | ||
| 1275 | CONFIG_UDF_NLS=y | ||
| 1276 | |||
| 1277 | # | ||
| 1278 | # DOS/FAT/NT Filesystems | ||
| 1279 | # | ||
| 1280 | CONFIG_FAT_FS=y | ||
| 1281 | # CONFIG_MSDOS_FS is not set | ||
| 1282 | CONFIG_VFAT_FS=y | ||
| 1283 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
| 1284 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
| 1285 | CONFIG_NTFS_FS=m | ||
| 1286 | # CONFIG_NTFS_DEBUG is not set | ||
| 1287 | # CONFIG_NTFS_RW is not set | ||
| 1288 | |||
| 1289 | # | ||
| 1290 | # Pseudo filesystems | ||
| 1291 | # | ||
| 1292 | CONFIG_PROC_FS=y | ||
| 1293 | CONFIG_PROC_KCORE=y | ||
| 1294 | CONFIG_PROC_SYSCTL=y | ||
| 1295 | CONFIG_PROC_PAGE_MONITOR=y | ||
| 1296 | CONFIG_SYSFS=y | ||
| 1297 | CONFIG_TMPFS=y | ||
| 1298 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
| 1299 | CONFIG_HUGETLBFS=y | ||
| 1300 | CONFIG_HUGETLB_PAGE=y | ||
| 1301 | # CONFIG_CONFIGFS_FS is not set | ||
| 1302 | CONFIG_MISC_FILESYSTEMS=y | ||
| 1303 | # CONFIG_ADFS_FS is not set | ||
| 1304 | # CONFIG_AFFS_FS is not set | ||
| 1305 | # CONFIG_HFS_FS is not set | ||
| 1306 | # CONFIG_HFSPLUS_FS is not set | ||
| 1307 | # CONFIG_BEFS_FS is not set | ||
| 1308 | # CONFIG_BFS_FS is not set | ||
| 1309 | # CONFIG_EFS_FS is not set | ||
| 1310 | # CONFIG_CRAMFS is not set | ||
| 1311 | # CONFIG_SQUASHFS is not set | ||
| 1312 | # CONFIG_VXFS_FS is not set | ||
| 1313 | # CONFIG_MINIX_FS is not set | ||
| 1314 | # CONFIG_OMFS_FS is not set | ||
| 1315 | # CONFIG_HPFS_FS is not set | ||
| 1316 | # CONFIG_QNX4FS_FS is not set | ||
| 1317 | # CONFIG_ROMFS_FS is not set | ||
| 1318 | # CONFIG_SYSV_FS is not set | ||
| 1319 | # CONFIG_UFS_FS is not set | ||
| 1320 | CONFIG_NETWORK_FILESYSTEMS=y | ||
| 1321 | CONFIG_NFS_FS=m | ||
| 1322 | CONFIG_NFS_V3=y | ||
| 1323 | # CONFIG_NFS_V3_ACL is not set | ||
| 1324 | CONFIG_NFS_V4=y | ||
| 1325 | CONFIG_NFSD=m | ||
| 1326 | CONFIG_NFSD_V3=y | ||
| 1327 | # CONFIG_NFSD_V3_ACL is not set | ||
| 1328 | CONFIG_NFSD_V4=y | ||
| 1329 | CONFIG_LOCKD=m | ||
| 1330 | CONFIG_LOCKD_V4=y | ||
| 1331 | CONFIG_EXPORTFS=m | ||
| 1332 | CONFIG_NFS_COMMON=y | ||
| 1333 | CONFIG_SUNRPC=m | ||
| 1334 | CONFIG_SUNRPC_GSS=m | ||
| 1335 | # CONFIG_SUNRPC_REGISTER_V4 is not set | ||
| 1336 | CONFIG_RPCSEC_GSS_KRB5=m | ||
| 1337 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
| 1338 | CONFIG_SMB_FS=m | ||
| 1339 | CONFIG_SMB_NLS_DEFAULT=y | ||
| 1340 | CONFIG_SMB_NLS_REMOTE="cp437" | ||
| 1341 | CONFIG_CIFS=m | ||
| 1342 | # CONFIG_CIFS_STATS is not set | ||
| 1343 | # CONFIG_CIFS_WEAK_PW_HASH is not set | ||
| 1344 | # CONFIG_CIFS_XATTR is not set | ||
| 1345 | # CONFIG_CIFS_DEBUG2 is not set | ||
| 1346 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
| 1347 | # CONFIG_NCP_FS is not set | ||
| 1348 | # CONFIG_CODA_FS is not set | ||
| 1349 | # CONFIG_AFS_FS is not set | ||
| 1350 | |||
| 1351 | # | ||
| 1352 | # Partition Types | ||
| 1353 | # | ||
| 1354 | CONFIG_PARTITION_ADVANCED=y | ||
| 1355 | # CONFIG_ACORN_PARTITION is not set | ||
| 1356 | # CONFIG_OSF_PARTITION is not set | ||
| 1357 | # CONFIG_AMIGA_PARTITION is not set | ||
| 1358 | # CONFIG_ATARI_PARTITION is not set | ||
| 1359 | # CONFIG_MAC_PARTITION is not set | ||
| 1360 | CONFIG_MSDOS_PARTITION=y | ||
| 1361 | # CONFIG_BSD_DISKLABEL is not set | ||
| 1362 | # CONFIG_MINIX_SUBPARTITION is not set | ||
| 1363 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
| 1364 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
| 1365 | # CONFIG_LDM_PARTITION is not set | ||
| 1366 | CONFIG_SGI_PARTITION=y | ||
| 1367 | # CONFIG_ULTRIX_PARTITION is not set | ||
| 1368 | # CONFIG_SUN_PARTITION is not set | ||
| 1369 | # CONFIG_KARMA_PARTITION is not set | ||
| 1370 | CONFIG_EFI_PARTITION=y | ||
| 1371 | # CONFIG_SYSV68_PARTITION is not set | ||
| 1372 | CONFIG_NLS=y | ||
| 1373 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
| 1374 | CONFIG_NLS_CODEPAGE_437=y | ||
| 1375 | CONFIG_NLS_CODEPAGE_737=m | ||
| 1376 | CONFIG_NLS_CODEPAGE_775=m | ||
| 1377 | CONFIG_NLS_CODEPAGE_850=m | ||
| 1378 | CONFIG_NLS_CODEPAGE_852=m | ||
| 1379 | CONFIG_NLS_CODEPAGE_855=m | ||
| 1380 | CONFIG_NLS_CODEPAGE_857=m | ||
| 1381 | CONFIG_NLS_CODEPAGE_860=m | ||
| 1382 | CONFIG_NLS_CODEPAGE_861=m | ||
| 1383 | CONFIG_NLS_CODEPAGE_862=m | ||
| 1384 | CONFIG_NLS_CODEPAGE_863=m | ||
| 1385 | CONFIG_NLS_CODEPAGE_864=m | ||
| 1386 | CONFIG_NLS_CODEPAGE_865=m | ||
| 1387 | CONFIG_NLS_CODEPAGE_866=m | ||
| 1388 | CONFIG_NLS_CODEPAGE_869=m | ||
| 1389 | CONFIG_NLS_CODEPAGE_936=m | ||
| 1390 | CONFIG_NLS_CODEPAGE_950=m | ||
| 1391 | CONFIG_NLS_CODEPAGE_932=m | ||
| 1392 | CONFIG_NLS_CODEPAGE_949=m | ||
| 1393 | CONFIG_NLS_CODEPAGE_874=m | ||
| 1394 | CONFIG_NLS_ISO8859_8=m | ||
| 1395 | CONFIG_NLS_CODEPAGE_1250=m | ||
| 1396 | CONFIG_NLS_CODEPAGE_1251=m | ||
| 1397 | # CONFIG_NLS_ASCII is not set | ||
| 1398 | CONFIG_NLS_ISO8859_1=y | ||
| 1399 | CONFIG_NLS_ISO8859_2=m | ||
| 1400 | CONFIG_NLS_ISO8859_3=m | ||
| 1401 | CONFIG_NLS_ISO8859_4=m | ||
| 1402 | CONFIG_NLS_ISO8859_5=m | ||
| 1403 | CONFIG_NLS_ISO8859_6=m | ||
| 1404 | CONFIG_NLS_ISO8859_7=m | ||
| 1405 | CONFIG_NLS_ISO8859_9=m | ||
| 1406 | CONFIG_NLS_ISO8859_13=m | ||
| 1407 | CONFIG_NLS_ISO8859_14=m | ||
| 1408 | CONFIG_NLS_ISO8859_15=m | ||
| 1409 | CONFIG_NLS_KOI8_R=m | ||
| 1410 | CONFIG_NLS_KOI8_U=m | ||
| 1411 | CONFIG_NLS_UTF8=m | ||
| 1412 | # CONFIG_DLM is not set | ||
| 1413 | |||
| 1414 | # | ||
| 1415 | # Kernel hacking | ||
| 1416 | # | ||
| 1417 | # CONFIG_PRINTK_TIME is not set | ||
| 1418 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
| 1419 | CONFIG_ENABLE_MUST_CHECK=y | ||
| 1420 | CONFIG_FRAME_WARN=2048 | ||
| 1421 | CONFIG_MAGIC_SYSRQ=y | ||
| 1422 | # CONFIG_UNUSED_SYMBOLS is not set | ||
| 1423 | # CONFIG_DEBUG_FS is not set | ||
| 1424 | # CONFIG_HEADERS_CHECK is not set | ||
| 1425 | CONFIG_DEBUG_KERNEL=y | ||
| 1426 | # CONFIG_DEBUG_SHIRQ is not set | ||
| 1427 | CONFIG_DETECT_SOFTLOCKUP=y | ||
| 1428 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
| 1429 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
| 1430 | CONFIG_SCHED_DEBUG=y | ||
| 1431 | # CONFIG_SCHEDSTATS is not set | ||
| 1432 | # CONFIG_TIMER_STATS is not set | ||
| 1433 | # CONFIG_DEBUG_OBJECTS is not set | ||
| 1434 | # CONFIG_SLUB_DEBUG_ON is not set | ||
| 1435 | # CONFIG_SLUB_STATS is not set | ||
| 1436 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
| 1437 | # CONFIG_RT_MUTEX_TESTER is not set | ||
| 1438 | # CONFIG_DEBUG_SPINLOCK is not set | ||
| 1439 | CONFIG_DEBUG_MUTEXES=y | ||
| 1440 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
| 1441 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
| 1442 | # CONFIG_DEBUG_KOBJECT is not set | ||
| 1443 | # CONFIG_DEBUG_INFO is not set | ||
| 1444 | # CONFIG_DEBUG_VM is not set | ||
| 1445 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
| 1446 | CONFIG_DEBUG_MEMORY_INIT=y | ||
| 1447 | # CONFIG_DEBUG_LIST is not set | ||
| 1448 | # CONFIG_DEBUG_SG is not set | ||
| 1449 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
| 1450 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
| 1451 | # CONFIG_RCU_TORTURE_TEST is not set | ||
| 1452 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
| 1453 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
| 1454 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
| 1455 | # CONFIG_FAULT_INJECTION is not set | ||
| 1456 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | ||
| 1457 | |||
| 1458 | # | ||
| 1459 | # Tracers | ||
| 1460 | # | ||
| 1461 | # CONFIG_SCHED_TRACER is not set | ||
| 1462 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
| 1463 | # CONFIG_BOOT_TRACER is not set | ||
| 1464 | # CONFIG_TRACE_BRANCH_PROFILING is not set | ||
| 1465 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | ||
| 1466 | # CONFIG_SAMPLES is not set | ||
| 1467 | CONFIG_IA64_GRANULE_16MB=y | ||
| 1468 | # CONFIG_IA64_GRANULE_64MB is not set | ||
| 1469 | # CONFIG_IA64_PRINT_HAZARDS is not set | ||
| 1470 | # CONFIG_DISABLE_VHPT is not set | ||
| 1471 | # CONFIG_IA64_DEBUG_CMPXCHG is not set | ||
| 1472 | # CONFIG_IA64_DEBUG_IRQ is not set | ||
| 1473 | |||
| 1474 | # | ||
| 1475 | # Security options | ||
| 1476 | # | ||
| 1477 | # CONFIG_KEYS is not set | ||
| 1478 | # CONFIG_SECURITY is not set | ||
| 1479 | # CONFIG_SECURITYFS is not set | ||
| 1480 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
| 1481 | CONFIG_CRYPTO=y | ||
| 1482 | |||
| 1483 | # | ||
| 1484 | # Crypto core or helper | ||
| 1485 | # | ||
| 1486 | # CONFIG_CRYPTO_FIPS is not set | ||
| 1487 | CONFIG_CRYPTO_ALGAPI=y | ||
| 1488 | CONFIG_CRYPTO_ALGAPI2=y | ||
| 1489 | CONFIG_CRYPTO_AEAD2=y | ||
| 1490 | CONFIG_CRYPTO_BLKCIPHER=m | ||
| 1491 | CONFIG_CRYPTO_BLKCIPHER2=y | ||
| 1492 | CONFIG_CRYPTO_HASH=y | ||
| 1493 | CONFIG_CRYPTO_HASH2=y | ||
| 1494 | CONFIG_CRYPTO_RNG2=y | ||
| 1495 | CONFIG_CRYPTO_MANAGER=m | ||
| 1496 | CONFIG_CRYPTO_MANAGER2=y | ||
| 1497 | # CONFIG_CRYPTO_GF128MUL is not set | ||
| 1498 | # CONFIG_CRYPTO_NULL is not set | ||
| 1499 | # CONFIG_CRYPTO_CRYPTD is not set | ||
| 1500 | # CONFIG_CRYPTO_AUTHENC is not set | ||
| 1501 | # CONFIG_CRYPTO_TEST is not set | ||
| 1502 | |||
| 1503 | # | ||
| 1504 | # Authenticated Encryption with Associated Data | ||
| 1505 | # | ||
| 1506 | # CONFIG_CRYPTO_CCM is not set | ||
| 1507 | # CONFIG_CRYPTO_GCM is not set | ||
| 1508 | # CONFIG_CRYPTO_SEQIV is not set | ||
| 1509 | |||
| 1510 | # | ||
| 1511 | # Block modes | ||
| 1512 | # | ||
| 1513 | CONFIG_CRYPTO_CBC=m | ||
| 1514 | # CONFIG_CRYPTO_CTR is not set | ||
| 1515 | # CONFIG_CRYPTO_CTS is not set | ||
| 1516 | CONFIG_CRYPTO_ECB=m | ||
| 1517 | # CONFIG_CRYPTO_LRW is not set | ||
| 1518 | CONFIG_CRYPTO_PCBC=m | ||
| 1519 | # CONFIG_CRYPTO_XTS is not set | ||
| 1520 | |||
| 1521 | # | ||
| 1522 | # Hash modes | ||
| 1523 | # | ||
| 1524 | # CONFIG_CRYPTO_HMAC is not set | ||
| 1525 | # CONFIG_CRYPTO_XCBC is not set | ||
| 1526 | |||
| 1527 | # | ||
| 1528 | # Digest | ||
| 1529 | # | ||
| 1530 | # CONFIG_CRYPTO_CRC32C is not set | ||
| 1531 | # CONFIG_CRYPTO_MD4 is not set | ||
| 1532 | CONFIG_CRYPTO_MD5=y | ||
| 1533 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
| 1534 | # CONFIG_CRYPTO_RMD128 is not set | ||
| 1535 | # CONFIG_CRYPTO_RMD160 is not set | ||
| 1536 | # CONFIG_CRYPTO_RMD256 is not set | ||
| 1537 | # CONFIG_CRYPTO_RMD320 is not set | ||
| 1538 | # CONFIG_CRYPTO_SHA1 is not set | ||
| 1539 | # CONFIG_CRYPTO_SHA256 is not set | ||
| 1540 | # CONFIG_CRYPTO_SHA512 is not set | ||
| 1541 | # CONFIG_CRYPTO_TGR192 is not set | ||
| 1542 | # CONFIG_CRYPTO_WP512 is not set | ||
| 1543 | |||
| 1544 | # | ||
| 1545 | # Ciphers | ||
| 1546 | # | ||
| 1547 | # CONFIG_CRYPTO_AES is not set | ||
| 1548 | # CONFIG_CRYPTO_ANUBIS is not set | ||
| 1549 | # CONFIG_CRYPTO_ARC4 is not set | ||
| 1550 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
| 1551 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
| 1552 | # CONFIG_CRYPTO_CAST5 is not set | ||
| 1553 | # CONFIG_CRYPTO_CAST6 is not set | ||
| 1554 | CONFIG_CRYPTO_DES=m | ||
| 1555 | # CONFIG_CRYPTO_FCRYPT is not set | ||
| 1556 | # CONFIG_CRYPTO_KHAZAD is not set | ||
| 1557 | # CONFIG_CRYPTO_SALSA20 is not set | ||
| 1558 | # CONFIG_CRYPTO_SEED is not set | ||
| 1559 | # CONFIG_CRYPTO_SERPENT is not set | ||
| 1560 | # CONFIG_CRYPTO_TEA is not set | ||
| 1561 | # CONFIG_CRYPTO_TWOFISH is not set | ||
| 1562 | |||
| 1563 | # | ||
| 1564 | # Compression | ||
| 1565 | # | ||
| 1566 | # CONFIG_CRYPTO_DEFLATE is not set | ||
| 1567 | # CONFIG_CRYPTO_LZO is not set | ||
| 1568 | |||
| 1569 | # | ||
| 1570 | # Random Number Generation | ||
| 1571 | # | ||
| 1572 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
| 1573 | CONFIG_CRYPTO_HW=y | ||
| 1574 | # CONFIG_CRYPTO_DEV_HIFN_795X is not set | ||
| 1575 | CONFIG_HAVE_KVM=y | ||
| 1576 | CONFIG_VIRTUALIZATION=y | ||
| 1577 | # CONFIG_KVM is not set | ||
| 1578 | # CONFIG_VIRTIO_PCI is not set | ||
| 1579 | # CONFIG_VIRTIO_BALLOON is not set | ||
| 1580 | |||
| 1581 | # | ||
| 1582 | # Library routines | ||
| 1583 | # | ||
| 1584 | CONFIG_BITREVERSE=y | ||
| 1585 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
| 1586 | # CONFIG_CRC_CCITT is not set | ||
| 1587 | # CONFIG_CRC16 is not set | ||
| 1588 | # CONFIG_CRC_T10DIF is not set | ||
| 1589 | CONFIG_CRC_ITU_T=m | ||
| 1590 | CONFIG_CRC32=y | ||
| 1591 | # CONFIG_CRC7 is not set | ||
| 1592 | # CONFIG_LIBCRC32C is not set | ||
| 1593 | CONFIG_PLIST=y | ||
| 1594 | CONFIG_HAS_IOMEM=y | ||
| 1595 | CONFIG_HAS_IOPORT=y | ||
| 1596 | CONFIG_HAS_DMA=y | ||
| 1597 | CONFIG_GENERIC_HARDIRQS=y | ||
| 1598 | CONFIG_GENERIC_IRQ_PROBE=y | ||
| 1599 | CONFIG_GENERIC_PENDING_IRQ=y | ||
| 1600 | CONFIG_IRQ_PER_CPU=y | ||
| 1601 | # CONFIG_IOMMU_API is not set | ||
diff --git a/arch/ia64/include/asm/sn/bte.h b/arch/ia64/include/asm/sn/bte.h index 5efecf06c9a4..96798d2da7c2 100644 --- a/arch/ia64/include/asm/sn/bte.h +++ b/arch/ia64/include/asm/sn/bte.h | |||
| @@ -39,7 +39,7 @@ | |||
| 39 | /* BTE status register only supports 16 bits for length field */ | 39 | /* BTE status register only supports 16 bits for length field */ |
| 40 | #define BTE_LEN_BITS (16) | 40 | #define BTE_LEN_BITS (16) |
| 41 | #define BTE_LEN_MASK ((1 << BTE_LEN_BITS) - 1) | 41 | #define BTE_LEN_MASK ((1 << BTE_LEN_BITS) - 1) |
| 42 | #define BTE_MAX_XFER ((1 << BTE_LEN_BITS) * L1_CACHE_BYTES) | 42 | #define BTE_MAX_XFER (BTE_LEN_MASK << L1_CACHE_SHIFT) |
| 43 | 43 | ||
| 44 | 44 | ||
| 45 | /* Define hardware */ | 45 | /* Define hardware */ |
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 11463994a7d5..52290547c85b 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
| @@ -736,14 +736,15 @@ int __cpu_disable(void) | |||
| 736 | return -EBUSY; | 736 | return -EBUSY; |
| 737 | } | 737 | } |
| 738 | 738 | ||
| 739 | cpu_clear(cpu, cpu_online_map); | ||
| 740 | |||
| 739 | if (migrate_platform_irqs(cpu)) { | 741 | if (migrate_platform_irqs(cpu)) { |
| 740 | cpu_set(cpu, cpu_online_map); | 742 | cpu_set(cpu, cpu_online_map); |
| 741 | return (-EBUSY); | 743 | return -EBUSY; |
| 742 | } | 744 | } |
| 743 | 745 | ||
| 744 | remove_siblinginfo(cpu); | 746 | remove_siblinginfo(cpu); |
| 745 | fixup_irqs(); | 747 | fixup_irqs(); |
| 746 | cpu_clear(cpu, cpu_online_map); | ||
| 747 | local_flush_tlb_all(); | 748 | local_flush_tlb_all(); |
| 748 | cpu_clear(cpu, cpu_callin_map); | 749 | cpu_clear(cpu, cpu_callin_map); |
| 749 | return 0; | 750 | return 0; |
diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c index 9456d4034024..c6d6b62db66c 100644 --- a/arch/ia64/sn/kernel/bte.c +++ b/arch/ia64/sn/kernel/bte.c | |||
| @@ -97,9 +97,10 @@ bte_result_t bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification) | |||
| 97 | return BTE_SUCCESS; | 97 | return BTE_SUCCESS; |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | BUG_ON((len & L1_CACHE_MASK) || | 100 | BUG_ON(len & L1_CACHE_MASK); |
| 101 | (src & L1_CACHE_MASK) || (dest & L1_CACHE_MASK)); | 101 | BUG_ON(src & L1_CACHE_MASK); |
| 102 | BUG_ON(!(len < ((BTE_LEN_MASK + 1) << L1_CACHE_SHIFT))); | 102 | BUG_ON(dest & L1_CACHE_MASK); |
| 103 | BUG_ON(len > BTE_MAX_XFER); | ||
| 103 | 104 | ||
| 104 | /* | 105 | /* |
| 105 | * Start with interface corresponding to cpu number | 106 | * Start with interface corresponding to cpu number |
diff --git a/arch/ia64/xen/Kconfig b/arch/ia64/xen/Kconfig index f1683a20275b..515e0826803a 100644 --- a/arch/ia64/xen/Kconfig +++ b/arch/ia64/xen/Kconfig | |||
| @@ -8,8 +8,7 @@ config XEN | |||
| 8 | depends on PARAVIRT && MCKINLEY && IA64_PAGE_SIZE_16KB && EXPERIMENTAL | 8 | depends on PARAVIRT && MCKINLEY && IA64_PAGE_SIZE_16KB && EXPERIMENTAL |
| 9 | select XEN_XENCOMM | 9 | select XEN_XENCOMM |
| 10 | select NO_IDLE_HZ | 10 | select NO_IDLE_HZ |
| 11 | 11 | # followings are required to save/restore. | |
| 12 | # those are required to save/restore. | ||
| 13 | select ARCH_SUSPEND_POSSIBLE | 12 | select ARCH_SUSPEND_POSSIBLE |
| 14 | select SUSPEND | 13 | select SUSPEND |
| 15 | select PM_SLEEP | 14 | select PM_SLEEP |
diff --git a/arch/ia64/xen/xen_pv_ops.c b/arch/ia64/xen/xen_pv_ops.c index 04cd12350455..936cff3c96e0 100644 --- a/arch/ia64/xen/xen_pv_ops.c +++ b/arch/ia64/xen/xen_pv_ops.c | |||
| @@ -153,7 +153,7 @@ xen_post_smp_prepare_boot_cpu(void) | |||
| 153 | xen_setup_vcpu_info_placement(); | 153 | xen_setup_vcpu_info_placement(); |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | static const struct pv_init_ops xen_init_ops __initdata = { | 156 | static const struct pv_init_ops xen_init_ops __initconst = { |
| 157 | .banner = xen_banner, | 157 | .banner = xen_banner, |
| 158 | 158 | ||
| 159 | .reserve_memory = xen_reserve_memory, | 159 | .reserve_memory = xen_reserve_memory, |
| @@ -337,7 +337,7 @@ xen_iosapic_write(char __iomem *iosapic, unsigned int reg, u32 val) | |||
| 337 | HYPERVISOR_physdev_op(PHYSDEVOP_apic_write, &apic_op); | 337 | HYPERVISOR_physdev_op(PHYSDEVOP_apic_write, &apic_op); |
| 338 | } | 338 | } |
| 339 | 339 | ||
| 340 | static const struct pv_iosapic_ops xen_iosapic_ops __initdata = { | 340 | static const struct pv_iosapic_ops xen_iosapic_ops __initconst = { |
| 341 | .pcat_compat_init = xen_pcat_compat_init, | 341 | .pcat_compat_init = xen_pcat_compat_init, |
| 342 | .__get_irq_chip = xen_iosapic_get_irq_chip, | 342 | .__get_irq_chip = xen_iosapic_get_irq_chip, |
| 343 | 343 | ||
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index dba4afabb444..39478dd08e67 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c | |||
| @@ -187,8 +187,8 @@ __asm__ (__ALIGN_STR "\n" \ | |||
| 187 | " jbra ret_from_interrupt\n" \ | 187 | " jbra ret_from_interrupt\n" \ |
| 188 | : : "i" (&kstat_cpu(0).irqs[n+8]), "i" (&irq_handler[n+8]), \ | 188 | : : "i" (&kstat_cpu(0).irqs[n+8]), "i" (&irq_handler[n+8]), \ |
| 189 | "n" (PT_OFF_SR), "n" (n), \ | 189 | "n" (PT_OFF_SR), "n" (n), \ |
| 190 | "i" (n & 8 ? (n & 16 ? &tt_mfp.int_mk_a : &mfp.int_mk_a) \ | 190 | "i" (n & 8 ? (n & 16 ? &tt_mfp.int_mk_a : &st_mfp.int_mk_a) \ |
| 191 | : (n & 16 ? &tt_mfp.int_mk_b : &mfp.int_mk_b)), \ | 191 | : (n & 16 ? &tt_mfp.int_mk_b : &st_mfp.int_mk_b)), \ |
| 192 | "m" (preempt_count()), "di" (HARDIRQ_OFFSET) \ | 192 | "m" (preempt_count()), "di" (HARDIRQ_OFFSET) \ |
| 193 | ); \ | 193 | ); \ |
| 194 | for (;;); /* fake noreturn */ \ | 194 | for (;;); /* fake noreturn */ \ |
| @@ -366,14 +366,14 @@ void __init atari_init_IRQ(void) | |||
| 366 | /* Initialize the MFP(s) */ | 366 | /* Initialize the MFP(s) */ |
| 367 | 367 | ||
| 368 | #ifdef ATARI_USE_SOFTWARE_EOI | 368 | #ifdef ATARI_USE_SOFTWARE_EOI |
| 369 | mfp.vec_adr = 0x48; /* Software EOI-Mode */ | 369 | st_mfp.vec_adr = 0x48; /* Software EOI-Mode */ |
| 370 | #else | 370 | #else |
| 371 | mfp.vec_adr = 0x40; /* Automatic EOI-Mode */ | 371 | st_mfp.vec_adr = 0x40; /* Automatic EOI-Mode */ |
| 372 | #endif | 372 | #endif |
| 373 | mfp.int_en_a = 0x00; /* turn off MFP-Ints */ | 373 | st_mfp.int_en_a = 0x00; /* turn off MFP-Ints */ |
| 374 | mfp.int_en_b = 0x00; | 374 | st_mfp.int_en_b = 0x00; |
| 375 | mfp.int_mk_a = 0xff; /* no Masking */ | 375 | st_mfp.int_mk_a = 0xff; /* no Masking */ |
| 376 | mfp.int_mk_b = 0xff; | 376 | st_mfp.int_mk_b = 0xff; |
| 377 | 377 | ||
| 378 | if (ATARIHW_PRESENT(TT_MFP)) { | 378 | if (ATARIHW_PRESENT(TT_MFP)) { |
| 379 | #ifdef ATARI_USE_SOFTWARE_EOI | 379 | #ifdef ATARI_USE_SOFTWARE_EOI |
diff --git a/arch/m68k/atari/atakeyb.c b/arch/m68k/atari/atakeyb.c index a5f33c059979..4add96d13b19 100644 --- a/arch/m68k/atari/atakeyb.c +++ b/arch/m68k/atari/atakeyb.c | |||
| @@ -609,10 +609,10 @@ int atari_keyb_init(void) | |||
| 609 | ACIA_RHTID : 0); | 609 | ACIA_RHTID : 0); |
| 610 | 610 | ||
| 611 | /* make sure the interrupt line is up */ | 611 | /* make sure the interrupt line is up */ |
| 612 | } while ((mfp.par_dt_reg & 0x10) == 0); | 612 | } while ((st_mfp.par_dt_reg & 0x10) == 0); |
| 613 | 613 | ||
| 614 | /* enable ACIA Interrupts */ | 614 | /* enable ACIA Interrupts */ |
| 615 | mfp.active_edge &= ~0x10; | 615 | st_mfp.active_edge &= ~0x10; |
| 616 | atari_turnon_irq(IRQ_MFP_ACIA); | 616 | atari_turnon_irq(IRQ_MFP_ACIA); |
| 617 | 617 | ||
| 618 | ikbd_self_test = 1; | 618 | ikbd_self_test = 1; |
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c index 49c28cdbea5c..ae2d96e5d618 100644 --- a/arch/m68k/atari/config.c +++ b/arch/m68k/atari/config.c | |||
| @@ -258,7 +258,7 @@ void __init config_atari(void) | |||
| 258 | printk("STND_SHIFTER "); | 258 | printk("STND_SHIFTER "); |
| 259 | } | 259 | } |
| 260 | } | 260 | } |
| 261 | if (hwreg_present(&mfp.par_dt_reg)) { | 261 | if (hwreg_present(&st_mfp.par_dt_reg)) { |
| 262 | ATARIHW_SET(ST_MFP); | 262 | ATARIHW_SET(ST_MFP); |
| 263 | printk("ST_MFP "); | 263 | printk("ST_MFP "); |
| 264 | } | 264 | } |
diff --git a/arch/m68k/atari/debug.c b/arch/m68k/atari/debug.c index 702b15ccfab7..28efdc33c1ae 100644 --- a/arch/m68k/atari/debug.c +++ b/arch/m68k/atari/debug.c | |||
| @@ -34,9 +34,9 @@ static struct console atari_console_driver = { | |||
| 34 | 34 | ||
| 35 | static inline void ata_mfp_out(char c) | 35 | static inline void ata_mfp_out(char c) |
| 36 | { | 36 | { |
| 37 | while (!(mfp.trn_stat & 0x80)) /* wait for tx buf empty */ | 37 | while (!(st_mfp.trn_stat & 0x80)) /* wait for tx buf empty */ |
| 38 | barrier(); | 38 | barrier(); |
| 39 | mfp.usart_dta = c; | 39 | st_mfp.usart_dta = c; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | static void atari_mfp_console_write(struct console *co, const char *str, | 42 | static void atari_mfp_console_write(struct console *co, const char *str, |
| @@ -91,7 +91,7 @@ static int ata_par_out(char c) | |||
| 91 | /* This a some-seconds timeout in case no printer is connected */ | 91 | /* This a some-seconds timeout in case no printer is connected */ |
| 92 | unsigned long i = loops_per_jiffy > 1 ? loops_per_jiffy : 10000000/HZ; | 92 | unsigned long i = loops_per_jiffy > 1 ? loops_per_jiffy : 10000000/HZ; |
| 93 | 93 | ||
| 94 | while ((mfp.par_dt_reg & 1) && --i) /* wait for BUSY == L */ | 94 | while ((st_mfp.par_dt_reg & 1) && --i) /* wait for BUSY == L */ |
| 95 | ; | 95 | ; |
| 96 | if (!i) | 96 | if (!i) |
| 97 | return 0; | 97 | return 0; |
| @@ -131,9 +131,9 @@ static void atari_par_console_write(struct console *co, const char *str, | |||
| 131 | #if 0 | 131 | #if 0 |
| 132 | int atari_mfp_console_wait_key(struct console *co) | 132 | int atari_mfp_console_wait_key(struct console *co) |
| 133 | { | 133 | { |
| 134 | while (!(mfp.rcv_stat & 0x80)) /* wait for rx buf filled */ | 134 | while (!(st_mfp.rcv_stat & 0x80)) /* wait for rx buf filled */ |
| 135 | barrier(); | 135 | barrier(); |
| 136 | return mfp.usart_dta; | 136 | return st_mfp.usart_dta; |
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | int atari_scc_console_wait_key(struct console *co) | 139 | int atari_scc_console_wait_key(struct console *co) |
| @@ -175,12 +175,12 @@ static void __init atari_init_mfp_port(int cflag) | |||
| 175 | baud = B9600; /* use default 9600bps for non-implemented rates */ | 175 | baud = B9600; /* use default 9600bps for non-implemented rates */ |
| 176 | baud -= B1200; /* baud_table[] starts at 1200bps */ | 176 | baud -= B1200; /* baud_table[] starts at 1200bps */ |
| 177 | 177 | ||
| 178 | mfp.trn_stat &= ~0x01; /* disable TX */ | 178 | st_mfp.trn_stat &= ~0x01; /* disable TX */ |
| 179 | mfp.usart_ctr = parity | csize | 0x88; /* 1:16 clk mode, 1 stop bit */ | 179 | st_mfp.usart_ctr = parity | csize | 0x88; /* 1:16 clk mode, 1 stop bit */ |
| 180 | mfp.tim_ct_cd &= 0x70; /* stop timer D */ | 180 | st_mfp.tim_ct_cd &= 0x70; /* stop timer D */ |
| 181 | mfp.tim_dt_d = baud_table[baud]; | 181 | st_mfp.tim_dt_d = baud_table[baud]; |
| 182 | mfp.tim_ct_cd |= 0x01; /* start timer D, 1:4 */ | 182 | st_mfp.tim_ct_cd |= 0x01; /* start timer D, 1:4 */ |
| 183 | mfp.trn_stat |= 0x01; /* enable TX */ | 183 | st_mfp.trn_stat |= 0x01; /* enable TX */ |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | #define SCC_WRITE(reg, val) \ | 186 | #define SCC_WRITE(reg, val) \ |
diff --git a/arch/m68k/atari/time.c b/arch/m68k/atari/time.c index d076ff8d1b39..a0531f34c617 100644 --- a/arch/m68k/atari/time.c +++ b/arch/m68k/atari/time.c | |||
| @@ -27,9 +27,9 @@ void __init | |||
| 27 | atari_sched_init(irq_handler_t timer_routine) | 27 | atari_sched_init(irq_handler_t timer_routine) |
| 28 | { | 28 | { |
| 29 | /* set Timer C data Register */ | 29 | /* set Timer C data Register */ |
| 30 | mfp.tim_dt_c = INT_TICKS; | 30 | st_mfp.tim_dt_c = INT_TICKS; |
| 31 | /* start timer C, div = 1:100 */ | 31 | /* start timer C, div = 1:100 */ |
| 32 | mfp.tim_ct_cd = (mfp.tim_ct_cd & 15) | 0x60; | 32 | st_mfp.tim_ct_cd = (st_mfp.tim_ct_cd & 15) | 0x60; |
| 33 | /* install interrupt service routine for MFP Timer C */ | 33 | /* install interrupt service routine for MFP Timer C */ |
| 34 | if (request_irq(IRQ_MFP_TIMC, timer_routine, IRQ_TYPE_SLOW, | 34 | if (request_irq(IRQ_MFP_TIMC, timer_routine, IRQ_TYPE_SLOW, |
| 35 | "timer", timer_routine)) | 35 | "timer", timer_routine)) |
| @@ -46,11 +46,11 @@ unsigned long atari_gettimeoffset (void) | |||
| 46 | unsigned long ticks, offset = 0; | 46 | unsigned long ticks, offset = 0; |
| 47 | 47 | ||
| 48 | /* read MFP timer C current value */ | 48 | /* read MFP timer C current value */ |
| 49 | ticks = mfp.tim_dt_c; | 49 | ticks = st_mfp.tim_dt_c; |
| 50 | /* The probability of underflow is less than 2% */ | 50 | /* The probability of underflow is less than 2% */ |
| 51 | if (ticks > INT_TICKS - INT_TICKS / 50) | 51 | if (ticks > INT_TICKS - INT_TICKS / 50) |
| 52 | /* Check for pending timer interrupt */ | 52 | /* Check for pending timer interrupt */ |
| 53 | if (mfp.int_pn_b & (1 << 5)) | 53 | if (st_mfp.int_pn_b & (1 << 5)) |
| 54 | offset = TICK_SIZE; | 54 | offset = TICK_SIZE; |
| 55 | 55 | ||
| 56 | ticks = INT_TICKS - ticks; | 56 | ticks = INT_TICKS - ticks; |
diff --git a/arch/m68k/include/asm/atarihw.h b/arch/m68k/include/asm/atarihw.h index 1412b4ab202f..a714e1aa072a 100644 --- a/arch/m68k/include/asm/atarihw.h +++ b/arch/m68k/include/asm/atarihw.h | |||
| @@ -113,7 +113,7 @@ extern struct atari_hw_present atari_hw_present; | |||
| 113 | * of nops on various machines. Somebody claimed that the tstb takes 600 ns. | 113 | * of nops on various machines. Somebody claimed that the tstb takes 600 ns. |
| 114 | */ | 114 | */ |
| 115 | #define MFPDELAY() \ | 115 | #define MFPDELAY() \ |
| 116 | __asm__ __volatile__ ( "tstb %0" : : "m" (mfp.par_dt_reg) : "cc" ); | 116 | __asm__ __volatile__ ( "tstb %0" : : "m" (st_mfp.par_dt_reg) : "cc" ); |
| 117 | 117 | ||
| 118 | /* Do cache push/invalidate for DMA read/write. This function obeys the | 118 | /* Do cache push/invalidate for DMA read/write. This function obeys the |
| 119 | * snooping on some machines (Medusa) and processors: The Medusa itself can | 119 | * snooping on some machines (Medusa) and processors: The Medusa itself can |
| @@ -565,7 +565,7 @@ struct MFP | |||
| 565 | u_char char_dummy23; | 565 | u_char char_dummy23; |
| 566 | u_char usart_dta; | 566 | u_char usart_dta; |
| 567 | }; | 567 | }; |
| 568 | # define mfp ((*(volatile struct MFP*)MFP_BAS)) | 568 | # define st_mfp ((*(volatile struct MFP*)MFP_BAS)) |
| 569 | 569 | ||
| 570 | /* TT's second MFP */ | 570 | /* TT's second MFP */ |
| 571 | 571 | ||
diff --git a/arch/m68k/include/asm/atariints.h b/arch/m68k/include/asm/atariints.h index 5748e99f4e26..f597892e43a0 100644 --- a/arch/m68k/include/asm/atariints.h +++ b/arch/m68k/include/asm/atariints.h | |||
| @@ -113,7 +113,7 @@ static inline int get_mfp_bit( unsigned irq, int type ) | |||
| 113 | { unsigned char mask, *reg; | 113 | { unsigned char mask, *reg; |
| 114 | 114 | ||
| 115 | mask = 1 << (irq & 7); | 115 | mask = 1 << (irq & 7); |
| 116 | reg = (unsigned char *)&mfp.int_en_a + type*4 + | 116 | reg = (unsigned char *)&st_mfp.int_en_a + type*4 + |
| 117 | ((irq & 8) >> 2) + (((irq-8) & 16) << 3); | 117 | ((irq & 8) >> 2) + (((irq-8) & 16) << 3); |
| 118 | return( *reg & mask ); | 118 | return( *reg & mask ); |
| 119 | } | 119 | } |
| @@ -123,7 +123,7 @@ static inline void set_mfp_bit( unsigned irq, int type ) | |||
| 123 | { unsigned char mask, *reg; | 123 | { unsigned char mask, *reg; |
| 124 | 124 | ||
| 125 | mask = 1 << (irq & 7); | 125 | mask = 1 << (irq & 7); |
| 126 | reg = (unsigned char *)&mfp.int_en_a + type*4 + | 126 | reg = (unsigned char *)&st_mfp.int_en_a + type*4 + |
| 127 | ((irq & 8) >> 2) + (((irq-8) & 16) << 3); | 127 | ((irq & 8) >> 2) + (((irq-8) & 16) << 3); |
| 128 | __asm__ __volatile__ ( "orb %0,%1" | 128 | __asm__ __volatile__ ( "orb %0,%1" |
| 129 | : : "di" (mask), "m" (*reg) : "memory" ); | 129 | : : "di" (mask), "m" (*reg) : "memory" ); |
| @@ -134,7 +134,7 @@ static inline void clear_mfp_bit( unsigned irq, int type ) | |||
| 134 | { unsigned char mask, *reg; | 134 | { unsigned char mask, *reg; |
| 135 | 135 | ||
| 136 | mask = ~(1 << (irq & 7)); | 136 | mask = ~(1 << (irq & 7)); |
| 137 | reg = (unsigned char *)&mfp.int_en_a + type*4 + | 137 | reg = (unsigned char *)&st_mfp.int_en_a + type*4 + |
| 138 | ((irq & 8) >> 2) + (((irq-8) & 16) << 3); | 138 | ((irq & 8) >> 2) + (((irq-8) & 16) << 3); |
| 139 | if (type == MFP_PENDING || type == MFP_SERVICE) | 139 | if (type == MFP_PENDING || type == MFP_SERVICE) |
| 140 | __asm__ __volatile__ ( "moveb %0,%1" | 140 | __asm__ __volatile__ ( "moveb %0,%1" |
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig index 9a9f43358879..41d16822e616 100644 --- a/arch/mn10300/Kconfig +++ b/arch/mn10300/Kconfig | |||
| @@ -7,6 +7,7 @@ mainmenu "Linux Kernel Configuration" | |||
| 7 | 7 | ||
| 8 | config MN10300 | 8 | config MN10300 |
| 9 | def_bool y | 9 | def_bool y |
| 10 | select HAVE_OPROFILE | ||
| 10 | 11 | ||
| 11 | config AM33 | 12 | config AM33 |
| 12 | def_bool y | 13 | def_bool y |
diff --git a/arch/mn10300/unit-asb2305/pci.c b/arch/mn10300/unit-asb2305/pci.c index 1a86425fec42..07dbbcda3b2e 100644 --- a/arch/mn10300/unit-asb2305/pci.c +++ b/arch/mn10300/unit-asb2305/pci.c | |||
| @@ -173,7 +173,7 @@ static int pci_ampci_write_config_byte(struct pci_bus *bus, unsigned int devfn, | |||
| 173 | BRIDGEREGB(where) = value; | 173 | BRIDGEREGB(where) = value; |
| 174 | } else { | 174 | } else { |
| 175 | if (bus->number == 0 && | 175 | if (bus->number == 0 && |
| 176 | (devfn == PCI_DEVFN(2, 0) && devfn == PCI_DEVFN(3, 0)) | 176 | (devfn == PCI_DEVFN(2, 0) || devfn == PCI_DEVFN(3, 0)) |
| 177 | ) | 177 | ) |
| 178 | __pcidebug("<= %02x", bus, devfn, where, value); | 178 | __pcidebug("<= %02x", bus, devfn, where, value); |
| 179 | CONFIG_ADDRESS = CONFIG_CMD(bus, devfn, where); | 179 | CONFIG_ADDRESS = CONFIG_CMD(bus, devfn, where); |
diff --git a/arch/um/drivers/vde_user.c b/arch/um/drivers/vde_user.c index 56533db25343..c5c43253e6ce 100644 --- a/arch/um/drivers/vde_user.c +++ b/arch/um/drivers/vde_user.c | |||
| @@ -78,7 +78,7 @@ void vde_init_libstuff(struct vde_data *vpri, struct vde_init *init) | |||
| 78 | { | 78 | { |
| 79 | struct vde_open_args *args; | 79 | struct vde_open_args *args; |
| 80 | 80 | ||
| 81 | vpri->args = kmalloc(sizeof(struct vde_open_args), UM_GFP_KERNEL); | 81 | vpri->args = uml_kmalloc(sizeof(struct vde_open_args), UM_GFP_KERNEL); |
| 82 | if (vpri->args == NULL) { | 82 | if (vpri->args == NULL) { |
| 83 | printk(UM_KERN_ERR "vde_init_libstuff - vde_open_args " | 83 | printk(UM_KERN_ERR "vde_init_libstuff - vde_open_args " |
| 84 | "allocation failed"); | 84 | "allocation failed"); |
| @@ -91,8 +91,8 @@ void vde_init_libstuff(struct vde_data *vpri, struct vde_init *init) | |||
| 91 | args->group = init->group; | 91 | args->group = init->group; |
| 92 | args->mode = init->mode ? init->mode : 0700; | 92 | args->mode = init->mode ? init->mode : 0700; |
| 93 | 93 | ||
| 94 | args->port ? printk(UM_KERN_INFO "port %d", args->port) : | 94 | args->port ? printk("port %d", args->port) : |
| 95 | printk(UM_KERN_INFO "undefined port"); | 95 | printk("undefined port"); |
| 96 | } | 96 | } |
| 97 | 97 | ||
| 98 | int vde_user_read(void *conn, void *buf, int len) | 98 | int vde_user_read(void *conn, void *buf, int len) |
diff --git a/arch/x86/kernel/acpi/wakeup_64.S b/arch/x86/kernel/acpi/wakeup_64.S index bcc293423a70..96258d9dc974 100644 --- a/arch/x86/kernel/acpi/wakeup_64.S +++ b/arch/x86/kernel/acpi/wakeup_64.S | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | * Hooray, we are in Long 64-bit mode (but still running in low memory) | 13 | * Hooray, we are in Long 64-bit mode (but still running in low memory) |
| 14 | */ | 14 | */ |
| 15 | ENTRY(wakeup_long64) | 15 | ENTRY(wakeup_long64) |
| 16 | wakeup_long64: | ||
| 17 | movq saved_magic, %rax | 16 | movq saved_magic, %rax |
| 18 | movq $0x123456789abcdef0, %rdx | 17 | movq $0x123456789abcdef0, %rdx |
| 19 | cmpq %rdx, %rax | 18 | cmpq %rdx, %rax |
| @@ -34,16 +33,12 @@ wakeup_long64: | |||
| 34 | 33 | ||
| 35 | movq saved_rip, %rax | 34 | movq saved_rip, %rax |
| 36 | jmp *%rax | 35 | jmp *%rax |
| 36 | ENDPROC(wakeup_long64) | ||
| 37 | 37 | ||
| 38 | bogus_64_magic: | 38 | bogus_64_magic: |
| 39 | jmp bogus_64_magic | 39 | jmp bogus_64_magic |
| 40 | 40 | ||
| 41 | .align 2 | 41 | ENTRY(do_suspend_lowlevel) |
| 42 | .p2align 4,,15 | ||
| 43 | .globl do_suspend_lowlevel | ||
| 44 | .type do_suspend_lowlevel,@function | ||
| 45 | do_suspend_lowlevel: | ||
| 46 | .LFB5: | ||
| 47 | subq $8, %rsp | 42 | subq $8, %rsp |
| 48 | xorl %eax, %eax | 43 | xorl %eax, %eax |
| 49 | call save_processor_state | 44 | call save_processor_state |
| @@ -67,7 +62,7 @@ do_suspend_lowlevel: | |||
| 67 | pushfq | 62 | pushfq |
| 68 | popq pt_regs_flags(%rax) | 63 | popq pt_regs_flags(%rax) |
| 69 | 64 | ||
| 70 | movq $.L97, saved_rip(%rip) | 65 | movq $resume_point, saved_rip(%rip) |
| 71 | 66 | ||
| 72 | movq %rsp, saved_rsp | 67 | movq %rsp, saved_rsp |
| 73 | movq %rbp, saved_rbp | 68 | movq %rbp, saved_rbp |
| @@ -78,14 +73,12 @@ do_suspend_lowlevel: | |||
| 78 | addq $8, %rsp | 73 | addq $8, %rsp |
| 79 | movl $3, %edi | 74 | movl $3, %edi |
| 80 | xorl %eax, %eax | 75 | xorl %eax, %eax |
| 81 | jmp acpi_enter_sleep_state | 76 | call acpi_enter_sleep_state |
| 82 | .L97: | 77 | /* in case something went wrong, restore the machine status and go on */ |
| 83 | .p2align 4,,7 | 78 | jmp resume_point |
| 84 | .L99: | ||
| 85 | .align 4 | ||
| 86 | movl $24, %eax | ||
| 87 | movw %ax, %ds | ||
| 88 | 79 | ||
| 80 | .align 4 | ||
| 81 | resume_point: | ||
| 89 | /* We don't restore %rax, it must be 0 anyway */ | 82 | /* We don't restore %rax, it must be 0 anyway */ |
| 90 | movq $saved_context, %rax | 83 | movq $saved_context, %rax |
| 91 | movq saved_context_cr4(%rax), %rbx | 84 | movq saved_context_cr4(%rax), %rbx |
| @@ -117,12 +110,9 @@ do_suspend_lowlevel: | |||
| 117 | xorl %eax, %eax | 110 | xorl %eax, %eax |
| 118 | addq $8, %rsp | 111 | addq $8, %rsp |
| 119 | jmp restore_processor_state | 112 | jmp restore_processor_state |
| 120 | .LFE5: | 113 | ENDPROC(do_suspend_lowlevel) |
| 121 | .Lfe5: | 114 | |
| 122 | .size do_suspend_lowlevel, .Lfe5-do_suspend_lowlevel | ||
| 123 | |||
| 124 | .data | 115 | .data |
| 125 | ALIGN | ||
| 126 | ENTRY(saved_rbp) .quad 0 | 116 | ENTRY(saved_rbp) .quad 0 |
| 127 | ENTRY(saved_rsi) .quad 0 | 117 | ENTRY(saved_rsi) .quad 0 |
| 128 | ENTRY(saved_rdi) .quad 0 | 118 | ENTRY(saved_rdi) .quad 0 |
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c index 98807bb095ad..266ec6c18b6c 100644 --- a/arch/x86/kernel/apm_32.c +++ b/arch/x86/kernel/apm_32.c | |||
| @@ -1192,6 +1192,7 @@ static int suspend(int vetoable) | |||
| 1192 | device_suspend(PMSG_SUSPEND); | 1192 | device_suspend(PMSG_SUSPEND); |
| 1193 | local_irq_disable(); | 1193 | local_irq_disable(); |
| 1194 | device_power_down(PMSG_SUSPEND); | 1194 | device_power_down(PMSG_SUSPEND); |
| 1195 | sysdev_suspend(PMSG_SUSPEND); | ||
| 1195 | 1196 | ||
| 1196 | local_irq_enable(); | 1197 | local_irq_enable(); |
| 1197 | 1198 | ||
| @@ -1208,6 +1209,7 @@ static int suspend(int vetoable) | |||
| 1208 | if (err != APM_SUCCESS) | 1209 | if (err != APM_SUCCESS) |
| 1209 | apm_error("suspend", err); | 1210 | apm_error("suspend", err); |
| 1210 | err = (err == APM_SUCCESS) ? 0 : -EIO; | 1211 | err = (err == APM_SUCCESS) ? 0 : -EIO; |
| 1212 | sysdev_resume(); | ||
| 1211 | device_power_up(PMSG_RESUME); | 1213 | device_power_up(PMSG_RESUME); |
| 1212 | local_irq_enable(); | 1214 | local_irq_enable(); |
| 1213 | device_resume(PMSG_RESUME); | 1215 | device_resume(PMSG_RESUME); |
| @@ -1228,6 +1230,7 @@ static void standby(void) | |||
| 1228 | 1230 | ||
| 1229 | local_irq_disable(); | 1231 | local_irq_disable(); |
| 1230 | device_power_down(PMSG_SUSPEND); | 1232 | device_power_down(PMSG_SUSPEND); |
| 1233 | sysdev_suspend(PMSG_SUSPEND); | ||
| 1231 | local_irq_enable(); | 1234 | local_irq_enable(); |
| 1232 | 1235 | ||
| 1233 | err = set_system_power_state(APM_STATE_STANDBY); | 1236 | err = set_system_power_state(APM_STATE_STANDBY); |
| @@ -1235,6 +1238,7 @@ static void standby(void) | |||
| 1235 | apm_error("standby", err); | 1238 | apm_error("standby", err); |
| 1236 | 1239 | ||
| 1237 | local_irq_disable(); | 1240 | local_irq_disable(); |
| 1241 | sysdev_resume(); | ||
| 1238 | device_power_up(PMSG_RESUME); | 1242 | device_power_up(PMSG_RESUME); |
| 1239 | local_irq_enable(); | 1243 | local_irq_enable(); |
| 1240 | } | 1244 | } |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c index 25cf624eccb7..fe79985ce0f2 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_64.c | |||
| @@ -490,7 +490,7 @@ static void __cpuinit mce_cpu_quirks(struct cpuinfo_x86 *c) | |||
| 490 | 490 | ||
| 491 | } | 491 | } |
| 492 | 492 | ||
| 493 | static void __cpuinit mce_cpu_features(struct cpuinfo_x86 *c) | 493 | static void mce_cpu_features(struct cpuinfo_x86 *c) |
| 494 | { | 494 | { |
| 495 | switch (c->x86_vendor) { | 495 | switch (c->x86_vendor) { |
| 496 | case X86_VENDOR_INTEL: | 496 | case X86_VENDOR_INTEL: |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c index 8ae8c4ff094d..f2ee0ae29bd6 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_amd_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_amd_64.c | |||
| @@ -121,7 +121,7 @@ static long threshold_restart_bank(void *_tr) | |||
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | /* cpu init entry point, called from mce.c with preempt off */ | 123 | /* cpu init entry point, called from mce.c with preempt off */ |
| 124 | void __cpuinit mce_amd_feature_init(struct cpuinfo_x86 *c) | 124 | void mce_amd_feature_init(struct cpuinfo_x86 *c) |
| 125 | { | 125 | { |
| 126 | unsigned int bank, block; | 126 | unsigned int bank, block; |
| 127 | unsigned int cpu = smp_processor_id(); | 127 | unsigned int cpu = smp_processor_id(); |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c index 4b48f251fd39..f44c36624360 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_intel_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_intel_64.c | |||
| @@ -30,7 +30,7 @@ asmlinkage void smp_thermal_interrupt(void) | |||
| 30 | irq_exit(); | 30 | irq_exit(); |
| 31 | } | 31 | } |
| 32 | 32 | ||
| 33 | static void __cpuinit intel_init_thermal(struct cpuinfo_x86 *c) | 33 | static void intel_init_thermal(struct cpuinfo_x86 *c) |
| 34 | { | 34 | { |
| 35 | u32 l, h; | 35 | u32 l, h; |
| 36 | int tm2 = 0; | 36 | int tm2 = 0; |
| @@ -84,7 +84,7 @@ static void __cpuinit intel_init_thermal(struct cpuinfo_x86 *c) | |||
| 84 | return; | 84 | return; |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | void __cpuinit mce_intel_feature_init(struct cpuinfo_x86 *c) | 87 | void mce_intel_feature_init(struct cpuinfo_x86 *c) |
| 88 | { | 88 | { |
| 89 | intel_init_thermal(c); | 89 | intel_init_thermal(c); |
| 90 | } | 90 | } |
diff --git a/arch/x86/kernel/time_64.c b/arch/x86/kernel/time_64.c index e6e695acd725..241ec3923f61 100644 --- a/arch/x86/kernel/time_64.c +++ b/arch/x86/kernel/time_64.c | |||
| @@ -115,7 +115,7 @@ unsigned long __init calibrate_cpu(void) | |||
| 115 | 115 | ||
| 116 | static struct irqaction irq0 = { | 116 | static struct irqaction irq0 = { |
| 117 | .handler = timer_interrupt, | 117 | .handler = timer_interrupt, |
| 118 | .flags = IRQF_DISABLED | IRQF_IRQPOLL | IRQF_NOBALANCING, | 118 | .flags = IRQF_DISABLED | IRQF_IRQPOLL | IRQF_NOBALANCING | IRQF_TIMER, |
| 119 | .mask = CPU_MASK_NONE, | 119 | .mask = CPU_MASK_NONE, |
| 120 | .name = "timer" | 120 | .name = "timer" |
| 121 | }; | 121 | }; |
diff --git a/arch/x86/kernel/vmiclock_32.c b/arch/x86/kernel/vmiclock_32.c index c4c1f9e09402..e5b088fffa40 100644 --- a/arch/x86/kernel/vmiclock_32.c +++ b/arch/x86/kernel/vmiclock_32.c | |||
| @@ -202,7 +202,7 @@ static irqreturn_t vmi_timer_interrupt(int irq, void *dev_id) | |||
| 202 | static struct irqaction vmi_clock_action = { | 202 | static struct irqaction vmi_clock_action = { |
| 203 | .name = "vmi-timer", | 203 | .name = "vmi-timer", |
| 204 | .handler = vmi_timer_interrupt, | 204 | .handler = vmi_timer_interrupt, |
| 205 | .flags = IRQF_DISABLED | IRQF_NOBALANCING, | 205 | .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_TIMER, |
| 206 | .mask = CPU_MASK_ALL, | 206 | .mask = CPU_MASK_ALL, |
| 207 | }; | 207 | }; |
| 208 | 208 | ||
| @@ -283,10 +283,13 @@ void __devinit vmi_time_ap_init(void) | |||
| 283 | #endif | 283 | #endif |
| 284 | 284 | ||
| 285 | /** vmi clocksource */ | 285 | /** vmi clocksource */ |
| 286 | static struct clocksource clocksource_vmi; | ||
| 286 | 287 | ||
| 287 | static cycle_t read_real_cycles(void) | 288 | static cycle_t read_real_cycles(void) |
| 288 | { | 289 | { |
| 289 | return vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL); | 290 | cycle_t ret = (cycle_t)vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL); |
| 291 | return ret >= clocksource_vmi.cycle_last ? | ||
| 292 | ret : clocksource_vmi.cycle_last; | ||
| 290 | } | 293 | } |
| 291 | 294 | ||
| 292 | static struct clocksource clocksource_vmi = { | 295 | static struct clocksource clocksource_vmi = { |
diff --git a/arch/x86/mach-default/setup.c b/arch/x86/mach-default/setup.c index a265a7c63190..50b591871128 100644 --- a/arch/x86/mach-default/setup.c +++ b/arch/x86/mach-default/setup.c | |||
| @@ -96,7 +96,7 @@ void __init trap_init_hook(void) | |||
| 96 | 96 | ||
| 97 | static struct irqaction irq0 = { | 97 | static struct irqaction irq0 = { |
| 98 | .handler = timer_interrupt, | 98 | .handler = timer_interrupt, |
| 99 | .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL, | 99 | .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER, |
| 100 | .mask = CPU_MASK_NONE, | 100 | .mask = CPU_MASK_NONE, |
| 101 | .name = "timer" | 101 | .name = "timer" |
| 102 | }; | 102 | }; |
diff --git a/arch/x86/mach-voyager/setup.c b/arch/x86/mach-voyager/setup.c index d914a7996a66..8e5118371f0f 100644 --- a/arch/x86/mach-voyager/setup.c +++ b/arch/x86/mach-voyager/setup.c | |||
| @@ -56,7 +56,7 @@ void __init trap_init_hook(void) | |||
| 56 | 56 | ||
| 57 | static struct irqaction irq0 = { | 57 | static struct irqaction irq0 = { |
| 58 | .handler = timer_interrupt, | 58 | .handler = timer_interrupt, |
| 59 | .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL, | 59 | .flags = IRQF_DISABLED | IRQF_NOBALANCING | IRQF_IRQPOLL | IRQF_TIMER, |
| 60 | .mask = CPU_MASK_NONE, | 60 | .mask = CPU_MASK_NONE, |
| 61 | .name = "timer" | 61 | .name = "timer" |
| 62 | }; | 62 | }; |
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 8ca0d8566fc8..7be47d1a97e4 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
| @@ -508,18 +508,13 @@ static int split_large_page(pte_t *kpte, unsigned long address) | |||
| 508 | #endif | 508 | #endif |
| 509 | 509 | ||
| 510 | /* | 510 | /* |
| 511 | * Install the new, split up pagetable. Important details here: | 511 | * Install the new, split up pagetable. |
| 512 | * | 512 | * |
| 513 | * On Intel the NX bit of all levels must be cleared to make a | 513 | * We use the standard kernel pagetable protections for the new |
| 514 | * page executable. See section 4.13.2 of Intel 64 and IA-32 | 514 | * pagetable protections, the actual ptes set above control the |
| 515 | * Architectures Software Developer's Manual). | 515 | * primary protection behavior: |
| 516 | * | ||
| 517 | * Mark the entry present. The current mapping might be | ||
| 518 | * set to not present, which we preserved above. | ||
| 519 | */ | 516 | */ |
| 520 | ref_prot = pte_pgprot(pte_mkexec(pte_clrhuge(*kpte))); | 517 | __set_pmd_pte(kpte, address, mk_pte(base, __pgprot(_KERNPG_TABLE))); |
| 521 | pgprot_val(ref_prot) |= _PAGE_PRESENT; | ||
| 522 | __set_pmd_pte(kpte, address, mk_pte(base, ref_prot)); | ||
| 523 | base = NULL; | 518 | base = NULL; |
| 524 | 519 | ||
| 525 | out_unlock: | 520 | out_unlock: |
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index a7799a99f2d9..8a851d0f4384 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
| @@ -254,13 +254,6 @@ config ACPI_PCI_SLOT | |||
| 254 | help you correlate PCI bus addresses with the physical geography | 254 | help you correlate PCI bus addresses with the physical geography |
| 255 | of your slots. If you are unsure, say N. | 255 | of your slots. If you are unsure, say N. |
| 256 | 256 | ||
| 257 | config ACPI_SYSTEM | ||
| 258 | bool | ||
| 259 | default y | ||
| 260 | help | ||
| 261 | This driver will enable your system to shut down using ACPI, and | ||
| 262 | dump your ACPI DSDT table using /proc/acpi/dsdt. | ||
| 263 | |||
| 264 | config X86_PM_TIMER | 257 | config X86_PM_TIMER |
| 265 | bool "Power Management Timer Support" if EMBEDDED | 258 | bool "Power Management Timer Support" if EMBEDDED |
| 266 | depends on X86 | 259 | depends on X86 |
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index 65d90c720b5a..b130ea0d0759 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile | |||
| @@ -52,7 +52,7 @@ obj-$(CONFIG_ACPI_PROCESSOR) += processor.o | |||
| 52 | obj-$(CONFIG_ACPI_CONTAINER) += container.o | 52 | obj-$(CONFIG_ACPI_CONTAINER) += container.o |
| 53 | obj-$(CONFIG_ACPI_THERMAL) += thermal.o | 53 | obj-$(CONFIG_ACPI_THERMAL) += thermal.o |
| 54 | obj-y += power.o | 54 | obj-y += power.o |
| 55 | obj-$(CONFIG_ACPI_SYSTEM) += system.o event.o | 55 | obj-y += system.o event.o |
| 56 | obj-$(CONFIG_ACPI_DEBUG) += debug.o | 56 | obj-$(CONFIG_ACPI_DEBUG) += debug.o |
| 57 | obj-$(CONFIG_ACPI_NUMA) += numa.o | 57 | obj-$(CONFIG_ACPI_NUMA) += numa.o |
| 58 | obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o | 58 | obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o |
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 65132f920459..69cbc57c2d1c 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
| @@ -138,6 +138,29 @@ static int acpi_battery_technology(struct acpi_battery *battery) | |||
| 138 | 138 | ||
| 139 | static int acpi_battery_get_state(struct acpi_battery *battery); | 139 | static int acpi_battery_get_state(struct acpi_battery *battery); |
| 140 | 140 | ||
| 141 | static int acpi_battery_is_charged(struct acpi_battery *battery) | ||
| 142 | { | ||
| 143 | /* either charging or discharging */ | ||
| 144 | if (battery->state != 0) | ||
| 145 | return 0; | ||
| 146 | |||
| 147 | /* battery not reporting charge */ | ||
| 148 | if (battery->capacity_now == ACPI_BATTERY_VALUE_UNKNOWN || | ||
| 149 | battery->capacity_now == 0) | ||
| 150 | return 0; | ||
| 151 | |||
| 152 | /* good batteries update full_charge as the batteries degrade */ | ||
| 153 | if (battery->full_charge_capacity == battery->capacity_now) | ||
| 154 | return 1; | ||
| 155 | |||
| 156 | /* fallback to using design values for broken batteries */ | ||
| 157 | if (battery->design_capacity == battery->capacity_now) | ||
| 158 | return 1; | ||
| 159 | |||
| 160 | /* we don't do any sort of metric based on percentages */ | ||
| 161 | return 0; | ||
| 162 | } | ||
| 163 | |||
| 141 | static int acpi_battery_get_property(struct power_supply *psy, | 164 | static int acpi_battery_get_property(struct power_supply *psy, |
| 142 | enum power_supply_property psp, | 165 | enum power_supply_property psp, |
| 143 | union power_supply_propval *val) | 166 | union power_supply_propval *val) |
| @@ -155,7 +178,7 @@ static int acpi_battery_get_property(struct power_supply *psy, | |||
| 155 | val->intval = POWER_SUPPLY_STATUS_DISCHARGING; | 178 | val->intval = POWER_SUPPLY_STATUS_DISCHARGING; |
| 156 | else if (battery->state & 0x02) | 179 | else if (battery->state & 0x02) |
| 157 | val->intval = POWER_SUPPLY_STATUS_CHARGING; | 180 | val->intval = POWER_SUPPLY_STATUS_CHARGING; |
| 158 | else if (battery->state == 0) | 181 | else if (acpi_battery_is_charged(battery)) |
| 159 | val->intval = POWER_SUPPLY_STATUS_FULL; | 182 | val->intval = POWER_SUPPLY_STATUS_FULL; |
| 160 | else | 183 | else |
| 161 | val->intval = POWER_SUPPLY_STATUS_UNKNOWN; | 184 | val->intval = POWER_SUPPLY_STATUS_UNKNOWN; |
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 5c2f5d343be6..2fe15060dcdc 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
| @@ -120,6 +120,8 @@ static struct acpi_ec { | |||
| 120 | spinlock_t curr_lock; | 120 | spinlock_t curr_lock; |
| 121 | } *boot_ec, *first_ec; | 121 | } *boot_ec, *first_ec; |
| 122 | 122 | ||
| 123 | static int EC_FLAGS_MSI; /* Out-of-spec MSI controller */ | ||
| 124 | |||
| 123 | /* -------------------------------------------------------------------------- | 125 | /* -------------------------------------------------------------------------- |
| 124 | Transaction Management | 126 | Transaction Management |
| 125 | -------------------------------------------------------------------------- */ | 127 | -------------------------------------------------------------------------- */ |
| @@ -259,6 +261,8 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, | |||
| 259 | clear_bit(EC_FLAGS_GPE_MODE, &ec->flags); | 261 | clear_bit(EC_FLAGS_GPE_MODE, &ec->flags); |
| 260 | acpi_disable_gpe(NULL, ec->gpe); | 262 | acpi_disable_gpe(NULL, ec->gpe); |
| 261 | } | 263 | } |
| 264 | if (EC_FLAGS_MSI) | ||
| 265 | udelay(ACPI_EC_DELAY); | ||
| 262 | /* start transaction */ | 266 | /* start transaction */ |
| 263 | spin_lock_irqsave(&ec->curr_lock, tmp); | 267 | spin_lock_irqsave(&ec->curr_lock, tmp); |
| 264 | /* following two actions should be kept atomic */ | 268 | /* following two actions should be kept atomic */ |
| @@ -967,6 +971,11 @@ int __init acpi_ec_ecdt_probe(void) | |||
| 967 | /* | 971 | /* |
| 968 | * Generate a boot ec context | 972 | * Generate a boot ec context |
| 969 | */ | 973 | */ |
| 974 | if (dmi_name_in_vendors("Micro-Star") || | ||
| 975 | dmi_name_in_vendors("Notebook")) { | ||
| 976 | pr_info(PREFIX "Enabling special treatment for EC from MSI.\n"); | ||
| 977 | EC_FLAGS_MSI = 1; | ||
| 978 | } | ||
| 970 | status = acpi_get_table(ACPI_SIG_ECDT, 1, | 979 | status = acpi_get_table(ACPI_SIG_ECDT, 1, |
| 971 | (struct acpi_table_header **)&ecdt_ptr); | 980 | (struct acpi_table_header **)&ecdt_ptr); |
| 972 | if (ACPI_SUCCESS(status)) { | 981 | if (ACPI_SUCCESS(status)) { |
diff --git a/drivers/base/base.h b/drivers/base/base.h index 0a5f055dffba..9f50f1b545dc 100644 --- a/drivers/base/base.h +++ b/drivers/base/base.h | |||
| @@ -88,8 +88,6 @@ extern void driver_detach(struct device_driver *drv); | |||
| 88 | extern int driver_probe_device(struct device_driver *drv, struct device *dev); | 88 | extern int driver_probe_device(struct device_driver *drv, struct device *dev); |
| 89 | 89 | ||
| 90 | extern void sysdev_shutdown(void); | 90 | extern void sysdev_shutdown(void); |
| 91 | extern int sysdev_suspend(pm_message_t state); | ||
| 92 | extern int sysdev_resume(void); | ||
| 93 | 91 | ||
| 94 | extern char *make_class_name(const char *name, struct kobject *kobj); | 92 | extern char *make_class_name(const char *name, struct kobject *kobj); |
| 95 | 93 | ||
diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 315bed8d5e7f..135231239103 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c | |||
| @@ -18,9 +18,11 @@ | |||
| 18 | */ | 18 | */ |
| 19 | 19 | ||
| 20 | #include <linux/device.h> | 20 | #include <linux/device.h> |
| 21 | #include <linux/delay.h> | ||
| 21 | #include <linux/module.h> | 22 | #include <linux/module.h> |
| 22 | #include <linux/kthread.h> | 23 | #include <linux/kthread.h> |
| 23 | #include <linux/wait.h> | 24 | #include <linux/wait.h> |
| 25 | #include <linux/async.h> | ||
| 24 | 26 | ||
| 25 | #include "base.h" | 27 | #include "base.h" |
| 26 | #include "power/power.h" | 28 | #include "power/power.h" |
| @@ -168,6 +170,21 @@ int driver_probe_done(void) | |||
| 168 | } | 170 | } |
| 169 | 171 | ||
| 170 | /** | 172 | /** |
| 173 | * wait_for_device_probe | ||
| 174 | * Wait for device probing to be completed. | ||
| 175 | * | ||
| 176 | * Note: this function polls at 100 msec intervals. | ||
| 177 | */ | ||
| 178 | int wait_for_device_probe(void) | ||
| 179 | { | ||
| 180 | /* wait for the known devices to complete their probing */ | ||
| 181 | while (driver_probe_done() != 0) | ||
| 182 | msleep(100); | ||
| 183 | async_synchronize_full(); | ||
| 184 | return 0; | ||
| 185 | } | ||
| 186 | |||
| 187 | /** | ||
| 171 | * driver_probe_device - attempt to bind device & driver together | 188 | * driver_probe_device - attempt to bind device & driver together |
| 172 | * @drv: driver to bind a device to | 189 | * @drv: driver to bind a device to |
| 173 | * @dev: device to try to bind to the driver | 190 | * @dev: device to try to bind to the driver |
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 670c9d6c1407..2d14f4ae6c01 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c | |||
| @@ -333,7 +333,6 @@ static void dpm_power_up(pm_message_t state) | |||
| 333 | */ | 333 | */ |
| 334 | void device_power_up(pm_message_t state) | 334 | void device_power_up(pm_message_t state) |
| 335 | { | 335 | { |
| 336 | sysdev_resume(); | ||
| 337 | dpm_power_up(state); | 336 | dpm_power_up(state); |
| 338 | } | 337 | } |
| 339 | EXPORT_SYMBOL_GPL(device_power_up); | 338 | EXPORT_SYMBOL_GPL(device_power_up); |
| @@ -577,8 +576,6 @@ int device_power_down(pm_message_t state) | |||
| 577 | } | 576 | } |
| 578 | dev->power.status = DPM_OFF_IRQ; | 577 | dev->power.status = DPM_OFF_IRQ; |
| 579 | } | 578 | } |
| 580 | if (!error) | ||
| 581 | error = sysdev_suspend(state); | ||
| 582 | if (error) | 579 | if (error) |
| 583 | dpm_power_up(resume_event(state)); | 580 | dpm_power_up(resume_event(state)); |
| 584 | return error; | 581 | return error; |
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index c98c31ec2f75..b428c8c4bc64 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c | |||
| @@ -303,7 +303,6 @@ void sysdev_unregister(struct sys_device * sysdev) | |||
| 303 | * is guaranteed by virtue of the fact that child devices are registered | 303 | * is guaranteed by virtue of the fact that child devices are registered |
| 304 | * after their parents. | 304 | * after their parents. |
| 305 | */ | 305 | */ |
| 306 | |||
| 307 | void sysdev_shutdown(void) | 306 | void sysdev_shutdown(void) |
| 308 | { | 307 | { |
| 309 | struct sysdev_class * cls; | 308 | struct sysdev_class * cls; |
| @@ -363,7 +362,6 @@ static void __sysdev_resume(struct sys_device *dev) | |||
| 363 | * This is only called by the device PM core, so we let them handle | 362 | * This is only called by the device PM core, so we let them handle |
| 364 | * all synchronization. | 363 | * all synchronization. |
| 365 | */ | 364 | */ |
| 366 | |||
| 367 | int sysdev_suspend(pm_message_t state) | 365 | int sysdev_suspend(pm_message_t state) |
| 368 | { | 366 | { |
| 369 | struct sysdev_class * cls; | 367 | struct sysdev_class * cls; |
| @@ -432,7 +430,7 @@ aux_driver: | |||
| 432 | } | 430 | } |
| 433 | return ret; | 431 | return ret; |
| 434 | } | 432 | } |
| 435 | 433 | EXPORT_SYMBOL_GPL(sysdev_suspend); | |
| 436 | 434 | ||
| 437 | /** | 435 | /** |
| 438 | * sysdev_resume - Bring system devices back to life. | 436 | * sysdev_resume - Bring system devices back to life. |
| @@ -442,7 +440,6 @@ aux_driver: | |||
| 442 | * | 440 | * |
| 443 | * Note: Interrupts are disabled when called. | 441 | * Note: Interrupts are disabled when called. |
| 444 | */ | 442 | */ |
| 445 | |||
| 446 | int sysdev_resume(void) | 443 | int sysdev_resume(void) |
| 447 | { | 444 | { |
| 448 | struct sysdev_class * cls; | 445 | struct sysdev_class * cls; |
| @@ -463,7 +460,7 @@ int sysdev_resume(void) | |||
| 463 | } | 460 | } |
| 464 | return 0; | 461 | return 0; |
| 465 | } | 462 | } |
| 466 | 463 | EXPORT_SYMBOL_GPL(sysdev_resume); | |
| 467 | 464 | ||
| 468 | int __init system_bus_init(void) | 465 | int __init system_bus_init(void) |
| 469 | { | 466 | { |
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index 69e1df7dfa14..4234c11c1e4c 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c | |||
| @@ -1730,7 +1730,7 @@ static int __init fd_test_drive_present( int drive ) | |||
| 1730 | 1730 | ||
| 1731 | timeout = jiffies + 2*HZ+HZ/2; | 1731 | timeout = jiffies + 2*HZ+HZ/2; |
| 1732 | while (time_before(jiffies, timeout)) | 1732 | while (time_before(jiffies, timeout)) |
| 1733 | if (!(mfp.par_dt_reg & 0x20)) | 1733 | if (!(st_mfp.par_dt_reg & 0x20)) |
| 1734 | break; | 1734 | break; |
| 1735 | 1735 | ||
| 1736 | status = FDC_READ( FDCREG_STATUS ); | 1736 | status = FDC_READ( FDCREG_STATUS ); |
| @@ -1747,7 +1747,7 @@ static int __init fd_test_drive_present( int drive ) | |||
| 1747 | /* dummy seek command to make WP bit accessible */ | 1747 | /* dummy seek command to make WP bit accessible */ |
| 1748 | FDC_WRITE( FDCREG_DATA, 0 ); | 1748 | FDC_WRITE( FDCREG_DATA, 0 ); |
| 1749 | FDC_WRITE( FDCREG_CMD, FDCCMD_SEEK ); | 1749 | FDC_WRITE( FDCREG_CMD, FDCCMD_SEEK ); |
| 1750 | while( mfp.par_dt_reg & 0x20 ) | 1750 | while( st_mfp.par_dt_reg & 0x20 ) |
| 1751 | ; | 1751 | ; |
| 1752 | status = FDC_READ( FDCREG_STATUS ); | 1752 | status = FDC_READ( FDCREG_STATUS ); |
| 1753 | } | 1753 | } |
diff --git a/drivers/char/scc.h b/drivers/char/scc.h index 93998f5baff5..341b1142bea8 100644 --- a/drivers/char/scc.h +++ b/drivers/char/scc.h | |||
| @@ -387,7 +387,7 @@ struct scc_port { | |||
| 387 | /* The SCC needs 3.5 PCLK cycles recovery time between to register | 387 | /* The SCC needs 3.5 PCLK cycles recovery time between to register |
| 388 | * accesses. PCLK runs with 8 MHz on an Atari, so this delay is 3.5 * | 388 | * accesses. PCLK runs with 8 MHz on an Atari, so this delay is 3.5 * |
| 389 | * 125 ns = 437.5 ns. This is too short for udelay(). | 389 | * 125 ns = 437.5 ns. This is too short for udelay(). |
| 390 | * 10/16/95: A tstb mfp.par_dt_reg takes 600ns (sure?) and thus should be | 390 | * 10/16/95: A tstb st_mfp.par_dt_reg takes 600ns (sure?) and thus should be |
| 391 | * quite right | 391 | * quite right |
| 392 | */ | 392 | */ |
| 393 | 393 | ||
diff --git a/drivers/char/sx.c b/drivers/char/sx.c index f146e90404fa..518f2a25d91e 100644 --- a/drivers/char/sx.c +++ b/drivers/char/sx.c | |||
| @@ -1746,9 +1746,10 @@ static long sx_fw_ioctl(struct file *filp, unsigned int cmd, | |||
| 1746 | sx_dprintk(SX_DEBUG_FIRMWARE, "returning type= %ld\n", rc); | 1746 | sx_dprintk(SX_DEBUG_FIRMWARE, "returning type= %ld\n", rc); |
| 1747 | break; | 1747 | break; |
| 1748 | case SXIO_DO_RAMTEST: | 1748 | case SXIO_DO_RAMTEST: |
| 1749 | if (sx_initialized) /* Already initialized: better not ramtest the board. */ | 1749 | if (sx_initialized) { /* Already initialized: better not ramtest the board. */ |
| 1750 | rc = -EPERM; | 1750 | rc = -EPERM; |
| 1751 | break; | 1751 | break; |
| 1752 | } | ||
| 1752 | if (IS_SX_BOARD(board)) { | 1753 | if (IS_SX_BOARD(board)) { |
| 1753 | rc = do_memtest(board, 0, 0x7000); | 1754 | rc = do_memtest(board, 0, 0x7000); |
| 1754 | if (!rc) | 1755 | if (!rc) |
| @@ -1788,7 +1789,7 @@ static long sx_fw_ioctl(struct file *filp, unsigned int cmd, | |||
| 1788 | nbytes - i : SX_CHUNK_SIZE)) { | 1789 | nbytes - i : SX_CHUNK_SIZE)) { |
| 1789 | kfree(tmp); | 1790 | kfree(tmp); |
| 1790 | rc = -EFAULT; | 1791 | rc = -EFAULT; |
| 1791 | break; | 1792 | goto out; |
| 1792 | } | 1793 | } |
| 1793 | memcpy_toio(board->base2 + offset + i, tmp, | 1794 | memcpy_toio(board->base2 + offset + i, tmp, |
| 1794 | (i + SX_CHUNK_SIZE > nbytes) ? | 1795 | (i + SX_CHUNK_SIZE > nbytes) ? |
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index bfce0992fefb..94a768871734 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
| @@ -1741,9 +1741,8 @@ out: | |||
| 1741 | * RETURNS: | 1741 | * RETURNS: |
| 1742 | * Zero on success, errno on failure. | 1742 | * Zero on success, errno on failure. |
| 1743 | */ | 1743 | */ |
| 1744 | void drm_fb_release(struct file *filp) | 1744 | void drm_fb_release(struct drm_file *priv) |
| 1745 | { | 1745 | { |
| 1746 | struct drm_file *priv = filp->private_data; | ||
| 1747 | struct drm_device *dev = priv->minor->dev; | 1746 | struct drm_device *dev = priv->minor->dev; |
| 1748 | struct drm_framebuffer *fb, *tfb; | 1747 | struct drm_framebuffer *fb, *tfb; |
| 1749 | 1748 | ||
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 964c5eb1fada..733028b4d45e 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c | |||
| @@ -512,8 +512,8 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, | |||
| 512 | if (drm_mode_equal(&saved_mode, &crtc->mode)) { | 512 | if (drm_mode_equal(&saved_mode, &crtc->mode)) { |
| 513 | if (saved_x != crtc->x || saved_y != crtc->y || | 513 | if (saved_x != crtc->x || saved_y != crtc->y || |
| 514 | depth_changed || bpp_changed) { | 514 | depth_changed || bpp_changed) { |
| 515 | crtc_funcs->mode_set_base(crtc, crtc->x, crtc->y, | 515 | ret = !crtc_funcs->mode_set_base(crtc, crtc->x, crtc->y, |
| 516 | old_fb); | 516 | old_fb); |
| 517 | goto done; | 517 | goto done; |
| 518 | } | 518 | } |
| 519 | } | 519 | } |
| @@ -552,7 +552,9 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, | |||
| 552 | /* Set up the DPLL and any encoders state that needs to adjust or depend | 552 | /* Set up the DPLL and any encoders state that needs to adjust or depend |
| 553 | * on the DPLL. | 553 | * on the DPLL. |
| 554 | */ | 554 | */ |
| 555 | crtc_funcs->mode_set(crtc, mode, adjusted_mode, x, y, old_fb); | 555 | ret = !crtc_funcs->mode_set(crtc, mode, adjusted_mode, x, y, old_fb); |
| 556 | if (!ret) | ||
| 557 | goto done; | ||
| 556 | 558 | ||
| 557 | list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { | 559 | list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { |
| 558 | 560 | ||
| @@ -752,6 +754,8 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) | |||
| 752 | if (!drm_crtc_helper_set_mode(set->crtc, set->mode, | 754 | if (!drm_crtc_helper_set_mode(set->crtc, set->mode, |
| 753 | set->x, set->y, | 755 | set->x, set->y, |
| 754 | old_fb)) { | 756 | old_fb)) { |
| 757 | DRM_ERROR("failed to set mode on crtc %p\n", | ||
| 758 | set->crtc); | ||
| 755 | ret = -EINVAL; | 759 | ret = -EINVAL; |
| 756 | goto fail_set_mode; | 760 | goto fail_set_mode; |
| 757 | } | 761 | } |
| @@ -765,7 +769,10 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) | |||
| 765 | old_fb = set->crtc->fb; | 769 | old_fb = set->crtc->fb; |
| 766 | if (set->crtc->fb != set->fb) | 770 | if (set->crtc->fb != set->fb) |
| 767 | set->crtc->fb = set->fb; | 771 | set->crtc->fb = set->fb; |
| 768 | crtc_funcs->mode_set_base(set->crtc, set->x, set->y, old_fb); | 772 | ret = crtc_funcs->mode_set_base(set->crtc, |
| 773 | set->x, set->y, old_fb); | ||
| 774 | if (ret != 0) | ||
| 775 | goto fail_set_mode; | ||
| 769 | } | 776 | } |
| 770 | 777 | ||
| 771 | kfree(save_encoders); | 778 | kfree(save_encoders); |
| @@ -775,8 +782,12 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set) | |||
| 775 | fail_set_mode: | 782 | fail_set_mode: |
| 776 | set->crtc->enabled = save_enabled; | 783 | set->crtc->enabled = save_enabled; |
| 777 | count = 0; | 784 | count = 0; |
| 778 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) | 785 | list_for_each_entry(connector, &dev->mode_config.connector_list, head) { |
| 786 | if (!connector->encoder) | ||
| 787 | continue; | ||
| 788 | |||
| 779 | connector->encoder->crtc = save_crtcs[count++]; | 789 | connector->encoder->crtc = save_crtcs[count++]; |
| 790 | } | ||
| 780 | fail_no_encoder: | 791 | fail_no_encoder: |
| 781 | kfree(save_crtcs); | 792 | kfree(save_crtcs); |
| 782 | count = 0; | 793 | count = 0; |
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c index b06a53715853..6c020fe5431c 100644 --- a/drivers/gpu/drm/drm_fops.c +++ b/drivers/gpu/drm/drm_fops.c | |||
| @@ -457,6 +457,9 @@ int drm_release(struct inode *inode, struct file *filp) | |||
| 457 | if (dev->driver->driver_features & DRIVER_GEM) | 457 | if (dev->driver->driver_features & DRIVER_GEM) |
| 458 | drm_gem_release(dev, file_priv); | 458 | drm_gem_release(dev, file_priv); |
| 459 | 459 | ||
| 460 | if (dev->driver->driver_features & DRIVER_MODESET) | ||
| 461 | drm_fb_release(file_priv); | ||
| 462 | |||
| 460 | mutex_lock(&dev->ctxlist_mutex); | 463 | mutex_lock(&dev->ctxlist_mutex); |
| 461 | if (!list_empty(&dev->ctxlist)) { | 464 | if (!list_empty(&dev->ctxlist)) { |
| 462 | struct drm_ctx_list *pos, *n; | 465 | struct drm_ctx_list *pos, *n; |
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 6915fb82d0b0..88d3368ffddd 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c | |||
| @@ -104,8 +104,8 @@ drm_gem_init(struct drm_device *dev) | |||
| 104 | 104 | ||
| 105 | if (drm_mm_init(&mm->offset_manager, DRM_FILE_PAGE_OFFSET_START, | 105 | if (drm_mm_init(&mm->offset_manager, DRM_FILE_PAGE_OFFSET_START, |
| 106 | DRM_FILE_PAGE_OFFSET_SIZE)) { | 106 | DRM_FILE_PAGE_OFFSET_SIZE)) { |
| 107 | drm_free(mm, sizeof(struct drm_gem_mm), DRM_MEM_MM); | ||
| 108 | drm_ht_remove(&mm->offset_hash); | 107 | drm_ht_remove(&mm->offset_hash); |
| 108 | drm_free(mm, sizeof(struct drm_gem_mm), DRM_MEM_MM); | ||
| 109 | return -ENOMEM; | 109 | return -ENOMEM; |
| 110 | } | 110 | } |
| 111 | 111 | ||
| @@ -295,35 +295,37 @@ drm_gem_flink_ioctl(struct drm_device *dev, void *data, | |||
| 295 | return -EBADF; | 295 | return -EBADF; |
| 296 | 296 | ||
| 297 | again: | 297 | again: |
| 298 | if (idr_pre_get(&dev->object_name_idr, GFP_KERNEL) == 0) | 298 | if (idr_pre_get(&dev->object_name_idr, GFP_KERNEL) == 0) { |
| 299 | return -ENOMEM; | 299 | ret = -ENOMEM; |
| 300 | goto err; | ||
| 301 | } | ||
| 300 | 302 | ||
| 301 | spin_lock(&dev->object_name_lock); | 303 | spin_lock(&dev->object_name_lock); |
| 302 | if (obj->name) { | 304 | if (!obj->name) { |
| 303 | args->name = obj->name; | 305 | ret = idr_get_new_above(&dev->object_name_idr, obj, 1, |
| 306 | &obj->name); | ||
| 307 | args->name = (uint64_t) obj->name; | ||
| 304 | spin_unlock(&dev->object_name_lock); | 308 | spin_unlock(&dev->object_name_lock); |
| 305 | return 0; | ||
| 306 | } | ||
| 307 | ret = idr_get_new_above(&dev->object_name_idr, obj, 1, | ||
| 308 | &obj->name); | ||
| 309 | spin_unlock(&dev->object_name_lock); | ||
| 310 | if (ret == -EAGAIN) | ||
| 311 | goto again; | ||
| 312 | 309 | ||
| 313 | if (ret != 0) { | 310 | if (ret == -EAGAIN) |
| 314 | mutex_lock(&dev->struct_mutex); | 311 | goto again; |
| 315 | drm_gem_object_unreference(obj); | ||
| 316 | mutex_unlock(&dev->struct_mutex); | ||
| 317 | return ret; | ||
| 318 | } | ||
| 319 | 312 | ||
| 320 | /* | 313 | if (ret != 0) |
| 321 | * Leave the reference from the lookup around as the | 314 | goto err; |
| 322 | * name table now holds one | ||
| 323 | */ | ||
| 324 | args->name = (uint64_t) obj->name; | ||
| 325 | 315 | ||
| 326 | return 0; | 316 | /* Allocate a reference for the name table. */ |
| 317 | drm_gem_object_reference(obj); | ||
| 318 | } else { | ||
| 319 | args->name = (uint64_t) obj->name; | ||
| 320 | spin_unlock(&dev->object_name_lock); | ||
| 321 | ret = 0; | ||
| 322 | } | ||
| 323 | |||
| 324 | err: | ||
| 325 | mutex_lock(&dev->struct_mutex); | ||
| 326 | drm_gem_object_unreference(obj); | ||
| 327 | mutex_unlock(&dev->struct_mutex); | ||
| 328 | return ret; | ||
| 327 | } | 329 | } |
| 328 | 330 | ||
| 329 | /** | 331 | /** |
| @@ -448,6 +450,7 @@ drm_gem_object_handle_free(struct kref *kref) | |||
| 448 | spin_lock(&dev->object_name_lock); | 450 | spin_lock(&dev->object_name_lock); |
| 449 | if (obj->name) { | 451 | if (obj->name) { |
| 450 | idr_remove(&dev->object_name_idr, obj->name); | 452 | idr_remove(&dev->object_name_idr, obj->name); |
| 453 | obj->name = 0; | ||
| 451 | spin_unlock(&dev->object_name_lock); | 454 | spin_unlock(&dev->object_name_lock); |
| 452 | /* | 455 | /* |
| 453 | * The object name held a reference to this object, drop | 456 | * The object name held a reference to this object, drop |
| @@ -460,6 +463,26 @@ drm_gem_object_handle_free(struct kref *kref) | |||
| 460 | } | 463 | } |
| 461 | EXPORT_SYMBOL(drm_gem_object_handle_free); | 464 | EXPORT_SYMBOL(drm_gem_object_handle_free); |
| 462 | 465 | ||
| 466 | void drm_gem_vm_open(struct vm_area_struct *vma) | ||
| 467 | { | ||
| 468 | struct drm_gem_object *obj = vma->vm_private_data; | ||
| 469 | |||
| 470 | drm_gem_object_reference(obj); | ||
| 471 | } | ||
| 472 | EXPORT_SYMBOL(drm_gem_vm_open); | ||
| 473 | |||
| 474 | void drm_gem_vm_close(struct vm_area_struct *vma) | ||
| 475 | { | ||
| 476 | struct drm_gem_object *obj = vma->vm_private_data; | ||
| 477 | struct drm_device *dev = obj->dev; | ||
| 478 | |||
| 479 | mutex_lock(&dev->struct_mutex); | ||
| 480 | drm_gem_object_unreference(obj); | ||
| 481 | mutex_unlock(&dev->struct_mutex); | ||
| 482 | } | ||
| 483 | EXPORT_SYMBOL(drm_gem_vm_close); | ||
| 484 | |||
| 485 | |||
| 463 | /** | 486 | /** |
| 464 | * drm_gem_mmap - memory map routine for GEM objects | 487 | * drm_gem_mmap - memory map routine for GEM objects |
| 465 | * @filp: DRM file pointer | 488 | * @filp: DRM file pointer |
| @@ -521,6 +544,14 @@ int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma) | |||
| 521 | #endif | 544 | #endif |
| 522 | vma->vm_page_prot = __pgprot(prot); | 545 | vma->vm_page_prot = __pgprot(prot); |
| 523 | 546 | ||
| 547 | /* Take a ref for this mapping of the object, so that the fault | ||
| 548 | * handler can dereference the mmap offset's pointer to the object. | ||
| 549 | * This reference is cleaned up by the corresponding vm_close | ||
| 550 | * (which should happen whether the vma was created by this call, or | ||
| 551 | * by a vm_open due to mremap or partial unmap or whatever). | ||
| 552 | */ | ||
| 553 | drm_gem_object_reference(obj); | ||
| 554 | |||
| 524 | vma->vm_file = filp; /* Needed for drm_vm_open() */ | 555 | vma->vm_file = filp; /* Needed for drm_vm_open() */ |
| 525 | drm_vm_open_locked(vma); | 556 | drm_vm_open_locked(vma); |
| 526 | 557 | ||
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 81f1cff56fd5..2d797ffe8137 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
| @@ -202,7 +202,7 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init) | |||
| 202 | dev_priv->ring.map.flags = 0; | 202 | dev_priv->ring.map.flags = 0; |
| 203 | dev_priv->ring.map.mtrr = 0; | 203 | dev_priv->ring.map.mtrr = 0; |
| 204 | 204 | ||
| 205 | drm_core_ioremap(&dev_priv->ring.map, dev); | 205 | drm_core_ioremap_wc(&dev_priv->ring.map, dev); |
| 206 | 206 | ||
| 207 | if (dev_priv->ring.map.handle == NULL) { | 207 | if (dev_priv->ring.map.handle == NULL) { |
| 208 | i915_dma_cleanup(dev); | 208 | i915_dma_cleanup(dev); |
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index aac12ee31a46..0692622ee2b3 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | * | 27 | * |
| 28 | */ | 28 | */ |
| 29 | 29 | ||
| 30 | #include <linux/device.h> | ||
| 30 | #include "drmP.h" | 31 | #include "drmP.h" |
| 31 | #include "drm.h" | 32 | #include "drm.h" |
| 32 | #include "i915_drm.h" | 33 | #include "i915_drm.h" |
| @@ -66,6 +67,12 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state) | |||
| 66 | 67 | ||
| 67 | i915_save_state(dev); | 68 | i915_save_state(dev); |
| 68 | 69 | ||
| 70 | /* If KMS is active, we do the leavevt stuff here */ | ||
| 71 | if (drm_core_check_feature(dev, DRIVER_MODESET) && i915_gem_idle(dev)) { | ||
| 72 | dev_err(&dev->pdev->dev, "GEM idle failed, aborting suspend\n"); | ||
| 73 | return -EBUSY; | ||
| 74 | } | ||
| 75 | |||
| 69 | intel_opregion_free(dev); | 76 | intel_opregion_free(dev); |
| 70 | 77 | ||
| 71 | if (state.event == PM_EVENT_SUSPEND) { | 78 | if (state.event == PM_EVENT_SUSPEND) { |
| @@ -79,6 +86,9 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state) | |||
| 79 | 86 | ||
| 80 | static int i915_resume(struct drm_device *dev) | 87 | static int i915_resume(struct drm_device *dev) |
| 81 | { | 88 | { |
| 89 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
| 90 | int ret = 0; | ||
| 91 | |||
| 82 | pci_set_power_state(dev->pdev, PCI_D0); | 92 | pci_set_power_state(dev->pdev, PCI_D0); |
| 83 | pci_restore_state(dev->pdev); | 93 | pci_restore_state(dev->pdev); |
| 84 | if (pci_enable_device(dev->pdev)) | 94 | if (pci_enable_device(dev->pdev)) |
| @@ -89,11 +99,24 @@ static int i915_resume(struct drm_device *dev) | |||
| 89 | 99 | ||
| 90 | intel_opregion_init(dev); | 100 | intel_opregion_init(dev); |
| 91 | 101 | ||
| 92 | return 0; | 102 | /* KMS EnterVT equivalent */ |
| 103 | if (drm_core_check_feature(dev, DRIVER_MODESET)) { | ||
| 104 | mutex_lock(&dev->struct_mutex); | ||
| 105 | dev_priv->mm.suspended = 0; | ||
| 106 | |||
| 107 | ret = i915_gem_init_ringbuffer(dev); | ||
| 108 | if (ret != 0) | ||
| 109 | ret = -1; | ||
| 110 | mutex_unlock(&dev->struct_mutex); | ||
| 111 | } | ||
| 112 | |||
| 113 | return ret; | ||
| 93 | } | 114 | } |
| 94 | 115 | ||
| 95 | static struct vm_operations_struct i915_gem_vm_ops = { | 116 | static struct vm_operations_struct i915_gem_vm_ops = { |
| 96 | .fault = i915_gem_fault, | 117 | .fault = i915_gem_fault, |
| 118 | .open = drm_gem_vm_open, | ||
| 119 | .close = drm_gem_vm_close, | ||
| 97 | }; | 120 | }; |
| 98 | 121 | ||
| 99 | static struct drm_driver driver = { | 122 | static struct drm_driver driver = { |
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 7325363164f8..17fa40858d26 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
| @@ -184,6 +184,8 @@ typedef struct drm_i915_private { | |||
| 184 | unsigned int lvds_dither:1; | 184 | unsigned int lvds_dither:1; |
| 185 | unsigned int lvds_vbt:1; | 185 | unsigned int lvds_vbt:1; |
| 186 | unsigned int int_crt_support:1; | 186 | unsigned int int_crt_support:1; |
| 187 | unsigned int lvds_use_ssc:1; | ||
| 188 | int lvds_ssc_freq; | ||
| 187 | 189 | ||
| 188 | struct drm_i915_fence_reg fence_regs[16]; /* assume 965 */ | 190 | struct drm_i915_fence_reg fence_regs[16]; /* assume 965 */ |
| 189 | int fence_reg_start; /* 4 if userland hasn't ioctl'd us yet */ | 191 | int fence_reg_start; /* 4 if userland hasn't ioctl'd us yet */ |
| @@ -616,6 +618,7 @@ int i915_gem_init_ringbuffer(struct drm_device *dev); | |||
| 616 | void i915_gem_cleanup_ringbuffer(struct drm_device *dev); | 618 | void i915_gem_cleanup_ringbuffer(struct drm_device *dev); |
| 617 | int i915_gem_do_init(struct drm_device *dev, unsigned long start, | 619 | int i915_gem_do_init(struct drm_device *dev, unsigned long start, |
| 618 | unsigned long end); | 620 | unsigned long end); |
| 621 | int i915_gem_idle(struct drm_device *dev); | ||
| 619 | int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); | 622 | int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf); |
| 620 | int i915_gem_object_set_to_gtt_domain(struct drm_gem_object *obj, | 623 | int i915_gem_object_set_to_gtt_domain(struct drm_gem_object *obj, |
| 621 | int write); | 624 | int write); |
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 818576654092..25b337438ca7 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
| @@ -34,10 +34,6 @@ | |||
| 34 | 34 | ||
| 35 | #define I915_GEM_GPU_DOMAINS (~(I915_GEM_DOMAIN_CPU | I915_GEM_DOMAIN_GTT)) | 35 | #define I915_GEM_GPU_DOMAINS (~(I915_GEM_DOMAIN_CPU | I915_GEM_DOMAIN_GTT)) |
| 36 | 36 | ||
| 37 | static void | ||
| 38 | i915_gem_object_set_to_gpu_domain(struct drm_gem_object *obj, | ||
| 39 | uint32_t read_domains, | ||
| 40 | uint32_t write_domain); | ||
| 41 | static void i915_gem_object_flush_gpu_write_domain(struct drm_gem_object *obj); | 37 | static void i915_gem_object_flush_gpu_write_domain(struct drm_gem_object *obj); |
| 42 | static void i915_gem_object_flush_gtt_write_domain(struct drm_gem_object *obj); | 38 | static void i915_gem_object_flush_gtt_write_domain(struct drm_gem_object *obj); |
| 43 | static void i915_gem_object_flush_cpu_write_domain(struct drm_gem_object *obj); | 39 | static void i915_gem_object_flush_cpu_write_domain(struct drm_gem_object *obj); |
| @@ -607,8 +603,6 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
| 607 | case -EAGAIN: | 603 | case -EAGAIN: |
| 608 | return VM_FAULT_OOM; | 604 | return VM_FAULT_OOM; |
| 609 | case -EFAULT: | 605 | case -EFAULT: |
| 610 | case -EBUSY: | ||
| 611 | DRM_ERROR("can't insert pfn?? fault or busy...\n"); | ||
| 612 | return VM_FAULT_SIGBUS; | 606 | return VM_FAULT_SIGBUS; |
| 613 | default: | 607 | default: |
| 614 | return VM_FAULT_NOPAGE; | 608 | return VM_FAULT_NOPAGE; |
| @@ -684,6 +678,30 @@ out_free_list: | |||
| 684 | return ret; | 678 | return ret; |
| 685 | } | 679 | } |
| 686 | 680 | ||
| 681 | static void | ||
| 682 | i915_gem_free_mmap_offset(struct drm_gem_object *obj) | ||
| 683 | { | ||
| 684 | struct drm_device *dev = obj->dev; | ||
| 685 | struct drm_i915_gem_object *obj_priv = obj->driver_private; | ||
| 686 | struct drm_gem_mm *mm = dev->mm_private; | ||
| 687 | struct drm_map_list *list; | ||
| 688 | |||
| 689 | list = &obj->map_list; | ||
| 690 | drm_ht_remove_item(&mm->offset_hash, &list->hash); | ||
| 691 | |||
| 692 | if (list->file_offset_node) { | ||
| 693 | drm_mm_put_block(list->file_offset_node); | ||
| 694 | list->file_offset_node = NULL; | ||
| 695 | } | ||
| 696 | |||
| 697 | if (list->map) { | ||
| 698 | drm_free(list->map, sizeof(struct drm_map), DRM_MEM_DRIVER); | ||
| 699 | list->map = NULL; | ||
| 700 | } | ||
| 701 | |||
| 702 | obj_priv->mmap_offset = 0; | ||
| 703 | } | ||
| 704 | |||
| 687 | /** | 705 | /** |
| 688 | * i915_gem_get_gtt_alignment - return required GTT alignment for an object | 706 | * i915_gem_get_gtt_alignment - return required GTT alignment for an object |
| 689 | * @obj: object to check | 707 | * @obj: object to check |
| @@ -758,8 +776,11 @@ i915_gem_mmap_gtt_ioctl(struct drm_device *dev, void *data, | |||
| 758 | 776 | ||
| 759 | if (!obj_priv->mmap_offset) { | 777 | if (!obj_priv->mmap_offset) { |
| 760 | ret = i915_gem_create_mmap_offset(obj); | 778 | ret = i915_gem_create_mmap_offset(obj); |
| 761 | if (ret) | 779 | if (ret) { |
| 780 | drm_gem_object_unreference(obj); | ||
| 781 | mutex_unlock(&dev->struct_mutex); | ||
| 762 | return ret; | 782 | return ret; |
| 783 | } | ||
| 763 | } | 784 | } |
| 764 | 785 | ||
| 765 | args->offset = obj_priv->mmap_offset; | 786 | args->offset = obj_priv->mmap_offset; |
| @@ -1996,30 +2017,28 @@ i915_gem_object_set_to_cpu_domain(struct drm_gem_object *obj, int write) | |||
| 1996 | * drm_agp_chipset_flush | 2017 | * drm_agp_chipset_flush |
| 1997 | */ | 2018 | */ |
| 1998 | static void | 2019 | static void |
| 1999 | i915_gem_object_set_to_gpu_domain(struct drm_gem_object *obj, | 2020 | i915_gem_object_set_to_gpu_domain(struct drm_gem_object *obj) |
| 2000 | uint32_t read_domains, | ||
| 2001 | uint32_t write_domain) | ||
| 2002 | { | 2021 | { |
| 2003 | struct drm_device *dev = obj->dev; | 2022 | struct drm_device *dev = obj->dev; |
| 2004 | struct drm_i915_gem_object *obj_priv = obj->driver_private; | 2023 | struct drm_i915_gem_object *obj_priv = obj->driver_private; |
| 2005 | uint32_t invalidate_domains = 0; | 2024 | uint32_t invalidate_domains = 0; |
| 2006 | uint32_t flush_domains = 0; | 2025 | uint32_t flush_domains = 0; |
| 2007 | 2026 | ||
| 2008 | BUG_ON(read_domains & I915_GEM_DOMAIN_CPU); | 2027 | BUG_ON(obj->pending_read_domains & I915_GEM_DOMAIN_CPU); |
| 2009 | BUG_ON(write_domain == I915_GEM_DOMAIN_CPU); | 2028 | BUG_ON(obj->pending_write_domain == I915_GEM_DOMAIN_CPU); |
| 2010 | 2029 | ||
| 2011 | #if WATCH_BUF | 2030 | #if WATCH_BUF |
| 2012 | DRM_INFO("%s: object %p read %08x -> %08x write %08x -> %08x\n", | 2031 | DRM_INFO("%s: object %p read %08x -> %08x write %08x -> %08x\n", |
| 2013 | __func__, obj, | 2032 | __func__, obj, |
| 2014 | obj->read_domains, read_domains, | 2033 | obj->read_domains, obj->pending_read_domains, |
| 2015 | obj->write_domain, write_domain); | 2034 | obj->write_domain, obj->pending_write_domain); |
| 2016 | #endif | 2035 | #endif |
| 2017 | /* | 2036 | /* |
| 2018 | * If the object isn't moving to a new write domain, | 2037 | * If the object isn't moving to a new write domain, |
| 2019 | * let the object stay in multiple read domains | 2038 | * let the object stay in multiple read domains |
| 2020 | */ | 2039 | */ |
| 2021 | if (write_domain == 0) | 2040 | if (obj->pending_write_domain == 0) |
| 2022 | read_domains |= obj->read_domains; | 2041 | obj->pending_read_domains |= obj->read_domains; |
| 2023 | else | 2042 | else |
| 2024 | obj_priv->dirty = 1; | 2043 | obj_priv->dirty = 1; |
| 2025 | 2044 | ||
| @@ -2029,15 +2048,17 @@ i915_gem_object_set_to_gpu_domain(struct drm_gem_object *obj, | |||
| 2029 | * any read domains which differ from the old | 2048 | * any read domains which differ from the old |
| 2030 | * write domain | 2049 | * write domain |
| 2031 | */ | 2050 | */ |
| 2032 | if (obj->write_domain && obj->write_domain != read_domains) { | 2051 | if (obj->write_domain && |
| 2052 | obj->write_domain != obj->pending_read_domains) { | ||
| 2033 | flush_domains |= obj->write_domain; | 2053 | flush_domains |= obj->write_domain; |
| 2034 | invalidate_domains |= read_domains & ~obj->write_domain; | 2054 | invalidate_domains |= |
| 2055 | obj->pending_read_domains & ~obj->write_domain; | ||
| 2035 | } | 2056 | } |
| 2036 | /* | 2057 | /* |
| 2037 | * Invalidate any read caches which may have | 2058 | * Invalidate any read caches which may have |
| 2038 | * stale data. That is, any new read domains. | 2059 | * stale data. That is, any new read domains. |
| 2039 | */ | 2060 | */ |
| 2040 | invalidate_domains |= read_domains & ~obj->read_domains; | 2061 | invalidate_domains |= obj->pending_read_domains & ~obj->read_domains; |
| 2041 | if ((flush_domains | invalidate_domains) & I915_GEM_DOMAIN_CPU) { | 2062 | if ((flush_domains | invalidate_domains) & I915_GEM_DOMAIN_CPU) { |
| 2042 | #if WATCH_BUF | 2063 | #if WATCH_BUF |
| 2043 | DRM_INFO("%s: CPU domain flush %08x invalidate %08x\n", | 2064 | DRM_INFO("%s: CPU domain flush %08x invalidate %08x\n", |
| @@ -2046,9 +2067,15 @@ i915_gem_object_set_to_gpu_domain(struct drm_gem_object *obj, | |||
| 2046 | i915_gem_clflush_object(obj); | 2067 | i915_gem_clflush_object(obj); |
| 2047 | } | 2068 | } |
| 2048 | 2069 | ||
| 2049 | if ((write_domain | flush_domains) != 0) | 2070 | /* The actual obj->write_domain will be updated with |
| 2050 | obj->write_domain = write_domain; | 2071 | * pending_write_domain after we emit the accumulated flush for all |
| 2051 | obj->read_domains = read_domains; | 2072 | * of our domain changes in execbuffers (which clears objects' |
| 2073 | * write_domains). So if we have a current write domain that we | ||
| 2074 | * aren't changing, set pending_write_domain to that. | ||
| 2075 | */ | ||
| 2076 | if (flush_domains == 0 && obj->pending_write_domain == 0) | ||
| 2077 | obj->pending_write_domain = obj->write_domain; | ||
| 2078 | obj->read_domains = obj->pending_read_domains; | ||
| 2052 | 2079 | ||
| 2053 | dev->invalidate_domains |= invalidate_domains; | 2080 | dev->invalidate_domains |= invalidate_domains; |
| 2054 | dev->flush_domains |= flush_domains; | 2081 | dev->flush_domains |= flush_domains; |
| @@ -2251,6 +2278,8 @@ i915_gem_object_pin_and_relocate(struct drm_gem_object *obj, | |||
| 2251 | (int) reloc.offset, | 2278 | (int) reloc.offset, |
| 2252 | reloc.read_domains, | 2279 | reloc.read_domains, |
| 2253 | reloc.write_domain); | 2280 | reloc.write_domain); |
| 2281 | drm_gem_object_unreference(target_obj); | ||
| 2282 | i915_gem_object_unpin(obj); | ||
| 2254 | return -EINVAL; | 2283 | return -EINVAL; |
| 2255 | } | 2284 | } |
| 2256 | 2285 | ||
| @@ -2480,13 +2509,15 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, | |||
| 2480 | if (dev_priv->mm.wedged) { | 2509 | if (dev_priv->mm.wedged) { |
| 2481 | DRM_ERROR("Execbuf while wedged\n"); | 2510 | DRM_ERROR("Execbuf while wedged\n"); |
| 2482 | mutex_unlock(&dev->struct_mutex); | 2511 | mutex_unlock(&dev->struct_mutex); |
| 2483 | return -EIO; | 2512 | ret = -EIO; |
| 2513 | goto pre_mutex_err; | ||
| 2484 | } | 2514 | } |
| 2485 | 2515 | ||
| 2486 | if (dev_priv->mm.suspended) { | 2516 | if (dev_priv->mm.suspended) { |
| 2487 | DRM_ERROR("Execbuf while VT-switched.\n"); | 2517 | DRM_ERROR("Execbuf while VT-switched.\n"); |
| 2488 | mutex_unlock(&dev->struct_mutex); | 2518 | mutex_unlock(&dev->struct_mutex); |
| 2489 | return -EBUSY; | 2519 | ret = -EBUSY; |
| 2520 | goto pre_mutex_err; | ||
| 2490 | } | 2521 | } |
| 2491 | 2522 | ||
| 2492 | /* Look up object handles */ | 2523 | /* Look up object handles */ |
| @@ -2554,9 +2585,7 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, | |||
| 2554 | struct drm_gem_object *obj = object_list[i]; | 2585 | struct drm_gem_object *obj = object_list[i]; |
| 2555 | 2586 | ||
| 2556 | /* Compute new gpu domains and update invalidate/flush */ | 2587 | /* Compute new gpu domains and update invalidate/flush */ |
| 2557 | i915_gem_object_set_to_gpu_domain(obj, | 2588 | i915_gem_object_set_to_gpu_domain(obj); |
| 2558 | obj->pending_read_domains, | ||
| 2559 | obj->pending_write_domain); | ||
| 2560 | } | 2589 | } |
| 2561 | 2590 | ||
| 2562 | i915_verify_inactive(dev, __FILE__, __LINE__); | 2591 | i915_verify_inactive(dev, __FILE__, __LINE__); |
| @@ -2575,6 +2604,12 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, | |||
| 2575 | (void)i915_add_request(dev, dev->flush_domains); | 2604 | (void)i915_add_request(dev, dev->flush_domains); |
| 2576 | } | 2605 | } |
| 2577 | 2606 | ||
| 2607 | for (i = 0; i < args->buffer_count; i++) { | ||
| 2608 | struct drm_gem_object *obj = object_list[i]; | ||
| 2609 | |||
| 2610 | obj->write_domain = obj->pending_write_domain; | ||
| 2611 | } | ||
| 2612 | |||
| 2578 | i915_verify_inactive(dev, __FILE__, __LINE__); | 2613 | i915_verify_inactive(dev, __FILE__, __LINE__); |
| 2579 | 2614 | ||
| 2580 | #if WATCH_COHERENCY | 2615 | #if WATCH_COHERENCY |
| @@ -2632,15 +2667,6 @@ i915_gem_execbuffer(struct drm_device *dev, void *data, | |||
| 2632 | 2667 | ||
| 2633 | i915_verify_inactive(dev, __FILE__, __LINE__); | 2668 | i915_verify_inactive(dev, __FILE__, __LINE__); |
| 2634 | 2669 | ||
| 2635 | /* Copy the new buffer offsets back to the user's exec list. */ | ||
| 2636 | ret = copy_to_user((struct drm_i915_relocation_entry __user *) | ||
| 2637 | (uintptr_t) args->buffers_ptr, | ||
| 2638 | exec_list, | ||
| 2639 | sizeof(*exec_list) * args->buffer_count); | ||
| 2640 | if (ret) | ||
| 2641 | DRM_ERROR("failed to copy %d exec entries " | ||
| 2642 | "back to user (%d)\n", | ||
| 2643 | args->buffer_count, ret); | ||
| 2644 | err: | 2670 | err: |
| 2645 | for (i = 0; i < pinned; i++) | 2671 | for (i = 0; i < pinned; i++) |
| 2646 | i915_gem_object_unpin(object_list[i]); | 2672 | i915_gem_object_unpin(object_list[i]); |
| @@ -2650,6 +2676,18 @@ err: | |||
| 2650 | 2676 | ||
| 2651 | mutex_unlock(&dev->struct_mutex); | 2677 | mutex_unlock(&dev->struct_mutex); |
| 2652 | 2678 | ||
| 2679 | if (!ret) { | ||
| 2680 | /* Copy the new buffer offsets back to the user's exec list. */ | ||
| 2681 | ret = copy_to_user((struct drm_i915_relocation_entry __user *) | ||
| 2682 | (uintptr_t) args->buffers_ptr, | ||
| 2683 | exec_list, | ||
| 2684 | sizeof(*exec_list) * args->buffer_count); | ||
| 2685 | if (ret) | ||
| 2686 | DRM_ERROR("failed to copy %d exec entries " | ||
| 2687 | "back to user (%d)\n", | ||
| 2688 | args->buffer_count, ret); | ||
| 2689 | } | ||
| 2690 | |||
| 2653 | pre_mutex_err: | 2691 | pre_mutex_err: |
| 2654 | drm_free(object_list, sizeof(*object_list) * args->buffer_count, | 2692 | drm_free(object_list, sizeof(*object_list) * args->buffer_count, |
| 2655 | DRM_MEM_DRIVER); | 2693 | DRM_MEM_DRIVER); |
| @@ -2753,6 +2791,7 @@ i915_gem_pin_ioctl(struct drm_device *dev, void *data, | |||
| 2753 | if (obj_priv->pin_filp != NULL && obj_priv->pin_filp != file_priv) { | 2791 | if (obj_priv->pin_filp != NULL && obj_priv->pin_filp != file_priv) { |
| 2754 | DRM_ERROR("Already pinned in i915_gem_pin_ioctl(): %d\n", | 2792 | DRM_ERROR("Already pinned in i915_gem_pin_ioctl(): %d\n", |
| 2755 | args->handle); | 2793 | args->handle); |
| 2794 | drm_gem_object_unreference(obj); | ||
| 2756 | mutex_unlock(&dev->struct_mutex); | 2795 | mutex_unlock(&dev->struct_mutex); |
| 2757 | return -EINVAL; | 2796 | return -EINVAL; |
| 2758 | } | 2797 | } |
| @@ -2833,6 +2872,13 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data, | |||
| 2833 | return -EBADF; | 2872 | return -EBADF; |
| 2834 | } | 2873 | } |
| 2835 | 2874 | ||
| 2875 | /* Update the active list for the hardware's current position. | ||
| 2876 | * Otherwise this only updates on a delayed timer or when irqs are | ||
| 2877 | * actually unmasked, and our working set ends up being larger than | ||
| 2878 | * required. | ||
| 2879 | */ | ||
| 2880 | i915_gem_retire_requests(dev); | ||
| 2881 | |||
| 2836 | obj_priv = obj->driver_private; | 2882 | obj_priv = obj->driver_private; |
| 2837 | /* Don't count being on the flushing list against the object being | 2883 | /* Don't count being on the flushing list against the object being |
| 2838 | * done. Otherwise, a buffer left on the flushing list but not getting | 2884 | * done. Otherwise, a buffer left on the flushing list but not getting |
| @@ -2885,9 +2931,6 @@ int i915_gem_init_object(struct drm_gem_object *obj) | |||
| 2885 | void i915_gem_free_object(struct drm_gem_object *obj) | 2931 | void i915_gem_free_object(struct drm_gem_object *obj) |
| 2886 | { | 2932 | { |
| 2887 | struct drm_device *dev = obj->dev; | 2933 | struct drm_device *dev = obj->dev; |
| 2888 | struct drm_gem_mm *mm = dev->mm_private; | ||
| 2889 | struct drm_map_list *list; | ||
| 2890 | struct drm_map *map; | ||
| 2891 | struct drm_i915_gem_object *obj_priv = obj->driver_private; | 2934 | struct drm_i915_gem_object *obj_priv = obj->driver_private; |
| 2892 | 2935 | ||
| 2893 | while (obj_priv->pin_count > 0) | 2936 | while (obj_priv->pin_count > 0) |
| @@ -2898,19 +2941,7 @@ void i915_gem_free_object(struct drm_gem_object *obj) | |||
| 2898 | 2941 | ||
| 2899 | i915_gem_object_unbind(obj); | 2942 | i915_gem_object_unbind(obj); |
| 2900 | 2943 | ||
| 2901 | list = &obj->map_list; | 2944 | i915_gem_free_mmap_offset(obj); |
| 2902 | drm_ht_remove_item(&mm->offset_hash, &list->hash); | ||
| 2903 | |||
| 2904 | if (list->file_offset_node) { | ||
| 2905 | drm_mm_put_block(list->file_offset_node); | ||
| 2906 | list->file_offset_node = NULL; | ||
| 2907 | } | ||
| 2908 | |||
| 2909 | map = list->map; | ||
| 2910 | if (map) { | ||
| 2911 | drm_free(map, sizeof(*map), DRM_MEM_DRIVER); | ||
| 2912 | list->map = NULL; | ||
| 2913 | } | ||
| 2914 | 2945 | ||
| 2915 | drm_free(obj_priv->page_cpu_valid, 1, DRM_MEM_DRIVER); | 2946 | drm_free(obj_priv->page_cpu_valid, 1, DRM_MEM_DRIVER); |
| 2916 | drm_free(obj->driver_private, 1, DRM_MEM_DRIVER); | 2947 | drm_free(obj->driver_private, 1, DRM_MEM_DRIVER); |
| @@ -2949,7 +2980,7 @@ i915_gem_evict_from_list(struct drm_device *dev, struct list_head *head) | |||
| 2949 | return 0; | 2980 | return 0; |
| 2950 | } | 2981 | } |
| 2951 | 2982 | ||
| 2952 | static int | 2983 | int |
| 2953 | i915_gem_idle(struct drm_device *dev) | 2984 | i915_gem_idle(struct drm_device *dev) |
| 2954 | { | 2985 | { |
| 2955 | drm_i915_private_t *dev_priv = dev->dev_private; | 2986 | drm_i915_private_t *dev_priv = dev->dev_private; |
| @@ -3095,6 +3126,7 @@ i915_gem_init_hws(struct drm_device *dev) | |||
| 3095 | if (dev_priv->hw_status_page == NULL) { | 3126 | if (dev_priv->hw_status_page == NULL) { |
| 3096 | DRM_ERROR("Failed to map status page.\n"); | 3127 | DRM_ERROR("Failed to map status page.\n"); |
| 3097 | memset(&dev_priv->hws_map, 0, sizeof(dev_priv->hws_map)); | 3128 | memset(&dev_priv->hws_map, 0, sizeof(dev_priv->hws_map)); |
| 3129 | i915_gem_object_unpin(obj); | ||
| 3098 | drm_gem_object_unreference(obj); | 3130 | drm_gem_object_unreference(obj); |
| 3099 | return -EINVAL; | 3131 | return -EINVAL; |
| 3100 | } | 3132 | } |
| @@ -3107,6 +3139,31 @@ i915_gem_init_hws(struct drm_device *dev) | |||
| 3107 | return 0; | 3139 | return 0; |
| 3108 | } | 3140 | } |
| 3109 | 3141 | ||
| 3142 | static void | ||
| 3143 | i915_gem_cleanup_hws(struct drm_device *dev) | ||
| 3144 | { | ||
| 3145 | drm_i915_private_t *dev_priv = dev->dev_private; | ||
| 3146 | struct drm_gem_object *obj; | ||
| 3147 | struct drm_i915_gem_object *obj_priv; | ||
| 3148 | |||
| 3149 | if (dev_priv->hws_obj == NULL) | ||
| 3150 | return; | ||
| 3151 | |||
| 3152 | obj = dev_priv->hws_obj; | ||
| 3153 | obj_priv = obj->driver_private; | ||
| 3154 | |||
| 3155 | kunmap(obj_priv->page_list[0]); | ||
| 3156 | i915_gem_object_unpin(obj); | ||
| 3157 | drm_gem_object_unreference(obj); | ||
| 3158 | dev_priv->hws_obj = NULL; | ||
| 3159 | |||
| 3160 | memset(&dev_priv->hws_map, 0, sizeof(dev_priv->hws_map)); | ||
| 3161 | dev_priv->hw_status_page = NULL; | ||
| 3162 | |||
| 3163 | /* Write high address into HWS_PGA when disabling. */ | ||
| 3164 | I915_WRITE(HWS_PGA, 0x1ffff000); | ||
| 3165 | } | ||
| 3166 | |||
| 3110 | int | 3167 | int |
| 3111 | i915_gem_init_ringbuffer(struct drm_device *dev) | 3168 | i915_gem_init_ringbuffer(struct drm_device *dev) |
| 3112 | { | 3169 | { |
| @@ -3124,6 +3181,7 @@ i915_gem_init_ringbuffer(struct drm_device *dev) | |||
| 3124 | obj = drm_gem_object_alloc(dev, 128 * 1024); | 3181 | obj = drm_gem_object_alloc(dev, 128 * 1024); |
| 3125 | if (obj == NULL) { | 3182 | if (obj == NULL) { |
| 3126 | DRM_ERROR("Failed to allocate ringbuffer\n"); | 3183 | DRM_ERROR("Failed to allocate ringbuffer\n"); |
| 3184 | i915_gem_cleanup_hws(dev); | ||
| 3127 | return -ENOMEM; | 3185 | return -ENOMEM; |
| 3128 | } | 3186 | } |
| 3129 | obj_priv = obj->driver_private; | 3187 | obj_priv = obj->driver_private; |
| @@ -3131,6 +3189,7 @@ i915_gem_init_ringbuffer(struct drm_device *dev) | |||
| 3131 | ret = i915_gem_object_pin(obj, 4096); | 3189 | ret = i915_gem_object_pin(obj, 4096); |
| 3132 | if (ret != 0) { | 3190 | if (ret != 0) { |
| 3133 | drm_gem_object_unreference(obj); | 3191 | drm_gem_object_unreference(obj); |
| 3192 | i915_gem_cleanup_hws(dev); | ||
| 3134 | return ret; | 3193 | return ret; |
| 3135 | } | 3194 | } |
| 3136 | 3195 | ||
| @@ -3148,7 +3207,9 @@ i915_gem_init_ringbuffer(struct drm_device *dev) | |||
| 3148 | if (ring->map.handle == NULL) { | 3207 | if (ring->map.handle == NULL) { |
| 3149 | DRM_ERROR("Failed to map ringbuffer.\n"); | 3208 | DRM_ERROR("Failed to map ringbuffer.\n"); |
| 3150 | memset(&dev_priv->ring, 0, sizeof(dev_priv->ring)); | 3209 | memset(&dev_priv->ring, 0, sizeof(dev_priv->ring)); |
| 3210 | i915_gem_object_unpin(obj); | ||
| 3151 | drm_gem_object_unreference(obj); | 3211 | drm_gem_object_unreference(obj); |
| 3212 | i915_gem_cleanup_hws(dev); | ||
| 3152 | return -EINVAL; | 3213 | return -EINVAL; |
| 3153 | } | 3214 | } |
| 3154 | ring->ring_obj = obj; | 3215 | ring->ring_obj = obj; |
| @@ -3228,20 +3289,7 @@ i915_gem_cleanup_ringbuffer(struct drm_device *dev) | |||
| 3228 | dev_priv->ring.ring_obj = NULL; | 3289 | dev_priv->ring.ring_obj = NULL; |
| 3229 | memset(&dev_priv->ring, 0, sizeof(dev_priv->ring)); | 3290 | memset(&dev_priv->ring, 0, sizeof(dev_priv->ring)); |
| 3230 | 3291 | ||
| 3231 | if (dev_priv->hws_obj != NULL) { | 3292 | i915_gem_cleanup_hws(dev); |
| 3232 | struct drm_gem_object *obj = dev_priv->hws_obj; | ||
| 3233 | struct drm_i915_gem_object *obj_priv = obj->driver_private; | ||
| 3234 | |||
| 3235 | kunmap(obj_priv->page_list[0]); | ||
| 3236 | i915_gem_object_unpin(obj); | ||
| 3237 | drm_gem_object_unreference(obj); | ||
| 3238 | dev_priv->hws_obj = NULL; | ||
| 3239 | memset(&dev_priv->hws_map, 0, sizeof(dev_priv->hws_map)); | ||
| 3240 | dev_priv->hw_status_page = NULL; | ||
| 3241 | |||
| 3242 | /* Write high address into HWS_PGA when disabling. */ | ||
| 3243 | I915_WRITE(HWS_PGA, 0x1ffff000); | ||
| 3244 | } | ||
| 3245 | } | 3293 | } |
| 3246 | 3294 | ||
| 3247 | int | 3295 | int |
diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c index fa1685cba840..7fb4191ef934 100644 --- a/drivers/gpu/drm/i915/i915_gem_tiling.c +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c | |||
| @@ -299,9 +299,8 @@ i915_gem_set_tiling(struct drm_device *dev, void *data, | |||
| 299 | } | 299 | } |
| 300 | obj_priv->stride = args->stride; | 300 | obj_priv->stride = args->stride; |
| 301 | 301 | ||
| 302 | mutex_unlock(&dev->struct_mutex); | ||
| 303 | |||
| 304 | drm_gem_object_unreference(obj); | 302 | drm_gem_object_unreference(obj); |
| 303 | mutex_unlock(&dev->struct_mutex); | ||
| 305 | 304 | ||
| 306 | return 0; | 305 | return 0; |
| 307 | } | 306 | } |
| @@ -340,9 +339,8 @@ i915_gem_get_tiling(struct drm_device *dev, void *data, | |||
| 340 | DRM_ERROR("unknown tiling mode\n"); | 339 | DRM_ERROR("unknown tiling mode\n"); |
| 341 | } | 340 | } |
| 342 | 341 | ||
| 343 | mutex_unlock(&dev->struct_mutex); | ||
| 344 | |||
| 345 | drm_gem_object_unreference(obj); | 342 | drm_gem_object_unreference(obj); |
| 343 | mutex_unlock(&dev->struct_mutex); | ||
| 346 | 344 | ||
| 347 | return 0; | 345 | return 0; |
| 348 | } | 346 | } |
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 4ca82a025525..65be30dccc77 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c | |||
| @@ -135,6 +135,14 @@ parse_general_features(struct drm_i915_private *dev_priv, | |||
| 135 | if (general) { | 135 | if (general) { |
| 136 | dev_priv->int_tv_support = general->int_tv_support; | 136 | dev_priv->int_tv_support = general->int_tv_support; |
| 137 | dev_priv->int_crt_support = general->int_crt_support; | 137 | dev_priv->int_crt_support = general->int_crt_support; |
| 138 | dev_priv->lvds_use_ssc = general->enable_ssc; | ||
| 139 | |||
| 140 | if (dev_priv->lvds_use_ssc) { | ||
| 141 | if (IS_I855(dev_priv->dev)) | ||
| 142 | dev_priv->lvds_ssc_freq = general->ssc_freq ? 66 : 48; | ||
| 143 | else | ||
| 144 | dev_priv->lvds_ssc_freq = general->ssc_freq ? 100 : 96; | ||
| 145 | } | ||
| 138 | } | 146 | } |
| 139 | } | 147 | } |
| 140 | 148 | ||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index bbdd72909a11..65b635ce28c8 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
| @@ -90,12 +90,12 @@ typedef struct { | |||
| 90 | #define I9XX_DOT_MAX 400000 | 90 | #define I9XX_DOT_MAX 400000 |
| 91 | #define I9XX_VCO_MIN 1400000 | 91 | #define I9XX_VCO_MIN 1400000 |
| 92 | #define I9XX_VCO_MAX 2800000 | 92 | #define I9XX_VCO_MAX 2800000 |
| 93 | #define I9XX_N_MIN 3 | 93 | #define I9XX_N_MIN 1 |
| 94 | #define I9XX_N_MAX 8 | 94 | #define I9XX_N_MAX 6 |
| 95 | #define I9XX_M_MIN 70 | 95 | #define I9XX_M_MIN 70 |
| 96 | #define I9XX_M_MAX 120 | 96 | #define I9XX_M_MAX 120 |
| 97 | #define I9XX_M1_MIN 10 | 97 | #define I9XX_M1_MIN 10 |
| 98 | #define I9XX_M1_MAX 20 | 98 | #define I9XX_M1_MAX 22 |
| 99 | #define I9XX_M2_MIN 5 | 99 | #define I9XX_M2_MIN 5 |
| 100 | #define I9XX_M2_MAX 9 | 100 | #define I9XX_M2_MAX 9 |
| 101 | #define I9XX_P_SDVO_DAC_MIN 5 | 101 | #define I9XX_P_SDVO_DAC_MIN 5 |
| @@ -189,9 +189,7 @@ static const intel_limit_t *intel_limit(struct drm_crtc *crtc) | |||
| 189 | return limit; | 189 | return limit; |
| 190 | } | 190 | } |
| 191 | 191 | ||
| 192 | /** Derive the pixel clock for the given refclk and divisors for 8xx chips. */ | 192 | static void intel_clock(int refclk, intel_clock_t *clock) |
| 193 | |||
| 194 | static void i8xx_clock(int refclk, intel_clock_t *clock) | ||
| 195 | { | 193 | { |
| 196 | clock->m = 5 * (clock->m1 + 2) + (clock->m2 + 2); | 194 | clock->m = 5 * (clock->m1 + 2) + (clock->m2 + 2); |
| 197 | clock->p = clock->p1 * clock->p2; | 195 | clock->p = clock->p1 * clock->p2; |
| @@ -199,25 +197,6 @@ static void i8xx_clock(int refclk, intel_clock_t *clock) | |||
| 199 | clock->dot = clock->vco / clock->p; | 197 | clock->dot = clock->vco / clock->p; |
| 200 | } | 198 | } |
| 201 | 199 | ||
| 202 | /** Derive the pixel clock for the given refclk and divisors for 9xx chips. */ | ||
| 203 | |||
| 204 | static void i9xx_clock(int refclk, intel_clock_t *clock) | ||
| 205 | { | ||
| 206 | clock->m = 5 * (clock->m1 + 2) + (clock->m2 + 2); | ||
| 207 | clock->p = clock->p1 * clock->p2; | ||
| 208 | clock->vco = refclk * clock->m / (clock->n + 2); | ||
| 209 | clock->dot = clock->vco / clock->p; | ||
| 210 | } | ||
| 211 | |||
| 212 | static void intel_clock(struct drm_device *dev, int refclk, | ||
| 213 | intel_clock_t *clock) | ||
| 214 | { | ||
| 215 | if (IS_I9XX(dev)) | ||
| 216 | i9xx_clock (refclk, clock); | ||
| 217 | else | ||
| 218 | i8xx_clock (refclk, clock); | ||
| 219 | } | ||
| 220 | |||
| 221 | /** | 200 | /** |
| 222 | * Returns whether any output on the specified pipe is of the specified type | 201 | * Returns whether any output on the specified pipe is of the specified type |
| 223 | */ | 202 | */ |
| @@ -238,7 +217,7 @@ bool intel_pipe_has_type (struct drm_crtc *crtc, int type) | |||
| 238 | return false; | 217 | return false; |
| 239 | } | 218 | } |
| 240 | 219 | ||
| 241 | #define INTELPllInvalid(s) { /* ErrorF (s) */; return false; } | 220 | #define INTELPllInvalid(s) do { DRM_DEBUG(s); return false; } while (0) |
| 242 | /** | 221 | /** |
| 243 | * Returns whether the given set of divisors are valid for a given refclk with | 222 | * Returns whether the given set of divisors are valid for a given refclk with |
| 244 | * the given connectors. | 223 | * the given connectors. |
| @@ -318,7 +297,7 @@ static bool intel_find_best_PLL(struct drm_crtc *crtc, int target, | |||
| 318 | clock.p1 <= limit->p1.max; clock.p1++) { | 297 | clock.p1 <= limit->p1.max; clock.p1++) { |
| 319 | int this_err; | 298 | int this_err; |
| 320 | 299 | ||
| 321 | intel_clock(dev, refclk, &clock); | 300 | intel_clock(refclk, &clock); |
| 322 | 301 | ||
| 323 | if (!intel_PLL_is_valid(crtc, &clock)) | 302 | if (!intel_PLL_is_valid(crtc, &clock)) |
| 324 | continue; | 303 | continue; |
| @@ -343,7 +322,7 @@ intel_wait_for_vblank(struct drm_device *dev) | |||
| 343 | udelay(20000); | 322 | udelay(20000); |
| 344 | } | 323 | } |
| 345 | 324 | ||
| 346 | static void | 325 | static int |
| 347 | intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, | 326 | intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, |
| 348 | struct drm_framebuffer *old_fb) | 327 | struct drm_framebuffer *old_fb) |
| 349 | { | 328 | { |
| @@ -361,11 +340,21 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, | |||
| 361 | int dspstride = (pipe == 0) ? DSPASTRIDE : DSPBSTRIDE; | 340 | int dspstride = (pipe == 0) ? DSPASTRIDE : DSPBSTRIDE; |
| 362 | int dspcntr_reg = (pipe == 0) ? DSPACNTR : DSPBCNTR; | 341 | int dspcntr_reg = (pipe == 0) ? DSPACNTR : DSPBCNTR; |
| 363 | u32 dspcntr, alignment; | 342 | u32 dspcntr, alignment; |
| 343 | int ret; | ||
| 364 | 344 | ||
| 365 | /* no fb bound */ | 345 | /* no fb bound */ |
| 366 | if (!crtc->fb) { | 346 | if (!crtc->fb) { |
| 367 | DRM_DEBUG("No FB bound\n"); | 347 | DRM_DEBUG("No FB bound\n"); |
| 368 | return; | 348 | return 0; |
| 349 | } | ||
| 350 | |||
| 351 | switch (pipe) { | ||
| 352 | case 0: | ||
| 353 | case 1: | ||
| 354 | break; | ||
| 355 | default: | ||
| 356 | DRM_ERROR("Can't update pipe %d in SAREA\n", pipe); | ||
| 357 | return -EINVAL; | ||
| 369 | } | 358 | } |
| 370 | 359 | ||
| 371 | intel_fb = to_intel_framebuffer(crtc->fb); | 360 | intel_fb = to_intel_framebuffer(crtc->fb); |
| @@ -377,28 +366,30 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, | |||
| 377 | alignment = 64 * 1024; | 366 | alignment = 64 * 1024; |
| 378 | break; | 367 | break; |
| 379 | case I915_TILING_X: | 368 | case I915_TILING_X: |
| 380 | if (IS_I9XX(dev)) | 369 | /* pin() will align the object as required by fence */ |
| 381 | alignment = 1024 * 1024; | 370 | alignment = 0; |
| 382 | else | ||
| 383 | alignment = 512 * 1024; | ||
| 384 | break; | 371 | break; |
| 385 | case I915_TILING_Y: | 372 | case I915_TILING_Y: |
| 386 | /* FIXME: Is this true? */ | 373 | /* FIXME: Is this true? */ |
| 387 | DRM_ERROR("Y tiled not allowed for scan out buffers\n"); | 374 | DRM_ERROR("Y tiled not allowed for scan out buffers\n"); |
| 388 | return; | 375 | return -EINVAL; |
| 389 | default: | 376 | default: |
| 390 | BUG(); | 377 | BUG(); |
| 391 | } | 378 | } |
| 392 | 379 | ||
| 393 | if (i915_gem_object_pin(intel_fb->obj, alignment)) | 380 | mutex_lock(&dev->struct_mutex); |
| 394 | return; | 381 | ret = i915_gem_object_pin(intel_fb->obj, alignment); |
| 395 | 382 | if (ret != 0) { | |
| 396 | i915_gem_object_set_to_gtt_domain(intel_fb->obj, 1); | 383 | mutex_unlock(&dev->struct_mutex); |
| 397 | 384 | return ret; | |
| 398 | Start = obj_priv->gtt_offset; | 385 | } |
| 399 | Offset = y * crtc->fb->pitch + x * (crtc->fb->bits_per_pixel / 8); | ||
| 400 | 386 | ||
| 401 | I915_WRITE(dspstride, crtc->fb->pitch); | 387 | ret = i915_gem_object_set_to_gtt_domain(intel_fb->obj, 1); |
| 388 | if (ret != 0) { | ||
| 389 | i915_gem_object_unpin(intel_fb->obj); | ||
| 390 | mutex_unlock(&dev->struct_mutex); | ||
| 391 | return ret; | ||
| 392 | } | ||
| 402 | 393 | ||
| 403 | dspcntr = I915_READ(dspcntr_reg); | 394 | dspcntr = I915_READ(dspcntr_reg); |
| 404 | /* Mask out pixel format bits in case we change it */ | 395 | /* Mask out pixel format bits in case we change it */ |
| @@ -419,11 +410,17 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, | |||
| 419 | break; | 410 | break; |
| 420 | default: | 411 | default: |
| 421 | DRM_ERROR("Unknown color depth\n"); | 412 | DRM_ERROR("Unknown color depth\n"); |
| 422 | return; | 413 | i915_gem_object_unpin(intel_fb->obj); |
| 414 | mutex_unlock(&dev->struct_mutex); | ||
| 415 | return -EINVAL; | ||
| 423 | } | 416 | } |
| 424 | I915_WRITE(dspcntr_reg, dspcntr); | 417 | I915_WRITE(dspcntr_reg, dspcntr); |
| 425 | 418 | ||
| 419 | Start = obj_priv->gtt_offset; | ||
| 420 | Offset = y * crtc->fb->pitch + x * (crtc->fb->bits_per_pixel / 8); | ||
| 421 | |||
| 426 | DRM_DEBUG("Writing base %08lX %08lX %d %d\n", Start, Offset, x, y); | 422 | DRM_DEBUG("Writing base %08lX %08lX %d %d\n", Start, Offset, x, y); |
| 423 | I915_WRITE(dspstride, crtc->fb->pitch); | ||
| 427 | if (IS_I965G(dev)) { | 424 | if (IS_I965G(dev)) { |
| 428 | I915_WRITE(dspbase, Offset); | 425 | I915_WRITE(dspbase, Offset); |
| 429 | I915_READ(dspbase); | 426 | I915_READ(dspbase); |
| @@ -440,27 +437,24 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, | |||
| 440 | intel_fb = to_intel_framebuffer(old_fb); | 437 | intel_fb = to_intel_framebuffer(old_fb); |
| 441 | i915_gem_object_unpin(intel_fb->obj); | 438 | i915_gem_object_unpin(intel_fb->obj); |
| 442 | } | 439 | } |
| 440 | mutex_unlock(&dev->struct_mutex); | ||
| 443 | 441 | ||
| 444 | if (!dev->primary->master) | 442 | if (!dev->primary->master) |
| 445 | return; | 443 | return 0; |
| 446 | 444 | ||
| 447 | master_priv = dev->primary->master->driver_priv; | 445 | master_priv = dev->primary->master->driver_priv; |
| 448 | if (!master_priv->sarea_priv) | 446 | if (!master_priv->sarea_priv) |
| 449 | return; | 447 | return 0; |
| 450 | 448 | ||
| 451 | switch (pipe) { | 449 | if (pipe) { |
| 452 | case 0: | ||
| 453 | master_priv->sarea_priv->pipeA_x = x; | ||
| 454 | master_priv->sarea_priv->pipeA_y = y; | ||
| 455 | break; | ||
| 456 | case 1: | ||
| 457 | master_priv->sarea_priv->pipeB_x = x; | 450 | master_priv->sarea_priv->pipeB_x = x; |
| 458 | master_priv->sarea_priv->pipeB_y = y; | 451 | master_priv->sarea_priv->pipeB_y = y; |
| 459 | break; | 452 | } else { |
| 460 | default: | 453 | master_priv->sarea_priv->pipeA_x = x; |
| 461 | DRM_ERROR("Can't update pipe %d in SAREA\n", pipe); | 454 | master_priv->sarea_priv->pipeA_y = y; |
| 462 | break; | ||
| 463 | } | 455 | } |
| 456 | |||
| 457 | return 0; | ||
| 464 | } | 458 | } |
| 465 | 459 | ||
| 466 | 460 | ||
| @@ -708,11 +702,11 @@ static int intel_panel_fitter_pipe (struct drm_device *dev) | |||
| 708 | return 1; | 702 | return 1; |
| 709 | } | 703 | } |
| 710 | 704 | ||
| 711 | static void intel_crtc_mode_set(struct drm_crtc *crtc, | 705 | static int intel_crtc_mode_set(struct drm_crtc *crtc, |
| 712 | struct drm_display_mode *mode, | 706 | struct drm_display_mode *mode, |
| 713 | struct drm_display_mode *adjusted_mode, | 707 | struct drm_display_mode *adjusted_mode, |
| 714 | int x, int y, | 708 | int x, int y, |
| 715 | struct drm_framebuffer *old_fb) | 709 | struct drm_framebuffer *old_fb) |
| 716 | { | 710 | { |
| 717 | struct drm_device *dev = crtc->dev; | 711 | struct drm_device *dev = crtc->dev; |
| 718 | struct drm_i915_private *dev_priv = dev->dev_private; | 712 | struct drm_i915_private *dev_priv = dev->dev_private; |
| @@ -732,13 +726,14 @@ static void intel_crtc_mode_set(struct drm_crtc *crtc, | |||
| 732 | int dspsize_reg = (pipe == 0) ? DSPASIZE : DSPBSIZE; | 726 | int dspsize_reg = (pipe == 0) ? DSPASIZE : DSPBSIZE; |
| 733 | int dsppos_reg = (pipe == 0) ? DSPAPOS : DSPBPOS; | 727 | int dsppos_reg = (pipe == 0) ? DSPAPOS : DSPBPOS; |
| 734 | int pipesrc_reg = (pipe == 0) ? PIPEASRC : PIPEBSRC; | 728 | int pipesrc_reg = (pipe == 0) ? PIPEASRC : PIPEBSRC; |
| 735 | int refclk; | 729 | int refclk, num_outputs = 0; |
| 736 | intel_clock_t clock; | 730 | intel_clock_t clock; |
| 737 | u32 dpll = 0, fp = 0, dspcntr, pipeconf; | 731 | u32 dpll = 0, fp = 0, dspcntr, pipeconf; |
| 738 | bool ok, is_sdvo = false, is_dvo = false; | 732 | bool ok, is_sdvo = false, is_dvo = false; |
| 739 | bool is_crt = false, is_lvds = false, is_tv = false; | 733 | bool is_crt = false, is_lvds = false, is_tv = false; |
| 740 | struct drm_mode_config *mode_config = &dev->mode_config; | 734 | struct drm_mode_config *mode_config = &dev->mode_config; |
| 741 | struct drm_connector *connector; | 735 | struct drm_connector *connector; |
| 736 | int ret; | ||
| 742 | 737 | ||
| 743 | drm_vblank_pre_modeset(dev, pipe); | 738 | drm_vblank_pre_modeset(dev, pipe); |
| 744 | 739 | ||
| @@ -768,9 +763,14 @@ static void intel_crtc_mode_set(struct drm_crtc *crtc, | |||
| 768 | is_crt = true; | 763 | is_crt = true; |
| 769 | break; | 764 | break; |
| 770 | } | 765 | } |
| 766 | |||
| 767 | num_outputs++; | ||
| 771 | } | 768 | } |
| 772 | 769 | ||
| 773 | if (IS_I9XX(dev)) { | 770 | if (is_lvds && dev_priv->lvds_use_ssc && num_outputs < 2) { |
| 771 | refclk = dev_priv->lvds_ssc_freq * 1000; | ||
| 772 | DRM_DEBUG("using SSC reference clock of %d MHz\n", refclk / 1000); | ||
| 773 | } else if (IS_I9XX(dev)) { | ||
| 774 | refclk = 96000; | 774 | refclk = 96000; |
| 775 | } else { | 775 | } else { |
| 776 | refclk = 48000; | 776 | refclk = 48000; |
| @@ -779,7 +779,7 @@ static void intel_crtc_mode_set(struct drm_crtc *crtc, | |||
| 779 | ok = intel_find_best_PLL(crtc, adjusted_mode->clock, refclk, &clock); | 779 | ok = intel_find_best_PLL(crtc, adjusted_mode->clock, refclk, &clock); |
| 780 | if (!ok) { | 780 | if (!ok) { |
| 781 | DRM_ERROR("Couldn't find PLL settings for mode!\n"); | 781 | DRM_ERROR("Couldn't find PLL settings for mode!\n"); |
| 782 | return; | 782 | return -EINVAL; |
| 783 | } | 783 | } |
| 784 | 784 | ||
| 785 | fp = clock.n << 16 | clock.m1 << 8 | clock.m2; | 785 | fp = clock.n << 16 | clock.m1 << 8 | clock.m2; |
| @@ -829,11 +829,14 @@ static void intel_crtc_mode_set(struct drm_crtc *crtc, | |||
| 829 | } | 829 | } |
| 830 | } | 830 | } |
| 831 | 831 | ||
| 832 | if (is_tv) { | 832 | if (is_sdvo && is_tv) |
| 833 | dpll |= PLL_REF_INPUT_TVCLKINBC; | ||
| 834 | else if (is_tv) | ||
| 833 | /* XXX: just matching BIOS for now */ | 835 | /* XXX: just matching BIOS for now */ |
| 834 | /* dpll |= PLL_REF_INPUT_TVCLKINBC; */ | 836 | /* dpll |= PLL_REF_INPUT_TVCLKINBC; */ |
| 835 | dpll |= 3; | 837 | dpll |= 3; |
| 836 | } | 838 | else if (is_lvds && dev_priv->lvds_use_ssc && num_outputs < 2) |
| 839 | dpll |= PLLB_REF_INPUT_SPREADSPECTRUMIN; | ||
| 837 | else | 840 | else |
| 838 | dpll |= PLL_REF_INPUT_DREFCLK; | 841 | dpll |= PLL_REF_INPUT_DREFCLK; |
| 839 | 842 | ||
| @@ -950,9 +953,13 @@ static void intel_crtc_mode_set(struct drm_crtc *crtc, | |||
| 950 | I915_WRITE(dspcntr_reg, dspcntr); | 953 | I915_WRITE(dspcntr_reg, dspcntr); |
| 951 | 954 | ||
| 952 | /* Flush the plane changes */ | 955 | /* Flush the plane changes */ |
| 953 | intel_pipe_set_base(crtc, x, y, old_fb); | 956 | ret = intel_pipe_set_base(crtc, x, y, old_fb); |
| 957 | if (ret != 0) | ||
| 958 | return ret; | ||
| 954 | 959 | ||
| 955 | drm_vblank_post_modeset(dev, pipe); | 960 | drm_vblank_post_modeset(dev, pipe); |
| 961 | |||
| 962 | return 0; | ||
| 956 | } | 963 | } |
| 957 | 964 | ||
| 958 | /** Loads the palette/gamma unit for the CRTC with the prepared values */ | 965 | /** Loads the palette/gamma unit for the CRTC with the prepared values */ |
| @@ -1001,6 +1008,7 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, | |||
| 1001 | temp = CURSOR_MODE_DISABLE; | 1008 | temp = CURSOR_MODE_DISABLE; |
| 1002 | addr = 0; | 1009 | addr = 0; |
| 1003 | bo = NULL; | 1010 | bo = NULL; |
| 1011 | mutex_lock(&dev->struct_mutex); | ||
| 1004 | goto finish; | 1012 | goto finish; |
| 1005 | } | 1013 | } |
| 1006 | 1014 | ||
| @@ -1023,18 +1031,19 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, | |||
| 1023 | } | 1031 | } |
| 1024 | 1032 | ||
| 1025 | /* we only need to pin inside GTT if cursor is non-phy */ | 1033 | /* we only need to pin inside GTT if cursor is non-phy */ |
| 1034 | mutex_lock(&dev->struct_mutex); | ||
| 1026 | if (!dev_priv->cursor_needs_physical) { | 1035 | if (!dev_priv->cursor_needs_physical) { |
| 1027 | ret = i915_gem_object_pin(bo, PAGE_SIZE); | 1036 | ret = i915_gem_object_pin(bo, PAGE_SIZE); |
| 1028 | if (ret) { | 1037 | if (ret) { |
| 1029 | DRM_ERROR("failed to pin cursor bo\n"); | 1038 | DRM_ERROR("failed to pin cursor bo\n"); |
| 1030 | goto fail; | 1039 | goto fail_locked; |
| 1031 | } | 1040 | } |
| 1032 | addr = obj_priv->gtt_offset; | 1041 | addr = obj_priv->gtt_offset; |
| 1033 | } else { | 1042 | } else { |
| 1034 | ret = i915_gem_attach_phys_object(dev, bo, (pipe == 0) ? I915_GEM_PHYS_CURSOR_0 : I915_GEM_PHYS_CURSOR_1); | 1043 | ret = i915_gem_attach_phys_object(dev, bo, (pipe == 0) ? I915_GEM_PHYS_CURSOR_0 : I915_GEM_PHYS_CURSOR_1); |
| 1035 | if (ret) { | 1044 | if (ret) { |
| 1036 | DRM_ERROR("failed to attach phys object\n"); | 1045 | DRM_ERROR("failed to attach phys object\n"); |
| 1037 | goto fail; | 1046 | goto fail_locked; |
| 1038 | } | 1047 | } |
| 1039 | addr = obj_priv->phys_obj->handle->busaddr; | 1048 | addr = obj_priv->phys_obj->handle->busaddr; |
| 1040 | } | 1049 | } |
| @@ -1054,10 +1063,9 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, | |||
| 1054 | i915_gem_detach_phys_object(dev, intel_crtc->cursor_bo); | 1063 | i915_gem_detach_phys_object(dev, intel_crtc->cursor_bo); |
| 1055 | } else | 1064 | } else |
| 1056 | i915_gem_object_unpin(intel_crtc->cursor_bo); | 1065 | i915_gem_object_unpin(intel_crtc->cursor_bo); |
| 1057 | mutex_lock(&dev->struct_mutex); | ||
| 1058 | drm_gem_object_unreference(intel_crtc->cursor_bo); | 1066 | drm_gem_object_unreference(intel_crtc->cursor_bo); |
| 1059 | mutex_unlock(&dev->struct_mutex); | ||
| 1060 | } | 1067 | } |
| 1068 | mutex_unlock(&dev->struct_mutex); | ||
| 1061 | 1069 | ||
| 1062 | intel_crtc->cursor_addr = addr; | 1070 | intel_crtc->cursor_addr = addr; |
| 1063 | intel_crtc->cursor_bo = bo; | 1071 | intel_crtc->cursor_bo = bo; |
| @@ -1065,6 +1073,7 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc, | |||
| 1065 | return 0; | 1073 | return 0; |
| 1066 | fail: | 1074 | fail: |
| 1067 | mutex_lock(&dev->struct_mutex); | 1075 | mutex_lock(&dev->struct_mutex); |
| 1076 | fail_locked: | ||
| 1068 | drm_gem_object_unreference(bo); | 1077 | drm_gem_object_unreference(bo); |
| 1069 | mutex_unlock(&dev->struct_mutex); | 1078 | mutex_unlock(&dev->struct_mutex); |
| 1070 | return ret; | 1079 | return ret; |
| @@ -1292,7 +1301,7 @@ static int intel_crtc_clock_get(struct drm_device *dev, struct drm_crtc *crtc) | |||
| 1292 | } | 1301 | } |
| 1293 | 1302 | ||
| 1294 | /* XXX: Handle the 100Mhz refclk */ | 1303 | /* XXX: Handle the 100Mhz refclk */ |
| 1295 | i9xx_clock(96000, &clock); | 1304 | intel_clock(96000, &clock); |
| 1296 | } else { | 1305 | } else { |
| 1297 | bool is_lvds = (pipe == 1) && (I915_READ(LVDS) & LVDS_PORT_EN); | 1306 | bool is_lvds = (pipe == 1) && (I915_READ(LVDS) & LVDS_PORT_EN); |
| 1298 | 1307 | ||
| @@ -1304,9 +1313,9 @@ static int intel_crtc_clock_get(struct drm_device *dev, struct drm_crtc *crtc) | |||
| 1304 | if ((dpll & PLL_REF_INPUT_MASK) == | 1313 | if ((dpll & PLL_REF_INPUT_MASK) == |
| 1305 | PLLB_REF_INPUT_SPREADSPECTRUMIN) { | 1314 | PLLB_REF_INPUT_SPREADSPECTRUMIN) { |
| 1306 | /* XXX: might not be 66MHz */ | 1315 | /* XXX: might not be 66MHz */ |
| 1307 | i8xx_clock(66000, &clock); | 1316 | intel_clock(66000, &clock); |
| 1308 | } else | 1317 | } else |
| 1309 | i8xx_clock(48000, &clock); | 1318 | intel_clock(48000, &clock); |
| 1310 | } else { | 1319 | } else { |
| 1311 | if (dpll & PLL_P1_DIVIDE_BY_TWO) | 1320 | if (dpll & PLL_P1_DIVIDE_BY_TWO) |
| 1312 | clock.p1 = 2; | 1321 | clock.p1 = 2; |
| @@ -1319,7 +1328,7 @@ static int intel_crtc_clock_get(struct drm_device *dev, struct drm_crtc *crtc) | |||
| 1319 | else | 1328 | else |
| 1320 | clock.p2 = 2; | 1329 | clock.p2 = 2; |
| 1321 | 1330 | ||
| 1322 | i8xx_clock(48000, &clock); | 1331 | intel_clock(48000, &clock); |
| 1323 | } | 1332 | } |
| 1324 | } | 1333 | } |
| 1325 | 1334 | ||
| @@ -1598,7 +1607,9 @@ intel_user_framebuffer_create(struct drm_device *dev, | |||
| 1598 | 1607 | ||
| 1599 | ret = intel_framebuffer_create(dev, mode_cmd, &fb, obj); | 1608 | ret = intel_framebuffer_create(dev, mode_cmd, &fb, obj); |
| 1600 | if (ret) { | 1609 | if (ret) { |
| 1610 | mutex_lock(&dev->struct_mutex); | ||
| 1601 | drm_gem_object_unreference(obj); | 1611 | drm_gem_object_unreference(obj); |
| 1612 | mutex_unlock(&dev->struct_mutex); | ||
| 1602 | return NULL; | 1613 | return NULL; |
| 1603 | } | 1614 | } |
| 1604 | 1615 | ||
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index afd1217b8a02..b7f0ebe9f810 100644 --- a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c | |||
| @@ -473,7 +473,7 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width, | |||
| 473 | ret = intel_framebuffer_create(dev, &mode_cmd, &fb, fbo); | 473 | ret = intel_framebuffer_create(dev, &mode_cmd, &fb, fbo); |
| 474 | if (ret) { | 474 | if (ret) { |
| 475 | DRM_ERROR("failed to allocate fb.\n"); | 475 | DRM_ERROR("failed to allocate fb.\n"); |
| 476 | goto out_unref; | 476 | goto out_unpin; |
| 477 | } | 477 | } |
| 478 | 478 | ||
| 479 | list_add(&fb->filp_head, &dev->mode_config.fb_kernel_list); | 479 | list_add(&fb->filp_head, &dev->mode_config.fb_kernel_list); |
| @@ -484,7 +484,7 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width, | |||
| 484 | info = framebuffer_alloc(sizeof(struct intelfb_par), device); | 484 | info = framebuffer_alloc(sizeof(struct intelfb_par), device); |
| 485 | if (!info) { | 485 | if (!info) { |
| 486 | ret = -ENOMEM; | 486 | ret = -ENOMEM; |
| 487 | goto out_unref; | 487 | goto out_unpin; |
| 488 | } | 488 | } |
| 489 | 489 | ||
| 490 | par = info->par; | 490 | par = info->par; |
| @@ -513,7 +513,7 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width, | |||
| 513 | size); | 513 | size); |
| 514 | if (!info->screen_base) { | 514 | if (!info->screen_base) { |
| 515 | ret = -ENOSPC; | 515 | ret = -ENOSPC; |
| 516 | goto out_unref; | 516 | goto out_unpin; |
| 517 | } | 517 | } |
| 518 | info->screen_size = size; | 518 | info->screen_size = size; |
| 519 | 519 | ||
| @@ -608,6 +608,8 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width, | |||
| 608 | mutex_unlock(&dev->struct_mutex); | 608 | mutex_unlock(&dev->struct_mutex); |
| 609 | return 0; | 609 | return 0; |
| 610 | 610 | ||
| 611 | out_unpin: | ||
| 612 | i915_gem_object_unpin(fbo); | ||
| 611 | out_unref: | 613 | out_unref: |
| 612 | drm_gem_object_unreference(fbo); | 614 | drm_gem_object_unreference(fbo); |
| 613 | mutex_unlock(&dev->struct_mutex); | 615 | mutex_unlock(&dev->struct_mutex); |
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 6d4f91265354..0d211af98854 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
| @@ -481,8 +481,6 @@ void intel_lvds_init(struct drm_device *dev) | |||
| 481 | if (dev_priv->panel_fixed_mode) { | 481 | if (dev_priv->panel_fixed_mode) { |
| 482 | dev_priv->panel_fixed_mode->type |= | 482 | dev_priv->panel_fixed_mode->type |= |
| 483 | DRM_MODE_TYPE_PREFERRED; | 483 | DRM_MODE_TYPE_PREFERRED; |
| 484 | drm_mode_probed_add(connector, | ||
| 485 | dev_priv->panel_fixed_mode); | ||
| 486 | goto out; | 484 | goto out; |
| 487 | } | 485 | } |
| 488 | } | 486 | } |
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index a30508b639ba..fbe6f3931b1b 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
| @@ -193,7 +193,7 @@ static bool intel_sdvo_write_byte(struct intel_output *intel_output, int addr, | |||
| 193 | 193 | ||
| 194 | #define SDVO_CMD_NAME_ENTRY(cmd) {cmd, #cmd} | 194 | #define SDVO_CMD_NAME_ENTRY(cmd) {cmd, #cmd} |
| 195 | /** Mapping of command numbers to names, for debug output */ | 195 | /** Mapping of command numbers to names, for debug output */ |
| 196 | const static struct _sdvo_cmd_name { | 196 | static const struct _sdvo_cmd_name { |
| 197 | u8 cmd; | 197 | u8 cmd; |
| 198 | char *name; | 198 | char *name; |
| 199 | } sdvo_cmd_names[] = { | 199 | } sdvo_cmd_names[] = { |
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index fbb35dc56f5c..56485d67369b 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c | |||
| @@ -411,7 +411,7 @@ struct tv_mode { | |||
| 411 | * These values account for -1s required. | 411 | * These values account for -1s required. |
| 412 | */ | 412 | */ |
| 413 | 413 | ||
| 414 | const static struct tv_mode tv_modes[] = { | 414 | static const struct tv_mode tv_modes[] = { |
| 415 | { | 415 | { |
| 416 | .name = "NTSC-M", | 416 | .name = "NTSC-M", |
| 417 | .clock = 107520, | 417 | .clock = 107520, |
diff --git a/drivers/gpu/drm/radeon/radeon_cp.c b/drivers/gpu/drm/radeon/radeon_cp.c index df4cf97e5d97..92965dbb3c14 100644 --- a/drivers/gpu/drm/radeon/radeon_cp.c +++ b/drivers/gpu/drm/radeon/radeon_cp.c | |||
| @@ -557,8 +557,10 @@ static int radeon_do_engine_reset(struct drm_device * dev) | |||
| 557 | } | 557 | } |
| 558 | 558 | ||
| 559 | static void radeon_cp_init_ring_buffer(struct drm_device * dev, | 559 | static void radeon_cp_init_ring_buffer(struct drm_device * dev, |
| 560 | drm_radeon_private_t * dev_priv) | 560 | drm_radeon_private_t *dev_priv, |
| 561 | struct drm_file *file_priv) | ||
| 561 | { | 562 | { |
| 563 | struct drm_radeon_master_private *master_priv; | ||
| 562 | u32 ring_start, cur_read_ptr; | 564 | u32 ring_start, cur_read_ptr; |
| 563 | u32 tmp; | 565 | u32 tmp; |
| 564 | 566 | ||
| @@ -677,6 +679,14 @@ static void radeon_cp_init_ring_buffer(struct drm_device * dev, | |||
| 677 | dev_priv->scratch[2] = 0; | 679 | dev_priv->scratch[2] = 0; |
| 678 | RADEON_WRITE(RADEON_LAST_CLEAR_REG, 0); | 680 | RADEON_WRITE(RADEON_LAST_CLEAR_REG, 0); |
| 679 | 681 | ||
| 682 | /* reset sarea copies of these */ | ||
| 683 | master_priv = file_priv->master->driver_priv; | ||
| 684 | if (master_priv->sarea_priv) { | ||
| 685 | master_priv->sarea_priv->last_frame = 0; | ||
| 686 | master_priv->sarea_priv->last_dispatch = 0; | ||
| 687 | master_priv->sarea_priv->last_clear = 0; | ||
| 688 | } | ||
| 689 | |||
| 680 | radeon_do_wait_for_idle(dev_priv); | 690 | radeon_do_wait_for_idle(dev_priv); |
| 681 | 691 | ||
| 682 | /* Sync everything up */ | 692 | /* Sync everything up */ |
| @@ -1215,7 +1225,7 @@ static int radeon_do_init_cp(struct drm_device *dev, drm_radeon_init_t *init, | |||
| 1215 | } | 1225 | } |
| 1216 | 1226 | ||
| 1217 | radeon_cp_load_microcode(dev_priv); | 1227 | radeon_cp_load_microcode(dev_priv); |
| 1218 | radeon_cp_init_ring_buffer(dev, dev_priv); | 1228 | radeon_cp_init_ring_buffer(dev, dev_priv, file_priv); |
| 1219 | 1229 | ||
| 1220 | dev_priv->last_buf = 0; | 1230 | dev_priv->last_buf = 0; |
| 1221 | 1231 | ||
| @@ -1281,7 +1291,7 @@ static int radeon_do_cleanup_cp(struct drm_device * dev) | |||
| 1281 | * | 1291 | * |
| 1282 | * Charl P. Botha <http://cpbotha.net> | 1292 | * Charl P. Botha <http://cpbotha.net> |
| 1283 | */ | 1293 | */ |
| 1284 | static int radeon_do_resume_cp(struct drm_device * dev) | 1294 | static int radeon_do_resume_cp(struct drm_device *dev, struct drm_file *file_priv) |
| 1285 | { | 1295 | { |
| 1286 | drm_radeon_private_t *dev_priv = dev->dev_private; | 1296 | drm_radeon_private_t *dev_priv = dev->dev_private; |
| 1287 | 1297 | ||
| @@ -1304,7 +1314,7 @@ static int radeon_do_resume_cp(struct drm_device * dev) | |||
| 1304 | } | 1314 | } |
| 1305 | 1315 | ||
| 1306 | radeon_cp_load_microcode(dev_priv); | 1316 | radeon_cp_load_microcode(dev_priv); |
| 1307 | radeon_cp_init_ring_buffer(dev, dev_priv); | 1317 | radeon_cp_init_ring_buffer(dev, dev_priv, file_priv); |
| 1308 | 1318 | ||
| 1309 | radeon_do_engine_reset(dev); | 1319 | radeon_do_engine_reset(dev); |
| 1310 | radeon_irq_set_state(dev, RADEON_SW_INT_ENABLE, 1); | 1320 | radeon_irq_set_state(dev, RADEON_SW_INT_ENABLE, 1); |
| @@ -1479,8 +1489,7 @@ int radeon_cp_idle(struct drm_device *dev, void *data, struct drm_file *file_pri | |||
| 1479 | */ | 1489 | */ |
| 1480 | int radeon_cp_resume(struct drm_device *dev, void *data, struct drm_file *file_priv) | 1490 | int radeon_cp_resume(struct drm_device *dev, void *data, struct drm_file *file_priv) |
| 1481 | { | 1491 | { |
| 1482 | 1492 | return radeon_do_resume_cp(dev, file_priv); | |
| 1483 | return radeon_do_resume_cp(dev); | ||
| 1484 | } | 1493 | } |
| 1485 | 1494 | ||
| 1486 | int radeon_engine_reset(struct drm_device *dev, void *data, struct drm_file *file_priv) | 1495 | int radeon_engine_reset(struct drm_device *dev, void *data, struct drm_file *file_priv) |
diff --git a/drivers/parport/parport_atari.c b/drivers/parport/parport_atari.c index ad4cdd256137..0b28fccec03f 100644 --- a/drivers/parport/parport_atari.c +++ b/drivers/parport/parport_atari.c | |||
| @@ -84,7 +84,7 @@ parport_atari_frob_control(struct parport *p, unsigned char mask, | |||
| 84 | static unsigned char | 84 | static unsigned char |
| 85 | parport_atari_read_status(struct parport *p) | 85 | parport_atari_read_status(struct parport *p) |
| 86 | { | 86 | { |
| 87 | return ((mfp.par_dt_reg & 1 ? 0 : PARPORT_STATUS_BUSY) | | 87 | return ((st_mfp.par_dt_reg & 1 ? 0 : PARPORT_STATUS_BUSY) | |
| 88 | PARPORT_STATUS_SELECT | PARPORT_STATUS_ERROR); | 88 | PARPORT_STATUS_SELECT | PARPORT_STATUS_ERROR); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| @@ -193,9 +193,9 @@ static int __init parport_atari_init(void) | |||
| 193 | sound_ym.wd_data = sound_ym.rd_data_reg_sel | (1 << 5); | 193 | sound_ym.wd_data = sound_ym.rd_data_reg_sel | (1 << 5); |
| 194 | local_irq_restore(flags); | 194 | local_irq_restore(flags); |
| 195 | /* MFP port I0 as input. */ | 195 | /* MFP port I0 as input. */ |
| 196 | mfp.data_dir &= ~1; | 196 | st_mfp.data_dir &= ~1; |
| 197 | /* MFP port I0 interrupt on high->low edge. */ | 197 | /* MFP port I0 interrupt on high->low edge. */ |
| 198 | mfp.active_edge &= ~1; | 198 | st_mfp.active_edge &= ~1; |
| 199 | p = parport_register_port((unsigned long)&sound_ym.wd_data, | 199 | p = parport_register_port((unsigned long)&sound_ym.wd_data, |
| 200 | IRQ_MFP_BUSY, PARPORT_DMA_NONE, | 200 | IRQ_MFP_BUSY, PARPORT_DMA_NONE, |
| 201 | &parport_atari_ops); | 201 | &parport_atari_ops); |
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index 65dc41540c62..45940f31fe9e 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c | |||
| @@ -166,6 +166,7 @@ struct fujitsu_hotkey_t { | |||
| 166 | struct platform_device *pf_device; | 166 | struct platform_device *pf_device; |
| 167 | struct kfifo *fifo; | 167 | struct kfifo *fifo; |
| 168 | spinlock_t fifo_lock; | 168 | spinlock_t fifo_lock; |
| 169 | int rfkill_supported; | ||
| 169 | int rfkill_state; | 170 | int rfkill_state; |
| 170 | int logolamp_registered; | 171 | int logolamp_registered; |
| 171 | int kblamps_registered; | 172 | int kblamps_registered; |
| @@ -526,7 +527,7 @@ static ssize_t | |||
| 526 | show_lid_state(struct device *dev, | 527 | show_lid_state(struct device *dev, |
| 527 | struct device_attribute *attr, char *buf) | 528 | struct device_attribute *attr, char *buf) |
| 528 | { | 529 | { |
| 529 | if (fujitsu_hotkey->rfkill_state == UNSUPPORTED_CMD) | 530 | if (!(fujitsu_hotkey->rfkill_supported & 0x100)) |
| 530 | return sprintf(buf, "unknown\n"); | 531 | return sprintf(buf, "unknown\n"); |
| 531 | if (fujitsu_hotkey->rfkill_state & 0x100) | 532 | if (fujitsu_hotkey->rfkill_state & 0x100) |
| 532 | return sprintf(buf, "open\n"); | 533 | return sprintf(buf, "open\n"); |
| @@ -538,7 +539,7 @@ static ssize_t | |||
| 538 | show_dock_state(struct device *dev, | 539 | show_dock_state(struct device *dev, |
| 539 | struct device_attribute *attr, char *buf) | 540 | struct device_attribute *attr, char *buf) |
| 540 | { | 541 | { |
| 541 | if (fujitsu_hotkey->rfkill_state == UNSUPPORTED_CMD) | 542 | if (!(fujitsu_hotkey->rfkill_supported & 0x200)) |
| 542 | return sprintf(buf, "unknown\n"); | 543 | return sprintf(buf, "unknown\n"); |
| 543 | if (fujitsu_hotkey->rfkill_state & 0x200) | 544 | if (fujitsu_hotkey->rfkill_state & 0x200) |
| 544 | return sprintf(buf, "docked\n"); | 545 | return sprintf(buf, "docked\n"); |
| @@ -550,7 +551,7 @@ static ssize_t | |||
| 550 | show_radios_state(struct device *dev, | 551 | show_radios_state(struct device *dev, |
| 551 | struct device_attribute *attr, char *buf) | 552 | struct device_attribute *attr, char *buf) |
| 552 | { | 553 | { |
| 553 | if (fujitsu_hotkey->rfkill_state == UNSUPPORTED_CMD) | 554 | if (!(fujitsu_hotkey->rfkill_supported & 0x20)) |
| 554 | return sprintf(buf, "unknown\n"); | 555 | return sprintf(buf, "unknown\n"); |
| 555 | if (fujitsu_hotkey->rfkill_state & 0x20) | 556 | if (fujitsu_hotkey->rfkill_state & 0x20) |
| 556 | return sprintf(buf, "on\n"); | 557 | return sprintf(buf, "on\n"); |
| @@ -928,8 +929,17 @@ static int acpi_fujitsu_hotkey_add(struct acpi_device *device) | |||
| 928 | ; /* No action, result is discarded */ | 929 | ; /* No action, result is discarded */ |
| 929 | vdbg_printk(FUJLAPTOP_DBG_INFO, "Discarded %i ringbuffer entries\n", i); | 930 | vdbg_printk(FUJLAPTOP_DBG_INFO, "Discarded %i ringbuffer entries\n", i); |
| 930 | 931 | ||
| 931 | fujitsu_hotkey->rfkill_state = | 932 | fujitsu_hotkey->rfkill_supported = |
| 932 | call_fext_func(FUNC_RFKILL, 0x4, 0x0, 0x0); | 933 | call_fext_func(FUNC_RFKILL, 0x0, 0x0, 0x0); |
| 934 | |||
| 935 | /* Make sure our bitmask of supported functions is cleared if the | ||
| 936 | RFKILL function block is not implemented, like on the S7020. */ | ||
| 937 | if (fujitsu_hotkey->rfkill_supported == UNSUPPORTED_CMD) | ||
| 938 | fujitsu_hotkey->rfkill_supported = 0; | ||
| 939 | |||
| 940 | if (fujitsu_hotkey->rfkill_supported) | ||
| 941 | fujitsu_hotkey->rfkill_state = | ||
| 942 | call_fext_func(FUNC_RFKILL, 0x4, 0x0, 0x0); | ||
| 933 | 943 | ||
| 934 | /* Suspect this is a keymap of the application panel, print it */ | 944 | /* Suspect this is a keymap of the application panel, print it */ |
| 935 | printk(KERN_INFO "fujitsu-laptop: BTNI: [0x%x]\n", | 945 | printk(KERN_INFO "fujitsu-laptop: BTNI: [0x%x]\n", |
| @@ -1005,8 +1015,9 @@ static void acpi_fujitsu_hotkey_notify(acpi_handle handle, u32 event, | |||
| 1005 | 1015 | ||
| 1006 | input = fujitsu_hotkey->input; | 1016 | input = fujitsu_hotkey->input; |
| 1007 | 1017 | ||
| 1008 | fujitsu_hotkey->rfkill_state = | 1018 | if (fujitsu_hotkey->rfkill_supported) |
| 1009 | call_fext_func(FUNC_RFKILL, 0x4, 0x0, 0x0); | 1019 | fujitsu_hotkey->rfkill_state = |
| 1020 | call_fext_func(FUNC_RFKILL, 0x4, 0x0, 0x0); | ||
| 1010 | 1021 | ||
| 1011 | switch (event) { | 1022 | switch (event) { |
| 1012 | case ACPI_FUJITSU_NOTIFY_CODE1: | 1023 | case ACPI_FUJITSU_NOTIFY_CODE1: |
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index a1a511bdec8c..ed1e728763a2 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c | |||
| @@ -1573,9 +1573,6 @@ static int ibmvfc_queuecommand(struct scsi_cmnd *cmnd, | |||
| 1573 | vfc_cmd->resp_len = sizeof(vfc_cmd->rsp); | 1573 | vfc_cmd->resp_len = sizeof(vfc_cmd->rsp); |
| 1574 | vfc_cmd->cancel_key = (unsigned long)cmnd->device->hostdata; | 1574 | vfc_cmd->cancel_key = (unsigned long)cmnd->device->hostdata; |
| 1575 | vfc_cmd->tgt_scsi_id = rport->port_id; | 1575 | vfc_cmd->tgt_scsi_id = rport->port_id; |
| 1576 | if ((rport->supported_classes & FC_COS_CLASS3) && | ||
| 1577 | (fc_host_supported_classes(vhost->host) & FC_COS_CLASS3)) | ||
| 1578 | vfc_cmd->flags = IBMVFC_CLASS_3_ERR; | ||
| 1579 | vfc_cmd->iu.xfer_len = scsi_bufflen(cmnd); | 1576 | vfc_cmd->iu.xfer_len = scsi_bufflen(cmnd); |
| 1580 | int_to_scsilun(cmnd->device->lun, &vfc_cmd->iu.lun); | 1577 | int_to_scsilun(cmnd->device->lun, &vfc_cmd->iu.lun); |
| 1581 | memcpy(vfc_cmd->iu.cdb, cmnd->cmnd, cmnd->cmd_len); | 1578 | memcpy(vfc_cmd->iu.cdb, cmnd->cmnd, cmnd->cmd_len); |
| @@ -3266,6 +3263,7 @@ static int ibmvfc_alloc_target(struct ibmvfc_host *vhost, u64 scsi_id) | |||
| 3266 | return -ENOMEM; | 3263 | return -ENOMEM; |
| 3267 | } | 3264 | } |
| 3268 | 3265 | ||
| 3266 | memset(tgt, 0, sizeof(*tgt)); | ||
| 3269 | tgt->scsi_id = scsi_id; | 3267 | tgt->scsi_id = scsi_id; |
| 3270 | tgt->new_scsi_id = scsi_id; | 3268 | tgt->new_scsi_id = scsi_id; |
| 3271 | tgt->vhost = vhost; | 3269 | tgt->vhost = vhost; |
| @@ -3576,9 +3574,18 @@ static void ibmvfc_log_ae(struct ibmvfc_host *vhost, int events) | |||
| 3576 | static void ibmvfc_tgt_add_rport(struct ibmvfc_target *tgt) | 3574 | static void ibmvfc_tgt_add_rport(struct ibmvfc_target *tgt) |
| 3577 | { | 3575 | { |
| 3578 | struct ibmvfc_host *vhost = tgt->vhost; | 3576 | struct ibmvfc_host *vhost = tgt->vhost; |
| 3579 | struct fc_rport *rport; | 3577 | struct fc_rport *rport = tgt->rport; |
| 3580 | unsigned long flags; | 3578 | unsigned long flags; |
| 3581 | 3579 | ||
| 3580 | if (rport) { | ||
| 3581 | tgt_dbg(tgt, "Setting rport roles\n"); | ||
| 3582 | fc_remote_port_rolechg(rport, tgt->ids.roles); | ||
| 3583 | spin_lock_irqsave(vhost->host->host_lock, flags); | ||
| 3584 | ibmvfc_set_tgt_action(tgt, IBMVFC_TGT_ACTION_NONE); | ||
| 3585 | spin_unlock_irqrestore(vhost->host->host_lock, flags); | ||
| 3586 | return; | ||
| 3587 | } | ||
| 3588 | |||
| 3582 | tgt_dbg(tgt, "Adding rport\n"); | 3589 | tgt_dbg(tgt, "Adding rport\n"); |
| 3583 | rport = fc_remote_port_add(vhost->host, 0, &tgt->ids); | 3590 | rport = fc_remote_port_add(vhost->host, 0, &tgt->ids); |
| 3584 | spin_lock_irqsave(vhost->host->host_lock, flags); | 3591 | spin_lock_irqsave(vhost->host->host_lock, flags); |
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.h b/drivers/scsi/ibmvscsi/ibmvfc.h index 87dafd0f8d44..b21e071b9862 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.h +++ b/drivers/scsi/ibmvscsi/ibmvfc.h | |||
| @@ -32,7 +32,7 @@ | |||
| 32 | #define IBMVFC_DRIVER_VERSION "1.0.4" | 32 | #define IBMVFC_DRIVER_VERSION "1.0.4" |
| 33 | #define IBMVFC_DRIVER_DATE "(November 14, 2008)" | 33 | #define IBMVFC_DRIVER_DATE "(November 14, 2008)" |
| 34 | 34 | ||
| 35 | #define IBMVFC_DEFAULT_TIMEOUT 15 | 35 | #define IBMVFC_DEFAULT_TIMEOUT 60 |
| 36 | #define IBMVFC_INIT_TIMEOUT 120 | 36 | #define IBMVFC_INIT_TIMEOUT 120 |
| 37 | #define IBMVFC_MAX_REQUESTS_DEFAULT 100 | 37 | #define IBMVFC_MAX_REQUESTS_DEFAULT 100 |
| 38 | 38 | ||
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index 74d07d137dae..c9aa7611e408 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c | |||
| @@ -432,6 +432,7 @@ static int map_sg_data(struct scsi_cmnd *cmd, | |||
| 432 | sdev_printk(KERN_ERR, cmd->device, | 432 | sdev_printk(KERN_ERR, cmd->device, |
| 433 | "Can't allocate memory " | 433 | "Can't allocate memory " |
| 434 | "for indirect table\n"); | 434 | "for indirect table\n"); |
| 435 | scsi_dma_unmap(cmd); | ||
| 435 | return 0; | 436 | return 0; |
| 436 | } | 437 | } |
| 437 | } | 438 | } |
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 257c24115de9..809d32d95c76 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
| @@ -1998,6 +1998,8 @@ int iscsi_host_add(struct Scsi_Host *shost, struct device *pdev) | |||
| 1998 | if (!shost->can_queue) | 1998 | if (!shost->can_queue) |
| 1999 | shost->can_queue = ISCSI_DEF_XMIT_CMDS_MAX; | 1999 | shost->can_queue = ISCSI_DEF_XMIT_CMDS_MAX; |
| 2000 | 2000 | ||
| 2001 | if (!shost->transportt->eh_timed_out) | ||
| 2002 | shost->transportt->eh_timed_out = iscsi_eh_cmd_timed_out; | ||
| 2001 | return scsi_add_host(shost, pdev); | 2003 | return scsi_add_host(shost, pdev); |
| 2002 | } | 2004 | } |
| 2003 | EXPORT_SYMBOL_GPL(iscsi_host_add); | 2005 | EXPORT_SYMBOL_GPL(iscsi_host_add); |
| @@ -2020,7 +2022,6 @@ struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht, | |||
| 2020 | shost = scsi_host_alloc(sht, sizeof(struct iscsi_host) + dd_data_size); | 2022 | shost = scsi_host_alloc(sht, sizeof(struct iscsi_host) + dd_data_size); |
| 2021 | if (!shost) | 2023 | if (!shost) |
| 2022 | return NULL; | 2024 | return NULL; |
| 2023 | shost->transportt->eh_timed_out = iscsi_eh_cmd_timed_out; | ||
| 2024 | 2025 | ||
| 2025 | if (qdepth > ISCSI_MAX_CMD_PER_LUN || qdepth < 1) { | 2026 | if (qdepth > ISCSI_MAX_CMD_PER_LUN || qdepth < 1) { |
| 2026 | if (qdepth != 0) | 2027 | if (qdepth != 0) |
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index a8f30bdaff69..a7302480bc4a 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
| @@ -5258,6 +5258,7 @@ lpfc_send_els_event(struct lpfc_vport *vport, | |||
| 5258 | sizeof(struct lpfc_name)); | 5258 | sizeof(struct lpfc_name)); |
| 5259 | break; | 5259 | break; |
| 5260 | default: | 5260 | default: |
| 5261 | kfree(els_data); | ||
| 5261 | return; | 5262 | return; |
| 5262 | } | 5263 | } |
| 5263 | memcpy(els_data->wwpn, &ndlp->nlp_portname, sizeof(struct lpfc_name)); | 5264 | memcpy(els_data->wwpn, &ndlp->nlp_portname, sizeof(struct lpfc_name)); |
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 33a3c13fd893..f4c57227ec18 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
| @@ -1265,13 +1265,6 @@ qla24xx_vport_delete(struct fc_vport *fc_vport) | |||
| 1265 | test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags)) | 1265 | test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags)) |
| 1266 | msleep(1000); | 1266 | msleep(1000); |
| 1267 | 1267 | ||
| 1268 | if (ha->mqenable) { | ||
| 1269 | if (qla25xx_delete_queues(vha, 0) != QLA_SUCCESS) | ||
| 1270 | qla_printk(KERN_WARNING, ha, | ||
| 1271 | "Queue delete failed.\n"); | ||
| 1272 | vha->req_ques[0] = ha->req_q_map[0]->id; | ||
| 1273 | } | ||
| 1274 | |||
| 1275 | qla24xx_disable_vp(vha); | 1268 | qla24xx_disable_vp(vha); |
| 1276 | 1269 | ||
| 1277 | fc_remove_host(vha->host); | 1270 | fc_remove_host(vha->host); |
| @@ -1293,6 +1286,12 @@ qla24xx_vport_delete(struct fc_vport *fc_vport) | |||
| 1293 | vha->host_no, vha->vp_idx, vha)); | 1286 | vha->host_no, vha->vp_idx, vha)); |
| 1294 | } | 1287 | } |
| 1295 | 1288 | ||
| 1289 | if (ha->mqenable) { | ||
| 1290 | if (qla25xx_delete_queues(vha, 0) != QLA_SUCCESS) | ||
| 1291 | qla_printk(KERN_WARNING, ha, | ||
| 1292 | "Queue delete failed.\n"); | ||
| 1293 | } | ||
| 1294 | |||
| 1296 | scsi_host_put(vha->host); | 1295 | scsi_host_put(vha->host); |
| 1297 | qla_printk(KERN_INFO, ha, "vport %d deleted\n", id); | 1296 | qla_printk(KERN_INFO, ha, "vport %d deleted\n", id); |
| 1298 | return 0; | 1297 | return 0; |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 023ee77fb027..e0c5bb54b258 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
| @@ -2135,6 +2135,7 @@ struct qla_msix_entry { | |||
| 2135 | /* Work events. */ | 2135 | /* Work events. */ |
| 2136 | enum qla_work_type { | 2136 | enum qla_work_type { |
| 2137 | QLA_EVT_AEN, | 2137 | QLA_EVT_AEN, |
| 2138 | QLA_EVT_IDC_ACK, | ||
| 2138 | }; | 2139 | }; |
| 2139 | 2140 | ||
| 2140 | 2141 | ||
| @@ -2149,6 +2150,10 @@ struct qla_work_evt { | |||
| 2149 | enum fc_host_event_code code; | 2150 | enum fc_host_event_code code; |
| 2150 | u32 data; | 2151 | u32 data; |
| 2151 | } aen; | 2152 | } aen; |
| 2153 | struct { | ||
| 2154 | #define QLA_IDC_ACK_REGS 7 | ||
| 2155 | uint16_t mb[QLA_IDC_ACK_REGS]; | ||
| 2156 | } idc_ack; | ||
| 2152 | } u; | 2157 | } u; |
| 2153 | }; | 2158 | }; |
| 2154 | 2159 | ||
diff --git a/drivers/scsi/qla2xxx/qla_devtbl.h b/drivers/scsi/qla2xxx/qla_devtbl.h index d78d35e681ab..d6ea69df7c5c 100644 --- a/drivers/scsi/qla2xxx/qla_devtbl.h +++ b/drivers/scsi/qla2xxx/qla_devtbl.h | |||
| @@ -72,7 +72,7 @@ static char *qla2x00_model_name[QLA_MODEL_NAMES*2] = { | |||
| 72 | "QLA2462", "Sun PCI-X 2.0 to 4Gb FC, Dual Channel", /* 0x141 */ | 72 | "QLA2462", "Sun PCI-X 2.0 to 4Gb FC, Dual Channel", /* 0x141 */ |
| 73 | "QLE2460", "Sun PCI-Express to 2Gb FC, Single Channel", /* 0x142 */ | 73 | "QLE2460", "Sun PCI-Express to 2Gb FC, Single Channel", /* 0x142 */ |
| 74 | "QLE2462", "Sun PCI-Express to 4Gb FC, Single Channel", /* 0x143 */ | 74 | "QLE2462", "Sun PCI-Express to 4Gb FC, Single Channel", /* 0x143 */ |
| 75 | "QEM2462" "Server I/O Module 4Gb FC, Dual Channel", /* 0x144 */ | 75 | "QEM2462", "Server I/O Module 4Gb FC, Dual Channel", /* 0x144 */ |
| 76 | "QLE2440", "PCI-Express to 4Gb FC, Single Channel", /* 0x145 */ | 76 | "QLE2440", "PCI-Express to 4Gb FC, Single Channel", /* 0x145 */ |
| 77 | "QLE2464", "PCI-Express to 4Gb FC, Quad Channel", /* 0x146 */ | 77 | "QLE2464", "PCI-Express to 4Gb FC, Quad Channel", /* 0x146 */ |
| 78 | "QLA2440", "PCI-X 2.0 to 4Gb FC, Single Channel", /* 0x147 */ | 78 | "QLA2440", "PCI-X 2.0 to 4Gb FC, Single Channel", /* 0x147 */ |
diff --git a/drivers/scsi/qla2xxx/qla_fw.h b/drivers/scsi/qla2xxx/qla_fw.h index 7abb045a0410..ffff42554087 100644 --- a/drivers/scsi/qla2xxx/qla_fw.h +++ b/drivers/scsi/qla2xxx/qla_fw.h | |||
| @@ -1402,6 +1402,8 @@ struct access_chip_rsp_84xx { | |||
| 1402 | #define MBA_IDC_NOTIFY 0x8101 | 1402 | #define MBA_IDC_NOTIFY 0x8101 |
| 1403 | #define MBA_IDC_TIME_EXT 0x8102 | 1403 | #define MBA_IDC_TIME_EXT 0x8102 |
| 1404 | 1404 | ||
| 1405 | #define MBC_IDC_ACK 0x101 | ||
| 1406 | |||
| 1405 | struct nvram_81xx { | 1407 | struct nvram_81xx { |
| 1406 | /* NVRAM header. */ | 1408 | /* NVRAM header. */ |
| 1407 | uint8_t id[4]; | 1409 | uint8_t id[4]; |
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index a336b4bc81a7..6de283f8f111 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h | |||
| @@ -72,6 +72,7 @@ extern int qla2x00_loop_reset(scsi_qla_host_t *); | |||
| 72 | extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); | 72 | extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); |
| 73 | extern int qla2x00_post_aen_work(struct scsi_qla_host *, enum | 73 | extern int qla2x00_post_aen_work(struct scsi_qla_host *, enum |
| 74 | fc_host_event_code, u32); | 74 | fc_host_event_code, u32); |
| 75 | extern int qla2x00_post_idc_ack_work(struct scsi_qla_host *, uint16_t *); | ||
| 75 | 76 | ||
| 76 | extern void qla2x00_abort_fcport_cmds(fc_port_t *); | 77 | extern void qla2x00_abort_fcport_cmds(fc_port_t *); |
| 77 | extern struct scsi_qla_host *qla2x00_create_host(struct scsi_host_template *, | 78 | extern struct scsi_qla_host *qla2x00_create_host(struct scsi_host_template *, |
| @@ -266,6 +267,8 @@ qla2x00_set_idma_speed(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t *); | |||
| 266 | 267 | ||
| 267 | extern int qla84xx_verify_chip(struct scsi_qla_host *, uint16_t *); | 268 | extern int qla84xx_verify_chip(struct scsi_qla_host *, uint16_t *); |
| 268 | 269 | ||
| 270 | extern int qla81xx_idc_ack(scsi_qla_host_t *, uint16_t *); | ||
| 271 | |||
| 269 | /* | 272 | /* |
| 270 | * Global Function Prototypes in qla_isr.c source file. | 273 | * Global Function Prototypes in qla_isr.c source file. |
| 271 | */ | 274 | */ |
| @@ -376,10 +379,8 @@ extern int qla2x00_dfs_remove(scsi_qla_host_t *); | |||
| 376 | 379 | ||
| 377 | /* Globa function prototypes for multi-q */ | 380 | /* Globa function prototypes for multi-q */ |
| 378 | extern int qla25xx_request_irq(struct rsp_que *); | 381 | extern int qla25xx_request_irq(struct rsp_que *); |
| 379 | extern int qla25xx_init_req_que(struct scsi_qla_host *, struct req_que *, | 382 | extern int qla25xx_init_req_que(struct scsi_qla_host *, struct req_que *); |
| 380 | uint8_t); | 383 | extern int qla25xx_init_rsp_que(struct scsi_qla_host *, struct rsp_que *); |
| 381 | extern int qla25xx_init_rsp_que(struct scsi_qla_host *, struct rsp_que *, | ||
| 382 | uint8_t); | ||
| 383 | extern int qla25xx_create_req_que(struct qla_hw_data *, uint16_t, uint8_t, | 384 | extern int qla25xx_create_req_que(struct qla_hw_data *, uint16_t, uint8_t, |
| 384 | uint16_t, uint8_t, uint8_t); | 385 | uint16_t, uint8_t, uint8_t); |
| 385 | extern int qla25xx_create_rsp_que(struct qla_hw_data *, uint16_t, uint8_t, | 386 | extern int qla25xx_create_rsp_que(struct qla_hw_data *, uint16_t, uint8_t, |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index f6368a1d3021..986501759ad4 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
| @@ -1226,9 +1226,8 @@ qla24xx_config_rings(struct scsi_qla_host *vha) | |||
| 1226 | icb->firmware_options_2 |= | 1226 | icb->firmware_options_2 |= |
| 1227 | __constant_cpu_to_le32(BIT_18); | 1227 | __constant_cpu_to_le32(BIT_18); |
| 1228 | 1228 | ||
| 1229 | icb->firmware_options_2 |= __constant_cpu_to_le32(BIT_22); | 1229 | icb->firmware_options_2 &= __constant_cpu_to_le32(~BIT_22); |
| 1230 | icb->firmware_options_2 |= __constant_cpu_to_le32(BIT_23); | 1230 | icb->firmware_options_2 |= __constant_cpu_to_le32(BIT_23); |
| 1231 | ha->rsp_q_map[0]->options = icb->firmware_options_2; | ||
| 1232 | 1231 | ||
| 1233 | WRT_REG_DWORD(®->isp25mq.req_q_in, 0); | 1232 | WRT_REG_DWORD(®->isp25mq.req_q_in, 0); |
| 1234 | WRT_REG_DWORD(®->isp25mq.req_q_out, 0); | 1233 | WRT_REG_DWORD(®->isp25mq.req_q_out, 0); |
| @@ -3493,7 +3492,7 @@ qla25xx_init_queues(struct qla_hw_data *ha) | |||
| 3493 | rsp = ha->rsp_q_map[i]; | 3492 | rsp = ha->rsp_q_map[i]; |
| 3494 | if (rsp) { | 3493 | if (rsp) { |
| 3495 | rsp->options &= ~BIT_0; | 3494 | rsp->options &= ~BIT_0; |
| 3496 | ret = qla25xx_init_rsp_que(base_vha, rsp, rsp->options); | 3495 | ret = qla25xx_init_rsp_que(base_vha, rsp); |
| 3497 | if (ret != QLA_SUCCESS) | 3496 | if (ret != QLA_SUCCESS) |
| 3498 | DEBUG2_17(printk(KERN_WARNING | 3497 | DEBUG2_17(printk(KERN_WARNING |
| 3499 | "%s Rsp que:%d init failed\n", __func__, | 3498 | "%s Rsp que:%d init failed\n", __func__, |
| @@ -3507,7 +3506,7 @@ qla25xx_init_queues(struct qla_hw_data *ha) | |||
| 3507 | if (req) { | 3506 | if (req) { |
| 3508 | /* Clear outstanding commands array. */ | 3507 | /* Clear outstanding commands array. */ |
| 3509 | req->options &= ~BIT_0; | 3508 | req->options &= ~BIT_0; |
| 3510 | ret = qla25xx_init_req_que(base_vha, req, req->options); | 3509 | ret = qla25xx_init_req_que(base_vha, req); |
| 3511 | if (ret != QLA_SUCCESS) | 3510 | if (ret != QLA_SUCCESS) |
| 3512 | DEBUG2_17(printk(KERN_WARNING | 3511 | DEBUG2_17(printk(KERN_WARNING |
| 3513 | "%s Req que:%d init failed\n", __func__, | 3512 | "%s Req que:%d init failed\n", __func__, |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index e28ad81baf1e..f250e5b7897c 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
| @@ -266,6 +266,40 @@ qla2x00_mbx_completion(scsi_qla_host_t *vha, uint16_t mb0) | |||
| 266 | } | 266 | } |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | static void | ||
| 270 | qla81xx_idc_event(scsi_qla_host_t *vha, uint16_t aen, uint16_t descr) | ||
| 271 | { | ||
| 272 | static char *event[] = | ||
| 273 | { "Complete", "Request Notification", "Time Extension" }; | ||
| 274 | int rval; | ||
| 275 | struct device_reg_24xx __iomem *reg24 = &vha->hw->iobase->isp24; | ||
| 276 | uint16_t __iomem *wptr; | ||
| 277 | uint16_t cnt, timeout, mb[QLA_IDC_ACK_REGS]; | ||
| 278 | |||
| 279 | /* Seed data -- mailbox1 -> mailbox7. */ | ||
| 280 | wptr = (uint16_t __iomem *)®24->mailbox1; | ||
| 281 | for (cnt = 0; cnt < QLA_IDC_ACK_REGS; cnt++, wptr++) | ||
| 282 | mb[cnt] = RD_REG_WORD(wptr); | ||
| 283 | |||
| 284 | DEBUG2(printk("scsi(%ld): Inter-Driver Commucation %s -- " | ||
| 285 | "%04x %04x %04x %04x %04x %04x %04x.\n", vha->host_no, | ||
| 286 | event[aen & 0xff], | ||
| 287 | mb[0], mb[1], mb[2], mb[3], mb[4], mb[5], mb[6])); | ||
| 288 | |||
| 289 | /* Acknowledgement needed? [Notify && non-zero timeout]. */ | ||
| 290 | timeout = (descr >> 8) & 0xf; | ||
| 291 | if (aen != MBA_IDC_NOTIFY || !timeout) | ||
| 292 | return; | ||
| 293 | |||
| 294 | DEBUG2(printk("scsi(%ld): Inter-Driver Commucation %s -- " | ||
| 295 | "ACK timeout=%d.\n", vha->host_no, event[aen & 0xff], timeout)); | ||
| 296 | |||
| 297 | rval = qla2x00_post_idc_ack_work(vha, mb); | ||
| 298 | if (rval != QLA_SUCCESS) | ||
| 299 | qla_printk(KERN_WARNING, vha->hw, | ||
| 300 | "IDC failed to post ACK.\n"); | ||
| 301 | } | ||
| 302 | |||
| 269 | /** | 303 | /** |
| 270 | * qla2x00_async_event() - Process aynchronous events. | 304 | * qla2x00_async_event() - Process aynchronous events. |
| 271 | * @ha: SCSI driver HA context | 305 | * @ha: SCSI driver HA context |
| @@ -714,21 +748,9 @@ skip_rio: | |||
| 714 | "%04x %04x %04x\n", vha->host_no, mb[1], mb[2], mb[3])); | 748 | "%04x %04x %04x\n", vha->host_no, mb[1], mb[2], mb[3])); |
| 715 | break; | 749 | break; |
| 716 | case MBA_IDC_COMPLETE: | 750 | case MBA_IDC_COMPLETE: |
| 717 | DEBUG2(printk("scsi(%ld): Inter-Driver Commucation " | ||
| 718 | "Complete -- %04x %04x %04x\n", vha->host_no, mb[1], mb[2], | ||
| 719 | mb[3])); | ||
| 720 | break; | ||
| 721 | case MBA_IDC_NOTIFY: | 751 | case MBA_IDC_NOTIFY: |
| 722 | DEBUG2(printk("scsi(%ld): Inter-Driver Commucation " | ||
| 723 | "Request Notification -- %04x %04x %04x\n", vha->host_no, | ||
| 724 | mb[1], mb[2], mb[3])); | ||
| 725 | /**** Mailbox registers 4 - 7 valid!!! */ | ||
| 726 | break; | ||
| 727 | case MBA_IDC_TIME_EXT: | 752 | case MBA_IDC_TIME_EXT: |
| 728 | DEBUG2(printk("scsi(%ld): Inter-Driver Commucation " | 753 | qla81xx_idc_event(vha, mb[0], mb[1]); |
| 729 | "Time Extension -- %04x %04x %04x\n", vha->host_no, mb[1], | ||
| 730 | mb[2], mb[3])); | ||
| 731 | /**** Mailbox registers 4 - 7 valid!!! */ | ||
| 732 | break; | 754 | break; |
| 733 | } | 755 | } |
| 734 | 756 | ||
| @@ -1707,7 +1729,6 @@ qla25xx_msix_rsp_q(int irq, void *dev_id) | |||
| 1707 | struct qla_hw_data *ha; | 1729 | struct qla_hw_data *ha; |
| 1708 | struct rsp_que *rsp; | 1730 | struct rsp_que *rsp; |
| 1709 | struct device_reg_24xx __iomem *reg; | 1731 | struct device_reg_24xx __iomem *reg; |
| 1710 | uint16_t msix_disabled_hccr = 0; | ||
| 1711 | 1732 | ||
| 1712 | rsp = (struct rsp_que *) dev_id; | 1733 | rsp = (struct rsp_que *) dev_id; |
| 1713 | if (!rsp) { | 1734 | if (!rsp) { |
| @@ -1720,17 +1741,8 @@ qla25xx_msix_rsp_q(int irq, void *dev_id) | |||
| 1720 | 1741 | ||
| 1721 | spin_lock_irq(&ha->hardware_lock); | 1742 | spin_lock_irq(&ha->hardware_lock); |
| 1722 | 1743 | ||
| 1723 | msix_disabled_hccr = rsp->options; | ||
| 1724 | if (!rsp->id) | ||
| 1725 | msix_disabled_hccr &= __constant_cpu_to_le32(BIT_22); | ||
| 1726 | else | ||
| 1727 | msix_disabled_hccr &= __constant_cpu_to_le32(BIT_6); | ||
| 1728 | |||
| 1729 | qla24xx_process_response_queue(rsp); | 1744 | qla24xx_process_response_queue(rsp); |
| 1730 | 1745 | ||
| 1731 | if (!msix_disabled_hccr) | ||
| 1732 | WRT_REG_DWORD(®->hccr, HCCRX_CLR_RISC_INT); | ||
| 1733 | |||
| 1734 | spin_unlock_irq(&ha->hardware_lock); | 1746 | spin_unlock_irq(&ha->hardware_lock); |
| 1735 | 1747 | ||
| 1736 | return IRQ_HANDLED; | 1748 | return IRQ_HANDLED; |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index f94ffbb98e95..4c7504cb3990 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
| @@ -3090,8 +3090,7 @@ verify_done: | |||
| 3090 | } | 3090 | } |
| 3091 | 3091 | ||
| 3092 | int | 3092 | int |
| 3093 | qla25xx_init_req_que(struct scsi_qla_host *vha, struct req_que *req, | 3093 | qla25xx_init_req_que(struct scsi_qla_host *vha, struct req_que *req) |
| 3094 | uint8_t options) | ||
| 3095 | { | 3094 | { |
| 3096 | int rval; | 3095 | int rval; |
| 3097 | unsigned long flags; | 3096 | unsigned long flags; |
| @@ -3101,7 +3100,7 @@ qla25xx_init_req_que(struct scsi_qla_host *vha, struct req_que *req, | |||
| 3101 | struct qla_hw_data *ha = vha->hw; | 3100 | struct qla_hw_data *ha = vha->hw; |
| 3102 | 3101 | ||
| 3103 | mcp->mb[0] = MBC_INITIALIZE_MULTIQ; | 3102 | mcp->mb[0] = MBC_INITIALIZE_MULTIQ; |
| 3104 | mcp->mb[1] = options; | 3103 | mcp->mb[1] = req->options; |
| 3105 | mcp->mb[2] = MSW(LSD(req->dma)); | 3104 | mcp->mb[2] = MSW(LSD(req->dma)); |
| 3106 | mcp->mb[3] = LSW(LSD(req->dma)); | 3105 | mcp->mb[3] = LSW(LSD(req->dma)); |
| 3107 | mcp->mb[6] = MSW(MSD(req->dma)); | 3106 | mcp->mb[6] = MSW(MSD(req->dma)); |
| @@ -3128,7 +3127,7 @@ qla25xx_init_req_que(struct scsi_qla_host *vha, struct req_que *req, | |||
| 3128 | mcp->tov = 60; | 3127 | mcp->tov = 60; |
| 3129 | 3128 | ||
| 3130 | spin_lock_irqsave(&ha->hardware_lock, flags); | 3129 | spin_lock_irqsave(&ha->hardware_lock, flags); |
| 3131 | if (!(options & BIT_0)) { | 3130 | if (!(req->options & BIT_0)) { |
| 3132 | WRT_REG_DWORD(®->req_q_in, 0); | 3131 | WRT_REG_DWORD(®->req_q_in, 0); |
| 3133 | WRT_REG_DWORD(®->req_q_out, 0); | 3132 | WRT_REG_DWORD(®->req_q_out, 0); |
| 3134 | } | 3133 | } |
| @@ -3142,8 +3141,7 @@ qla25xx_init_req_que(struct scsi_qla_host *vha, struct req_que *req, | |||
| 3142 | } | 3141 | } |
| 3143 | 3142 | ||
| 3144 | int | 3143 | int |
| 3145 | qla25xx_init_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp, | 3144 | qla25xx_init_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp) |
| 3146 | uint8_t options) | ||
| 3147 | { | 3145 | { |
| 3148 | int rval; | 3146 | int rval; |
| 3149 | unsigned long flags; | 3147 | unsigned long flags; |
| @@ -3153,7 +3151,7 @@ qla25xx_init_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp, | |||
| 3153 | struct qla_hw_data *ha = vha->hw; | 3151 | struct qla_hw_data *ha = vha->hw; |
| 3154 | 3152 | ||
| 3155 | mcp->mb[0] = MBC_INITIALIZE_MULTIQ; | 3153 | mcp->mb[0] = MBC_INITIALIZE_MULTIQ; |
| 3156 | mcp->mb[1] = options; | 3154 | mcp->mb[1] = rsp->options; |
| 3157 | mcp->mb[2] = MSW(LSD(rsp->dma)); | 3155 | mcp->mb[2] = MSW(LSD(rsp->dma)); |
| 3158 | mcp->mb[3] = LSW(LSD(rsp->dma)); | 3156 | mcp->mb[3] = LSW(LSD(rsp->dma)); |
| 3159 | mcp->mb[6] = MSW(MSD(rsp->dma)); | 3157 | mcp->mb[6] = MSW(MSD(rsp->dma)); |
| @@ -3178,7 +3176,7 @@ qla25xx_init_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp, | |||
| 3178 | mcp->tov = 60; | 3176 | mcp->tov = 60; |
| 3179 | 3177 | ||
| 3180 | spin_lock_irqsave(&ha->hardware_lock, flags); | 3178 | spin_lock_irqsave(&ha->hardware_lock, flags); |
| 3181 | if (!(options & BIT_0)) { | 3179 | if (!(rsp->options & BIT_0)) { |
| 3182 | WRT_REG_DWORD(®->rsp_q_out, 0); | 3180 | WRT_REG_DWORD(®->rsp_q_out, 0); |
| 3183 | WRT_REG_DWORD(®->rsp_q_in, 0); | 3181 | WRT_REG_DWORD(®->rsp_q_in, 0); |
| 3184 | } | 3182 | } |
| @@ -3193,3 +3191,29 @@ qla25xx_init_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp, | |||
| 3193 | return rval; | 3191 | return rval; |
| 3194 | } | 3192 | } |
| 3195 | 3193 | ||
| 3194 | int | ||
| 3195 | qla81xx_idc_ack(scsi_qla_host_t *vha, uint16_t *mb) | ||
| 3196 | { | ||
| 3197 | int rval; | ||
| 3198 | mbx_cmd_t mc; | ||
| 3199 | mbx_cmd_t *mcp = &mc; | ||
| 3200 | |||
| 3201 | DEBUG11(printk("%s(%ld): entered.\n", __func__, vha->host_no)); | ||
| 3202 | |||
| 3203 | mcp->mb[0] = MBC_IDC_ACK; | ||
| 3204 | memcpy(&mcp->mb[1], mb, QLA_IDC_ACK_REGS * sizeof(uint16_t)); | ||
| 3205 | mcp->out_mb = MBX_7|MBX_6|MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0; | ||
| 3206 | mcp->in_mb = MBX_0; | ||
| 3207 | mcp->tov = MBX_TOV_SECONDS; | ||
| 3208 | mcp->flags = 0; | ||
| 3209 | rval = qla2x00_mailbox_command(vha, mcp); | ||
| 3210 | |||
| 3211 | if (rval != QLA_SUCCESS) { | ||
| 3212 | DEBUG2_3_11(printk("%s(%ld): failed=%x (%x).\n", __func__, | ||
| 3213 | vha->host_no, rval, mcp->mb[0])); | ||
| 3214 | } else { | ||
| 3215 | DEBUG11(printk("%s(%ld): done.\n", __func__, vha->host_no)); | ||
| 3216 | } | ||
| 3217 | |||
| 3218 | return rval; | ||
| 3219 | } | ||
diff --git a/drivers/scsi/qla2xxx/qla_mid.c b/drivers/scsi/qla2xxx/qla_mid.c index f53179c46423..3f23932210c4 100644 --- a/drivers/scsi/qla2xxx/qla_mid.c +++ b/drivers/scsi/qla2xxx/qla_mid.c | |||
| @@ -396,7 +396,7 @@ qla24xx_create_vhost(struct fc_vport *fc_vport) | |||
| 396 | 396 | ||
| 397 | qla2x00_start_timer(vha, qla2x00_timer, WATCH_INTERVAL); | 397 | qla2x00_start_timer(vha, qla2x00_timer, WATCH_INTERVAL); |
| 398 | 398 | ||
| 399 | memset(vha->req_ques, 0, sizeof(vha->req_ques) * QLA_MAX_HOST_QUES); | 399 | memset(vha->req_ques, 0, sizeof(vha->req_ques)); |
| 400 | vha->req_ques[0] = ha->req_q_map[0]->id; | 400 | vha->req_ques[0] = ha->req_q_map[0]->id; |
| 401 | host->can_queue = ha->req_q_map[0]->length + 128; | 401 | host->can_queue = ha->req_q_map[0]->length + 128; |
| 402 | host->this_id = 255; | 402 | host->this_id = 255; |
| @@ -471,7 +471,7 @@ qla25xx_delete_req_que(struct scsi_qla_host *vha, struct req_que *req) | |||
| 471 | 471 | ||
| 472 | if (req) { | 472 | if (req) { |
| 473 | req->options |= BIT_0; | 473 | req->options |= BIT_0; |
| 474 | ret = qla25xx_init_req_que(vha, req, req->options); | 474 | ret = qla25xx_init_req_que(vha, req); |
| 475 | } | 475 | } |
| 476 | if (ret == QLA_SUCCESS) | 476 | if (ret == QLA_SUCCESS) |
| 477 | qla25xx_free_req_que(vha, req); | 477 | qla25xx_free_req_que(vha, req); |
| @@ -486,7 +486,7 @@ qla25xx_delete_rsp_que(struct scsi_qla_host *vha, struct rsp_que *rsp) | |||
| 486 | 486 | ||
| 487 | if (rsp) { | 487 | if (rsp) { |
| 488 | rsp->options |= BIT_0; | 488 | rsp->options |= BIT_0; |
| 489 | ret = qla25xx_init_rsp_que(vha, rsp, rsp->options); | 489 | ret = qla25xx_init_rsp_que(vha, rsp); |
| 490 | } | 490 | } |
| 491 | if (ret == QLA_SUCCESS) | 491 | if (ret == QLA_SUCCESS) |
| 492 | qla25xx_free_rsp_que(vha, rsp); | 492 | qla25xx_free_rsp_que(vha, rsp); |
| @@ -502,7 +502,7 @@ int qla25xx_update_req_que(struct scsi_qla_host *vha, uint8_t que, uint8_t qos) | |||
| 502 | 502 | ||
| 503 | req->options |= BIT_3; | 503 | req->options |= BIT_3; |
| 504 | req->qos = qos; | 504 | req->qos = qos; |
| 505 | ret = qla25xx_init_req_que(vha, req, req->options); | 505 | ret = qla25xx_init_req_que(vha, req); |
| 506 | if (ret != QLA_SUCCESS) | 506 | if (ret != QLA_SUCCESS) |
| 507 | DEBUG2_17(printk(KERN_WARNING "%s failed\n", __func__)); | 507 | DEBUG2_17(printk(KERN_WARNING "%s failed\n", __func__)); |
| 508 | /* restore options bit */ | 508 | /* restore options bit */ |
| @@ -632,7 +632,7 @@ qla25xx_create_req_que(struct qla_hw_data *ha, uint16_t options, | |||
| 632 | req->max_q_depth = ha->req_q_map[0]->max_q_depth; | 632 | req->max_q_depth = ha->req_q_map[0]->max_q_depth; |
| 633 | mutex_unlock(&ha->vport_lock); | 633 | mutex_unlock(&ha->vport_lock); |
| 634 | 634 | ||
| 635 | ret = qla25xx_init_req_que(base_vha, req, options); | 635 | ret = qla25xx_init_req_que(base_vha, req); |
| 636 | if (ret != QLA_SUCCESS) { | 636 | if (ret != QLA_SUCCESS) { |
| 637 | qla_printk(KERN_WARNING, ha, "%s failed\n", __func__); | 637 | qla_printk(KERN_WARNING, ha, "%s failed\n", __func__); |
| 638 | mutex_lock(&ha->vport_lock); | 638 | mutex_lock(&ha->vport_lock); |
| @@ -710,7 +710,7 @@ qla25xx_create_rsp_que(struct qla_hw_data *ha, uint16_t options, | |||
| 710 | if (ret) | 710 | if (ret) |
| 711 | goto que_failed; | 711 | goto que_failed; |
| 712 | 712 | ||
| 713 | ret = qla25xx_init_rsp_que(base_vha, rsp, options); | 713 | ret = qla25xx_init_rsp_que(base_vha, rsp); |
| 714 | if (ret != QLA_SUCCESS) { | 714 | if (ret != QLA_SUCCESS) { |
| 715 | qla_printk(KERN_WARNING, ha, "%s failed\n", __func__); | 715 | qla_printk(KERN_WARNING, ha, "%s failed\n", __func__); |
| 716 | mutex_lock(&ha->vport_lock); | 716 | mutex_lock(&ha->vport_lock); |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index c11f872d3e10..2f5f72531e23 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
| @@ -2522,6 +2522,19 @@ qla2x00_post_aen_work(struct scsi_qla_host *vha, enum fc_host_event_code code, | |||
| 2522 | return qla2x00_post_work(vha, e, 1); | 2522 | return qla2x00_post_work(vha, e, 1); |
| 2523 | } | 2523 | } |
| 2524 | 2524 | ||
| 2525 | int | ||
| 2526 | qla2x00_post_idc_ack_work(struct scsi_qla_host *vha, uint16_t *mb) | ||
| 2527 | { | ||
| 2528 | struct qla_work_evt *e; | ||
| 2529 | |||
| 2530 | e = qla2x00_alloc_work(vha, QLA_EVT_IDC_ACK, 1); | ||
| 2531 | if (!e) | ||
| 2532 | return QLA_FUNCTION_FAILED; | ||
| 2533 | |||
| 2534 | memcpy(e->u.idc_ack.mb, mb, QLA_IDC_ACK_REGS * sizeof(uint16_t)); | ||
| 2535 | return qla2x00_post_work(vha, e, 1); | ||
| 2536 | } | ||
| 2537 | |||
| 2525 | static void | 2538 | static void |
| 2526 | qla2x00_do_work(struct scsi_qla_host *vha) | 2539 | qla2x00_do_work(struct scsi_qla_host *vha) |
| 2527 | { | 2540 | { |
| @@ -2539,6 +2552,9 @@ qla2x00_do_work(struct scsi_qla_host *vha) | |||
| 2539 | fc_host_post_event(vha->host, fc_get_event_number(), | 2552 | fc_host_post_event(vha->host, fc_get_event_number(), |
| 2540 | e->u.aen.code, e->u.aen.data); | 2553 | e->u.aen.code, e->u.aen.data); |
| 2541 | break; | 2554 | break; |
| 2555 | case QLA_EVT_IDC_ACK: | ||
| 2556 | qla81xx_idc_ack(vha, e->u.idc_ack.mb); | ||
| 2557 | break; | ||
| 2542 | } | 2558 | } |
| 2543 | if (e->flags & QLA_EVT_FLAG_FREE) | 2559 | if (e->flags & QLA_EVT_FLAG_FREE) |
| 2544 | kfree(e); | 2560 | kfree(e); |
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index 9c3b694c049d..284827926eff 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c | |||
| @@ -684,7 +684,7 @@ qla2xxx_get_flt_info(scsi_qla_host_t *vha, uint32_t flt_addr) | |||
| 684 | "end=0x%x size=0x%x.\n", le32_to_cpu(region->code), start, | 684 | "end=0x%x size=0x%x.\n", le32_to_cpu(region->code), start, |
| 685 | le32_to_cpu(region->end) >> 2, le32_to_cpu(region->size))); | 685 | le32_to_cpu(region->end) >> 2, le32_to_cpu(region->size))); |
| 686 | 686 | ||
| 687 | switch (le32_to_cpu(region->code)) { | 687 | switch (le32_to_cpu(region->code) & 0xff) { |
| 688 | case FLT_REG_FW: | 688 | case FLT_REG_FW: |
| 689 | ha->flt_region_fw = start; | 689 | ha->flt_region_fw = start; |
| 690 | break; | 690 | break; |
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index cfa4c11a4797..79f7053da99b 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++ b/drivers/scsi/qla2xxx/qla_version.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | /* | 7 | /* |
| 8 | * Driver version | 8 | * Driver version |
| 9 | */ | 9 | */ |
| 10 | #define QLA2XXX_VERSION "8.03.00-k2" | 10 | #define QLA2XXX_VERSION "8.03.00-k3" |
| 11 | 11 | ||
| 12 | #define QLA_DRIVER_MAJOR_VER 8 | 12 | #define QLA_DRIVER_MAJOR_VER 8 |
| 13 | #define QLA_DRIVER_MINOR_VER 3 | 13 | #define QLA_DRIVER_MINOR_VER 3 |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 66505bb79410..8f4de20c9deb 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
| @@ -317,6 +317,7 @@ static struct scsi_device *scsi_alloc_sdev(struct scsi_target *starget, | |||
| 317 | return sdev; | 317 | return sdev; |
| 318 | 318 | ||
| 319 | out_device_destroy: | 319 | out_device_destroy: |
| 320 | scsi_device_set_state(sdev, SDEV_DEL); | ||
| 320 | transport_destroy_device(&sdev->sdev_gendev); | 321 | transport_destroy_device(&sdev->sdev_gendev); |
| 321 | put_device(&sdev->sdev_gendev); | 322 | put_device(&sdev->sdev_gendev); |
| 322 | out: | 323 | out: |
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 8f0bd3f7a59f..516925d8b570 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
| @@ -1078,7 +1078,7 @@ sg_ioctl(struct inode *inode, struct file *filp, | |||
| 1078 | case BLKTRACESETUP: | 1078 | case BLKTRACESETUP: |
| 1079 | return blk_trace_setup(sdp->device->request_queue, | 1079 | return blk_trace_setup(sdp->device->request_queue, |
| 1080 | sdp->disk->disk_name, | 1080 | sdp->disk->disk_name, |
| 1081 | sdp->device->sdev_gendev.devt, | 1081 | MKDEV(SCSI_GENERIC_MAJOR, sdp->index), |
| 1082 | (char *)arg); | 1082 | (char *)arg); |
| 1083 | case BLKTRACESTART: | 1083 | case BLKTRACESTART: |
| 1084 | return blk_trace_startstop(sdp->device->request_queue, 1); | 1084 | return blk_trace_startstop(sdp->device->request_queue, 1); |
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 0d934bfbdd9b..b4b39811b445 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
| @@ -2083,6 +2083,20 @@ static int serial8250_startup(struct uart_port *port) | |||
| 2083 | 2083 | ||
| 2084 | serial8250_set_mctrl(&up->port, up->port.mctrl); | 2084 | serial8250_set_mctrl(&up->port, up->port.mctrl); |
| 2085 | 2085 | ||
| 2086 | /* Serial over Lan (SoL) hack: | ||
| 2087 | Intel 8257x Gigabit ethernet chips have a | ||
| 2088 | 16550 emulation, to be used for Serial Over Lan. | ||
| 2089 | Those chips take a longer time than a normal | ||
| 2090 | serial device to signalize that a transmission | ||
| 2091 | data was queued. Due to that, the above test generally | ||
| 2092 | fails. One solution would be to delay the reading of | ||
| 2093 | iir. However, this is not reliable, since the timeout | ||
| 2094 | is variable. So, let's just don't test if we receive | ||
| 2095 | TX irq. This way, we'll never enable UART_BUG_TXEN. | ||
| 2096 | */ | ||
| 2097 | if (up->port.flags & UPF_NO_TXEN_TEST) | ||
| 2098 | goto dont_test_tx_en; | ||
| 2099 | |||
| 2086 | /* | 2100 | /* |
| 2087 | * Do a quick test to see if we receive an | 2101 | * Do a quick test to see if we receive an |
| 2088 | * interrupt when we enable the TX irq. | 2102 | * interrupt when we enable the TX irq. |
| @@ -2102,6 +2116,7 @@ static int serial8250_startup(struct uart_port *port) | |||
| 2102 | up->bugs &= ~UART_BUG_TXEN; | 2116 | up->bugs &= ~UART_BUG_TXEN; |
| 2103 | } | 2117 | } |
| 2104 | 2118 | ||
| 2119 | dont_test_tx_en: | ||
| 2105 | spin_unlock_irqrestore(&up->port.lock, flags); | 2120 | spin_unlock_irqrestore(&up->port.lock, flags); |
| 2106 | 2121 | ||
| 2107 | /* | 2122 | /* |
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index 536d8e510f66..533f82025adf 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c | |||
| @@ -798,6 +798,21 @@ pci_default_setup(struct serial_private *priv, | |||
| 798 | return setup_port(priv, port, bar, offset, board->reg_shift); | 798 | return setup_port(priv, port, bar, offset, board->reg_shift); |
| 799 | } | 799 | } |
| 800 | 800 | ||
| 801 | static int skip_tx_en_setup(struct serial_private *priv, | ||
| 802 | const struct pciserial_board *board, | ||
| 803 | struct uart_port *port, int idx) | ||
| 804 | { | ||
| 805 | port->flags |= UPF_NO_TXEN_TEST; | ||
| 806 | printk(KERN_DEBUG "serial8250: skipping TxEn test for device " | ||
| 807 | "[%04x:%04x] subsystem [%04x:%04x]\n", | ||
| 808 | priv->dev->vendor, | ||
| 809 | priv->dev->device, | ||
| 810 | priv->dev->subsystem_vendor, | ||
| 811 | priv->dev->subsystem_device); | ||
| 812 | |||
| 813 | return pci_default_setup(priv, board, port, idx); | ||
| 814 | } | ||
| 815 | |||
| 801 | /* This should be in linux/pci_ids.h */ | 816 | /* This should be in linux/pci_ids.h */ |
| 802 | #define PCI_VENDOR_ID_SBSMODULARIO 0x124B | 817 | #define PCI_VENDOR_ID_SBSMODULARIO 0x124B |
| 803 | #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B | 818 | #define PCI_SUBVENDOR_ID_SBSMODULARIO 0x124B |
| @@ -864,6 +879,27 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { | |||
| 864 | .init = pci_inteli960ni_init, | 879 | .init = pci_inteli960ni_init, |
| 865 | .setup = pci_default_setup, | 880 | .setup = pci_default_setup, |
| 866 | }, | 881 | }, |
| 882 | { | ||
| 883 | .vendor = PCI_VENDOR_ID_INTEL, | ||
| 884 | .device = PCI_DEVICE_ID_INTEL_8257X_SOL, | ||
| 885 | .subvendor = PCI_ANY_ID, | ||
| 886 | .subdevice = PCI_ANY_ID, | ||
| 887 | .setup = skip_tx_en_setup, | ||
| 888 | }, | ||
| 889 | { | ||
| 890 | .vendor = PCI_VENDOR_ID_INTEL, | ||
| 891 | .device = PCI_DEVICE_ID_INTEL_82573L_SOL, | ||
| 892 | .subvendor = PCI_ANY_ID, | ||
| 893 | .subdevice = PCI_ANY_ID, | ||
| 894 | .setup = skip_tx_en_setup, | ||
| 895 | }, | ||
| 896 | { | ||
| 897 | .vendor = PCI_VENDOR_ID_INTEL, | ||
| 898 | .device = PCI_DEVICE_ID_INTEL_82573E_SOL, | ||
| 899 | .subvendor = PCI_ANY_ID, | ||
| 900 | .subdevice = PCI_ANY_ID, | ||
| 901 | .setup = skip_tx_en_setup, | ||
| 902 | }, | ||
| 867 | /* | 903 | /* |
| 868 | * ITE | 904 | * ITE |
| 869 | */ | 905 | */ |
diff --git a/drivers/video/atafb.c b/drivers/video/atafb.c index 8058572a7428..018850c116c6 100644 --- a/drivers/video/atafb.c +++ b/drivers/video/atafb.c | |||
| @@ -841,7 +841,7 @@ static int tt_detect(void) | |||
| 841 | tt_dmasnd.ctrl = DMASND_CTRL_OFF; | 841 | tt_dmasnd.ctrl = DMASND_CTRL_OFF; |
| 842 | udelay(20); /* wait a while for things to settle down */ | 842 | udelay(20); /* wait a while for things to settle down */ |
| 843 | } | 843 | } |
| 844 | mono_moni = (mfp.par_dt_reg & 0x80) == 0; | 844 | mono_moni = (st_mfp.par_dt_reg & 0x80) == 0; |
| 845 | 845 | ||
| 846 | tt_get_par(&par); | 846 | tt_get_par(&par); |
| 847 | tt_encode_var(&atafb_predefined[0], &par); | 847 | tt_encode_var(&atafb_predefined[0], &par); |
| @@ -2035,7 +2035,7 @@ static int stste_detect(void) | |||
| 2035 | tt_dmasnd.ctrl = DMASND_CTRL_OFF; | 2035 | tt_dmasnd.ctrl = DMASND_CTRL_OFF; |
| 2036 | udelay(20); /* wait a while for things to settle down */ | 2036 | udelay(20); /* wait a while for things to settle down */ |
| 2037 | } | 2037 | } |
| 2038 | mono_moni = (mfp.par_dt_reg & 0x80) == 0; | 2038 | mono_moni = (st_mfp.par_dt_reg & 0x80) == 0; |
| 2039 | 2039 | ||
| 2040 | stste_get_par(&par); | 2040 | stste_get_par(&par); |
| 2041 | stste_encode_var(&atafb_predefined[0], &par); | 2041 | stste_encode_var(&atafb_predefined[0], &par); |
| @@ -2086,20 +2086,20 @@ static void st_ovsc_switch(void) | |||
| 2086 | return; | 2086 | return; |
| 2087 | local_irq_save(flags); | 2087 | local_irq_save(flags); |
| 2088 | 2088 | ||
| 2089 | mfp.tim_ct_b = 0x10; | 2089 | st_mfp.tim_ct_b = 0x10; |
| 2090 | mfp.active_edge |= 8; | 2090 | st_mfp.active_edge |= 8; |
| 2091 | mfp.tim_ct_b = 0; | 2091 | st_mfp.tim_ct_b = 0; |
| 2092 | mfp.tim_dt_b = 0xf0; | 2092 | st_mfp.tim_dt_b = 0xf0; |
| 2093 | mfp.tim_ct_b = 8; | 2093 | st_mfp.tim_ct_b = 8; |
| 2094 | while (mfp.tim_dt_b > 1) /* TOS does it this way, don't ask why */ | 2094 | while (st_mfp.tim_dt_b > 1) /* TOS does it this way, don't ask why */ |
| 2095 | ; | 2095 | ; |
| 2096 | new = mfp.tim_dt_b; | 2096 | new = st_mfp.tim_dt_b; |
| 2097 | do { | 2097 | do { |
| 2098 | udelay(LINE_DELAY); | 2098 | udelay(LINE_DELAY); |
| 2099 | old = new; | 2099 | old = new; |
| 2100 | new = mfp.tim_dt_b; | 2100 | new = st_mfp.tim_dt_b; |
| 2101 | } while (old != new); | 2101 | } while (old != new); |
| 2102 | mfp.tim_ct_b = 0x10; | 2102 | st_mfp.tim_ct_b = 0x10; |
| 2103 | udelay(SYNC_DELAY); | 2103 | udelay(SYNC_DELAY); |
| 2104 | 2104 | ||
| 2105 | if (atari_switches & ATARI_SWITCH_OVSC_IKBD) | 2105 | if (atari_switches & ATARI_SWITCH_OVSC_IKBD) |
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index e6e299feb51b..2181ce4d7ebd 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c | |||
| @@ -2365,7 +2365,6 @@ static void fbcon_aty128_bmove(struct display *p, int sy, int sx, int dy, int dx | |||
| 2365 | static void aty128_set_suspend(struct aty128fb_par *par, int suspend) | 2365 | static void aty128_set_suspend(struct aty128fb_par *par, int suspend) |
| 2366 | { | 2366 | { |
| 2367 | u32 pmgt; | 2367 | u32 pmgt; |
| 2368 | u16 pwr_command; | ||
| 2369 | struct pci_dev *pdev = par->pdev; | 2368 | struct pci_dev *pdev = par->pdev; |
| 2370 | 2369 | ||
| 2371 | if (!par->pm_reg) | 2370 | if (!par->pm_reg) |
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index 9b91617b9582..56892a142ee2 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c | |||
| @@ -45,6 +45,13 @@ static int xen_suspend(void *data) | |||
| 45 | err); | 45 | err); |
| 46 | return err; | 46 | return err; |
| 47 | } | 47 | } |
| 48 | err = sysdev_suspend(PMSG_SUSPEND); | ||
| 49 | if (err) { | ||
| 50 | printk(KERN_ERR "xen_suspend: sysdev_suspend failed: %d\n", | ||
| 51 | err); | ||
| 52 | device_power_up(PMSG_RESUME); | ||
| 53 | return err; | ||
| 54 | } | ||
| 48 | 55 | ||
| 49 | xen_mm_pin_all(); | 56 | xen_mm_pin_all(); |
| 50 | gnttab_suspend(); | 57 | gnttab_suspend(); |
| @@ -61,6 +68,7 @@ static int xen_suspend(void *data) | |||
| 61 | gnttab_resume(); | 68 | gnttab_resume(); |
| 62 | xen_mm_unpin_all(); | 69 | xen_mm_unpin_all(); |
| 63 | 70 | ||
| 71 | sysdev_resume(); | ||
| 64 | device_power_up(PMSG_RESUME); | 72 | device_power_up(PMSG_RESUME); |
| 65 | 73 | ||
| 66 | if (!*cancelled) { | 74 | if (!*cancelled) { |
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 3e8023efaff7..872f104576e5 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c | |||
| @@ -1222,7 +1222,7 @@ int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync) | |||
| 1222 | /* | 1222 | /* |
| 1223 | * ok we haven't committed the transaction yet, lets do a commit | 1223 | * ok we haven't committed the transaction yet, lets do a commit |
| 1224 | */ | 1224 | */ |
| 1225 | if (file->private_data) | 1225 | if (file && file->private_data) |
| 1226 | btrfs_ioctl_trans_end(file); | 1226 | btrfs_ioctl_trans_end(file); |
| 1227 | 1227 | ||
| 1228 | trans = btrfs_start_transaction(root, 1); | 1228 | trans = btrfs_start_transaction(root, 1); |
| @@ -1231,7 +1231,7 @@ int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync) | |||
| 1231 | goto out; | 1231 | goto out; |
| 1232 | } | 1232 | } |
| 1233 | 1233 | ||
| 1234 | ret = btrfs_log_dentry_safe(trans, root, file->f_dentry); | 1234 | ret = btrfs_log_dentry_safe(trans, root, dentry); |
| 1235 | if (ret < 0) | 1235 | if (ret < 0) |
| 1236 | goto out; | 1236 | goto out; |
| 1237 | 1237 | ||
| @@ -1245,7 +1245,7 @@ int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync) | |||
| 1245 | * file again, but that will end up using the synchronization | 1245 | * file again, but that will end up using the synchronization |
| 1246 | * inside btrfs_sync_log to keep things safe. | 1246 | * inside btrfs_sync_log to keep things safe. |
| 1247 | */ | 1247 | */ |
| 1248 | mutex_unlock(&file->f_dentry->d_inode->i_mutex); | 1248 | mutex_unlock(&dentry->d_inode->i_mutex); |
| 1249 | 1249 | ||
| 1250 | if (ret > 0) { | 1250 | if (ret > 0) { |
| 1251 | ret = btrfs_commit_transaction(trans, root); | 1251 | ret = btrfs_commit_transaction(trans, root); |
| @@ -1253,7 +1253,7 @@ int btrfs_sync_file(struct file *file, struct dentry *dentry, int datasync) | |||
| 1253 | btrfs_sync_log(trans, root); | 1253 | btrfs_sync_log(trans, root); |
| 1254 | ret = btrfs_end_transaction(trans, root); | 1254 | ret = btrfs_end_transaction(trans, root); |
| 1255 | } | 1255 | } |
| 1256 | mutex_lock(&file->f_dentry->d_inode->i_mutex); | 1256 | mutex_lock(&dentry->d_inode->i_mutex); |
| 1257 | out: | 1257 | out: |
| 1258 | return ret > 0 ? EIO : ret; | 1258 | return ret > 0 ? EIO : ret; |
| 1259 | } | 1259 | } |
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index 73ac7ebd1dfc..851388fafc73 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | Version 1.57 | ||
| 2 | ------------ | ||
| 3 | Improve support for multiple security contexts to the same server. We | ||
| 4 | used to use the same "vcnumber" for all connections which could cause | ||
| 5 | the server to treat subsequent connections, especially those that | ||
| 6 | are authenticated as guest, as reconnections, invalidating the earlier | ||
| 7 | user's smb session. This fix allows cifs to mount multiple times to the | ||
| 8 | same server with different userids without risking invalidating earlier | ||
| 9 | established security contexts. | ||
| 10 | |||
| 1 | Version 1.56 | 11 | Version 1.56 |
| 2 | ------------ | 12 | ------------ |
| 3 | Add "forcemandatorylock" mount option to allow user to use mandatory | 13 | Add "forcemandatorylock" mount option to allow user to use mandatory |
| @@ -7,7 +17,10 @@ specified and user does not have access to query information about the | |||
| 7 | top of the share. Fix problem in 2.6.28 resolving DFS paths to | 17 | top of the share. Fix problem in 2.6.28 resolving DFS paths to |
| 8 | Samba servers (worked to Windows). Fix rmdir so that pending search | 18 | Samba servers (worked to Windows). Fix rmdir so that pending search |
| 9 | (readdir) requests do not get invalid results which include the now | 19 | (readdir) requests do not get invalid results which include the now |
| 10 | removed directory. | 20 | removed directory. Fix oops in cifs_dfs_ref.c when prefixpath is not reachable |
| 21 | when using DFS. Add better file create support to servers which support | ||
| 22 | the CIFS POSIX protocol extensions (this adds support for new flags | ||
| 23 | on create, and improves semantics for write of locked ranges). | ||
| 11 | 24 | ||
| 12 | Version 1.55 | 25 | Version 1.55 |
| 13 | ------------ | 26 | ------------ |
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index 7ac481841f87..2b1d28a9ee28 100644 --- a/fs/cifs/cifsfs.h +++ b/fs/cifs/cifsfs.h | |||
| @@ -100,5 +100,5 @@ extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg); | |||
| 100 | extern const struct export_operations cifs_export_ops; | 100 | extern const struct export_operations cifs_export_ops; |
| 101 | #endif /* EXPERIMENTAL */ | 101 | #endif /* EXPERIMENTAL */ |
| 102 | 102 | ||
| 103 | #define CIFS_VERSION "1.56" | 103 | #define CIFS_VERSION "1.57" |
| 104 | #endif /* _CIFSFS_H */ | 104 | #endif /* _CIFSFS_H */ |
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 94c1ca0ec953..e004f6db5fc8 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
| @@ -164,9 +164,12 @@ struct TCP_Server_Info { | |||
| 164 | /* multiplexed reads or writes */ | 164 | /* multiplexed reads or writes */ |
| 165 | unsigned int maxBuf; /* maxBuf specifies the maximum */ | 165 | unsigned int maxBuf; /* maxBuf specifies the maximum */ |
| 166 | /* message size the server can send or receive for non-raw SMBs */ | 166 | /* message size the server can send or receive for non-raw SMBs */ |
| 167 | unsigned int maxRw; /* maxRw specifies the maximum */ | 167 | unsigned int max_rw; /* maxRw specifies the maximum */ |
| 168 | /* message size the server can send or receive for */ | 168 | /* message size the server can send or receive for */ |
| 169 | /* SMB_COM_WRITE_RAW or SMB_COM_READ_RAW. */ | 169 | /* SMB_COM_WRITE_RAW or SMB_COM_READ_RAW. */ |
| 170 | unsigned int max_vcs; /* maximum number of smb sessions, at least | ||
| 171 | those that can be specified uniquely with | ||
| 172 | vcnumbers */ | ||
| 170 | char sessid[4]; /* unique token id for this session */ | 173 | char sessid[4]; /* unique token id for this session */ |
| 171 | /* (returned on Negotiate */ | 174 | /* (returned on Negotiate */ |
| 172 | int capabilities; /* allow selective disabling of caps by smb sess */ | 175 | int capabilities; /* allow selective disabling of caps by smb sess */ |
| @@ -210,6 +213,7 @@ struct cifsSesInfo { | |||
| 210 | unsigned overrideSecFlg; /* if non-zero override global sec flags */ | 213 | unsigned overrideSecFlg; /* if non-zero override global sec flags */ |
| 211 | __u16 ipc_tid; /* special tid for connection to IPC share */ | 214 | __u16 ipc_tid; /* special tid for connection to IPC share */ |
| 212 | __u16 flags; | 215 | __u16 flags; |
| 216 | __u16 vcnum; | ||
| 213 | char *serverOS; /* name of operating system underlying server */ | 217 | char *serverOS; /* name of operating system underlying server */ |
| 214 | char *serverNOS; /* name of network operating system of server */ | 218 | char *serverNOS; /* name of network operating system of server */ |
| 215 | char *serverDomain; /* security realm of server */ | 219 | char *serverDomain; /* security realm of server */ |
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 382ba6298809..083dfc57c7a3 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
| @@ -42,6 +42,7 @@ extern void _FreeXid(unsigned int); | |||
| 42 | #define GetXid() (int)_GetXid(); cFYI(1,("CIFS VFS: in %s as Xid: %d with uid: %d",__func__, xid,current_fsuid())); | 42 | #define GetXid() (int)_GetXid(); cFYI(1,("CIFS VFS: in %s as Xid: %d with uid: %d",__func__, xid,current_fsuid())); |
| 43 | #define FreeXid(curr_xid) {_FreeXid(curr_xid); cFYI(1,("CIFS VFS: leaving %s (xid = %d) rc = %d",__func__,curr_xid,(int)rc));} | 43 | #define FreeXid(curr_xid) {_FreeXid(curr_xid); cFYI(1,("CIFS VFS: leaving %s (xid = %d) rc = %d",__func__,curr_xid,(int)rc));} |
| 44 | extern char *build_path_from_dentry(struct dentry *); | 44 | extern char *build_path_from_dentry(struct dentry *); |
| 45 | extern char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb); | ||
| 45 | extern char *build_wildcard_path_from_dentry(struct dentry *direntry); | 46 | extern char *build_wildcard_path_from_dentry(struct dentry *direntry); |
| 46 | /* extern void renew_parental_timestamps(struct dentry *direntry);*/ | 47 | /* extern void renew_parental_timestamps(struct dentry *direntry);*/ |
| 47 | extern int SendReceive(const unsigned int /* xid */ , struct cifsSesInfo *, | 48 | extern int SendReceive(const unsigned int /* xid */ , struct cifsSesInfo *, |
| @@ -91,6 +92,9 @@ extern u64 cifs_UnixTimeToNT(struct timespec); | |||
| 91 | extern __le64 cnvrtDosCifsTm(__u16 date, __u16 time); | 92 | extern __le64 cnvrtDosCifsTm(__u16 date, __u16 time); |
| 92 | extern struct timespec cnvrtDosUnixTm(__u16 date, __u16 time); | 93 | extern struct timespec cnvrtDosUnixTm(__u16 date, __u16 time); |
| 93 | 94 | ||
| 95 | extern void posix_fill_in_inode(struct inode *tmp_inode, | ||
| 96 | FILE_UNIX_BASIC_INFO *pData, int isNewInode); | ||
| 97 | extern struct inode *cifs_new_inode(struct super_block *sb, __u64 *inum); | ||
| 94 | extern int cifs_get_inode_info(struct inode **pinode, | 98 | extern int cifs_get_inode_info(struct inode **pinode, |
| 95 | const unsigned char *search_path, | 99 | const unsigned char *search_path, |
| 96 | FILE_ALL_INFO *pfile_info, | 100 | FILE_ALL_INFO *pfile_info, |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 552642a507c4..939e2f76b959 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
| @@ -528,14 +528,15 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
| 528 | server->maxReq = le16_to_cpu(rsp->MaxMpxCount); | 528 | server->maxReq = le16_to_cpu(rsp->MaxMpxCount); |
| 529 | server->maxBuf = min((__u32)le16_to_cpu(rsp->MaxBufSize), | 529 | server->maxBuf = min((__u32)le16_to_cpu(rsp->MaxBufSize), |
| 530 | (__u32)CIFSMaxBufSize + MAX_CIFS_HDR_SIZE); | 530 | (__u32)CIFSMaxBufSize + MAX_CIFS_HDR_SIZE); |
| 531 | server->max_vcs = le16_to_cpu(rsp->MaxNumberVcs); | ||
| 531 | GETU32(server->sessid) = le32_to_cpu(rsp->SessionKey); | 532 | GETU32(server->sessid) = le32_to_cpu(rsp->SessionKey); |
| 532 | /* even though we do not use raw we might as well set this | 533 | /* even though we do not use raw we might as well set this |
| 533 | accurately, in case we ever find a need for it */ | 534 | accurately, in case we ever find a need for it */ |
| 534 | if ((le16_to_cpu(rsp->RawMode) & RAW_ENABLE) == RAW_ENABLE) { | 535 | if ((le16_to_cpu(rsp->RawMode) & RAW_ENABLE) == RAW_ENABLE) { |
| 535 | server->maxRw = 0xFF00; | 536 | server->max_rw = 0xFF00; |
| 536 | server->capabilities = CAP_MPX_MODE | CAP_RAW_MODE; | 537 | server->capabilities = CAP_MPX_MODE | CAP_RAW_MODE; |
| 537 | } else { | 538 | } else { |
| 538 | server->maxRw = 0;/* we do not need to use raw anyway */ | 539 | server->max_rw = 0;/* do not need to use raw anyway */ |
| 539 | server->capabilities = CAP_MPX_MODE; | 540 | server->capabilities = CAP_MPX_MODE; |
| 540 | } | 541 | } |
| 541 | tmp = (__s16)le16_to_cpu(rsp->ServerTimeZone); | 542 | tmp = (__s16)le16_to_cpu(rsp->ServerTimeZone); |
| @@ -638,7 +639,7 @@ CIFSSMBNegotiate(unsigned int xid, struct cifsSesInfo *ses) | |||
| 638 | /* probably no need to store and check maxvcs */ | 639 | /* probably no need to store and check maxvcs */ |
| 639 | server->maxBuf = min(le32_to_cpu(pSMBr->MaxBufferSize), | 640 | server->maxBuf = min(le32_to_cpu(pSMBr->MaxBufferSize), |
| 640 | (__u32) CIFSMaxBufSize + MAX_CIFS_HDR_SIZE); | 641 | (__u32) CIFSMaxBufSize + MAX_CIFS_HDR_SIZE); |
| 641 | server->maxRw = le32_to_cpu(pSMBr->MaxRawSize); | 642 | server->max_rw = le32_to_cpu(pSMBr->MaxRawSize); |
| 642 | cFYI(DBG2, ("Max buf = %d", ses->server->maxBuf)); | 643 | cFYI(DBG2, ("Max buf = %d", ses->server->maxBuf)); |
| 643 | GETU32(ses->server->sessid) = le32_to_cpu(pSMBr->SessionKey); | 644 | GETU32(ses->server->sessid) = le32_to_cpu(pSMBr->SessionKey); |
| 644 | server->capabilities = le32_to_cpu(pSMBr->Capabilities); | 645 | server->capabilities = le32_to_cpu(pSMBr->Capabilities); |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 2209be943051..da0f4ffa0613 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
| @@ -23,7 +23,6 @@ | |||
| 23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
| 24 | #include <linux/list.h> | 24 | #include <linux/list.h> |
| 25 | #include <linux/wait.h> | 25 | #include <linux/wait.h> |
| 26 | #include <linux/ipv6.h> | ||
| 27 | #include <linux/pagemap.h> | 26 | #include <linux/pagemap.h> |
| 28 | #include <linux/ctype.h> | 27 | #include <linux/ctype.h> |
| 29 | #include <linux/utsname.h> | 28 | #include <linux/utsname.h> |
| @@ -35,6 +34,7 @@ | |||
| 35 | #include <linux/freezer.h> | 34 | #include <linux/freezer.h> |
| 36 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
| 37 | #include <asm/processor.h> | 36 | #include <asm/processor.h> |
| 37 | #include <net/ipv6.h> | ||
| 38 | #include "cifspdu.h" | 38 | #include "cifspdu.h" |
| 39 | #include "cifsglob.h" | 39 | #include "cifsglob.h" |
| 40 | #include "cifsproto.h" | 40 | #include "cifsproto.h" |
| @@ -1379,8 +1379,8 @@ cifs_find_tcp_session(struct sockaddr_storage *addr) | |||
| 1379 | server->addr.sockAddr.sin_addr.s_addr)) | 1379 | server->addr.sockAddr.sin_addr.s_addr)) |
| 1380 | continue; | 1380 | continue; |
| 1381 | else if (addr->ss_family == AF_INET6 && | 1381 | else if (addr->ss_family == AF_INET6 && |
| 1382 | memcmp(&server->addr.sockAddr6.sin6_addr, | 1382 | !ipv6_addr_equal(&server->addr.sockAddr6.sin6_addr, |
| 1383 | &addr6->sin6_addr, sizeof(addr6->sin6_addr))) | 1383 | &addr6->sin6_addr)) |
| 1384 | continue; | 1384 | continue; |
| 1385 | 1385 | ||
| 1386 | ++server->srv_count; | 1386 | ++server->srv_count; |
| @@ -2180,6 +2180,33 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info, | |||
| 2180 | "mount option supported")); | 2180 | "mount option supported")); |
| 2181 | } | 2181 | } |
| 2182 | 2182 | ||
| 2183 | static int | ||
| 2184 | is_path_accessible(int xid, struct cifsTconInfo *tcon, | ||
| 2185 | struct cifs_sb_info *cifs_sb, const char *full_path) | ||
| 2186 | { | ||
| 2187 | int rc; | ||
| 2188 | __u64 inode_num; | ||
| 2189 | FILE_ALL_INFO *pfile_info; | ||
| 2190 | |||
| 2191 | rc = CIFSGetSrvInodeNumber(xid, tcon, full_path, &inode_num, | ||
| 2192 | cifs_sb->local_nls, | ||
| 2193 | cifs_sb->mnt_cifs_flags & | ||
| 2194 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
| 2195 | if (rc != -EOPNOTSUPP) | ||
| 2196 | return rc; | ||
| 2197 | |||
| 2198 | pfile_info = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL); | ||
| 2199 | if (pfile_info == NULL) | ||
| 2200 | return -ENOMEM; | ||
| 2201 | |||
| 2202 | rc = CIFSSMBQPathInfo(xid, tcon, full_path, pfile_info, | ||
| 2203 | 0 /* not legacy */, cifs_sb->local_nls, | ||
| 2204 | cifs_sb->mnt_cifs_flags & | ||
| 2205 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
| 2206 | kfree(pfile_info); | ||
| 2207 | return rc; | ||
| 2208 | } | ||
| 2209 | |||
| 2183 | int | 2210 | int |
| 2184 | cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | 2211 | cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, |
| 2185 | char *mount_data, const char *devname) | 2212 | char *mount_data, const char *devname) |
| @@ -2190,6 +2217,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
| 2190 | struct cifsSesInfo *pSesInfo = NULL; | 2217 | struct cifsSesInfo *pSesInfo = NULL; |
| 2191 | struct cifsTconInfo *tcon = NULL; | 2218 | struct cifsTconInfo *tcon = NULL; |
| 2192 | struct TCP_Server_Info *srvTcp = NULL; | 2219 | struct TCP_Server_Info *srvTcp = NULL; |
| 2220 | char *full_path; | ||
| 2193 | 2221 | ||
| 2194 | xid = GetXid(); | 2222 | xid = GetXid(); |
| 2195 | 2223 | ||
| @@ -2426,6 +2454,23 @@ mount_fail_check: | |||
| 2426 | cifs_sb->rsize = min(cifs_sb->rsize, | 2454 | cifs_sb->rsize = min(cifs_sb->rsize, |
| 2427 | (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE)); | 2455 | (tcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE)); |
| 2428 | 2456 | ||
| 2457 | if (!rc && cifs_sb->prepathlen) { | ||
| 2458 | /* build_path_to_root works only when we have a valid tcon */ | ||
| 2459 | full_path = cifs_build_path_to_root(cifs_sb); | ||
| 2460 | if (full_path == NULL) { | ||
| 2461 | rc = -ENOMEM; | ||
| 2462 | goto mount_fail_check; | ||
| 2463 | } | ||
| 2464 | rc = is_path_accessible(xid, tcon, cifs_sb, full_path); | ||
| 2465 | if (rc) { | ||
| 2466 | cERROR(1, ("Path %s in not accessible: %d", | ||
| 2467 | full_path, rc)); | ||
| 2468 | kfree(full_path); | ||
| 2469 | goto mount_fail_check; | ||
| 2470 | } | ||
| 2471 | kfree(full_path); | ||
| 2472 | } | ||
| 2473 | |||
| 2429 | /* volume_info->password is freed above when existing session found | 2474 | /* volume_info->password is freed above when existing session found |
| 2430 | (in which case it is not needed anymore) but when new sesion is created | 2475 | (in which case it is not needed anymore) but when new sesion is created |
| 2431 | the password ptr is put in the new session structure (in which case the | 2476 | the password ptr is put in the new session structure (in which case the |
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 964aad03c5ad..89fb72832652 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * | 3 | * |
| 4 | * vfs operations that deal with dentries | 4 | * vfs operations that deal with dentries |
| 5 | * | 5 | * |
| 6 | * Copyright (C) International Business Machines Corp., 2002,2008 | 6 | * Copyright (C) International Business Machines Corp., 2002,2009 |
| 7 | * Author(s): Steve French (sfrench@us.ibm.com) | 7 | * Author(s): Steve French (sfrench@us.ibm.com) |
| 8 | * | 8 | * |
| 9 | * This library is free software; you can redistribute it and/or modify | 9 | * This library is free software; you can redistribute it and/or modify |
| @@ -129,6 +129,78 @@ cifs_bp_rename_retry: | |||
| 129 | return full_path; | 129 | return full_path; |
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | static int cifs_posix_open(char *full_path, struct inode **pinode, | ||
| 133 | struct super_block *sb, int mode, int oflags, | ||
| 134 | int *poplock, __u16 *pnetfid, int xid) | ||
| 135 | { | ||
| 136 | int rc; | ||
| 137 | __u32 oplock; | ||
| 138 | FILE_UNIX_BASIC_INFO *presp_data; | ||
| 139 | __u32 posix_flags = 0; | ||
| 140 | struct cifs_sb_info *cifs_sb = CIFS_SB(sb); | ||
| 141 | |||
| 142 | cFYI(1, ("posix open %s", full_path)); | ||
| 143 | |||
| 144 | presp_data = kzalloc(sizeof(FILE_UNIX_BASIC_INFO), GFP_KERNEL); | ||
| 145 | if (presp_data == NULL) | ||
| 146 | return -ENOMEM; | ||
| 147 | |||
| 148 | /* So far cifs posix extensions can only map the following flags. | ||
| 149 | There are other valid fmode oflags such as FMODE_LSEEK, FMODE_PREAD, but | ||
| 150 | so far we do not seem to need them, and we can treat them as local only */ | ||
| 151 | if ((oflags & (FMODE_READ | FMODE_WRITE)) == | ||
| 152 | (FMODE_READ | FMODE_WRITE)) | ||
| 153 | posix_flags = SMB_O_RDWR; | ||
| 154 | else if (oflags & FMODE_READ) | ||
| 155 | posix_flags = SMB_O_RDONLY; | ||
| 156 | else if (oflags & FMODE_WRITE) | ||
| 157 | posix_flags = SMB_O_WRONLY; | ||
| 158 | if (oflags & O_CREAT) | ||
| 159 | posix_flags |= SMB_O_CREAT; | ||
| 160 | if (oflags & O_EXCL) | ||
| 161 | posix_flags |= SMB_O_EXCL; | ||
| 162 | if (oflags & O_TRUNC) | ||
| 163 | posix_flags |= SMB_O_TRUNC; | ||
| 164 | if (oflags & O_APPEND) | ||
| 165 | posix_flags |= SMB_O_APPEND; | ||
| 166 | if (oflags & O_SYNC) | ||
| 167 | posix_flags |= SMB_O_SYNC; | ||
| 168 | if (oflags & O_DIRECTORY) | ||
| 169 | posix_flags |= SMB_O_DIRECTORY; | ||
| 170 | if (oflags & O_NOFOLLOW) | ||
| 171 | posix_flags |= SMB_O_NOFOLLOW; | ||
| 172 | if (oflags & O_DIRECT) | ||
| 173 | posix_flags |= SMB_O_DIRECT; | ||
| 174 | |||
| 175 | |||
| 176 | rc = CIFSPOSIXCreate(xid, cifs_sb->tcon, posix_flags, mode, | ||
| 177 | pnetfid, presp_data, &oplock, full_path, | ||
| 178 | cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & | ||
| 179 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
| 180 | if (rc) | ||
| 181 | goto posix_open_ret; | ||
| 182 | |||
| 183 | if (presp_data->Type == cpu_to_le32(-1)) | ||
| 184 | goto posix_open_ret; /* open ok, caller does qpathinfo */ | ||
| 185 | |||
| 186 | /* get new inode and set it up */ | ||
| 187 | if (!pinode) | ||
| 188 | goto posix_open_ret; /* caller does not need info */ | ||
| 189 | |||
| 190 | *pinode = cifs_new_inode(sb, &presp_data->UniqueId); | ||
| 191 | |||
| 192 | /* We do not need to close the file if new_inode fails since | ||
| 193 | the caller will retry qpathinfo as long as inode is null */ | ||
| 194 | if (*pinode == NULL) | ||
| 195 | goto posix_open_ret; | ||
| 196 | |||
| 197 | posix_fill_in_inode(*pinode, presp_data, 1); | ||
| 198 | |||
| 199 | posix_open_ret: | ||
| 200 | kfree(presp_data); | ||
| 201 | return rc; | ||
| 202 | } | ||
| 203 | |||
| 132 | static void setup_cifs_dentry(struct cifsTconInfo *tcon, | 204 | static void setup_cifs_dentry(struct cifsTconInfo *tcon, |
| 133 | struct dentry *direntry, | 205 | struct dentry *direntry, |
| 134 | struct inode *newinode) | 206 | struct inode *newinode) |
| @@ -150,7 +222,14 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
| 150 | int xid; | 222 | int xid; |
| 151 | int create_options = CREATE_NOT_DIR; | 223 | int create_options = CREATE_NOT_DIR; |
| 152 | int oplock = 0; | 224 | int oplock = 0; |
| 153 | /* BB below access is too much for the mknod to request */ | 225 | int oflags; |
| 226 | /* | ||
| 227 | * BB below access is probably too much for mknod to request | ||
| 228 | * but we have to do query and setpathinfo so requesting | ||
| 229 | * less could fail (unless we want to request getatr and setatr | ||
| 230 | * permissions (only). At least for POSIX we do not have to | ||
| 231 | * request so much. | ||
| 232 | */ | ||
| 154 | int desiredAccess = GENERIC_READ | GENERIC_WRITE; | 233 | int desiredAccess = GENERIC_READ | GENERIC_WRITE; |
| 155 | __u16 fileHandle; | 234 | __u16 fileHandle; |
| 156 | struct cifs_sb_info *cifs_sb; | 235 | struct cifs_sb_info *cifs_sb; |
| @@ -174,13 +253,43 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
| 174 | } | 253 | } |
| 175 | 254 | ||
| 176 | mode &= ~current->fs->umask; | 255 | mode &= ~current->fs->umask; |
| 256 | if (oplockEnabled) | ||
| 257 | oplock = REQ_OPLOCK; | ||
| 177 | 258 | ||
| 178 | if (nd && (nd->flags & LOOKUP_OPEN)) { | 259 | if (nd && (nd->flags & LOOKUP_OPEN)) |
| 179 | int oflags = nd->intent.open.flags; | 260 | oflags = nd->intent.open.flags; |
| 261 | else | ||
| 262 | oflags = FMODE_READ; | ||
| 263 | |||
| 264 | if (tcon->unix_ext && (tcon->ses->capabilities & CAP_UNIX) && | ||
| 265 | (CIFS_UNIX_POSIX_PATH_OPS_CAP & | ||
| 266 | le64_to_cpu(tcon->fsUnixInfo.Capability))) { | ||
| 267 | rc = cifs_posix_open(full_path, &newinode, inode->i_sb, | ||
| 268 | mode, oflags, &oplock, &fileHandle, xid); | ||
| 269 | /* EIO could indicate that (posix open) operation is not | ||
| 270 | supported, despite what server claimed in capability | ||
| 271 | negotation. EREMOTE indicates DFS junction, which is not | ||
| 272 | handled in posix open */ | ||
| 273 | |||
| 274 | if ((rc == 0) && (newinode == NULL)) | ||
| 275 | goto cifs_create_get_file_info; /* query inode info */ | ||
| 276 | else if (rc == 0) /* success, no need to query */ | ||
| 277 | goto cifs_create_set_dentry; | ||
| 278 | else if ((rc != -EIO) && (rc != -EREMOTE) && | ||
| 279 | (rc != -EOPNOTSUPP)) /* path not found or net err */ | ||
| 280 | goto cifs_create_out; | ||
| 281 | /* else fallthrough to retry, using older open call, this is | ||
| 282 | case where server does not support this SMB level, and | ||
| 283 | falsely claims capability (also get here for DFS case | ||
| 284 | which should be rare for path not covered on files) */ | ||
| 285 | } | ||
| 180 | 286 | ||
| 287 | if (nd && (nd->flags & LOOKUP_OPEN)) { | ||
| 288 | /* if the file is going to stay open, then we | ||
| 289 | need to set the desired access properly */ | ||
| 181 | desiredAccess = 0; | 290 | desiredAccess = 0; |
| 182 | if (oflags & FMODE_READ) | 291 | if (oflags & FMODE_READ) |
| 183 | desiredAccess |= GENERIC_READ; | 292 | desiredAccess |= GENERIC_READ; /* is this too little? */ |
| 184 | if (oflags & FMODE_WRITE) { | 293 | if (oflags & FMODE_WRITE) { |
| 185 | desiredAccess |= GENERIC_WRITE; | 294 | desiredAccess |= GENERIC_WRITE; |
| 186 | if (!(oflags & FMODE_READ)) | 295 | if (!(oflags & FMODE_READ)) |
| @@ -199,8 +308,6 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
| 199 | 308 | ||
| 200 | /* BB add processing to set equivalent of mode - e.g. via CreateX with | 309 | /* BB add processing to set equivalent of mode - e.g. via CreateX with |
| 201 | ACLs */ | 310 | ACLs */ |
| 202 | if (oplockEnabled) | ||
| 203 | oplock = REQ_OPLOCK; | ||
| 204 | 311 | ||
| 205 | buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL); | 312 | buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL); |
| 206 | if (buf == NULL) { | 313 | if (buf == NULL) { |
| @@ -233,116 +340,112 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
| 233 | } | 340 | } |
| 234 | if (rc) { | 341 | if (rc) { |
| 235 | cFYI(1, ("cifs_create returned 0x%x", rc)); | 342 | cFYI(1, ("cifs_create returned 0x%x", rc)); |
| 236 | } else { | 343 | goto cifs_create_out; |
| 237 | /* If Open reported that we actually created a file | 344 | } |
| 238 | then we now have to set the mode if possible */ | 345 | |
| 239 | if ((tcon->unix_ext) && (oplock & CIFS_CREATE_ACTION)) { | 346 | /* If Open reported that we actually created a file |
| 240 | struct cifs_unix_set_info_args args = { | 347 | then we now have to set the mode if possible */ |
| 348 | if ((tcon->unix_ext) && (oplock & CIFS_CREATE_ACTION)) { | ||
| 349 | struct cifs_unix_set_info_args args = { | ||
| 241 | .mode = mode, | 350 | .mode = mode, |
| 242 | .ctime = NO_CHANGE_64, | 351 | .ctime = NO_CHANGE_64, |
| 243 | .atime = NO_CHANGE_64, | 352 | .atime = NO_CHANGE_64, |
| 244 | .mtime = NO_CHANGE_64, | 353 | .mtime = NO_CHANGE_64, |
| 245 | .device = 0, | 354 | .device = 0, |
| 246 | }; | 355 | }; |
| 247 | 356 | ||
| 248 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { | 357 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { |
| 249 | args.uid = (__u64) current_fsuid(); | 358 | args.uid = (__u64) current_fsuid(); |
| 250 | if (inode->i_mode & S_ISGID) | 359 | if (inode->i_mode & S_ISGID) |
| 251 | args.gid = (__u64) inode->i_gid; | 360 | args.gid = (__u64) inode->i_gid; |
| 252 | else | 361 | else |
| 253 | args.gid = (__u64) current_fsgid(); | 362 | args.gid = (__u64) current_fsgid(); |
| 254 | } else { | ||
| 255 | args.uid = NO_CHANGE_64; | ||
| 256 | args.gid = NO_CHANGE_64; | ||
| 257 | } | ||
| 258 | CIFSSMBUnixSetInfo(xid, tcon, full_path, &args, | ||
| 259 | cifs_sb->local_nls, | ||
| 260 | cifs_sb->mnt_cifs_flags & | ||
| 261 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
| 262 | } else { | 363 | } else { |
| 263 | /* BB implement mode setting via Windows security | 364 | args.uid = NO_CHANGE_64; |
| 264 | descriptors e.g. */ | 365 | args.gid = NO_CHANGE_64; |
| 265 | /* CIFSSMBWinSetPerms(xid,tcon,path,mode,-1,-1,nls);*/ | ||
| 266 | |||
| 267 | /* Could set r/o dos attribute if mode & 0222 == 0 */ | ||
| 268 | } | 366 | } |
| 367 | CIFSSMBUnixSetInfo(xid, tcon, full_path, &args, | ||
| 368 | cifs_sb->local_nls, | ||
| 369 | cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
| 370 | } else { | ||
| 371 | /* BB implement mode setting via Windows security | ||
| 372 | descriptors e.g. */ | ||
| 373 | /* CIFSSMBWinSetPerms(xid,tcon,path,mode,-1,-1,nls);*/ | ||
| 269 | 374 | ||
| 270 | /* server might mask mode so we have to query for it */ | 375 | /* Could set r/o dos attribute if mode & 0222 == 0 */ |
| 271 | if (tcon->unix_ext) | 376 | } |
| 272 | rc = cifs_get_inode_info_unix(&newinode, full_path, | 377 | |
| 273 | inode->i_sb, xid); | 378 | cifs_create_get_file_info: |
| 274 | else { | 379 | /* server might mask mode so we have to query for it */ |
| 275 | rc = cifs_get_inode_info(&newinode, full_path, | 380 | if (tcon->unix_ext) |
| 276 | buf, inode->i_sb, xid, | 381 | rc = cifs_get_inode_info_unix(&newinode, full_path, |
| 277 | &fileHandle); | 382 | inode->i_sb, xid); |
| 278 | if (newinode) { | 383 | else { |
| 279 | if (cifs_sb->mnt_cifs_flags & | 384 | rc = cifs_get_inode_info(&newinode, full_path, buf, |
| 280 | CIFS_MOUNT_DYNPERM) | 385 | inode->i_sb, xid, &fileHandle); |
| 281 | newinode->i_mode = mode; | 386 | if (newinode) { |
| 282 | if ((oplock & CIFS_CREATE_ACTION) && | 387 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DYNPERM) |
| 283 | (cifs_sb->mnt_cifs_flags & | 388 | newinode->i_mode = mode; |
| 284 | CIFS_MOUNT_SET_UID)) { | 389 | if ((oplock & CIFS_CREATE_ACTION) && |
| 285 | newinode->i_uid = current_fsuid(); | 390 | (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID)) { |
| 286 | if (inode->i_mode & S_ISGID) | 391 | newinode->i_uid = current_fsuid(); |
| 287 | newinode->i_gid = | 392 | if (inode->i_mode & S_ISGID) |
| 288 | inode->i_gid; | 393 | newinode->i_gid = inode->i_gid; |
| 289 | else | 394 | else |
| 290 | newinode->i_gid = | 395 | newinode->i_gid = current_fsgid(); |
| 291 | current_fsgid(); | ||
| 292 | } | ||
| 293 | } | 396 | } |
| 294 | } | 397 | } |
| 398 | } | ||
| 295 | 399 | ||
| 296 | if (rc != 0) { | 400 | cifs_create_set_dentry: |
| 297 | cFYI(1, ("Create worked, get_inode_info failed rc = %d", | 401 | if (rc == 0) |
| 298 | rc)); | 402 | setup_cifs_dentry(tcon, direntry, newinode); |
| 299 | } else | 403 | else |
| 300 | setup_cifs_dentry(tcon, direntry, newinode); | 404 | cFYI(1, ("Create worked, get_inode_info failed rc = %d", rc)); |
| 301 | 405 | ||
| 302 | if ((nd == NULL /* nfsd case - nfs srv does not set nd */) || | 406 | /* nfsd case - nfs srv does not set nd */ |
| 303 | (!(nd->flags & LOOKUP_OPEN))) { | 407 | if ((nd == NULL) || (!(nd->flags & LOOKUP_OPEN))) { |
| 304 | /* mknod case - do not leave file open */ | 408 | /* mknod case - do not leave file open */ |
| 305 | CIFSSMBClose(xid, tcon, fileHandle); | 409 | CIFSSMBClose(xid, tcon, fileHandle); |
| 306 | } else if (newinode) { | 410 | } else if (newinode) { |
| 307 | struct cifsFileInfo *pCifsFile = | 411 | struct cifsFileInfo *pCifsFile = |
| 308 | kzalloc(sizeof(struct cifsFileInfo), GFP_KERNEL); | 412 | kzalloc(sizeof(struct cifsFileInfo), GFP_KERNEL); |
| 309 | 413 | ||
| 310 | if (pCifsFile == NULL) | 414 | if (pCifsFile == NULL) |
| 311 | goto cifs_create_out; | 415 | goto cifs_create_out; |
| 312 | pCifsFile->netfid = fileHandle; | 416 | pCifsFile->netfid = fileHandle; |
| 313 | pCifsFile->pid = current->tgid; | 417 | pCifsFile->pid = current->tgid; |
| 314 | pCifsFile->pInode = newinode; | 418 | pCifsFile->pInode = newinode; |
| 315 | pCifsFile->invalidHandle = false; | 419 | pCifsFile->invalidHandle = false; |
| 316 | pCifsFile->closePend = false; | 420 | pCifsFile->closePend = false; |
| 317 | init_MUTEX(&pCifsFile->fh_sem); | 421 | init_MUTEX(&pCifsFile->fh_sem); |
| 318 | mutex_init(&pCifsFile->lock_mutex); | 422 | mutex_init(&pCifsFile->lock_mutex); |
| 319 | INIT_LIST_HEAD(&pCifsFile->llist); | 423 | INIT_LIST_HEAD(&pCifsFile->llist); |
| 320 | atomic_set(&pCifsFile->wrtPending, 0); | 424 | atomic_set(&pCifsFile->wrtPending, 0); |
| 321 | 425 | ||
| 322 | /* set the following in open now | 426 | /* set the following in open now |
| 323 | pCifsFile->pfile = file; */ | 427 | pCifsFile->pfile = file; */ |
| 324 | write_lock(&GlobalSMBSeslock); | 428 | write_lock(&GlobalSMBSeslock); |
| 325 | list_add(&pCifsFile->tlist, &tcon->openFileList); | 429 | list_add(&pCifsFile->tlist, &tcon->openFileList); |
| 326 | pCifsInode = CIFS_I(newinode); | 430 | pCifsInode = CIFS_I(newinode); |
| 327 | if (pCifsInode) { | 431 | if (pCifsInode) { |
| 328 | /* if readable file instance put first in list*/ | 432 | /* if readable file instance put first in list*/ |
| 329 | if (write_only) { | 433 | if (write_only) { |
| 330 | list_add_tail(&pCifsFile->flist, | 434 | list_add_tail(&pCifsFile->flist, |
| 331 | &pCifsInode->openFileList); | 435 | &pCifsInode->openFileList); |
| 332 | } else { | 436 | } else { |
| 333 | list_add(&pCifsFile->flist, | 437 | list_add(&pCifsFile->flist, |
| 334 | &pCifsInode->openFileList); | 438 | &pCifsInode->openFileList); |
| 335 | } | ||
| 336 | if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) { | ||
| 337 | pCifsInode->clientCanCacheAll = true; | ||
| 338 | pCifsInode->clientCanCacheRead = true; | ||
| 339 | cFYI(1, ("Exclusive Oplock inode %p", | ||
| 340 | newinode)); | ||
| 341 | } else if ((oplock & 0xF) == OPLOCK_READ) | ||
| 342 | pCifsInode->clientCanCacheRead = true; | ||
| 343 | } | 439 | } |
| 344 | write_unlock(&GlobalSMBSeslock); | 440 | if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) { |
| 441 | pCifsInode->clientCanCacheAll = true; | ||
| 442 | pCifsInode->clientCanCacheRead = true; | ||
| 443 | cFYI(1, ("Exclusive Oplock inode %p", | ||
| 444 | newinode)); | ||
| 445 | } else if ((oplock & 0xF) == OPLOCK_READ) | ||
| 446 | pCifsInode->clientCanCacheRead = true; | ||
| 345 | } | 447 | } |
| 448 | write_unlock(&GlobalSMBSeslock); | ||
| 346 | } | 449 | } |
| 347 | cifs_create_out: | 450 | cifs_create_out: |
| 348 | kfree(buf); | 451 | kfree(buf); |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index bcf7b5184664..4690a360c855 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
| @@ -199,6 +199,49 @@ static void fill_fake_finddataunix(FILE_UNIX_BASIC_INFO *pfnd_dat, | |||
| 199 | pfnd_dat->Gid = cpu_to_le64(pinode->i_gid); | 199 | pfnd_dat->Gid = cpu_to_le64(pinode->i_gid); |
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | /** | ||
| 203 | * cifs_new inode - create new inode, initialize, and hash it | ||
| 204 | * @sb - pointer to superblock | ||
| 205 | * @inum - if valid pointer and serverino is enabled, replace i_ino with val | ||
| 206 | * | ||
| 207 | * Create a new inode, initialize it for CIFS and hash it. Returns the new | ||
| 208 | * inode or NULL if one couldn't be allocated. | ||
| 209 | * | ||
| 210 | * If the share isn't mounted with "serverino" or inum is a NULL pointer then | ||
| 211 | * we'll just use the inode number assigned by new_inode(). Note that this can | ||
| 212 | * mean i_ino collisions since the i_ino assigned by new_inode is not | ||
| 213 | * guaranteed to be unique. | ||
| 214 | */ | ||
| 215 | struct inode * | ||
| 216 | cifs_new_inode(struct super_block *sb, __u64 *inum) | ||
| 217 | { | ||
| 218 | struct inode *inode; | ||
| 219 | |||
| 220 | inode = new_inode(sb); | ||
| 221 | if (inode == NULL) | ||
| 222 | return NULL; | ||
| 223 | |||
| 224 | /* | ||
| 225 | * BB: Is i_ino == 0 legal? Here, we assume that it is. If it isn't we | ||
| 226 | * stop passing inum as ptr. Are there sanity checks we can use to | ||
| 227 | * ensure that the server is really filling in that field? Also, | ||
| 228 | * if serverino is disabled, perhaps we should be using iunique()? | ||
| 229 | */ | ||
| 230 | if (inum && (CIFS_SB(sb)->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)) | ||
| 231 | inode->i_ino = (unsigned long) *inum; | ||
| 232 | |||
| 233 | /* | ||
| 234 | * must set this here instead of cifs_alloc_inode since VFS will | ||
| 235 | * clobber i_flags | ||
| 236 | */ | ||
| 237 | if (sb->s_flags & MS_NOATIME) | ||
| 238 | inode->i_flags |= S_NOATIME | S_NOCMTIME; | ||
| 239 | |||
| 240 | insert_inode_hash(inode); | ||
| 241 | |||
| 242 | return inode; | ||
| 243 | } | ||
| 244 | |||
| 202 | int cifs_get_inode_info_unix(struct inode **pinode, | 245 | int cifs_get_inode_info_unix(struct inode **pinode, |
| 203 | const unsigned char *full_path, struct super_block *sb, int xid) | 246 | const unsigned char *full_path, struct super_block *sb, int xid) |
| 204 | { | 247 | { |
| @@ -233,22 +276,11 @@ int cifs_get_inode_info_unix(struct inode **pinode, | |||
| 233 | 276 | ||
| 234 | /* get new inode */ | 277 | /* get new inode */ |
| 235 | if (*pinode == NULL) { | 278 | if (*pinode == NULL) { |
| 236 | *pinode = new_inode(sb); | 279 | *pinode = cifs_new_inode(sb, &find_data.UniqueId); |
| 237 | if (*pinode == NULL) { | 280 | if (*pinode == NULL) { |
| 238 | rc = -ENOMEM; | 281 | rc = -ENOMEM; |
| 239 | goto cgiiu_exit; | 282 | goto cgiiu_exit; |
| 240 | } | 283 | } |
| 241 | /* Is an i_ino of zero legal? */ | ||
| 242 | /* note ino incremented to unique num in new_inode */ | ||
| 243 | /* Are there sanity checks we can use to ensure that | ||
| 244 | the server is really filling in that field? */ | ||
| 245 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) | ||
| 246 | (*pinode)->i_ino = (unsigned long)find_data.UniqueId; | ||
| 247 | |||
| 248 | if (sb->s_flags & MS_NOATIME) | ||
| 249 | (*pinode)->i_flags |= S_NOATIME | S_NOCMTIME; | ||
| 250 | |||
| 251 | insert_inode_hash(*pinode); | ||
| 252 | } | 284 | } |
| 253 | 285 | ||
| 254 | inode = *pinode; | 286 | inode = *pinode; |
| @@ -465,11 +497,9 @@ int cifs_get_inode_info(struct inode **pinode, | |||
| 465 | 497 | ||
| 466 | /* get new inode */ | 498 | /* get new inode */ |
| 467 | if (*pinode == NULL) { | 499 | if (*pinode == NULL) { |
| 468 | *pinode = new_inode(sb); | 500 | __u64 inode_num; |
| 469 | if (*pinode == NULL) { | 501 | __u64 *pinum = &inode_num; |
| 470 | rc = -ENOMEM; | 502 | |
| 471 | goto cgii_exit; | ||
| 472 | } | ||
| 473 | /* Is an i_ino of zero legal? Can we use that to check | 503 | /* Is an i_ino of zero legal? Can we use that to check |
| 474 | if the server supports returning inode numbers? Are | 504 | if the server supports returning inode numbers? Are |
| 475 | there other sanity checks we can use to ensure that | 505 | there other sanity checks we can use to ensure that |
| @@ -486,22 +516,26 @@ int cifs_get_inode_info(struct inode **pinode, | |||
| 486 | 516 | ||
| 487 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { | 517 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { |
| 488 | int rc1 = 0; | 518 | int rc1 = 0; |
| 489 | __u64 inode_num; | ||
| 490 | 519 | ||
| 491 | rc1 = CIFSGetSrvInodeNumber(xid, pTcon, | 520 | rc1 = CIFSGetSrvInodeNumber(xid, pTcon, |
| 492 | full_path, &inode_num, | 521 | full_path, pinum, |
| 493 | cifs_sb->local_nls, | 522 | cifs_sb->local_nls, |
| 494 | cifs_sb->mnt_cifs_flags & | 523 | cifs_sb->mnt_cifs_flags & |
| 495 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 524 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
| 496 | if (rc1) { | 525 | if (rc1) { |
| 497 | cFYI(1, ("GetSrvInodeNum rc %d", rc1)); | 526 | cFYI(1, ("GetSrvInodeNum rc %d", rc1)); |
| 527 | pinum = NULL; | ||
| 498 | /* BB EOPNOSUPP disable SERVER_INUM? */ | 528 | /* BB EOPNOSUPP disable SERVER_INUM? */ |
| 499 | } else /* do we need cast or hash to ino? */ | 529 | } |
| 500 | (*pinode)->i_ino = inode_num; | 530 | } else { |
| 501 | } /* else ino incremented to unique num in new_inode*/ | 531 | pinum = NULL; |
| 502 | if (sb->s_flags & MS_NOATIME) | 532 | } |
| 503 | (*pinode)->i_flags |= S_NOATIME | S_NOCMTIME; | 533 | |
| 504 | insert_inode_hash(*pinode); | 534 | *pinode = cifs_new_inode(sb, pinum); |
| 535 | if (*pinode == NULL) { | ||
| 536 | rc = -ENOMEM; | ||
| 537 | goto cgii_exit; | ||
| 538 | } | ||
| 505 | } | 539 | } |
| 506 | inode = *pinode; | 540 | inode = *pinode; |
| 507 | cifsInfo = CIFS_I(inode); | 541 | cifsInfo = CIFS_I(inode); |
| @@ -621,7 +655,7 @@ static const struct inode_operations cifs_ipc_inode_ops = { | |||
| 621 | .lookup = cifs_lookup, | 655 | .lookup = cifs_lookup, |
| 622 | }; | 656 | }; |
| 623 | 657 | ||
| 624 | static char *build_path_to_root(struct cifs_sb_info *cifs_sb) | 658 | char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb) |
| 625 | { | 659 | { |
| 626 | int pplen = cifs_sb->prepathlen; | 660 | int pplen = cifs_sb->prepathlen; |
| 627 | int dfsplen; | 661 | int dfsplen; |
| @@ -678,7 +712,7 @@ struct inode *cifs_iget(struct super_block *sb, unsigned long ino) | |||
| 678 | return inode; | 712 | return inode; |
| 679 | 713 | ||
| 680 | cifs_sb = CIFS_SB(inode->i_sb); | 714 | cifs_sb = CIFS_SB(inode->i_sb); |
| 681 | full_path = build_path_to_root(cifs_sb); | 715 | full_path = cifs_build_path_to_root(cifs_sb); |
| 682 | if (full_path == NULL) | 716 | if (full_path == NULL) |
| 683 | return ERR_PTR(-ENOMEM); | 717 | return ERR_PTR(-ENOMEM); |
| 684 | 718 | ||
| @@ -1017,7 +1051,7 @@ out_reval: | |||
| 1017 | return rc; | 1051 | return rc; |
| 1018 | } | 1052 | } |
| 1019 | 1053 | ||
| 1020 | static void posix_fill_in_inode(struct inode *tmp_inode, | 1054 | void posix_fill_in_inode(struct inode *tmp_inode, |
| 1021 | FILE_UNIX_BASIC_INFO *pData, int isNewInode) | 1055 | FILE_UNIX_BASIC_INFO *pData, int isNewInode) |
| 1022 | { | 1056 | { |
| 1023 | struct cifsInodeInfo *cifsInfo = CIFS_I(tmp_inode); | 1057 | struct cifsInodeInfo *cifsInfo = CIFS_I(tmp_inode); |
| @@ -1114,24 +1148,14 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode) | |||
| 1114 | else | 1148 | else |
| 1115 | direntry->d_op = &cifs_dentry_ops; | 1149 | direntry->d_op = &cifs_dentry_ops; |
| 1116 | 1150 | ||
| 1117 | newinode = new_inode(inode->i_sb); | 1151 | newinode = cifs_new_inode(inode->i_sb, |
| 1152 | &pInfo->UniqueId); | ||
| 1118 | if (newinode == NULL) { | 1153 | if (newinode == NULL) { |
| 1119 | kfree(pInfo); | 1154 | kfree(pInfo); |
| 1120 | goto mkdir_get_info; | 1155 | goto mkdir_get_info; |
| 1121 | } | 1156 | } |
| 1122 | 1157 | ||
| 1123 | /* Is an i_ino of zero legal? */ | ||
| 1124 | /* Are there sanity checks we can use to ensure that | ||
| 1125 | the server is really filling in that field? */ | ||
| 1126 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { | ||
| 1127 | newinode->i_ino = | ||
| 1128 | (unsigned long)pInfo->UniqueId; | ||
| 1129 | } /* note ino incremented to unique num in new_inode */ | ||
| 1130 | if (inode->i_sb->s_flags & MS_NOATIME) | ||
| 1131 | newinode->i_flags |= S_NOATIME | S_NOCMTIME; | ||
| 1132 | newinode->i_nlink = 2; | 1158 | newinode->i_nlink = 2; |
| 1133 | |||
| 1134 | insert_inode_hash(newinode); | ||
| 1135 | d_instantiate(direntry, newinode); | 1159 | d_instantiate(direntry, newinode); |
| 1136 | 1160 | ||
| 1137 | /* we already checked in POSIXCreate whether | 1161 | /* we already checked in POSIXCreate whether |
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 9f51f9bf0292..c2c01ff4c32c 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
| @@ -56,35 +56,34 @@ static inline void dump_cifs_file_struct(struct file *file, char *label) | |||
| 56 | } | 56 | } |
| 57 | #endif /* DEBUG2 */ | 57 | #endif /* DEBUG2 */ |
| 58 | 58 | ||
| 59 | /* Returns one if new inode created (which therefore needs to be hashed) */ | 59 | /* Returns 1 if new inode created, 2 if both dentry and inode were */ |
| 60 | /* Might check in the future if inode number changed so we can rehash inode */ | 60 | /* Might check in the future if inode number changed so we can rehash inode */ |
| 61 | static int construct_dentry(struct qstr *qstring, struct file *file, | 61 | static int |
| 62 | struct inode **ptmp_inode, struct dentry **pnew_dentry) | 62 | construct_dentry(struct qstr *qstring, struct file *file, |
| 63 | struct inode **ptmp_inode, struct dentry **pnew_dentry, | ||
| 64 | __u64 *inum) | ||
| 63 | { | 65 | { |
| 64 | struct dentry *tmp_dentry; | 66 | struct dentry *tmp_dentry = NULL; |
| 65 | struct cifs_sb_info *cifs_sb; | 67 | struct super_block *sb = file->f_path.dentry->d_sb; |
| 66 | struct cifsTconInfo *pTcon; | ||
| 67 | int rc = 0; | 68 | int rc = 0; |
| 68 | 69 | ||
| 69 | cFYI(1, ("For %s", qstring->name)); | 70 | cFYI(1, ("For %s", qstring->name)); |
| 70 | cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); | ||
| 71 | pTcon = cifs_sb->tcon; | ||
| 72 | 71 | ||
| 73 | qstring->hash = full_name_hash(qstring->name, qstring->len); | 72 | qstring->hash = full_name_hash(qstring->name, qstring->len); |
| 74 | tmp_dentry = d_lookup(file->f_path.dentry, qstring); | 73 | tmp_dentry = d_lookup(file->f_path.dentry, qstring); |
| 75 | if (tmp_dentry) { | 74 | if (tmp_dentry) { |
| 75 | /* BB: overwrite old name? i.e. tmp_dentry->d_name and | ||
| 76 | * tmp_dentry->d_name.len?? | ||
| 77 | */ | ||
| 76 | cFYI(0, ("existing dentry with inode 0x%p", | 78 | cFYI(0, ("existing dentry with inode 0x%p", |
| 77 | tmp_dentry->d_inode)); | 79 | tmp_dentry->d_inode)); |
| 78 | *ptmp_inode = tmp_dentry->d_inode; | 80 | *ptmp_inode = tmp_dentry->d_inode; |
| 79 | /* BB overwrite old name? i.e. tmp_dentry->d_name and tmp_dentry->d_name.len??*/ | ||
| 80 | if (*ptmp_inode == NULL) { | 81 | if (*ptmp_inode == NULL) { |
| 81 | *ptmp_inode = new_inode(file->f_path.dentry->d_sb); | 82 | *ptmp_inode = cifs_new_inode(sb, inum); |
| 82 | if (*ptmp_inode == NULL) | 83 | if (*ptmp_inode == NULL) |
| 83 | return rc; | 84 | return rc; |
| 84 | rc = 1; | 85 | rc = 1; |
| 85 | } | 86 | } |
| 86 | if (file->f_path.dentry->d_sb->s_flags & MS_NOATIME) | ||
| 87 | (*ptmp_inode)->i_flags |= S_NOATIME | S_NOCMTIME; | ||
| 88 | } else { | 87 | } else { |
| 89 | tmp_dentry = d_alloc(file->f_path.dentry, qstring); | 88 | tmp_dentry = d_alloc(file->f_path.dentry, qstring); |
| 90 | if (tmp_dentry == NULL) { | 89 | if (tmp_dentry == NULL) { |
| @@ -93,15 +92,14 @@ static int construct_dentry(struct qstr *qstring, struct file *file, | |||
| 93 | return rc; | 92 | return rc; |
| 94 | } | 93 | } |
| 95 | 94 | ||
| 96 | *ptmp_inode = new_inode(file->f_path.dentry->d_sb); | 95 | if (CIFS_SB(sb)->tcon->nocase) |
| 97 | if (pTcon->nocase) | ||
| 98 | tmp_dentry->d_op = &cifs_ci_dentry_ops; | 96 | tmp_dentry->d_op = &cifs_ci_dentry_ops; |
| 99 | else | 97 | else |
| 100 | tmp_dentry->d_op = &cifs_dentry_ops; | 98 | tmp_dentry->d_op = &cifs_dentry_ops; |
| 99 | |||
| 100 | *ptmp_inode = cifs_new_inode(sb, inum); | ||
| 101 | if (*ptmp_inode == NULL) | 101 | if (*ptmp_inode == NULL) |
| 102 | return rc; | 102 | return rc; |
| 103 | if (file->f_path.dentry->d_sb->s_flags & MS_NOATIME) | ||
| 104 | (*ptmp_inode)->i_flags |= S_NOATIME | S_NOCMTIME; | ||
| 105 | rc = 2; | 103 | rc = 2; |
| 106 | } | 104 | } |
| 107 | 105 | ||
| @@ -822,7 +820,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon, | |||
| 822 | /* inode num, inode type and filename returned */ | 820 | /* inode num, inode type and filename returned */ |
| 823 | static int cifs_get_name_from_search_buf(struct qstr *pqst, | 821 | static int cifs_get_name_from_search_buf(struct qstr *pqst, |
| 824 | char *current_entry, __u16 level, unsigned int unicode, | 822 | char *current_entry, __u16 level, unsigned int unicode, |
| 825 | struct cifs_sb_info *cifs_sb, int max_len, ino_t *pinum) | 823 | struct cifs_sb_info *cifs_sb, int max_len, __u64 *pinum) |
| 826 | { | 824 | { |
| 827 | int rc = 0; | 825 | int rc = 0; |
| 828 | unsigned int len = 0; | 826 | unsigned int len = 0; |
| @@ -842,9 +840,7 @@ static int cifs_get_name_from_search_buf(struct qstr *pqst, | |||
| 842 | len = strnlen(filename, PATH_MAX); | 840 | len = strnlen(filename, PATH_MAX); |
| 843 | } | 841 | } |
| 844 | 842 | ||
| 845 | /* BB fixme - hash low and high 32 bits if not 64 bit arch BB */ | 843 | *pinum = pFindData->UniqueId; |
| 846 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) | ||
| 847 | *pinum = pFindData->UniqueId; | ||
| 848 | } else if (level == SMB_FIND_FILE_DIRECTORY_INFO) { | 844 | } else if (level == SMB_FIND_FILE_DIRECTORY_INFO) { |
| 849 | FILE_DIRECTORY_INFO *pFindData = | 845 | FILE_DIRECTORY_INFO *pFindData = |
| 850 | (FILE_DIRECTORY_INFO *)current_entry; | 846 | (FILE_DIRECTORY_INFO *)current_entry; |
| @@ -907,7 +903,7 @@ static int cifs_filldir(char *pfindEntry, struct file *file, | |||
| 907 | struct qstr qstring; | 903 | struct qstr qstring; |
| 908 | struct cifsFileInfo *pCifsF; | 904 | struct cifsFileInfo *pCifsF; |
| 909 | unsigned int obj_type; | 905 | unsigned int obj_type; |
| 910 | ino_t inum; | 906 | __u64 inum; |
| 911 | struct cifs_sb_info *cifs_sb; | 907 | struct cifs_sb_info *cifs_sb; |
| 912 | struct inode *tmp_inode; | 908 | struct inode *tmp_inode; |
| 913 | struct dentry *tmp_dentry; | 909 | struct dentry *tmp_dentry; |
| @@ -940,20 +936,18 @@ static int cifs_filldir(char *pfindEntry, struct file *file, | |||
| 940 | if (rc) | 936 | if (rc) |
| 941 | return rc; | 937 | return rc; |
| 942 | 938 | ||
| 943 | rc = construct_dentry(&qstring, file, &tmp_inode, &tmp_dentry); | 939 | /* only these two infolevels return valid inode numbers */ |
| 940 | if (pCifsF->srch_inf.info_level == SMB_FIND_FILE_UNIX || | ||
| 941 | pCifsF->srch_inf.info_level == SMB_FIND_FILE_ID_FULL_DIR_INFO) | ||
| 942 | rc = construct_dentry(&qstring, file, &tmp_inode, &tmp_dentry, | ||
| 943 | &inum); | ||
| 944 | else | ||
| 945 | rc = construct_dentry(&qstring, file, &tmp_inode, &tmp_dentry, | ||
| 946 | NULL); | ||
| 947 | |||
| 944 | if ((tmp_inode == NULL) || (tmp_dentry == NULL)) | 948 | if ((tmp_inode == NULL) || (tmp_dentry == NULL)) |
| 945 | return -ENOMEM; | 949 | return -ENOMEM; |
| 946 | 950 | ||
| 947 | if (rc) { | ||
| 948 | /* inode created, we need to hash it with right inode number */ | ||
| 949 | if (inum != 0) { | ||
| 950 | /* BB fixme - hash the 2 32 quantities bits together if | ||
| 951 | * necessary BB */ | ||
| 952 | tmp_inode->i_ino = inum; | ||
| 953 | } | ||
| 954 | insert_inode_hash(tmp_inode); | ||
| 955 | } | ||
| 956 | |||
| 957 | /* we pass in rc below, indicating whether it is a new inode, | 951 | /* we pass in rc below, indicating whether it is a new inode, |
| 958 | so we can figure out whether to invalidate the inode cached | 952 | so we can figure out whether to invalidate the inode cached |
| 959 | data if the file has changed */ | 953 | data if the file has changed */ |
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 5f22de7b79a9..5c68b4282be9 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
| @@ -34,15 +34,99 @@ | |||
| 34 | extern void SMBNTencrypt(unsigned char *passwd, unsigned char *c8, | 34 | extern void SMBNTencrypt(unsigned char *passwd, unsigned char *c8, |
| 35 | unsigned char *p24); | 35 | unsigned char *p24); |
| 36 | 36 | ||
| 37 | /* Checks if this is the first smb session to be reconnected after | ||
| 38 | the socket has been reestablished (so we know whether to use vc 0). | ||
| 39 | Called while holding the cifs_tcp_ses_lock, so do not block */ | ||
| 40 | static bool is_first_ses_reconnect(struct cifsSesInfo *ses) | ||
| 41 | { | ||
| 42 | struct list_head *tmp; | ||
| 43 | struct cifsSesInfo *tmp_ses; | ||
| 44 | |||
| 45 | list_for_each(tmp, &ses->server->smb_ses_list) { | ||
| 46 | tmp_ses = list_entry(tmp, struct cifsSesInfo, | ||
| 47 | smb_ses_list); | ||
| 48 | if (tmp_ses->need_reconnect == false) | ||
| 49 | return false; | ||
| 50 | } | ||
| 51 | /* could not find a session that was already connected, | ||
| 52 | this must be the first one we are reconnecting */ | ||
| 53 | return true; | ||
| 54 | } | ||
| 55 | |||
| 56 | /* | ||
| 57 | * vc number 0 is treated specially by some servers, and should be the | ||
| 58 | * first one we request. After that we can use vcnumbers up to maxvcs, | ||
| 59 | * one for each smb session (some Windows versions set maxvcs incorrectly | ||
| 60 | * so maxvc=1 can be ignored). If we have too many vcs, we can reuse | ||
| 61 | * any vc but zero (some servers reset the connection on vcnum zero) | ||
| 62 | * | ||
| 63 | */ | ||
| 64 | static __le16 get_next_vcnum(struct cifsSesInfo *ses) | ||
| 65 | { | ||
| 66 | __u16 vcnum = 0; | ||
| 67 | struct list_head *tmp; | ||
| 68 | struct cifsSesInfo *tmp_ses; | ||
| 69 | __u16 max_vcs = ses->server->max_vcs; | ||
| 70 | __u16 i; | ||
| 71 | int free_vc_found = 0; | ||
| 72 | |||
| 73 | /* Quoting the MS-SMB specification: "Windows-based SMB servers set this | ||
| 74 | field to one but do not enforce this limit, which allows an SMB client | ||
| 75 | to establish more virtual circuits than allowed by this value ... but | ||
| 76 | other server implementations can enforce this limit." */ | ||
| 77 | if (max_vcs < 2) | ||
| 78 | max_vcs = 0xFFFF; | ||
| 79 | |||
| 80 | write_lock(&cifs_tcp_ses_lock); | ||
| 81 | if ((ses->need_reconnect) && is_first_ses_reconnect(ses)) | ||
| 82 | goto get_vc_num_exit; /* vcnum will be zero */ | ||
| 83 | for (i = ses->server->srv_count - 1; i < max_vcs; i++) { | ||
| 84 | if (i == 0) /* this is the only connection, use vc 0 */ | ||
| 85 | break; | ||
| 86 | |||
| 87 | free_vc_found = 1; | ||
| 88 | |||
| 89 | list_for_each(tmp, &ses->server->smb_ses_list) { | ||
| 90 | tmp_ses = list_entry(tmp, struct cifsSesInfo, | ||
| 91 | smb_ses_list); | ||
| 92 | if (tmp_ses->vcnum == i) { | ||
| 93 | free_vc_found = 0; | ||
| 94 | break; /* found duplicate, try next vcnum */ | ||
| 95 | } | ||
| 96 | } | ||
| 97 | if (free_vc_found) | ||
| 98 | break; /* we found a vcnumber that will work - use it */ | ||
| 99 | } | ||
| 100 | |||
| 101 | if (i == 0) | ||
| 102 | vcnum = 0; /* for most common case, ie if one smb session, use | ||
| 103 | vc zero. Also for case when no free vcnum, zero | ||
| 104 | is safest to send (some clients only send zero) */ | ||
| 105 | else if (free_vc_found == 0) | ||
| 106 | vcnum = 1; /* we can not reuse vc=0 safely, since some servers | ||
| 107 | reset all uids on that, but 1 is ok. */ | ||
| 108 | else | ||
| 109 | vcnum = i; | ||
| 110 | ses->vcnum = vcnum; | ||
| 111 | get_vc_num_exit: | ||
| 112 | write_unlock(&cifs_tcp_ses_lock); | ||
| 113 | |||
| 114 | return le16_to_cpu(vcnum); | ||
| 115 | } | ||
| 116 | |||
| 37 | static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB) | 117 | static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB) |
| 38 | { | 118 | { |
| 39 | __u32 capabilities = 0; | 119 | __u32 capabilities = 0; |
| 40 | 120 | ||
| 41 | /* init fields common to all four types of SessSetup */ | 121 | /* init fields common to all four types of SessSetup */ |
| 42 | /* note that header is initialized to zero in header_assemble */ | 122 | /* Note that offsets for first seven fields in req struct are same */ |
| 123 | /* in CIFS Specs so does not matter which of 3 forms of struct */ | ||
| 124 | /* that we use in next few lines */ | ||
| 125 | /* Note that header is initialized to zero in header_assemble */ | ||
| 43 | pSMB->req.AndXCommand = 0xFF; | 126 | pSMB->req.AndXCommand = 0xFF; |
| 44 | pSMB->req.MaxBufferSize = cpu_to_le16(ses->server->maxBuf); | 127 | pSMB->req.MaxBufferSize = cpu_to_le16(ses->server->maxBuf); |
| 45 | pSMB->req.MaxMpxCount = cpu_to_le16(ses->server->maxReq); | 128 | pSMB->req.MaxMpxCount = cpu_to_le16(ses->server->maxReq); |
| 129 | pSMB->req.VcNumber = get_next_vcnum(ses); | ||
| 46 | 130 | ||
| 47 | /* Now no need to set SMBFLG_CASELESS or obsolete CANONICAL PATH */ | 131 | /* Now no need to set SMBFLG_CASELESS or obsolete CANONICAL PATH */ |
| 48 | 132 | ||
| @@ -71,7 +155,6 @@ static __u32 cifs_ssetup_hdr(struct cifsSesInfo *ses, SESSION_SETUP_ANDX *pSMB) | |||
| 71 | if (ses->capabilities & CAP_UNIX) | 155 | if (ses->capabilities & CAP_UNIX) |
| 72 | capabilities |= CAP_UNIX; | 156 | capabilities |= CAP_UNIX; |
| 73 | 157 | ||
| 74 | /* BB check whether to init vcnum BB */ | ||
| 75 | return capabilities; | 158 | return capabilities; |
| 76 | } | 159 | } |
| 77 | 160 | ||
| @@ -228,7 +311,7 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft, | |||
| 228 | 311 | ||
| 229 | kfree(ses->serverOS); | 312 | kfree(ses->serverOS); |
| 230 | /* UTF-8 string will not grow more than four times as big as UCS-16 */ | 313 | /* UTF-8 string will not grow more than four times as big as UCS-16 */ |
| 231 | ses->serverOS = kzalloc(4 * len, GFP_KERNEL); | 314 | ses->serverOS = kzalloc((4 * len) + 2 /* trailing null */, GFP_KERNEL); |
| 232 | if (ses->serverOS != NULL) | 315 | if (ses->serverOS != NULL) |
| 233 | cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp); | 316 | cifs_strfromUCS_le(ses->serverOS, (__le16 *)data, len, nls_cp); |
| 234 | data += 2 * (len + 1); | 317 | data += 2 * (len + 1); |
| @@ -241,7 +324,7 @@ static int decode_unicode_ssetup(char **pbcc_area, int bleft, | |||
| 241 | return rc; | 324 | return rc; |
| 242 | 325 | ||
| 243 | kfree(ses->serverNOS); | 326 | kfree(ses->serverNOS); |
| 244 | ses->serverNOS = kzalloc(4 * len, GFP_KERNEL); /* BB this is wrong length FIXME BB */ | 327 | ses->serverNOS = kzalloc((4 * len) + 2 /* trailing null */, GFP_KERNEL); |
| 245 | if (ses->serverNOS != NULL) { | 328 | if (ses->serverNOS != NULL) { |
| 246 | cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len, | 329 | cifs_strfromUCS_le(ses->serverNOS, (__le16 *)data, len, |
| 247 | nls_cp); | 330 | nls_cp); |
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index d71dc44e21ed..cb329edc925b 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
| @@ -166,6 +166,75 @@ test_page_region( | |||
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | /* | 168 | /* |
| 169 | * Mapping of multi-page buffers into contiguous virtual space | ||
| 170 | */ | ||
| 171 | |||
| 172 | typedef struct a_list { | ||
| 173 | void *vm_addr; | ||
| 174 | struct a_list *next; | ||
| 175 | } a_list_t; | ||
| 176 | |||
| 177 | static a_list_t *as_free_head; | ||
| 178 | static int as_list_len; | ||
| 179 | static DEFINE_SPINLOCK(as_lock); | ||
| 180 | |||
| 181 | /* | ||
| 182 | * Try to batch vunmaps because they are costly. | ||
| 183 | */ | ||
| 184 | STATIC void | ||
| 185 | free_address( | ||
| 186 | void *addr) | ||
| 187 | { | ||
| 188 | a_list_t *aentry; | ||
| 189 | |||
| 190 | #ifdef CONFIG_XEN | ||
| 191 | /* | ||
| 192 | * Xen needs to be able to make sure it can get an exclusive | ||
| 193 | * RO mapping of pages it wants to turn into a pagetable. If | ||
| 194 | * a newly allocated page is also still being vmap()ed by xfs, | ||
| 195 | * it will cause pagetable construction to fail. This is a | ||
| 196 | * quick workaround to always eagerly unmap pages so that Xen | ||
| 197 | * is happy. | ||
| 198 | */ | ||
| 199 | vunmap(addr); | ||
| 200 | return; | ||
| 201 | #endif | ||
| 202 | |||
| 203 | aentry = kmalloc(sizeof(a_list_t), GFP_NOWAIT); | ||
| 204 | if (likely(aentry)) { | ||
| 205 | spin_lock(&as_lock); | ||
| 206 | aentry->next = as_free_head; | ||
| 207 | aentry->vm_addr = addr; | ||
| 208 | as_free_head = aentry; | ||
| 209 | as_list_len++; | ||
| 210 | spin_unlock(&as_lock); | ||
| 211 | } else { | ||
| 212 | vunmap(addr); | ||
| 213 | } | ||
| 214 | } | ||
| 215 | |||
| 216 | STATIC void | ||
| 217 | purge_addresses(void) | ||
| 218 | { | ||
| 219 | a_list_t *aentry, *old; | ||
| 220 | |||
| 221 | if (as_free_head == NULL) | ||
| 222 | return; | ||
| 223 | |||
| 224 | spin_lock(&as_lock); | ||
| 225 | aentry = as_free_head; | ||
| 226 | as_free_head = NULL; | ||
| 227 | as_list_len = 0; | ||
| 228 | spin_unlock(&as_lock); | ||
| 229 | |||
| 230 | while ((old = aentry) != NULL) { | ||
| 231 | vunmap(aentry->vm_addr); | ||
| 232 | aentry = aentry->next; | ||
| 233 | kfree(old); | ||
| 234 | } | ||
| 235 | } | ||
| 236 | |||
| 237 | /* | ||
| 169 | * Internal xfs_buf_t object manipulation | 238 | * Internal xfs_buf_t object manipulation |
| 170 | */ | 239 | */ |
| 171 | 240 | ||
| @@ -264,7 +333,7 @@ xfs_buf_free( | |||
| 264 | uint i; | 333 | uint i; |
| 265 | 334 | ||
| 266 | if ((bp->b_flags & XBF_MAPPED) && (bp->b_page_count > 1)) | 335 | if ((bp->b_flags & XBF_MAPPED) && (bp->b_page_count > 1)) |
| 267 | vm_unmap_ram(bp->b_addr - bp->b_offset, bp->b_page_count); | 336 | free_address(bp->b_addr - bp->b_offset); |
| 268 | 337 | ||
| 269 | for (i = 0; i < bp->b_page_count; i++) { | 338 | for (i = 0; i < bp->b_page_count; i++) { |
| 270 | struct page *page = bp->b_pages[i]; | 339 | struct page *page = bp->b_pages[i]; |
| @@ -386,8 +455,10 @@ _xfs_buf_map_pages( | |||
| 386 | bp->b_addr = page_address(bp->b_pages[0]) + bp->b_offset; | 455 | bp->b_addr = page_address(bp->b_pages[0]) + bp->b_offset; |
| 387 | bp->b_flags |= XBF_MAPPED; | 456 | bp->b_flags |= XBF_MAPPED; |
| 388 | } else if (flags & XBF_MAPPED) { | 457 | } else if (flags & XBF_MAPPED) { |
| 389 | bp->b_addr = vm_map_ram(bp->b_pages, bp->b_page_count, | 458 | if (as_list_len > 64) |
| 390 | -1, PAGE_KERNEL); | 459 | purge_addresses(); |
| 460 | bp->b_addr = vmap(bp->b_pages, bp->b_page_count, | ||
| 461 | VM_MAP, PAGE_KERNEL); | ||
| 391 | if (unlikely(bp->b_addr == NULL)) | 462 | if (unlikely(bp->b_addr == NULL)) |
| 392 | return -ENOMEM; | 463 | return -ENOMEM; |
| 393 | bp->b_addr += bp->b_offset; | 464 | bp->b_addr += bp->b_offset; |
| @@ -1672,6 +1743,8 @@ xfsbufd( | |||
| 1672 | count++; | 1743 | count++; |
| 1673 | } | 1744 | } |
| 1674 | 1745 | ||
| 1746 | if (as_list_len > 0) | ||
| 1747 | purge_addresses(); | ||
| 1675 | if (count) | 1748 | if (count) |
| 1676 | blk_run_address_space(target->bt_mapping); | 1749 | blk_run_address_space(target->bt_mapping); |
| 1677 | 1750 | ||
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index 8190b9bcc2d9..e5f4ae989abf 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
| @@ -1321,6 +1321,8 @@ void drm_gem_object_free(struct kref *kref); | |||
| 1321 | struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev, | 1321 | struct drm_gem_object *drm_gem_object_alloc(struct drm_device *dev, |
| 1322 | size_t size); | 1322 | size_t size); |
| 1323 | void drm_gem_object_handle_free(struct kref *kref); | 1323 | void drm_gem_object_handle_free(struct kref *kref); |
| 1324 | void drm_gem_vm_open(struct vm_area_struct *vma); | ||
| 1325 | void drm_gem_vm_close(struct vm_area_struct *vma); | ||
| 1324 | int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); | 1326 | int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); |
| 1325 | 1327 | ||
| 1326 | static inline void | 1328 | static inline void |
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index d54de24bf371..5ded1acfb543 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
| @@ -609,7 +609,7 @@ extern char *drm_get_dvi_i_subconnector_name(int val); | |||
| 609 | extern char *drm_get_dvi_i_select_name(int val); | 609 | extern char *drm_get_dvi_i_select_name(int val); |
| 610 | extern char *drm_get_tv_subconnector_name(int val); | 610 | extern char *drm_get_tv_subconnector_name(int val); |
| 611 | extern char *drm_get_tv_select_name(int val); | 611 | extern char *drm_get_tv_select_name(int val); |
| 612 | extern void drm_fb_release(struct file *filp); | 612 | extern void drm_fb_release(struct drm_file *file_priv); |
| 613 | extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group); | 613 | extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group); |
| 614 | extern struct edid *drm_get_edid(struct drm_connector *connector, | 614 | extern struct edid *drm_get_edid(struct drm_connector *connector, |
| 615 | struct i2c_adapter *adapter); | 615 | struct i2c_adapter *adapter); |
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h index 0c6f0e11b41b..0b0d236c2154 100644 --- a/include/drm/drm_crtc_helper.h +++ b/include/drm/drm_crtc_helper.h | |||
| @@ -54,13 +54,13 @@ struct drm_crtc_helper_funcs { | |||
| 54 | struct drm_display_mode *mode, | 54 | struct drm_display_mode *mode, |
| 55 | struct drm_display_mode *adjusted_mode); | 55 | struct drm_display_mode *adjusted_mode); |
| 56 | /* Actually set the mode */ | 56 | /* Actually set the mode */ |
| 57 | void (*mode_set)(struct drm_crtc *crtc, struct drm_display_mode *mode, | 57 | int (*mode_set)(struct drm_crtc *crtc, struct drm_display_mode *mode, |
| 58 | struct drm_display_mode *adjusted_mode, int x, int y, | 58 | struct drm_display_mode *adjusted_mode, int x, int y, |
| 59 | struct drm_framebuffer *old_fb); | 59 | struct drm_framebuffer *old_fb); |
| 60 | 60 | ||
| 61 | /* Move the crtc on the current fb to the given position *optional* */ | 61 | /* Move the crtc on the current fb to the given position *optional* */ |
| 62 | void (*mode_set_base)(struct drm_crtc *crtc, int x, int y, | 62 | int (*mode_set_base)(struct drm_crtc *crtc, int x, int y, |
| 63 | struct drm_framebuffer *old_fb); | 63 | struct drm_framebuffer *old_fb); |
| 64 | }; | 64 | }; |
| 65 | 65 | ||
| 66 | struct drm_encoder_helper_funcs { | 66 | struct drm_encoder_helper_funcs { |
diff --git a/include/linux/device.h b/include/linux/device.h index 45e5b1921fbb..47f343c7bdda 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -147,6 +147,8 @@ extern void put_driver(struct device_driver *drv); | |||
| 147 | extern struct device_driver *driver_find(const char *name, | 147 | extern struct device_driver *driver_find(const char *name, |
| 148 | struct bus_type *bus); | 148 | struct bus_type *bus); |
| 149 | extern int driver_probe_done(void); | 149 | extern int driver_probe_done(void); |
| 150 | extern int wait_for_device_probe(void); | ||
| 151 | |||
| 150 | 152 | ||
| 151 | /* sysfs interface for exporting driver attributes */ | 153 | /* sysfs interface for exporting driver attributes */ |
| 152 | 154 | ||
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 114b8192eab9..aca8c458aa8a 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -2323,6 +2323,9 @@ | |||
| 2323 | #define PCI_DEVICE_ID_INTEL_82378 0x0484 | 2323 | #define PCI_DEVICE_ID_INTEL_82378 0x0484 |
| 2324 | #define PCI_DEVICE_ID_INTEL_I960 0x0960 | 2324 | #define PCI_DEVICE_ID_INTEL_I960 0x0960 |
| 2325 | #define PCI_DEVICE_ID_INTEL_I960RM 0x0962 | 2325 | #define PCI_DEVICE_ID_INTEL_I960RM 0x0962 |
| 2326 | #define PCI_DEVICE_ID_INTEL_8257X_SOL 0x1062 | ||
| 2327 | #define PCI_DEVICE_ID_INTEL_82573E_SOL 0x1085 | ||
| 2328 | #define PCI_DEVICE_ID_INTEL_82573L_SOL 0x108F | ||
| 2326 | #define PCI_DEVICE_ID_INTEL_82815_MC 0x1130 | 2329 | #define PCI_DEVICE_ID_INTEL_82815_MC 0x1130 |
| 2327 | #define PCI_DEVICE_ID_INTEL_82815_CGC 0x1132 | 2330 | #define PCI_DEVICE_ID_INTEL_82815_CGC 0x1132 |
| 2328 | #define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221 | 2331 | #define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221 |
diff --git a/include/linux/pm.h b/include/linux/pm.h index de2e0a8f6728..24ba5f67b3a3 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
| @@ -381,10 +381,12 @@ struct dev_pm_info { | |||
| 381 | 381 | ||
| 382 | #ifdef CONFIG_PM_SLEEP | 382 | #ifdef CONFIG_PM_SLEEP |
| 383 | extern void device_pm_lock(void); | 383 | extern void device_pm_lock(void); |
| 384 | extern int sysdev_resume(void); | ||
| 384 | extern void device_power_up(pm_message_t state); | 385 | extern void device_power_up(pm_message_t state); |
| 385 | extern void device_resume(pm_message_t state); | 386 | extern void device_resume(pm_message_t state); |
| 386 | 387 | ||
| 387 | extern void device_pm_unlock(void); | 388 | extern void device_pm_unlock(void); |
| 389 | extern int sysdev_suspend(pm_message_t state); | ||
| 388 | extern int device_power_down(pm_message_t state); | 390 | extern int device_power_down(pm_message_t state); |
| 389 | extern int device_suspend(pm_message_t state); | 391 | extern int device_suspend(pm_message_t state); |
| 390 | extern int device_prepare_suspend(pm_message_t state); | 392 | extern int device_prepare_suspend(pm_message_t state); |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index 90bbbf0b1161..df9245c7bd3b 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
| @@ -296,6 +296,7 @@ struct uart_port { | |||
| 296 | #define UPF_HARDPPS_CD ((__force upf_t) (1 << 11)) | 296 | #define UPF_HARDPPS_CD ((__force upf_t) (1 << 11)) |
| 297 | #define UPF_LOW_LATENCY ((__force upf_t) (1 << 13)) | 297 | #define UPF_LOW_LATENCY ((__force upf_t) (1 << 13)) |
| 298 | #define UPF_BUGGY_UART ((__force upf_t) (1 << 14)) | 298 | #define UPF_BUGGY_UART ((__force upf_t) (1 << 14)) |
| 299 | #define UPF_NO_TXEN_TEST ((__force upf_t) (1 << 15)) | ||
| 299 | #define UPF_MAGIC_MULTIPLIER ((__force upf_t) (1 << 16)) | 300 | #define UPF_MAGIC_MULTIPLIER ((__force upf_t) (1 << 16)) |
| 300 | #define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) | 301 | #define UPF_CONS_FLOW ((__force upf_t) (1 << 23)) |
| 301 | #define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) | 302 | #define UPF_SHARE_IRQ ((__force upf_t) (1 << 24)) |
diff --git a/include/linux/slab.h b/include/linux/slab.h index f96d13c281e8..24c5602bee99 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h | |||
| @@ -127,6 +127,7 @@ int kmem_ptr_validate(struct kmem_cache *cachep, const void *ptr); | |||
| 127 | void * __must_check __krealloc(const void *, size_t, gfp_t); | 127 | void * __must_check __krealloc(const void *, size_t, gfp_t); |
| 128 | void * __must_check krealloc(const void *, size_t, gfp_t); | 128 | void * __must_check krealloc(const void *, size_t, gfp_t); |
| 129 | void kfree(const void *); | 129 | void kfree(const void *); |
| 130 | void kzfree(const void *); | ||
| 130 | size_t ksize(const void *); | 131 | size_t ksize(const void *); |
| 131 | 132 | ||
| 132 | /* | 133 | /* |
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h index bf8de281b4ed..eed4254bd503 100644 --- a/include/linux/spi/spi_bitbang.h +++ b/include/linux/spi/spi_bitbang.h | |||
| @@ -83,6 +83,13 @@ extern int spi_bitbang_stop(struct spi_bitbang *spi); | |||
| 83 | * int getmiso(struct spi_device *); | 83 | * int getmiso(struct spi_device *); |
| 84 | * void spidelay(unsigned); | 84 | * void spidelay(unsigned); |
| 85 | * | 85 | * |
| 86 | * setsck()'s is_on parameter is a zero/nonzero boolean. | ||
| 87 | * | ||
| 88 | * setmosi()'s is_on parameter is a zero/nonzero boolean. | ||
| 89 | * | ||
| 90 | * getmiso() is required to return 0 or 1 only. Any other value is invalid | ||
| 91 | * and will result in improper operation. | ||
| 92 | * | ||
| 86 | * A non-inlined routine would call bitbang_txrx_*() routines. The | 93 | * A non-inlined routine would call bitbang_txrx_*() routines. The |
| 87 | * main loop could easily compile down to a handful of instructions, | 94 | * main loop could easily compile down to a handful of instructions, |
| 88 | * especially if the delay is a NOP (to run at peak speed). | 95 | * especially if the delay is a NOP (to run at peak speed). |
diff --git a/init/do_mounts.c b/init/do_mounts.c index 708105e163df..8d4ff5afc1d8 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c | |||
| @@ -370,10 +370,14 @@ void __init prepare_namespace(void) | |||
| 370 | ssleep(root_delay); | 370 | ssleep(root_delay); |
| 371 | } | 371 | } |
| 372 | 372 | ||
| 373 | /* wait for the known devices to complete their probing */ | 373 | /* |
| 374 | while (driver_probe_done() != 0) | 374 | * wait for the known devices to complete their probing |
| 375 | msleep(100); | 375 | * |
| 376 | async_synchronize_full(); | 376 | * Note: this is a potential source of long boot delays. |
| 377 | * For example, it is not atypical to wait 5 seconds here | ||
| 378 | * for the touchpad of a laptop to initialize. | ||
| 379 | */ | ||
| 380 | wait_for_device_probe(); | ||
| 377 | 381 | ||
| 378 | md_run_setup(); | 382 | md_run_setup(); |
| 379 | 383 | ||
| @@ -399,6 +403,7 @@ void __init prepare_namespace(void) | |||
| 399 | while (driver_probe_done() != 0 || | 403 | while (driver_probe_done() != 0 || |
| 400 | (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0) | 404 | (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0) |
| 401 | msleep(100); | 405 | msleep(100); |
| 406 | async_synchronize_full(); | ||
| 402 | } | 407 | } |
| 403 | 408 | ||
| 404 | is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; | 409 | is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR; |
diff --git a/init/do_mounts_md.c b/init/do_mounts_md.c index ff95e3192884..9bdddbcb3d6a 100644 --- a/init/do_mounts_md.c +++ b/init/do_mounts_md.c | |||
| @@ -281,8 +281,9 @@ static void __init autodetect_raid(void) | |||
| 281 | */ | 281 | */ |
| 282 | printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n"); | 282 | printk(KERN_INFO "md: Waiting for all devices to be available before autodetect\n"); |
| 283 | printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n"); | 283 | printk(KERN_INFO "md: If you don't use raid, use raid=noautodetect\n"); |
| 284 | while (driver_probe_done() < 0) | 284 | |
| 285 | msleep(100); | 285 | wait_for_device_probe(); |
| 286 | |||
| 286 | fd = sys_open("/dev/md0", 0, 0); | 287 | fd = sys_open("/dev/md0", 0, 0); |
| 287 | if (fd >= 0) { | 288 | if (fd >= 0) { |
| 288 | sys_ioctl(fd, RAID_AUTORUN, raid_autopart); | 289 | sys_ioctl(fd, RAID_AUTORUN, raid_autopart); |
diff --git a/kernel/kexec.c b/kernel/kexec.c index 8a6d7b08864e..483899578259 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c | |||
| @@ -1465,6 +1465,11 @@ int kernel_kexec(void) | |||
| 1465 | error = device_power_down(PMSG_FREEZE); | 1465 | error = device_power_down(PMSG_FREEZE); |
| 1466 | if (error) | 1466 | if (error) |
| 1467 | goto Enable_irqs; | 1467 | goto Enable_irqs; |
| 1468 | |||
| 1469 | /* Suspend system devices */ | ||
| 1470 | error = sysdev_suspend(PMSG_FREEZE); | ||
| 1471 | if (error) | ||
| 1472 | goto Power_up_devices; | ||
| 1468 | } else | 1473 | } else |
| 1469 | #endif | 1474 | #endif |
| 1470 | { | 1475 | { |
| @@ -1477,6 +1482,8 @@ int kernel_kexec(void) | |||
| 1477 | 1482 | ||
| 1478 | #ifdef CONFIG_KEXEC_JUMP | 1483 | #ifdef CONFIG_KEXEC_JUMP |
| 1479 | if (kexec_image->preserve_context) { | 1484 | if (kexec_image->preserve_context) { |
| 1485 | sysdev_resume(); | ||
| 1486 | Power_up_devices: | ||
| 1480 | device_power_up(PMSG_RESTORE); | 1487 | device_power_up(PMSG_RESTORE); |
| 1481 | Enable_irqs: | 1488 | Enable_irqs: |
| 1482 | local_irq_enable(); | 1489 | local_irq_enable(); |
diff --git a/kernel/power/console.c b/kernel/power/console.c index b8628be2a465..a3961b205de7 100644 --- a/kernel/power/console.c +++ b/kernel/power/console.c | |||
| @@ -78,6 +78,12 @@ void pm_restore_console(void) | |||
| 78 | } | 78 | } |
| 79 | set_console(orig_fgconsole); | 79 | set_console(orig_fgconsole); |
| 80 | release_console_sem(); | 80 | release_console_sem(); |
| 81 | |||
| 82 | if (vt_waitactive(orig_fgconsole)) { | ||
| 83 | pr_debug("Resume: Can't switch VCs."); | ||
| 84 | return; | ||
| 85 | } | ||
| 86 | |||
| 81 | kmsg_redirect = orig_kmsg; | 87 | kmsg_redirect = orig_kmsg; |
| 82 | } | 88 | } |
| 83 | #endif | 89 | #endif |
diff --git a/kernel/power/disk.c b/kernel/power/disk.c index 432ee575c9ee..4a4a206b1979 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c | |||
| @@ -227,6 +227,12 @@ static int create_image(int platform_mode) | |||
| 227 | "aborting hibernation\n"); | 227 | "aborting hibernation\n"); |
| 228 | goto Enable_irqs; | 228 | goto Enable_irqs; |
| 229 | } | 229 | } |
| 230 | sysdev_suspend(PMSG_FREEZE); | ||
| 231 | if (error) { | ||
| 232 | printk(KERN_ERR "PM: Some devices failed to power down, " | ||
| 233 | "aborting hibernation\n"); | ||
| 234 | goto Power_up_devices; | ||
| 235 | } | ||
| 230 | 236 | ||
| 231 | if (hibernation_test(TEST_CORE)) | 237 | if (hibernation_test(TEST_CORE)) |
| 232 | goto Power_up; | 238 | goto Power_up; |
| @@ -242,9 +248,11 @@ static int create_image(int platform_mode) | |||
| 242 | if (!in_suspend) | 248 | if (!in_suspend) |
| 243 | platform_leave(platform_mode); | 249 | platform_leave(platform_mode); |
| 244 | Power_up: | 250 | Power_up: |
| 251 | sysdev_resume(); | ||
| 245 | /* NOTE: device_power_up() is just a resume() for devices | 252 | /* NOTE: device_power_up() is just a resume() for devices |
| 246 | * that suspended with irqs off ... no overall powerup. | 253 | * that suspended with irqs off ... no overall powerup. |
| 247 | */ | 254 | */ |
| 255 | Power_up_devices: | ||
| 248 | device_power_up(in_suspend ? | 256 | device_power_up(in_suspend ? |
| 249 | (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE); | 257 | (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE); |
| 250 | Enable_irqs: | 258 | Enable_irqs: |
| @@ -335,6 +343,7 @@ static int resume_target_kernel(void) | |||
| 335 | "aborting resume\n"); | 343 | "aborting resume\n"); |
| 336 | goto Enable_irqs; | 344 | goto Enable_irqs; |
| 337 | } | 345 | } |
| 346 | sysdev_suspend(PMSG_QUIESCE); | ||
| 338 | /* We'll ignore saved state, but this gets preempt count (etc) right */ | 347 | /* We'll ignore saved state, but this gets preempt count (etc) right */ |
| 339 | save_processor_state(); | 348 | save_processor_state(); |
| 340 | error = restore_highmem(); | 349 | error = restore_highmem(); |
| @@ -357,6 +366,7 @@ static int resume_target_kernel(void) | |||
| 357 | swsusp_free(); | 366 | swsusp_free(); |
| 358 | restore_processor_state(); | 367 | restore_processor_state(); |
| 359 | touch_softlockup_watchdog(); | 368 | touch_softlockup_watchdog(); |
| 369 | sysdev_resume(); | ||
| 360 | device_power_up(PMSG_RECOVER); | 370 | device_power_up(PMSG_RECOVER); |
| 361 | Enable_irqs: | 371 | Enable_irqs: |
| 362 | local_irq_enable(); | 372 | local_irq_enable(); |
| @@ -440,6 +450,7 @@ int hibernation_platform_enter(void) | |||
| 440 | local_irq_disable(); | 450 | local_irq_disable(); |
| 441 | error = device_power_down(PMSG_HIBERNATE); | 451 | error = device_power_down(PMSG_HIBERNATE); |
| 442 | if (!error) { | 452 | if (!error) { |
| 453 | sysdev_suspend(PMSG_HIBERNATE); | ||
| 443 | hibernation_ops->enter(); | 454 | hibernation_ops->enter(); |
| 444 | /* We should never get here */ | 455 | /* We should never get here */ |
| 445 | while (1); | 456 | while (1); |
| @@ -595,6 +606,12 @@ static int software_resume(void) | |||
| 595 | unsigned int flags; | 606 | unsigned int flags; |
| 596 | 607 | ||
| 597 | /* | 608 | /* |
| 609 | * If the user said "noresume".. bail out early. | ||
| 610 | */ | ||
| 611 | if (noresume) | ||
| 612 | return 0; | ||
| 613 | |||
| 614 | /* | ||
| 598 | * name_to_dev_t() below takes a sysfs buffer mutex when sysfs | 615 | * name_to_dev_t() below takes a sysfs buffer mutex when sysfs |
| 599 | * is configured into the kernel. Since the regular hibernate | 616 | * is configured into the kernel. Since the regular hibernate |
| 600 | * trigger path is via sysfs which takes a buffer mutex before | 617 | * trigger path is via sysfs which takes a buffer mutex before |
| @@ -610,6 +627,11 @@ static int software_resume(void) | |||
| 610 | mutex_unlock(&pm_mutex); | 627 | mutex_unlock(&pm_mutex); |
| 611 | return -ENOENT; | 628 | return -ENOENT; |
| 612 | } | 629 | } |
| 630 | /* | ||
| 631 | * Some device discovery might still be in progress; we need | ||
| 632 | * to wait for this to finish. | ||
| 633 | */ | ||
| 634 | wait_for_device_probe(); | ||
| 613 | swsusp_resume_device = name_to_dev_t(resume_file); | 635 | swsusp_resume_device = name_to_dev_t(resume_file); |
| 614 | pr_debug("PM: Resume from partition %s\n", resume_file); | 636 | pr_debug("PM: Resume from partition %s\n", resume_file); |
| 615 | } else { | 637 | } else { |
diff --git a/kernel/power/main.c b/kernel/power/main.c index b4d219016b6c..c9632f841f64 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
| @@ -298,8 +298,12 @@ static int suspend_enter(suspend_state_t state) | |||
| 298 | goto Done; | 298 | goto Done; |
| 299 | } | 299 | } |
| 300 | 300 | ||
| 301 | if (!suspend_test(TEST_CORE)) | 301 | error = sysdev_suspend(PMSG_SUSPEND); |
| 302 | error = suspend_ops->enter(state); | 302 | if (!error) { |
| 303 | if (!suspend_test(TEST_CORE)) | ||
| 304 | error = suspend_ops->enter(state); | ||
| 305 | sysdev_resume(); | ||
| 306 | } | ||
| 303 | 307 | ||
| 304 | device_power_up(PMSG_RESUME); | 308 | device_power_up(PMSG_RESUME); |
| 305 | Done: | 309 | Done: |
diff --git a/kernel/power/user.c b/kernel/power/user.c index 005b93d839ba..6c85359364f2 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c | |||
| @@ -95,15 +95,15 @@ static int snapshot_open(struct inode *inode, struct file *filp) | |||
| 95 | data->swap = swsusp_resume_device ? | 95 | data->swap = swsusp_resume_device ? |
| 96 | swap_type_of(swsusp_resume_device, 0, NULL) : -1; | 96 | swap_type_of(swsusp_resume_device, 0, NULL) : -1; |
| 97 | data->mode = O_RDONLY; | 97 | data->mode = O_RDONLY; |
| 98 | error = pm_notifier_call_chain(PM_RESTORE_PREPARE); | 98 | error = pm_notifier_call_chain(PM_HIBERNATION_PREPARE); |
| 99 | if (error) | 99 | if (error) |
| 100 | pm_notifier_call_chain(PM_POST_RESTORE); | 100 | pm_notifier_call_chain(PM_POST_HIBERNATION); |
| 101 | } else { | 101 | } else { |
| 102 | data->swap = -1; | 102 | data->swap = -1; |
| 103 | data->mode = O_WRONLY; | 103 | data->mode = O_WRONLY; |
| 104 | error = pm_notifier_call_chain(PM_HIBERNATION_PREPARE); | 104 | error = pm_notifier_call_chain(PM_RESTORE_PREPARE); |
| 105 | if (error) | 105 | if (error) |
| 106 | pm_notifier_call_chain(PM_POST_HIBERNATION); | 106 | pm_notifier_call_chain(PM_POST_RESTORE); |
| 107 | } | 107 | } |
| 108 | if (error) | 108 | if (error) |
| 109 | atomic_inc(&snapshot_device_available); | 109 | atomic_inc(&snapshot_device_available); |
diff --git a/kernel/printk.c b/kernel/printk.c index 69188f226a93..e3602d0755b0 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
| @@ -73,7 +73,6 @@ EXPORT_SYMBOL(oops_in_progress); | |||
| 73 | * driver system. | 73 | * driver system. |
| 74 | */ | 74 | */ |
| 75 | static DECLARE_MUTEX(console_sem); | 75 | static DECLARE_MUTEX(console_sem); |
| 76 | static DECLARE_MUTEX(secondary_console_sem); | ||
| 77 | struct console *console_drivers; | 76 | struct console *console_drivers; |
| 78 | EXPORT_SYMBOL_GPL(console_drivers); | 77 | EXPORT_SYMBOL_GPL(console_drivers); |
| 79 | 78 | ||
| @@ -891,12 +890,14 @@ void suspend_console(void) | |||
| 891 | printk("Suspending console(s) (use no_console_suspend to debug)\n"); | 890 | printk("Suspending console(s) (use no_console_suspend to debug)\n"); |
| 892 | acquire_console_sem(); | 891 | acquire_console_sem(); |
| 893 | console_suspended = 1; | 892 | console_suspended = 1; |
| 893 | up(&console_sem); | ||
| 894 | } | 894 | } |
| 895 | 895 | ||
| 896 | void resume_console(void) | 896 | void resume_console(void) |
| 897 | { | 897 | { |
| 898 | if (!console_suspend_enabled) | 898 | if (!console_suspend_enabled) |
| 899 | return; | 899 | return; |
| 900 | down(&console_sem); | ||
| 900 | console_suspended = 0; | 901 | console_suspended = 0; |
| 901 | release_console_sem(); | 902 | release_console_sem(); |
| 902 | } | 903 | } |
| @@ -912,11 +913,9 @@ void resume_console(void) | |||
| 912 | void acquire_console_sem(void) | 913 | void acquire_console_sem(void) |
| 913 | { | 914 | { |
| 914 | BUG_ON(in_interrupt()); | 915 | BUG_ON(in_interrupt()); |
| 915 | if (console_suspended) { | ||
| 916 | down(&secondary_console_sem); | ||
| 917 | return; | ||
| 918 | } | ||
| 919 | down(&console_sem); | 916 | down(&console_sem); |
| 917 | if (console_suspended) | ||
| 918 | return; | ||
| 920 | console_locked = 1; | 919 | console_locked = 1; |
| 921 | console_may_schedule = 1; | 920 | console_may_schedule = 1; |
| 922 | } | 921 | } |
| @@ -926,6 +925,10 @@ int try_acquire_console_sem(void) | |||
| 926 | { | 925 | { |
| 927 | if (down_trylock(&console_sem)) | 926 | if (down_trylock(&console_sem)) |
| 928 | return -1; | 927 | return -1; |
| 928 | if (console_suspended) { | ||
| 929 | up(&console_sem); | ||
| 930 | return -1; | ||
| 931 | } | ||
| 929 | console_locked = 1; | 932 | console_locked = 1; |
| 930 | console_may_schedule = 0; | 933 | console_may_schedule = 0; |
| 931 | return 0; | 934 | return 0; |
| @@ -979,7 +982,7 @@ void release_console_sem(void) | |||
| 979 | unsigned wake_klogd = 0; | 982 | unsigned wake_klogd = 0; |
| 980 | 983 | ||
| 981 | if (console_suspended) { | 984 | if (console_suspended) { |
| 982 | up(&secondary_console_sem); | 985 | up(&console_sem); |
| 983 | return; | 986 | return; |
| 984 | } | 987 | } |
| 985 | 988 | ||
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 29044f500269..1bcf9cd4baa0 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
| @@ -838,7 +838,7 @@ config FIREWIRE_OHCI_REMOTE_DMA | |||
| 838 | 838 | ||
| 839 | If unsure, say N. | 839 | If unsure, say N. |
| 840 | 840 | ||
| 841 | menuconfig BUILD_DOCSRC | 841 | config BUILD_DOCSRC |
| 842 | bool "Build targets in Documentation/ tree" | 842 | bool "Build targets in Documentation/ tree" |
| 843 | depends on HEADERS_CHECK | 843 | depends on HEADERS_CHECK |
| 844 | help | 844 | help |
diff --git a/mm/swapfile.c b/mm/swapfile.c index 7e6304dfafab..312fafe0ab6e 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
| @@ -635,7 +635,7 @@ int swap_type_of(dev_t device, sector_t offset, struct block_device **bdev_p) | |||
| 635 | 635 | ||
| 636 | if (!bdev) { | 636 | if (!bdev) { |
| 637 | if (bdev_p) | 637 | if (bdev_p) |
| 638 | *bdev_p = sis->bdev; | 638 | *bdev_p = bdget(sis->bdev->bd_dev); |
| 639 | 639 | ||
| 640 | spin_unlock(&swap_lock); | 640 | spin_unlock(&swap_lock); |
| 641 | return i; | 641 | return i; |
| @@ -647,7 +647,7 @@ int swap_type_of(dev_t device, sector_t offset, struct block_device **bdev_p) | |||
| 647 | struct swap_extent, list); | 647 | struct swap_extent, list); |
| 648 | if (se->start_block == offset) { | 648 | if (se->start_block == offset) { |
| 649 | if (bdev_p) | 649 | if (bdev_p) |
| 650 | *bdev_p = sis->bdev; | 650 | *bdev_p = bdget(sis->bdev->bd_dev); |
| 651 | 651 | ||
| 652 | spin_unlock(&swap_lock); | 652 | spin_unlock(&swap_lock); |
| 653 | bdput(bdev); | 653 | bdput(bdev); |
| @@ -129,6 +129,26 @@ void *krealloc(const void *p, size_t new_size, gfp_t flags) | |||
| 129 | } | 129 | } |
| 130 | EXPORT_SYMBOL(krealloc); | 130 | EXPORT_SYMBOL(krealloc); |
| 131 | 131 | ||
| 132 | /** | ||
| 133 | * kzfree - like kfree but zero memory | ||
| 134 | * @p: object to free memory of | ||
| 135 | * | ||
| 136 | * The memory of the object @p points to is zeroed before freed. | ||
| 137 | * If @p is %NULL, kzfree() does nothing. | ||
| 138 | */ | ||
| 139 | void kzfree(const void *p) | ||
| 140 | { | ||
| 141 | size_t ks; | ||
| 142 | void *mem = (void *)p; | ||
| 143 | |||
| 144 | if (unlikely(ZERO_OR_NULL_PTR(mem))) | ||
| 145 | return; | ||
| 146 | ks = ksize(mem); | ||
| 147 | memset(mem, 0, ks); | ||
| 148 | kfree(mem); | ||
| 149 | } | ||
| 150 | EXPORT_SYMBOL(kzfree); | ||
| 151 | |||
| 132 | /* | 152 | /* |
| 133 | * strndup_user - duplicate an existing string from user space | 153 | * strndup_user - duplicate an existing string from user space |
| 134 | * @s: The string to duplicate | 154 | * @s: The string to duplicate |
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 4dd2636d0b92..903cad46e796 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
| @@ -1012,6 +1012,8 @@ void __init vmalloc_init(void) | |||
| 1012 | void unmap_kernel_range(unsigned long addr, unsigned long size) | 1012 | void unmap_kernel_range(unsigned long addr, unsigned long size) |
| 1013 | { | 1013 | { |
| 1014 | unsigned long end = addr + size; | 1014 | unsigned long end = addr + size; |
| 1015 | |||
| 1016 | flush_cache_vunmap(addr, end); | ||
| 1015 | vunmap_page_range(addr, end); | 1017 | vunmap_page_range(addr, end); |
| 1016 | flush_tlb_kernel_range(addr, end); | 1018 | flush_tlb_kernel_range(addr, end); |
| 1017 | } | 1019 | } |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 9a27c44aa327..6177e3bcd66b 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
| @@ -2057,31 +2057,31 @@ static unsigned long shrink_all_zones(unsigned long nr_pages, int prio, | |||
| 2057 | int pass, struct scan_control *sc) | 2057 | int pass, struct scan_control *sc) |
| 2058 | { | 2058 | { |
| 2059 | struct zone *zone; | 2059 | struct zone *zone; |
| 2060 | unsigned long nr_to_scan, ret = 0; | 2060 | unsigned long ret = 0; |
| 2061 | enum lru_list l; | ||
| 2062 | 2061 | ||
| 2063 | for_each_zone(zone) { | 2062 | for_each_zone(zone) { |
| 2063 | enum lru_list l; | ||
| 2064 | 2064 | ||
| 2065 | if (!populated_zone(zone)) | 2065 | if (!populated_zone(zone)) |
| 2066 | continue; | 2066 | continue; |
| 2067 | |||
| 2068 | if (zone_is_all_unreclaimable(zone) && prio != DEF_PRIORITY) | 2067 | if (zone_is_all_unreclaimable(zone) && prio != DEF_PRIORITY) |
| 2069 | continue; | 2068 | continue; |
| 2070 | 2069 | ||
| 2071 | for_each_evictable_lru(l) { | 2070 | for_each_evictable_lru(l) { |
| 2071 | enum zone_stat_item ls = NR_LRU_BASE + l; | ||
| 2072 | unsigned long lru_pages = zone_page_state(zone, ls); | ||
| 2073 | |||
| 2072 | /* For pass = 0, we don't shrink the active list */ | 2074 | /* For pass = 0, we don't shrink the active list */ |
| 2073 | if (pass == 0 && | 2075 | if (pass == 0 && (l == LRU_ACTIVE_ANON || |
| 2074 | (l == LRU_ACTIVE || l == LRU_ACTIVE_FILE)) | 2076 | l == LRU_ACTIVE_FILE)) |
| 2075 | continue; | 2077 | continue; |
| 2076 | 2078 | ||
| 2077 | zone->lru[l].nr_scan += | 2079 | zone->lru[l].nr_scan += (lru_pages >> prio) + 1; |
| 2078 | (zone_page_state(zone, NR_LRU_BASE + l) | ||
| 2079 | >> prio) + 1; | ||
| 2080 | if (zone->lru[l].nr_scan >= nr_pages || pass > 3) { | 2080 | if (zone->lru[l].nr_scan >= nr_pages || pass > 3) { |
| 2081 | unsigned long nr_to_scan; | ||
| 2082 | |||
| 2081 | zone->lru[l].nr_scan = 0; | 2083 | zone->lru[l].nr_scan = 0; |
| 2082 | nr_to_scan = min(nr_pages, | 2084 | nr_to_scan = min(nr_pages, lru_pages); |
| 2083 | zone_page_state(zone, | ||
| 2084 | NR_LRU_BASE + l)); | ||
| 2085 | ret += shrink_list(l, nr_to_scan, zone, | 2085 | ret += shrink_list(l, nr_to_scan, zone, |
| 2086 | sc, prio); | 2086 | sc, prio); |
| 2087 | if (ret >= nr_pages) | 2087 | if (ret >= nr_pages) |
| @@ -2089,7 +2089,6 @@ static unsigned long shrink_all_zones(unsigned long nr_pages, int prio, | |||
| 2089 | } | 2089 | } |
| 2090 | } | 2090 | } |
| 2091 | } | 2091 | } |
| 2092 | |||
| 2093 | return ret; | 2092 | return ret; |
| 2094 | } | 2093 | } |
| 2095 | 2094 | ||
| @@ -2112,7 +2111,6 @@ unsigned long shrink_all_memory(unsigned long nr_pages) | |||
| 2112 | .may_swap = 0, | 2111 | .may_swap = 0, |
| 2113 | .swap_cluster_max = nr_pages, | 2112 | .swap_cluster_max = nr_pages, |
| 2114 | .may_writepage = 1, | 2113 | .may_writepage = 1, |
| 2115 | .swappiness = vm_swappiness, | ||
| 2116 | .isolate_pages = isolate_pages_global, | 2114 | .isolate_pages = isolate_pages_global, |
| 2117 | }; | 2115 | }; |
| 2118 | 2116 | ||
| @@ -2146,10 +2144,8 @@ unsigned long shrink_all_memory(unsigned long nr_pages) | |||
| 2146 | int prio; | 2144 | int prio; |
| 2147 | 2145 | ||
| 2148 | /* Force reclaiming mapped pages in the passes #3 and #4 */ | 2146 | /* Force reclaiming mapped pages in the passes #3 and #4 */ |
| 2149 | if (pass > 2) { | 2147 | if (pass > 2) |
| 2150 | sc.may_swap = 1; | 2148 | sc.may_swap = 1; |
| 2151 | sc.swappiness = 100; | ||
| 2152 | } | ||
| 2153 | 2149 | ||
| 2154 | for (prio = DEF_PRIORITY; prio >= 0; prio--) { | 2150 | for (prio = DEF_PRIORITY; prio >= 0; prio--) { |
| 2155 | unsigned long nr_to_scan = nr_pages - ret; | 2151 | unsigned long nr_to_scan = nr_pages - ret; |
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c index 6bb2635b5ded..7bc992976d29 100644 --- a/net/ipv4/cipso_ipv4.c +++ b/net/ipv4/cipso_ipv4.c | |||
| @@ -3,11 +3,16 @@ | |||
| 3 | * | 3 | * |
| 4 | * This is an implementation of the CIPSO 2.2 protocol as specified in | 4 | * This is an implementation of the CIPSO 2.2 protocol as specified in |
| 5 | * draft-ietf-cipso-ipsecurity-01.txt with additional tag types as found in | 5 | * draft-ietf-cipso-ipsecurity-01.txt with additional tag types as found in |
| 6 | * FIPS-188, copies of both documents can be found in the Documentation | 6 | * FIPS-188. While CIPSO never became a full IETF RFC standard many vendors |
| 7 | * directory. While CIPSO never became a full IETF RFC standard many vendors | ||
| 8 | * have chosen to adopt the protocol and over the years it has become a | 7 | * have chosen to adopt the protocol and over the years it has become a |
| 9 | * de-facto standard for labeled networking. | 8 | * de-facto standard for labeled networking. |
| 10 | * | 9 | * |
| 10 | * The CIPSO draft specification can be found in the kernel's Documentation | ||
| 11 | * directory as well as the following URL: | ||
| 12 | * http://netlabel.sourceforge.net/files/draft-ietf-cipso-ipsecurity-01.txt | ||
| 13 | * The FIPS-188 specification can be found at the following URL: | ||
| 14 | * http://www.itl.nist.gov/fipspubs/fip188.htm | ||
| 15 | * | ||
| 11 | * Author: Paul Moore <paul.moore@hp.com> | 16 | * Author: Paul Moore <paul.moore@hp.com> |
| 12 | * | 17 | * |
| 13 | */ | 18 | */ |
diff --git a/security/selinux/netlabel.c b/security/selinux/netlabel.c index f58701a7b728..3f4b26647386 100644 --- a/security/selinux/netlabel.c +++ b/security/selinux/netlabel.c | |||
| @@ -490,8 +490,10 @@ int selinux_netlbl_socket_setsockopt(struct socket *sock, | |||
| 490 | lock_sock(sk); | 490 | lock_sock(sk); |
| 491 | rc = netlbl_sock_getattr(sk, &secattr); | 491 | rc = netlbl_sock_getattr(sk, &secattr); |
| 492 | release_sock(sk); | 492 | release_sock(sk); |
| 493 | if (rc == 0 && secattr.flags != NETLBL_SECATTR_NONE) | 493 | if (rc == 0) |
| 494 | rc = -EACCES; | 494 | rc = -EACCES; |
| 495 | else if (rc == -ENOMSG) | ||
| 496 | rc = 0; | ||
| 495 | netlbl_secattr_destroy(&secattr); | 497 | netlbl_secattr_destroy(&secattr); |
| 496 | } | 498 | } |
| 497 | 499 | ||
diff --git a/sound/oss/dmasound/dmasound_atari.c b/sound/oss/dmasound/dmasound_atari.c index 57d9f154c88b..38931f2f6967 100644 --- a/sound/oss/dmasound/dmasound_atari.c +++ b/sound/oss/dmasound/dmasound_atari.c | |||
| @@ -847,23 +847,23 @@ static int __init AtaIrqInit(void) | |||
| 847 | of events. So all we need to keep the music playing is | 847 | of events. So all we need to keep the music playing is |
| 848 | to provide the sound hardware with new data upon | 848 | to provide the sound hardware with new data upon |
| 849 | an interrupt from timer A. */ | 849 | an interrupt from timer A. */ |
| 850 | mfp.tim_ct_a = 0; /* ++roman: Stop timer before programming! */ | 850 | st_mfp.tim_ct_a = 0; /* ++roman: Stop timer before programming! */ |
| 851 | mfp.tim_dt_a = 1; /* Cause interrupt after first event. */ | 851 | st_mfp.tim_dt_a = 1; /* Cause interrupt after first event. */ |
| 852 | mfp.tim_ct_a = 8; /* Turn on event counting. */ | 852 | st_mfp.tim_ct_a = 8; /* Turn on event counting. */ |
| 853 | /* Register interrupt handler. */ | 853 | /* Register interrupt handler. */ |
| 854 | if (request_irq(IRQ_MFP_TIMA, AtaInterrupt, IRQ_TYPE_SLOW, "DMA sound", | 854 | if (request_irq(IRQ_MFP_TIMA, AtaInterrupt, IRQ_TYPE_SLOW, "DMA sound", |
| 855 | AtaInterrupt)) | 855 | AtaInterrupt)) |
| 856 | return 0; | 856 | return 0; |
| 857 | mfp.int_en_a |= 0x20; /* Turn interrupt on. */ | 857 | st_mfp.int_en_a |= 0x20; /* Turn interrupt on. */ |
| 858 | mfp.int_mk_a |= 0x20; | 858 | st_mfp.int_mk_a |= 0x20; |
| 859 | return 1; | 859 | return 1; |
| 860 | } | 860 | } |
| 861 | 861 | ||
| 862 | #ifdef MODULE | 862 | #ifdef MODULE |
| 863 | static void AtaIrqCleanUp(void) | 863 | static void AtaIrqCleanUp(void) |
| 864 | { | 864 | { |
| 865 | mfp.tim_ct_a = 0; /* stop timer */ | 865 | st_mfp.tim_ct_a = 0; /* stop timer */ |
| 866 | mfp.int_en_a &= ~0x20; /* turn interrupt off */ | 866 | st_mfp.int_en_a &= ~0x20; /* turn interrupt off */ |
| 867 | free_irq(IRQ_MFP_TIMA, AtaInterrupt); | 867 | free_irq(IRQ_MFP_TIMA, AtaInterrupt); |
| 868 | } | 868 | } |
| 869 | #endif /* MODULE */ | 869 | #endif /* MODULE */ |
| @@ -1599,7 +1599,7 @@ static int __init dmasound_atari_init(void) | |||
| 1599 | is_falcon = 0; | 1599 | is_falcon = 0; |
| 1600 | } else | 1600 | } else |
| 1601 | return -ENODEV; | 1601 | return -ENODEV; |
| 1602 | if ((mfp.int_en_a & mfp.int_mk_a & 0x20) == 0) | 1602 | if ((st_mfp.int_en_a & st_mfp.int_mk_a & 0x20) == 0) |
| 1603 | return dmasound_init(); | 1603 | return dmasound_init(); |
| 1604 | else { | 1604 | else { |
| 1605 | printk("DMA sound driver: Timer A interrupt already in use\n"); | 1605 | printk("DMA sound driver: Timer A interrupt already in use\n"); |
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c index 482fb0304ca9..4ae51dcb81af 100644 --- a/sound/pci/hda/hda_hwdep.c +++ b/sound/pci/hda/hda_hwdep.c | |||
| @@ -277,18 +277,19 @@ static ssize_t init_verbs_store(struct device *dev, | |||
| 277 | { | 277 | { |
| 278 | struct snd_hwdep *hwdep = dev_get_drvdata(dev); | 278 | struct snd_hwdep *hwdep = dev_get_drvdata(dev); |
| 279 | struct hda_codec *codec = hwdep->private_data; | 279 | struct hda_codec *codec = hwdep->private_data; |
| 280 | char *p; | 280 | struct hda_verb *v; |
| 281 | struct hda_verb verb, *v; | 281 | int nid, verb, param; |
| 282 | 282 | ||
| 283 | verb.nid = simple_strtoul(buf, &p, 0); | 283 | if (sscanf(buf, "%i %i %i", &nid, &verb, ¶m) != 3) |
| 284 | verb.verb = simple_strtoul(p, &p, 0); | 284 | return -EINVAL; |
| 285 | verb.param = simple_strtoul(p, &p, 0); | 285 | if (!nid || !verb) |
| 286 | if (!verb.nid || !verb.verb || !verb.param) | ||
| 287 | return -EINVAL; | 286 | return -EINVAL; |
| 288 | v = snd_array_new(&codec->init_verbs); | 287 | v = snd_array_new(&codec->init_verbs); |
| 289 | if (!v) | 288 | if (!v) |
| 290 | return -ENOMEM; | 289 | return -ENOMEM; |
| 291 | *v = verb; | 290 | v->nid = nid; |
| 291 | v->verb = verb; | ||
| 292 | v->param = param; | ||
| 292 | return count; | 293 | return count; |
| 293 | } | 294 | } |
| 294 | 295 | ||
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index ed8fcbd60003..a680be0d4534 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
| @@ -7017,6 +7017,7 @@ static int patch_alc882(struct hda_codec *codec) | |||
| 7017 | case 0x106b3e00: /* iMac 24 Aluminium */ | 7017 | case 0x106b3e00: /* iMac 24 Aluminium */ |
| 7018 | board_config = ALC885_IMAC24; | 7018 | board_config = ALC885_IMAC24; |
| 7019 | break; | 7019 | break; |
| 7020 | case 0x106b00a0: /* MacBookPro3,1 - Another revision */ | ||
| 7020 | case 0x106b00a1: /* Macbook (might be wrong - PCI SSID?) */ | 7021 | case 0x106b00a1: /* Macbook (might be wrong - PCI SSID?) */ |
| 7021 | case 0x106b00a4: /* MacbookPro4,1 */ | 7022 | case 0x106b00a4: /* MacbookPro4,1 */ |
| 7022 | case 0x106b2c00: /* Macbook Pro rev3 */ | 7023 | case 0x106b2c00: /* Macbook Pro rev3 */ |
| @@ -8469,6 +8470,8 @@ static struct snd_pci_quirk alc883_cfg_tbl[] = { | |||
| 8469 | ALC888_ACER_ASPIRE_4930G), | 8470 | ALC888_ACER_ASPIRE_4930G), |
| 8470 | SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G", | 8471 | SND_PCI_QUIRK(0x1025, 0x015e, "Acer Aspire 6930G", |
| 8471 | ALC888_ACER_ASPIRE_4930G), | 8472 | ALC888_ACER_ASPIRE_4930G), |
| 8473 | SND_PCI_QUIRK(0x1025, 0x0166, "Acer Aspire 6530G", | ||
| 8474 | ALC888_ACER_ASPIRE_4930G), | ||
| 8472 | SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER), /* default Acer */ | 8475 | SND_PCI_QUIRK(0x1025, 0, "Acer laptop", ALC883_ACER), /* default Acer */ |
| 8473 | SND_PCI_QUIRK(0x1028, 0x020d, "Dell Inspiron 530", ALC888_6ST_DELL), | 8476 | SND_PCI_QUIRK(0x1028, 0x020d, "Dell Inspiron 530", ALC888_6ST_DELL), |
| 8474 | SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavillion", ALC883_6ST_DIG), | 8477 | SND_PCI_QUIRK(0x103c, 0x2a3d, "HP Pavillion", ALC883_6ST_DIG), |
