Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'x86/numa' into x86-mm

Merge reason: Pick up x86-32 remap allocator cleanup changes - 14
commits, 3fe14ab541^..993ba1585c.

3fe14ab541: x86-32, numa: Fix failure condition check in alloc_remap()
993ba1585c: x86-32, numa: Update remap allocator comments

Scheduled NUMA init 32/64bit unification changes depend on them.

Signed-off-by: Tejun Heo <tj@kernel.org>

Tejun Heo aff36486 c7a7b814

+1377 -1014
+2 -2
Documentation/00-INDEX
··· 206 206 - directory with laptop related info and laptop driver documentation. 207 207 ldm.txt 208 208 - a brief description of LDM (Windows Dynamic Disks). 209 - leds-class.txt 210 - - documents LED handling under Linux. 209 + leds/ 210 + - directory with info about LED handling under Linux. 211 211 local_ops.txt 212 212 - semantics and behavior of local atomic operations. 213 213 lockdep-design.txt
+1 -1
Documentation/ABI/testing/sysfs-driver-hid-roccat-kone
··· 40 40 Date: March 2010 41 41 Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 42 42 Description: The mouse can store 5 profiles which can be switched by the 43 - press of a button. A profile holds informations like button 43 + press of a button. A profile holds information like button 44 44 mappings, sensitivity, the colors of the 5 leds and light 45 45 effects. 46 46 When read, these files return the respective profile. The
+4 -4
Documentation/ABI/testing/sysfs-driver-hid-roccat-koneplus
··· 33 33 Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 34 34 Description: The mouse can store 5 profiles which can be switched by the 35 35 press of a button. A profile is split in settings and buttons. 36 - profile_buttons holds informations about button layout. 36 + profile_buttons holds information about button layout. 37 37 When written, this file lets one write the respective profile 38 38 buttons back to the mouse. The data has to be 77 bytes long. 39 39 The mouse will reject invalid data. ··· 47 47 Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 48 48 Description: The mouse can store 5 profiles which can be switched by the 49 49 press of a button. A profile is split in settings and buttons. 50 - profile_buttons holds informations about button layout. 50 + profile_buttons holds information about button layout. 51 51 When read, these files return the respective profile buttons. 52 52 The returned data is 77 bytes in size. 53 53 This file is readonly. ··· 58 58 Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 59 59 Description: The mouse can store 5 profiles which can be switched by the 60 60 press of a button. A profile is split in settings and buttons. 61 - profile_settings holds informations like resolution, sensitivity 61 + profile_settings holds information like resolution, sensitivity 62 62 and light effects. 63 63 When written, this file lets one write the respective profile 64 64 settings back to the mouse. The data has to be 43 bytes long. ··· 73 73 Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 74 74 Description: The mouse can store 5 profiles which can be switched by the 75 75 press of a button. A profile is split in settings and buttons. 76 - profile_settings holds informations like resolution, sensitivity 76 + profile_settings holds information like resolution, sensitivity 77 77 and light effects. 78 78 When read, these files return the respective profile settings. 79 79 The returned data is 43 bytes in size.
+4 -4
Documentation/ABI/testing/sysfs-driver-hid-roccat-kovaplus
··· 52 52 Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 53 53 Description: The mouse can store 5 profiles which can be switched by the 54 54 press of a button. A profile is split in settings and buttons. 55 - profile_buttons holds informations about button layout. 55 + profile_buttons holds information about button layout. 56 56 When written, this file lets one write the respective profile 57 57 buttons back to the mouse. The data has to be 23 bytes long. 58 58 The mouse will reject invalid data. ··· 66 66 Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 67 67 Description: The mouse can store 5 profiles which can be switched by the 68 68 press of a button. A profile is split in settings and buttons. 69 - profile_buttons holds informations about button layout. 69 + profile_buttons holds information about button layout. 70 70 When read, these files return the respective profile buttons. 71 71 The returned data is 23 bytes in size. 72 72 This file is readonly. ··· 77 77 Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 78 78 Description: The mouse can store 5 profiles which can be switched by the 79 79 press of a button. A profile is split in settings and buttons. 80 - profile_settings holds informations like resolution, sensitivity 80 + profile_settings holds information like resolution, sensitivity 81 81 and light effects. 82 82 When written, this file lets one write the respective profile 83 83 settings back to the mouse. The data has to be 16 bytes long. ··· 92 92 Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 93 93 Description: The mouse can store 5 profiles which can be switched by the 94 94 press of a button. A profile is split in settings and buttons. 95 - profile_settings holds informations like resolution, sensitivity 95 + profile_settings holds information like resolution, sensitivity 96 96 and light effects. 97 97 When read, these files return the respective profile settings. 98 98 The returned data is 16 bytes in size.
+4 -4
Documentation/ABI/testing/sysfs-driver-hid-roccat-pyra
··· 39 39 Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 40 40 Description: The mouse can store 5 profiles which can be switched by the 41 41 press of a button. A profile is split in settings and buttons. 42 - profile_settings holds informations like resolution, sensitivity 42 + profile_settings holds information like resolution, sensitivity 43 43 and light effects. 44 44 When written, this file lets one write the respective profile 45 45 settings back to the mouse. The data has to be 13 bytes long. ··· 54 54 Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 55 55 Description: The mouse can store 5 profiles which can be switched by the 56 56 press of a button. A profile is split in settings and buttons. 57 - profile_settings holds informations like resolution, sensitivity 57 + profile_settings holds information like resolution, sensitivity 58 58 and light effects. 59 59 When read, these files return the respective profile settings. 60 60 The returned data is 13 bytes in size. ··· 66 66 Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 67 67 Description: The mouse can store 5 profiles which can be switched by the 68 68 press of a button. A profile is split in settings and buttons. 69 - profile_buttons holds informations about button layout. 69 + profile_buttons holds information about button layout. 70 70 When written, this file lets one write the respective profile 71 71 buttons back to the mouse. The data has to be 19 bytes long. 72 72 The mouse will reject invalid data. ··· 80 80 Contact: Stefan Achatz <erazor_de@users.sourceforge.net> 81 81 Description: The mouse can store 5 profiles which can be switched by the 82 82 press of a button. A profile is split in settings and buttons. 83 - profile_buttons holds informations about button layout. 83 + profile_buttons holds information about button layout. 84 84 When read, these files return the respective profile buttons. 85 85 The returned data is 19 bytes in size. 86 86 This file is readonly.
+1 -1
Documentation/ABI/testing/sysfs-platform-asus-laptop
··· 27 27 Contact: "Corentin Chary" <corentincj@iksaif.net> 28 28 Description: 29 29 Some models like the W1N have a LED display that can be 30 - used to display several informations. 30 + used to display several items of information. 31 31 To control the LED display, use the following : 32 32 echo 0x0T000DDD > /sys/devices/platform/asus_laptop/ 33 33 where T control the 3 letters display, and DDD the 3 digits display.
+6 -6
Documentation/cgroups/cgroups.txt
··· 110 110 tasks etc. The resource planning for this server could be along the 111 111 following lines: 112 112 113 - CPU : Top cpuset 113 + CPU : "Top cpuset" 114 114 / \ 115 115 CPUSet1 CPUSet2 116 - | | 117 - (Profs) (Students) 116 + | | 117 + (Professors) (Students) 118 118 119 119 In addition (system tasks) are attached to topcpuset (so 120 120 that they can run anywhere) with a limit of 20% 121 121 122 - Memory : Professors (50%), students (30%), system (20%) 122 + Memory : Professors (50%), Students (30%), system (20%) 123 123 124 - Disk : Prof (50%), students (30%), system (20%) 124 + Disk : Professors (50%), Students (30%), system (20%) 125 125 126 126 Network : WWW browsing (20%), Network File System (60%), others (20%) 127 127 / \ 128 - Prof (15%) students (5%) 128 + Professors (15%) students (5%) 129 129 130 130 Browsers like Firefox/Lynx go into the WWW network class, while (k)nfsd go 131 131 into NFS network class.
+3 -3
Documentation/devicetree/booting-without-of.txt
··· 138 138 section III, but, for example, the kernel does not require you to 139 139 create a node for every PCI device in the system. It is a requirement 140 140 to have a node for PCI host bridges in order to provide interrupt 141 - routing informations and memory/IO ranges, among others. It is also 141 + routing information and memory/IO ranges, among others. It is also 142 142 recommended to define nodes for on chip devices and other buses that 143 143 don't specifically fit in an existing OF specification. This creates a 144 144 great flexibility in the way the kernel can then probe those and match ··· 385 385 among others, by kexec. If you are on an SMP system, this value 386 386 should match the content of the "reg" property of the CPU node in 387 387 the device-tree corresponding to the CPU calling the kernel entry 388 - point (see further chapters for more informations on the required 388 + point (see further chapters for more information on the required 389 389 device-tree contents) 390 390 391 391 - size_dt_strings ··· 553 553 554 554 This tree is almost a minimal tree. It pretty much contains the 555 555 minimal set of required nodes and properties to boot a linux kernel; 556 - that is, some basic model informations at the root, the CPUs, and the 556 + that is, some basic model information at the root, the CPUs, and the 557 557 physical memory layout. It also includes misc information passed 558 558 through /chosen, like in this example, the platform type (mandatory) 559 559 and the kernel command line arguments (optional).
+1 -1
Documentation/dvb/udev.txt
··· 1 1 The DVB subsystem currently registers to the sysfs subsystem using the 2 2 "class_simple" interface. 3 3 4 - This means that only the basic informations like module loading parameters 4 + This means that only the basic information like module loading parameters 5 5 are presented through sysfs. Other things that might be interesting are 6 6 currently *not* available. 7 7
+1 -1
Documentation/edac.txt
··· 311 311 'ce_noinfo_count' 312 312 313 313 This attribute file displays the number of CEs that 314 - have occurred wherewith no informations as to which DIMM slot 314 + have occurred wherewith no information as to which DIMM slot 315 315 is having errors. Memory is handicapped, but operational, 316 316 yet no information is available to indicate which slot 317 317 the failing memory is in. This count field should be also
+9 -7
Documentation/kernel-parameters.txt
··· 1832 1832 perfmon on Intel CPUs instead of the 1833 1833 CPU specific event set. 1834 1834 1835 - oops=panic Always panic on oopses. Default is to just kill the process, 1836 - but there is a small probability of deadlocking the machine. 1835 + oops=panic Always panic on oopses. Default is to just kill the 1836 + process, but there is a small probability of 1837 + deadlocking the machine. 1837 1838 This will also cause panics on machine check exceptions. 1838 1839 Useful together with panic=30 to trigger a reboot. 1839 1840 1840 1841 OSS [HW,OSS] 1841 1842 See Documentation/sound/oss/oss-parameters.txt 1842 1843 1843 - panic= [KNL] Kernel behaviour on panic 1844 + panic= [KNL] Kernel behaviour on panic: delay <timeout> 1845 + seconds before rebooting 1844 1846 Format: <timeout> 1845 1847 1846 1848 parkbd.port= [HW] Parallel port number the keyboard adapter is ··· 2345 2343 2346 2344 softlockup_panic= 2347 2345 [KNL] Should the soft-lockup detector generate panics. 2346 + Format: <integer> 2348 2347 2349 2348 sonypi.*= [HW] Sony Programmable I/O Control Device driver 2350 2349 See Documentation/sonypi.txt ··· 2478 2475 topology= [S390] 2479 2476 Format: {off | on} 2480 2477 Specify if the kernel should make use of the cpu 2481 - topology informations if the hardware supports these. 2482 - The scheduler will make use of these informations and 2478 + topology information if the hardware supports this. 2479 + The scheduler will make use of this information and 2483 2480 e.g. base its process migration decisions on it. 2484 2481 Default is on. 2485 2482 ··· 2532 2529 reported either. 2533 2530 2534 2531 unknown_nmi_panic 2535 - [X86] 2536 - Set unknown_nmi_panic=1 early on boot. 2532 + [X86] Cause panic on unknown NMI. 2537 2533 2538 2534 usbcore.autosuspend= 2539 2535 [USB] The autosuspend time delay (in seconds) used
+2 -2
Documentation/kmemleak.txt
··· 11 11 reported via /sys/kernel/debug/kmemleak. A similar method is used by the 12 12 Valgrind tool (memcheck --leak-check) to detect the memory leaks in 13 13 user-space applications. 14 + Kmemleak is supported on x86, arm, powerpc, sparc, sh, microblaze and tile. 14 15 15 16 Usage 16 17 ----- ··· 179 178 the pointer is calculated by other methods than the usual container_of 180 179 macro or the pointer is stored in a location not scanned by kmemleak. 181 180 182 - Page allocations and ioremap are not tracked. Only the ARM and x86 183 - architectures are currently supported. 181 + Page allocations and ioremap are not tracked.
+2 -2
Documentation/laptops/asus-laptop.txt
··· 61 61 Hotkeys are also reported as input keys (like keyboards) you can check 62 62 which key are supported using "xev" under X11. 63 63 64 - You can get informations on the version of your DSDT table by reading the 64 + You can get information on the version of your DSDT table by reading the 65 65 /sys/devices/platform/asus-laptop/infos entry. If you have a question or a 66 66 bug report to do, please include the output of this entry. 67 67 ··· 178 178 ----------- 179 179 180 180 Some models like the W1N have a LED display that can be used to display 181 - several informations. 181 + several items of information. 182 182 183 183 LED display works for the following models: 184 184 W1000N
-1
Documentation/leds-class.txt Documentation/leds/leds-class.txt
··· 95 95 particular LED (ACPI?). The addition of triggers provided by the LED driver 96 96 should cover this option and be possible to add without breaking the 97 97 current interface. 98 -
Documentation/leds-lp3944.txt Documentation/leds/leds-lp3944.txt
+8
Documentation/leds/00-INDEX
··· 1 + leds-class.txt 2 + - documents LED handling under Linux. 3 + leds-lp3944.txt 4 + - notes on how to use the leds-lp3944 driver. 5 + leds-lp5521.txt 6 + - notes on how to use the leds-lp5521 driver. 7 + leds-lp5523.txt 8 + - notes on how to use the leds-lp5523 driver.
+1 -1
Documentation/networking/batman-adv.txt
··· 72 72 # fragmentation gw_sel_class vis_mode 73 73 74 74 75 - There is a special folder for debugging informations: 75 + There is a special folder for debugging information: 76 76 77 77 # ls /sys/kernel/debug/batman_adv/bat0/ 78 78 # gateways socket transtable_global vis_data
+1 -1
Documentation/s390/Debugging390.txt
··· 2273 2273 There is a lot of useful info in here best found by going in & having a look around, 2274 2274 so I'll take you through some entries I consider important. 2275 2275 2276 - All the processes running on the machine have there own entry defined by 2276 + All the processes running on the machine have their own entry defined by 2277 2277 /proc/<pid> 2278 2278 So lets have a look at the init process 2279 2279 cd /proc/1
+23 -9
Documentation/scheduler/sched-domains.txt
··· 1 - Each CPU has a "base" scheduling domain (struct sched_domain). These are 2 - accessed via cpu_sched_domain(i) and this_sched_domain() macros. The domain 1 + Each CPU has a "base" scheduling domain (struct sched_domain). The domain 3 2 hierarchy is built from these base domains via the ->parent pointer. ->parent 4 - MUST be NULL terminated, and domain structures should be per-CPU as they 5 - are locklessly updated. 3 + MUST be NULL terminated, and domain structures should be per-CPU as they are 4 + locklessly updated. 6 5 7 6 Each scheduling domain spans a number of CPUs (stored in the ->span field). 8 7 A domain's span MUST be a superset of it child's span (this restriction could ··· 25 26 load of each of its member CPUs, and only when the load of a group becomes 26 27 out of balance are tasks moved between groups. 27 28 28 - In kernel/sched.c, rebalance_tick is run periodically on each CPU. This 29 - function takes its CPU's base sched domain and checks to see if has reached 30 - its rebalance interval. If so, then it will run load_balance on that domain. 31 - rebalance_tick then checks the parent sched_domain (if it exists), and the 32 - parent of the parent and so forth. 29 + In kernel/sched.c, trigger_load_balance() is run periodically on each CPU 30 + through scheduler_tick(). It raises a softirq after the next regularly scheduled 31 + rebalancing event for the current runqueue has arrived. The actual load 32 + balancing workhorse, run_rebalance_domains()->rebalance_domains(), is then run 33 + in softirq context (SCHED_SOFTIRQ). 34 + 35 + The latter function takes two arguments: the current CPU and whether it was idle 36 + at the time the scheduler_tick() happened and iterates over all sched domains 37 + our CPU is on, starting from its base domain and going up the ->parent chain. 38 + While doing that, it checks to see if the current domain has exhausted its 39 + rebalance interval. If so, it runs load_balance() on that domain. It then checks 40 + the parent sched_domain (if it exists), and the parent of the parent and so 41 + forth. 42 + 43 + Initially, load_balance() finds the busiest group in the current sched domain. 44 + If it succeeds, it looks for the busiest runqueue of all the CPUs' runqueues in 45 + that group. If it manages to find such a runqueue, it locks both our initial 46 + CPU's runqueue and the newly found busiest one and starts moving tasks from it 47 + to our runqueue. The exact number of tasks amounts to an imbalance previously 48 + computed while iterating over this sched domain's groups. 33 49 34 50 *** Implementing sched domains *** 35 51 The "base" domain will "span" the first level of the hierarchy. In the case
+1 -1
Documentation/scsi/sym53c8xx_2.txt
··· 285 285 286 286 7. Profiling information 287 287 288 - This driver does not provide profiling informations as did its predecessors. 288 + This driver does not provide profiling information as did its predecessors. 289 289 This feature was not this useful and added complexity to the code. 290 290 As the driver code got more complex, I have decided to remove everything 291 291 that didn't seem actually useful.
+1 -1
Documentation/sound/alsa/ALSA-Configuration.txt
··· 2229 2229 2230 2230 /proc/asound/card#/pcm#[cp]/oss 2231 2231 ------------------------------- 2232 - String "erase" - erase all additional informations about OSS applications 2232 + String "erase" - erase all additional information about OSS applications 2233 2233 String "<app_name> <fragments> <fragment_size> [<options>]" 2234 2234 2235 2235 <app_name> - name of application with (higher priority) or without path
+3 -3
Documentation/sound/oss/AudioExcelDSP16
··· 1 1 Driver 2 2 ------ 3 3 4 - Informations about Audio Excel DSP 16 driver can be found in the source 4 + Information about Audio Excel DSP 16 driver can be found in the source 5 5 file aedsp16.c 6 6 Please, read the head of the source before using it. It contain useful 7 - informations. 7 + information. 8 8 9 9 Configuration 10 10 ------------- ··· 68 68 This driver supports the SC-6000 and SC-6600 based Gallant's sound card. 69 69 It don't support the Audio Excel DSP 16 III (try the SC-6600 code). 70 70 I'm working on the III version of the card: if someone have useful 71 - informations about it, please let me know. 71 + information about it, please let me know. 72 72 For all the non-supported audio cards, you have to boot MS-DOS (or WIN95) 73 73 activating the audio card with the MS-DOS device driver, then you have to 74 74 <ctrl>-<alt>-<del> and boot Linux.
+1 -1
Documentation/sound/oss/README.ymfsb
··· 5 5 ============ 6 6 7 7 This code references YAMAHA's sample codes and data sheets. 8 - I respect and thank for all people they made open the informations 8 + I respect and thank for all people they made open the information 9 9 about YMF7xx cards. 10 10 11 11 And this codes heavily based on Jeff Garzik <jgarzik@pobox.com>'s
+1 -1
Documentation/video4linux/bttv/Insmod-options
··· 1 1 2 - Note: "modinfo <module>" prints various informations about a kernel 2 + Note: "modinfo <module>" prints various information about a kernel 3 3 module, among them a complete and up-to-date list of insmod options. 4 4 This list tends to be outdated because it is updated manually ... 5 5
+1 -1
Documentation/video4linux/bttv/Sound-FAQ
··· 8 8 sound is handled in slightly different ways on each board. 9 9 10 10 To handle the grabber boards correctly, there is a array tvcards[] in 11 - bttv-cards.c, which holds the informations required for each board. 11 + bttv-cards.c, which holds the information required for each board. 12 12 Sound will work only, if the correct entry is used (for video it often 13 13 makes no difference). The bttv driver prints a line to the kernel 14 14 log, telling which card type is used. Like this one:
+2 -2
Documentation/video4linux/et61x251.txt
··· 191 191 Description: Debugging information level, from 0 to 3: 192 192 0 = none (use carefully) 193 193 1 = critical errors 194 - 2 = significant informations 194 + 2 = significant information 195 195 3 = more verbose messages 196 196 Level 3 is useful for testing only, when only one device 197 - is used at the same time. It also shows some more informations 197 + is used at the same time. It also shows some more information 198 198 about the hardware being detected. This module parameter can be 199 199 changed at runtime thanks to the /sys filesystem interface. 200 200 Default: 2
+2 -2
Documentation/video4linux/sn9c102.txt
··· 214 214 Description: Debugging information level, from 0 to 3: 215 215 0 = none (use carefully) 216 216 1 = critical errors 217 - 2 = significant informations 217 + 2 = significant information 218 218 3 = more verbose messages 219 219 Level 3 is useful for testing only. It also shows some more 220 - informations about the hardware being detected. 220 + information about the hardware being detected. 221 221 This parameter can be changed at runtime thanks to the /sys 222 222 filesystem interface. 223 223 Default: 2
+1 -1
Documentation/video4linux/w9968cf.txt
··· 413 413 Description: Debugging information level, from 0 to 6: 414 414 0 = none (use carefully) 415 415 1 = critical errors 416 - 2 = significant informations 416 + 2 = significant information 417 417 3 = configuration or general messages 418 418 4 = warnings 419 419 5 = called functions
+3 -3
Documentation/video4linux/zc0301.txt
··· 181 181 Description: Debugging information level, from 0 to 3: 182 182 0 = none (use carefully) 183 183 1 = critical errors 184 - 2 = significant informations 184 + 2 = significant information 185 185 3 = more verbose messages 186 186 Level 3 is useful for testing only, when only one device 187 - is used at the same time. It also shows some more informations 187 + is used at the same time. It also shows some information 188 188 about the hardware being detected. This module parameter can be 189 189 changed at runtime thanks to the /sys filesystem interface. 190 190 Default: 2 ··· 261 261 262 262 11. Credits 263 263 =========== 264 - - Informations about the chip internals needed to enable the I2C protocol have 264 + - Information about the chip internals needed to enable the I2C protocol have 265 265 been taken from the documentation of the ZC030x Video4Linux1 driver written 266 266 by Andrew Birkett <andy@nobugs.org>; 267 267 - The initialization values of the ZC0301 controller connected to the PAS202BCB
+1 -1
Makefile
··· 1 1 VERSION = 2 2 2 PATCHLEVEL = 6 3 3 SUBLEVEL = 39 4 - EXTRAVERSION = -rc1 4 + EXTRAVERSION = -rc2 5 5 NAME = Flesh-Eating Bats with Fangs 6 6 7 7 # *DOCUMENTATION*
+5 -1
arch/microblaze/include/asm/unistd.h
··· 386 386 #define __NR_fanotify_init 368 387 387 #define __NR_fanotify_mark 369 388 388 #define __NR_prlimit64 370 389 + #define __NR_name_to_handle_at 371 390 + #define __NR_open_by_handle_at 372 391 + #define __NR_clock_adjtime 373 392 + #define __NR_syncfs 374 389 393 390 - #define __NR_syscalls 371 394 + #define __NR_syscalls 375 391 395 392 396 #ifdef __KERNEL__ 393 397 #ifndef __ASSEMBLY__
+1
arch/microblaze/kernel/Makefile
··· 10 10 CFLAGS_REMOVE_selfmod.o = -pg 11 11 CFLAGS_REMOVE_heartbeat.o = -pg 12 12 CFLAGS_REMOVE_ftrace.o = -pg 13 + CFLAGS_REMOVE_process.o = -pg 13 14 endif 14 15 15 16 extra-y := head.o vmlinux.lds
+6 -4
arch/microblaze/kernel/ftrace.c
··· 51 51 : "r" (parent), "r" (return_hooker) 52 52 ); 53 53 54 + flush_dcache_range((u32)parent, (u32)parent + 4); 55 + flush_icache_range((u32)parent, (u32)parent + 4); 56 + 54 57 if (unlikely(faulted)) { 55 58 ftrace_graph_stop(); 56 59 WARN_ON(1); ··· 97 94 98 95 if (unlikely(faulted)) 99 96 return -EFAULT; 97 + 98 + flush_dcache_range(addr, addr + 4); 99 + flush_icache_range(addr, addr + 4); 100 100 101 101 return 0; 102 102 } ··· 201 195 ret += ftrace_modify_code((unsigned long)&ftrace_caller, 202 196 MICROBLAZE_NOP); 203 197 204 - /* All changes are done - lets do caches consistent */ 205 - flush_icache(); 206 198 return ret; 207 199 } 208 200 ··· 214 210 215 211 old_jump = *(unsigned int *)ip; /* save jump over instruction */ 216 212 ret = ftrace_modify_code(ip, MICROBLAZE_NOP); 217 - flush_icache(); 218 213 219 214 pr_debug("%s: Replace instruction: 0x%x\n", __func__, old_jump); 220 215 return ret; ··· 225 222 unsigned long ip = (unsigned long)(&ftrace_call_graph); 226 223 227 224 ret = ftrace_modify_code(ip, old_jump); 228 - flush_icache(); 229 225 230 226 pr_debug("%s\n", __func__); 231 227 return ret;
+2 -2
arch/microblaze/kernel/intc.c
··· 158 158 for (i = 0; i < nr_irq; ++i) { 159 159 if (intr_type & (0x00000001 << i)) { 160 160 irq_set_chip_and_handler_name(i, &intc_dev, 161 - handle_edge_irq, intc_dev.name); 161 + handle_edge_irq, "edge"); 162 162 irq_clear_status_flags(i, IRQ_LEVEL); 163 163 } else { 164 164 irq_set_chip_and_handler_name(i, &intc_dev, 165 - handle_level_irq, intc_dev.name); 165 + handle_level_irq, "level"); 166 166 irq_set_status_flags(i, IRQ_LEVEL); 167 167 } 168 168 }
+4
arch/microblaze/kernel/syscall_table.S
··· 375 375 .long sys_fanotify_init 376 376 .long sys_fanotify_mark 377 377 .long sys_prlimit64 /* 370 */ 378 + .long sys_name_to_handle_at 379 + .long sys_open_by_handle_at 380 + .long sys_clock_adjtime 381 + .long sys_syncfs
+6
arch/microblaze/lib/Makefile
··· 2 2 # Makefile 3 3 # 4 4 5 + ifdef CONFIG_FUNCTION_TRACER 6 + CFLAGS_REMOVE_ashldi3.o = -pg 7 + CFLAGS_REMOVE_ashrdi3.o = -pg 8 + CFLAGS_REMOVE_lshrdi3.o = -pg 9 + endif 10 + 5 11 lib-y := memset.o 6 12 7 13 ifeq ($(CONFIG_OPT_LIB_ASM),y)
+6 -6
arch/powerpc/boot/dts/p1020rdb.dts
··· 1 1 /* 2 2 * P1020 RDB Device Tree Source 3 3 * 4 - * Copyright 2009 Freescale Semiconductor Inc. 4 + * Copyright 2009-2011 Freescale Semiconductor Inc. 5 5 * 6 6 * This program is free software; you can redistribute it and/or modify it 7 7 * under the terms of the GNU General Public License as published by the ··· 553 553 reg = <0 0xffe09000 0 0x1000>; 554 554 bus-range = <0 255>; 555 555 ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 556 - 0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>; 556 + 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; 557 557 clock-frequency = <33333333>; 558 558 interrupt-parent = <&mpic>; 559 559 interrupts = <16 2>; ··· 580 580 #address-cells = <3>; 581 581 reg = <0 0xffe0a000 0 0x1000>; 582 582 bus-range = <0 255>; 583 - ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000 584 - 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>; 583 + ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 584 + 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; 585 585 clock-frequency = <33333333>; 586 586 interrupt-parent = <&mpic>; 587 587 interrupts = <16 2>; ··· 590 590 #size-cells = <2>; 591 591 #address-cells = <3>; 592 592 device_type = "pci"; 593 - ranges = <0x2000000 0x0 0xc0000000 594 - 0x2000000 0x0 0xc0000000 593 + ranges = <0x2000000 0x0 0x80000000 594 + 0x2000000 0x0 0x80000000 595 595 0x0 0x20000000 596 596 597 597 0x1000000 0x0 0x0
+6 -6
arch/powerpc/boot/dts/p2020rdb.dts
··· 1 1 /* 2 2 * P2020 RDB Device Tree Source 3 3 * 4 - * Copyright 2009 Freescale Semiconductor Inc. 4 + * Copyright 2009-2011 Freescale Semiconductor Inc. 5 5 * 6 6 * This program is free software; you can redistribute it and/or modify it 7 7 * under the terms of the GNU General Public License as published by the ··· 537 537 reg = <0 0xffe09000 0 0x1000>; 538 538 bus-range = <0 255>; 539 539 ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 540 - 0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>; 540 + 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; 541 541 clock-frequency = <33333333>; 542 542 interrupt-parent = <&mpic>; 543 543 interrupts = <25 2>; ··· 564 564 #address-cells = <3>; 565 565 reg = <0 0xffe0a000 0 0x1000>; 566 566 bus-range = <0 255>; 567 - ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000 568 - 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>; 567 + ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 568 + 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; 569 569 clock-frequency = <33333333>; 570 570 interrupt-parent = <&mpic>; 571 571 interrupts = <26 2>; ··· 574 574 #size-cells = <2>; 575 575 #address-cells = <3>; 576 576 device_type = "pci"; 577 - ranges = <0x2000000 0x0 0xc0000000 578 - 0x2000000 0x0 0xc0000000 577 + ranges = <0x2000000 0x0 0x80000000 578 + 0x2000000 0x0 0x80000000 579 579 0x0 0x20000000 580 580 581 581 0x1000000 0x0 0x0
+2 -2
arch/powerpc/boot/dts/p2020rdb_camp_core0.dts
··· 6 6 * This dts file allows core0 to have memory, l2, i2c, spi, gpio, dma1, usb, 7 7 * eth1, eth2, sdhc, crypto, global-util, pci0. 8 8 * 9 - * Copyright 2009 Freescale Semiconductor Inc. 9 + * Copyright 2009-2011 Freescale Semiconductor Inc. 10 10 * 11 11 * This program is free software; you can redistribute it and/or modify it 12 12 * under the terms of the GNU General Public License as published by the ··· 342 342 reg = <0 0xffe09000 0 0x1000>; 343 343 bus-range = <0 255>; 344 344 ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000 345 - 0x1000000 0x0 0x00000000 0 0xffc30000 0x0 0x10000>; 345 + 0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>; 346 346 clock-frequency = <33333333>; 347 347 interrupt-parent = <&mpic>; 348 348 interrupts = <25 2>;
+5 -5
arch/powerpc/boot/dts/p2020rdb_camp_core1.dts
··· 7 7 * 8 8 * Please note to add "-b 1" for core1's dts compiling. 9 9 * 10 - * Copyright 2009 Freescale Semiconductor Inc. 10 + * Copyright 2009-2011 Freescale Semiconductor Inc. 11 11 * 12 12 * This program is free software; you can redistribute it and/or modify it 13 13 * under the terms of the GNU General Public License as published by the ··· 162 162 #address-cells = <3>; 163 163 reg = <0 0xffe0a000 0 0x1000>; 164 164 bus-range = <0 255>; 165 - ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000 166 - 0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>; 165 + ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000 166 + 0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>; 167 167 clock-frequency = <33333333>; 168 168 interrupt-parent = <&mpic>; 169 169 interrupts = <26 2>; ··· 172 172 #size-cells = <2>; 173 173 #address-cells = <3>; 174 174 device_type = "pci"; 175 - ranges = <0x2000000 0x0 0xc0000000 176 - 0x2000000 0x0 0xc0000000 175 + ranges = <0x2000000 0x0 0x80000000 176 + 0x2000000 0x0 0x80000000 177 177 0x0 0x20000000 178 178 179 179 0x1000000 0x0 0x0
+3 -3
arch/powerpc/kernel/crash.c
··· 163 163 } 164 164 165 165 /* wait for all the CPUs to hit real mode but timeout if they don't come in */ 166 - #ifdef CONFIG_PPC_STD_MMU_64 166 + #if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP) 167 167 static void crash_kexec_wait_realmode(int cpu) 168 168 { 169 169 unsigned int msecs; ··· 188 188 } 189 189 mb(); 190 190 } 191 + #else 192 + static inline void crash_kexec_wait_realmode(int cpu) {} 191 193 #endif 192 194 193 195 /* ··· 346 344 crash_save_cpu(regs, crashing_cpu); 347 345 crash_kexec_prepare_cpus(crashing_cpu); 348 346 cpu_set(crashing_cpu, cpus_in_crash); 349 - #if defined(CONFIG_PPC_STD_MMU_64) && defined(CONFIG_SMP) 350 347 crash_kexec_wait_realmode(crashing_cpu); 351 - #endif 352 348 353 349 machine_kexec_mask_interrupts(); 354 350
+1 -1
arch/powerpc/kernel/paca.c
··· 203 203 { 204 204 int new_size; 205 205 206 - new_size = PAGE_ALIGN(sizeof(struct paca_struct) * num_possible_cpus()); 206 + new_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpu_ids); 207 207 208 208 if (new_size >= paca_size) 209 209 return;
+3
arch/powerpc/kernel/setup-common.c
··· 509 509 */ 510 510 cpu_init_thread_core_maps(nthreads); 511 511 512 + /* Now that possible cpus are set, set nr_cpu_ids for later use */ 513 + nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1; 514 + 512 515 free_unused_pacas(); 513 516 } 514 517 #endif /* CONFIG_SMP */
+1 -1
arch/powerpc/mm/tlb_low_64e.S
··· 431 431 * The thing is, we know that in normal circumstances, this is 432 432 * always called as a second level tlb miss for SW load or as a first 433 433 * level TLB miss for HW load, so we should be able to peek at the 434 - * relevant informations in the first exception frame in the PACA. 434 + * relevant information in the first exception frame in the PACA. 435 435 * 436 436 * However, we do need to double check that, because we may just hit 437 437 * a stray kernel pointer or a userland attack trying to hit those
+1 -1
arch/powerpc/platforms/Kconfig
··· 46 46 help 47 47 Support from booting from Open Firmware or yaboot using an 48 48 Open Firmware client interface. This enables the kernel to 49 - communicate with open firmware to retrieve system informations 49 + communicate with open firmware to retrieve system information 50 50 such as the device tree. 51 51 52 52 In case of doubt, say Y
+1 -1
arch/powerpc/platforms/pseries/setup.c
··· 378 378 379 379 return 0; 380 380 } 381 - arch_initcall(pSeries_init_panel); 381 + machine_arch_initcall(pseries, pSeries_init_panel); 382 382 383 383 static int pseries_set_dabr(unsigned long dabr) 384 384 {
+11 -6
arch/powerpc/platforms/pseries/smp.c
··· 112 112 113 113 /* Fixup atomic count: it exited inside IRQ handler. */ 114 114 task_thread_info(paca[lcpu].__current)->preempt_count = 0; 115 - 115 + #ifdef CONFIG_HOTPLUG_CPU 116 116 if (get_cpu_current_state(lcpu) == CPU_STATE_INACTIVE) 117 117 goto out; 118 - 118 + #endif 119 119 /* 120 120 * If the RTAS start-cpu token does not exist then presume the 121 121 * cpu is already spinning. ··· 130 130 return 0; 131 131 } 132 132 133 + #ifdef CONFIG_HOTPLUG_CPU 133 134 out: 135 + #endif 134 136 return 1; 135 137 } 136 138 ··· 146 144 vpa_init(cpu); 147 145 148 146 cpumask_clear_cpu(cpu, of_spin_mask); 147 + #ifdef CONFIG_HOTPLUG_CPU 149 148 set_cpu_current_state(cpu, CPU_STATE_ONLINE); 150 149 set_default_offline_state(cpu); 151 - 150 + #endif 152 151 } 153 152 #endif /* CONFIG_XICS */ 154 153 155 154 static void __devinit smp_pSeries_kick_cpu(int nr) 156 155 { 157 - long rc; 158 - unsigned long hcpuid; 159 156 BUG_ON(nr < 0 || nr >= NR_CPUS); 160 157 161 158 if (!smp_startup_cpu(nr)) ··· 166 165 * the processor will continue on to secondary_start 167 166 */ 168 167 paca[nr].cpu_start = 1; 169 - 168 + #ifdef CONFIG_HOTPLUG_CPU 170 169 set_preferred_offline_state(nr, CPU_STATE_ONLINE); 171 170 172 171 if (get_cpu_current_state(nr) == CPU_STATE_INACTIVE) { 172 + long rc; 173 + unsigned long hcpuid; 174 + 173 175 hcpuid = get_hard_smp_processor_id(nr); 174 176 rc = plpar_hcall_norets(H_PROD, hcpuid); 175 177 if (rc != H_SUCCESS) 176 178 printk(KERN_ERR "Error: Prod to wake up processor %d " 177 179 "Ret= %ld\n", nr, rc); 178 180 } 181 + #endif 179 182 } 180 183 181 184 static int smp_pSeries_cpu_bootable(unsigned int nr)
+1 -1
arch/unicore32/Makefile
··· 48 48 ASM_GENERIC_HEADERS += cputime.h current.h 49 49 ASM_GENERIC_HEADERS += device.h div64.h 50 50 ASM_GENERIC_HEADERS += emergency-restart.h errno.h 51 - ASM_GENERIC_HEADERS += fb.h fcntl.h ftrace.h 51 + ASM_GENERIC_HEADERS += fb.h fcntl.h ftrace.h futex.h 52 52 ASM_GENERIC_HEADERS += hardirq.h hw_irq.h 53 53 ASM_GENERIC_HEADERS += ioctl.h ioctls.h ipcbuf.h irq_regs.h 54 54 ASM_GENERIC_HEADERS += kdebug.h kmap_types.h
-143
arch/unicore32/include/asm/futex.h
··· 1 - /* 2 - * linux/arch/unicore32/include/asm/futex.h 3 - * 4 - * Code specific to PKUnity SoC and UniCore ISA 5 - * 6 - * Copyright (C) 2001-2010 GUAN Xue-tao 7 - * 8 - * This program is free software; you can redistribute it and/or modify 9 - * it under the terms of the GNU General Public License version 2 as 10 - * published by the Free Software Foundation. 11 - */ 12 - 13 - #ifndef __UNICORE_FUTEX_H__ 14 - #define __UNICORE_FUTEX_H__ 15 - 16 - #ifdef __KERNEL__ 17 - 18 - #include <linux/futex.h> 19 - #include <linux/preempt.h> 20 - #include <linux/uaccess.h> 21 - #include <linux/errno.h> 22 - 23 - #define __futex_atomic_op(insn, ret, oldval, uaddr, oparg) \ 24 - __asm__ __volatile__( \ 25 - "1: ldw.u %1, [%2]\n" \ 26 - " " insn "\n" \ 27 - "2: stw.u %0, [%2]\n" \ 28 - " mov %0, #0\n" \ 29 - "3:\n" \ 30 - " .pushsection __ex_table,\"a\"\n" \ 31 - " .align 3\n" \ 32 - " .long 1b, 4f, 2b, 4f\n" \ 33 - " .popsection\n" \ 34 - " .pushsection .fixup,\"ax\"\n" \ 35 - "4: mov %0, %4\n" \ 36 - " b 3b\n" \ 37 - " .popsection" \ 38 - : "=&r" (ret), "=&r" (oldval) \ 39 - : "r" (uaddr), "r" (oparg), "Ir" (-EFAULT) \ 40 - : "cc", "memory") 41 - 42 - static inline int 43 - futex_atomic_op_inuser(int encoded_op, int __user *uaddr) 44 - { 45 - int op = (encoded_op >> 28) & 7; 46 - int cmp = (encoded_op >> 24) & 15; 47 - int oparg = (encoded_op << 8) >> 20; 48 - int cmparg = (encoded_op << 20) >> 20; 49 - int oldval = 0, ret; 50 - 51 - if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) 52 - oparg = 1 << oparg; 53 - 54 - if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) 55 - return -EFAULT; 56 - 57 - pagefault_disable(); /* implies preempt_disable() */ 58 - 59 - switch (op) { 60 - case FUTEX_OP_SET: 61 - __futex_atomic_op("mov %0, %3", ret, oldval, uaddr, oparg); 62 - break; 63 - case FUTEX_OP_ADD: 64 - __futex_atomic_op("add %0, %1, %3", ret, oldval, uaddr, oparg); 65 - break; 66 - case FUTEX_OP_OR: 67 - __futex_atomic_op("or %0, %1, %3", ret, oldval, uaddr, oparg); 68 - break; 69 - case FUTEX_OP_ANDN: 70 - __futex_atomic_op("and %0, %1, %3", 71 - ret, oldval, uaddr, ~oparg); 72 - break; 73 - case FUTEX_OP_XOR: 74 - __futex_atomic_op("xor %0, %1, %3", ret, oldval, uaddr, oparg); 75 - break; 76 - default: 77 - ret = -ENOSYS; 78 - } 79 - 80 - pagefault_enable(); /* subsumes preempt_enable() */ 81 - 82 - if (!ret) { 83 - switch (cmp) { 84 - case FUTEX_OP_CMP_EQ: 85 - ret = (oldval == cmparg); 86 - break; 87 - case FUTEX_OP_CMP_NE: 88 - ret = (oldval != cmparg); 89 - break; 90 - case FUTEX_OP_CMP_LT: 91 - ret = (oldval < cmparg); 92 - break; 93 - case FUTEX_OP_CMP_GE: 94 - ret = (oldval >= cmparg); 95 - break; 96 - case FUTEX_OP_CMP_LE: 97 - ret = (oldval <= cmparg); 98 - break; 99 - case FUTEX_OP_CMP_GT: 100 - ret = (oldval > cmparg); 101 - break; 102 - default: 103 - ret = -ENOSYS; 104 - } 105 - } 106 - return ret; 107 - } 108 - 109 - static inline int 110 - futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) 111 - { 112 - int val; 113 - 114 - if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) 115 - return -EFAULT; 116 - 117 - pagefault_disable(); /* implies preempt_disable() */ 118 - 119 - __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" 120 - "1: ldw.u %0, [%3]\n" 121 - " cmpxor.a %0, %1\n" 122 - " bne 3f\n" 123 - "2: stw.u %2, [%3]\n" 124 - "3:\n" 125 - " .pushsection __ex_table,\"a\"\n" 126 - " .align 3\n" 127 - " .long 1b, 4f, 2b, 4f\n" 128 - " .popsection\n" 129 - " .pushsection .fixup,\"ax\"\n" 130 - "4: mov %0, %4\n" 131 - " b 3b\n" 132 - " .popsection" 133 - : "=&r" (val) 134 - : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) 135 - : "cc", "memory"); 136 - 137 - pagefault_enable(); /* subsumes preempt_enable() */ 138 - 139 - return val; 140 - } 141 - 142 - #endif /* __KERNEL__ */ 143 - #endif /* __UNICORE_FUTEX_H__ */
-10
arch/unicore32/include/mach/PKUnity.h
··· 24 24 #define PKUNITY_MMIO_BASE 0x80000000 /* 0x80000000 - 0xFFFFFFFF 2GB */ 25 25 26 26 /* 27 - * PKUNITY Memory Map Addresses: 0x0D000000 - 0x0EFFFFFF (32MB) 28 - * 0x0D000000 - 0x0DFFFFFF 16MB: for UVC 29 - * 0x0E000000 - 0x0EFFFFFF 16MB: for UNIGFX 30 - */ 31 - #define PKUNITY_UVC_MMAP_BASE 0x0D000000 32 - #define PKUNITY_UVC_MMAP_SIZE 0x01000000 /* 16MB */ 33 - #define PKUNITY_UNIGFX_MMAP_BASE 0x0E000000 34 - #define PKUNITY_UNIGFX_MMAP_SIZE 0x01000000 /* 16MB */ 35 - 36 - /* 37 27 * PKUNITY System Bus Addresses (PCI): 0x80000000 - 0xBFFFFFFF (1GB) 38 28 * 0x80000000 - 0x8000000B 12B PCI Configuration regs 39 29 * 0x80010000 - 0x80010250 592B PCI Bridge Base
-1
arch/unicore32/include/mach/memory.h
··· 50 50 51 51 /* kuser area */ 52 52 #define KUSER_VECPAGE_BASE (KUSER_BASE + UL(0x3fff0000)) 53 - #define KUSER_UNIGFX_BASE (PAGE_OFFSET + PKUNITY_UNIGFX_MMAP_BASE) 54 53 /* kuser_vecpage (0xbfff0000) is ro, and vectors page (0xffff0000) is rw */ 55 54 #define kuser_vecpage_to_vectors(x) ((x) - (KUSER_VECPAGE_BASE) \ 56 55 + (VECTORS_BASE))
-5
arch/unicore32/kernel/puv3-core.c
··· 99 99 .end = io_v2p(PKUNITY_UNIGFX_BASE) + 0xfff, 100 100 .flags = IORESOURCE_MEM, 101 101 }, 102 - [1] = { 103 - .start = PKUNITY_UNIGFX_MMAP_BASE, 104 - .end = PKUNITY_UNIGFX_MMAP_BASE + PKUNITY_UNIGFX_MMAP_SIZE, 105 - .flags = IORESOURCE_MEM, 106 - }, 107 102 }; 108 103 109 104 static struct resource puv3_rtc_resources[] = {
-9
arch/unicore32/kernel/rtc.c
··· 88 88 return 0; 89 89 } 90 90 91 - static int puv3_rtc_setfreq(struct device *dev, int freq) 92 - { 93 - return 0; 94 - } 95 - 96 91 /* Time read/write */ 97 92 98 93 static int puv3_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm) ··· 209 214 .set_time = puv3_rtc_settime, 210 215 .read_alarm = puv3_rtc_getalarm, 211 216 .set_alarm = puv3_rtc_setalarm, 212 - .irq_set_freq = puv3_rtc_setfreq, 213 - .irq_set_state = puv3_rtc_setpie, 214 217 .proc = puv3_rtc_proc, 215 218 }; 216 219 ··· 286 293 } 287 294 288 295 puv3_rtc_enable(pdev, 1); 289 - 290 - puv3_rtc_setfreq(&pdev->dev, 1); 291 296 292 297 /* register RTC and exit */ 293 298
+2 -13
arch/unicore32/kernel/setup.c
··· 64 64 */ 65 65 static struct resource mem_res[] = { 66 66 { 67 - .name = "Video RAM", 68 - .start = 0, 69 - .end = 0, 70 - .flags = IORESOURCE_MEM 71 - }, 72 - { 73 67 .name = "Kernel text", 74 68 .start = 0, 75 69 .end = 0, ··· 77 83 } 78 84 }; 79 85 80 - #define video_ram mem_res[0] 81 - #define kernel_code mem_res[1] 82 - #define kernel_data mem_res[2] 86 + #define kernel_code mem_res[0] 87 + #define kernel_data mem_res[1] 83 88 84 89 /* 85 90 * These functions re-use the assembly code in head.S, which ··· 217 224 kernel_data.end <= res->end) 218 225 request_resource(res, &kernel_data); 219 226 } 220 - 221 - video_ram.start = PKUNITY_UNIGFX_MMAP_BASE; 222 - video_ram.end = PKUNITY_UNIGFX_MMAP_BASE + PKUNITY_UNIGFX_MMAP_SIZE; 223 - request_resource(&iomem_resource, &video_ram); 224 227 } 225 228 226 229 static void (*init_machine)(void) __initdata;
-1
arch/unicore32/kernel/traps.c
··· 22 22 #include <linux/delay.h> 23 23 #include <linux/hardirq.h> 24 24 #include <linux/init.h> 25 - #include <linux/uaccess.h> 26 25 #include <linux/atomic.h> 27 26 #include <linux/unistd.h> 28 27
+4 -3
arch/unicore32/kernel/vmlinux.lds.S
··· 14 14 #include <asm/thread_info.h> 15 15 #include <asm/memory.h> 16 16 #include <asm/page.h> 17 + #include <asm/cache.h> 17 18 18 19 OUTPUT_ARCH(unicore32) 19 20 ENTRY(stext) ··· 30 29 HEAD_TEXT_SECTION 31 30 INIT_TEXT_SECTION(PAGE_SIZE) 32 31 INIT_DATA_SECTION(16) 33 - PERCPU(PAGE_SIZE) 32 + PERCPU(L1_CACHE_BYTES, PAGE_SIZE) 34 33 __init_end = .; 35 34 36 35 _stext = .; ··· 46 45 47 46 _sdata = .; 48 47 RO_DATA_SECTION(PAGE_SIZE) 49 - RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE) 48 + RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) 50 49 _edata = .; 51 50 52 - EXCEPTION_TABLE(32) 51 + EXCEPTION_TABLE(L1_CACHE_BYTES) 53 52 NOTES 54 53 55 54 BSS_SECTION(0, 0, 0)
-20
arch/unicore32/mm/mmu.c
··· 338 338 * and can only be in node 0. 339 339 */ 340 340 memblock_reserve(__pa(swapper_pg_dir), PTRS_PER_PGD * sizeof(pgd_t)); 341 - 342 - #ifdef CONFIG_PUV3_UNIGFX 343 - /* 344 - * These should likewise go elsewhere. They pre-reserve the 345 - * screen/video memory region at the 48M~64M of main system memory. 346 - */ 347 - memblock_reserve(PKUNITY_UNIGFX_MMAP_BASE, PKUNITY_UNIGFX_MMAP_SIZE); 348 - memblock_reserve(PKUNITY_UVC_MMAP_BASE, PKUNITY_UVC_MMAP_SIZE); 349 - #endif 350 341 } 351 342 352 343 /* ··· 360 369 361 370 for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE) 362 371 pmd_clear(pmd_off_k(addr)); 363 - 364 - /* 365 - * Create a mapping for UniGFX VRAM 366 - */ 367 - #ifdef CONFIG_PUV3_UNIGFX 368 - map.pfn = __phys_to_pfn(PKUNITY_UNIGFX_MMAP_BASE); 369 - map.virtual = KUSER_UNIGFX_BASE; 370 - map.length = PKUNITY_UNIGFX_MMAP_SIZE; 371 - map.type = MT_KUSER; 372 - create_mapping(&map); 373 - #endif 374 372 375 373 /* 376 374 * Create a mapping for the machine vectors at the high-vectors
-1
arch/x86/include/asm/apic.h
··· 2 2 #define _ASM_X86_APIC_H 3 3 4 4 #include <linux/cpumask.h> 5 - #include <linux/delay.h> 6 5 #include <linux/pm.h> 7 6 8 7 #include <asm/alternative.h>
-1
arch/x86/include/asm/dma.h
··· 10 10 11 11 #include <linux/spinlock.h> /* And spinlocks */ 12 12 #include <asm/io.h> /* need byte IO */ 13 - #include <linux/delay.h> 14 13 15 14 #ifdef HAVE_REALLY_SLOW_DMA_CONTROLLER 16 15 #define dma_outb outb_p
-1
arch/x86/include/asm/topology.h
··· 95 95 #ifdef CONFIG_X86_32 96 96 extern unsigned long node_start_pfn[]; 97 97 extern unsigned long node_end_pfn[]; 98 - extern unsigned long node_remap_size[]; 99 98 #define node_has_online_mem(nid) (node_start_pfn[nid] != node_end_pfn[nid]) 100 99 101 100 # define SD_CACHE_NICE_TRIES 1
+1 -1
arch/x86/kernel/amd_nb.c
··· 21 21 EXPORT_SYMBOL(amd_nb_misc_ids); 22 22 23 23 static struct pci_device_id amd_nb_link_ids[] = { 24 - { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_LINK) }, 24 + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }, 25 25 {} 26 26 }; 27 27
+1
arch/x86/kernel/apic/hw_nmi.c
··· 16 16 #include <linux/kprobes.h> 17 17 #include <linux/nmi.h> 18 18 #include <linux/module.h> 19 + #include <linux/delay.h> 19 20 20 21 #ifdef CONFIG_HARDLOCKUP_DETECTOR 21 22 u64 hw_nmi_get_sample_period(void)
-4
arch/x86/kernel/apic/numaq_32.c
··· 93 93 node_end_pfn[node]); 94 94 95 95 memory_present(node, node_start_pfn[node], node_end_pfn[node]); 96 - 97 - node_remap_size[node] = node_memmap_size_bytes(node, 98 - node_start_pfn[node], 99 - node_end_pfn[node]); 100 96 } 101 97 102 98 /*
+10
arch/x86/kernel/apic/x2apic_uv_x.c
··· 23 23 #include <linux/io.h> 24 24 #include <linux/pci.h> 25 25 #include <linux/kdebug.h> 26 + #include <linux/delay.h> 27 + #include <linux/crash_dump.h> 26 28 27 29 #include <asm/uv/uv_mmrs.h> 28 30 #include <asm/uv/uv_hub.h> ··· 36 34 #include <asm/ipi.h> 37 35 #include <asm/smp.h> 38 36 #include <asm/x86_init.h> 37 + #include <asm/emergency-restart.h> 39 38 40 39 DEFINE_PER_CPU(int, x2apic_extra_bits); 41 40 ··· 813 810 814 811 /* register Legacy VGA I/O redirection handler */ 815 812 pci_register_set_vga_state(uv_set_vga_state); 813 + 814 + /* 815 + * For a kdump kernel the reset must be BOOT_ACPI, not BOOT_EFI, as 816 + * EFI is not enabled in the kdump kernel. 817 + */ 818 + if (is_kdump_kernel()) 819 + reboot_type = BOOT_ACPI; 816 820 }
+1 -1
arch/x86/kernel/cpu/mcheck/mce.c
··· 1626 1626 static unsigned int mce_poll(struct file *file, poll_table *wait) 1627 1627 { 1628 1628 poll_wait(file, &mce_wait, wait); 1629 - if (rcu_dereference_check_mce(mcelog.next)) 1629 + if (rcu_access_index(mcelog.next)) 1630 1630 return POLLIN | POLLRDNORM; 1631 1631 if (!mce_apei_read_done && apei_check_mce()) 1632 1632 return POLLIN | POLLRDNORM;
+15 -5
arch/x86/kernel/cpu/mtrr/main.c
··· 293 293 294 294 /* 295 295 * HACK! 296 - * We use this same function to initialize the mtrrs on boot. 297 - * The state of the boot cpu's mtrrs has been saved, and we want 298 - * to replicate across all the APs. 299 - * If we're doing that @reg is set to something special... 296 + * 297 + * We use this same function to initialize the mtrrs during boot, 298 + * resume, runtime cpu online and on an explicit request to set a 299 + * specific MTRR. 300 + * 301 + * During boot or suspend, the state of the boot cpu's mtrrs has been 302 + * saved, and we want to replicate that across all the cpus that come 303 + * online (either at the end of boot or resume or during a runtime cpu 304 + * online). If we're doing that, @reg is set to something special and on 305 + * this cpu we still do mtrr_if->set_all(). During boot/resume, this 306 + * is unnecessary if at this point we are still on the cpu that started 307 + * the boot/resume sequence. But there is no guarantee that we are still 308 + * on the same cpu. So we do mtrr_if->set_all() on this cpu aswell to be 309 + * sure that we are in sync with everyone else. 300 310 */ 301 311 if (reg != ~0U) 302 312 mtrr_if->set(reg, base, size, type); 303 - else if (!mtrr_aps_delayed_init) 313 + else 304 314 mtrr_if->set_all(); 305 315 306 316 /* Wait for the others */
+1
arch/x86/kernel/irq.c
··· 8 8 #include <linux/seq_file.h> 9 9 #include <linux/smp.h> 10 10 #include <linux/ftrace.h> 11 + #include <linux/delay.h> 11 12 12 13 #include <asm/apic.h> 13 14 #include <asm/io_apic.h>
+1
arch/x86/kernel/microcode_core.c
··· 550 550 microcode_dev_exit(); 551 551 552 552 unregister_hotcpu_notifier(&mc_cpu_notifier); 553 + unregister_syscore_ops(&mc_syscore_ops); 553 554 554 555 get_online_cpus(); 555 556 mutex_lock(&microcode_mutex);
+1
arch/x86/kernel/reboot.c
··· 6 6 #include <linux/dmi.h> 7 7 #include <linux/sched.h> 8 8 #include <linux/tboot.h> 9 + #include <linux/delay.h> 9 10 #include <acpi/reboot.h> 10 11 #include <asm/io.h> 11 12 #include <asm/apic.h>
+107 -153
arch/x86/mm/numa_32.c
··· 104 104 105 105 #define LARGE_PAGE_BYTES (PTRS_PER_PTE * PAGE_SIZE) 106 106 107 - unsigned long node_remap_size[MAX_NUMNODES]; 108 107 static void *node_remap_start_vaddr[MAX_NUMNODES]; 109 108 void set_pmd_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags); 110 - 111 - static unsigned long kva_start_pfn; 112 - static unsigned long kva_pages; 113 109 114 110 int __cpuinit numa_cpu_node(int cpu) 115 111 { ··· 125 129 node_end_pfn[0] = max_pfn; 126 130 memblock_x86_register_active_regions(0, 0, max_pfn); 127 131 memory_present(0, 0, max_pfn); 128 - node_remap_size[0] = node_memmap_size_bytes(0, 0, max_pfn); 129 132 130 133 /* Indicate there is one node available. */ 131 134 nodes_clear(node_online_map); ··· 159 164 { 160 165 char buf[16]; 161 166 162 - if (node_has_online_mem(nid) && node_remap_start_vaddr[nid]) 163 - NODE_DATA(nid) = (pg_data_t *)node_remap_start_vaddr[nid]; 164 - else { 167 + NODE_DATA(nid) = alloc_remap(nid, ALIGN(sizeof(pg_data_t), PAGE_SIZE)); 168 + if (!NODE_DATA(nid)) { 165 169 unsigned long pgdat_phys; 166 170 pgdat_phys = memblock_find_in_range(min_low_pfn<<PAGE_SHIFT, 167 171 max_pfn_mapped<<PAGE_SHIFT, ··· 176 182 } 177 183 178 184 /* 179 - * In the DISCONTIGMEM and SPARSEMEM memory model, a portion of the kernel 180 - * virtual address space (KVA) is reserved and portions of nodes are mapped 181 - * using it. This is to allow node-local memory to be allocated for 182 - * structures that would normally require ZONE_NORMAL. The memory is 183 - * allocated with alloc_remap() and callers should be prepared to allocate 184 - * from the bootmem allocator instead. 185 + * Remap memory allocator 185 186 */ 186 187 static unsigned long node_remap_start_pfn[MAX_NUMNODES]; 187 188 static void *node_remap_end_vaddr[MAX_NUMNODES]; 188 189 static void *node_remap_alloc_vaddr[MAX_NUMNODES]; 189 - static unsigned long node_remap_offset[MAX_NUMNODES]; 190 190 191 + /** 192 + * alloc_remap - Allocate remapped memory 193 + * @nid: NUMA node to allocate memory from 194 + * @size: The size of allocation 195 + * 196 + * Allocate @size bytes from the remap area of NUMA node @nid. The 197 + * size of the remap area is predetermined by init_alloc_remap() and 198 + * only the callers considered there should call this function. For 199 + * more info, please read the comment on top of init_alloc_remap(). 200 + * 201 + * The caller must be ready to handle allocation failure from this 202 + * function and fall back to regular memory allocator in such cases. 203 + * 204 + * CONTEXT: 205 + * Single CPU early boot context. 206 + * 207 + * RETURNS: 208 + * Pointer to the allocated memory on success, %NULL on failure. 209 + */ 191 210 void *alloc_remap(int nid, unsigned long size) 192 211 { 193 212 void *allocation = node_remap_alloc_vaddr[nid]; 194 213 195 214 size = ALIGN(size, L1_CACHE_BYTES); 196 215 197 - if (!allocation || (allocation + size) >= node_remap_end_vaddr[nid]) 216 + if (!allocation || (allocation + size) > node_remap_end_vaddr[nid]) 198 217 return NULL; 199 218 200 219 node_remap_alloc_vaddr[nid] += size; 201 220 memset(allocation, 0, size); 202 221 203 222 return allocation; 204 - } 205 - 206 - static void __init remap_numa_kva(void) 207 - { 208 - void *vaddr; 209 - unsigned long pfn; 210 - int node; 211 - 212 - for_each_online_node(node) { 213 - printk(KERN_DEBUG "remap_numa_kva: node %d\n", node); 214 - for (pfn=0; pfn < node_remap_size[node]; pfn += PTRS_PER_PTE) { 215 - vaddr = node_remap_start_vaddr[node]+(pfn<<PAGE_SHIFT); 216 - printk(KERN_DEBUG "remap_numa_kva: %08lx to pfn %08lx\n", 217 - (unsigned long)vaddr, 218 - node_remap_start_pfn[node] + pfn); 219 - set_pmd_pfn((ulong) vaddr, 220 - node_remap_start_pfn[node] + pfn, 221 - PAGE_KERNEL_LARGE); 222 - } 223 - } 224 223 } 225 224 226 225 #ifdef CONFIG_HIBERNATION ··· 227 240 int node; 228 241 229 242 for_each_online_node(node) { 230 - unsigned long start_va, start_pfn, size, pfn; 243 + unsigned long start_va, start_pfn, nr_pages, pfn; 231 244 232 245 start_va = (unsigned long)node_remap_start_vaddr[node]; 233 246 start_pfn = node_remap_start_pfn[node]; 234 - size = node_remap_size[node]; 247 + nr_pages = (node_remap_end_vaddr[node] - 248 + node_remap_start_vaddr[node]) >> PAGE_SHIFT; 235 249 236 250 printk(KERN_DEBUG "%s: node %d\n", __func__, node); 237 251 238 - for (pfn = 0; pfn < size; pfn += PTRS_PER_PTE) { 252 + for (pfn = 0; pfn < nr_pages; pfn += PTRS_PER_PTE) { 239 253 unsigned long vaddr = start_va + (pfn << PAGE_SHIFT); 240 254 pgd_t *pgd = pgd_base + pgd_index(vaddr); 241 255 pud_t *pud = pud_offset(pgd, vaddr); ··· 252 264 } 253 265 #endif 254 266 255 - static __init unsigned long calculate_numa_remap_pages(void) 267 + /** 268 + * init_alloc_remap - Initialize remap allocator for a NUMA node 269 + * @nid: NUMA node to initizlie remap allocator for 270 + * 271 + * NUMA nodes may end up without any lowmem. As allocating pgdat and 272 + * memmap on a different node with lowmem is inefficient, a special 273 + * remap allocator is implemented which can be used by alloc_remap(). 274 + * 275 + * For each node, the amount of memory which will be necessary for 276 + * pgdat and memmap is calculated and two memory areas of the size are 277 + * allocated - one in the node and the other in lowmem; then, the area 278 + * in the node is remapped to the lowmem area. 279 + * 280 + * As pgdat and memmap must be allocated in lowmem anyway, this 281 + * doesn't waste lowmem address space; however, the actual lowmem 282 + * which gets remapped over is wasted. The amount shouldn't be 283 + * problematic on machines this feature will be used. 284 + * 285 + * Initialization failure isn't fatal. alloc_remap() is used 286 + * opportunistically and the callers will fall back to other memory 287 + * allocation mechanisms on failure. 288 + */ 289 + static __init void init_alloc_remap(int nid) 256 290 { 257 - int nid; 258 - unsigned long size, reserve_pages = 0; 291 + unsigned long size, pfn; 292 + u64 node_pa, remap_pa; 293 + void *remap_va; 259 294 260 - for_each_online_node(nid) { 261 - u64 node_kva_target; 262 - u64 node_kva_final; 295 + /* 296 + * The acpi/srat node info can show hot-add memroy zones where 297 + * memory could be added but not currently present. 298 + */ 299 + printk(KERN_DEBUG "node %d pfn: [%lx - %lx]\n", 300 + nid, node_start_pfn[nid], node_end_pfn[nid]); 301 + if (node_start_pfn[nid] > max_pfn) 302 + return; 303 + if (!node_end_pfn[nid]) 304 + return; 305 + if (node_end_pfn[nid] > max_pfn) 306 + node_end_pfn[nid] = max_pfn; 263 307 264 - /* 265 - * The acpi/srat node info can show hot-add memroy zones 266 - * where memory could be added but not currently present. 267 - */ 268 - printk(KERN_DEBUG "node %d pfn: [%lx - %lx]\n", 269 - nid, node_start_pfn[nid], node_end_pfn[nid]); 270 - if (node_start_pfn[nid] > max_pfn) 271 - continue; 272 - if (!node_end_pfn[nid]) 273 - continue; 274 - if (node_end_pfn[nid] > max_pfn) 275 - node_end_pfn[nid] = max_pfn; 308 + /* calculate the necessary space aligned to large page size */ 309 + size = node_memmap_size_bytes(nid, node_start_pfn[nid], 310 + min(node_end_pfn[nid], max_pfn)); 311 + size += ALIGN(sizeof(pg_data_t), PAGE_SIZE); 312 + size = ALIGN(size, LARGE_PAGE_BYTES); 276 313 277 - /* ensure the remap includes space for the pgdat. */ 278 - size = node_remap_size[nid] + sizeof(pg_data_t); 279 - 280 - /* convert size to large (pmd size) pages, rounding up */ 281 - size = (size + LARGE_PAGE_BYTES - 1) / LARGE_PAGE_BYTES; 282 - /* now the roundup is correct, convert to PAGE_SIZE pages */ 283 - size = size * PTRS_PER_PTE; 284 - 285 - node_kva_target = round_down(node_end_pfn[nid] - size, 286 - PTRS_PER_PTE); 287 - node_kva_target <<= PAGE_SHIFT; 288 - do { 289 - node_kva_final = memblock_find_in_range(node_kva_target, 290 - ((u64)node_end_pfn[nid])<<PAGE_SHIFT, 291 - ((u64)size)<<PAGE_SHIFT, 292 - LARGE_PAGE_BYTES); 293 - node_kva_target -= LARGE_PAGE_BYTES; 294 - } while (node_kva_final == MEMBLOCK_ERROR && 295 - (node_kva_target>>PAGE_SHIFT) > (node_start_pfn[nid])); 296 - 297 - if (node_kva_final == MEMBLOCK_ERROR) 298 - panic("Can not get kva ram\n"); 299 - 300 - node_remap_size[nid] = size; 301 - node_remap_offset[nid] = reserve_pages; 302 - reserve_pages += size; 303 - printk(KERN_DEBUG "Reserving %ld pages of KVA for lmem_map of" 304 - " node %d at %llx\n", 305 - size, nid, node_kva_final>>PAGE_SHIFT); 306 - 307 - /* 308 - * prevent kva address below max_low_pfn want it on system 309 - * with less memory later. 310 - * layout will be: KVA address , KVA RAM 311 - * 312 - * we are supposed to only record the one less then max_low_pfn 313 - * but we could have some hole in high memory, and it will only 314 - * check page_is_ram(pfn) && !page_is_reserved_early(pfn) to decide 315 - * to use it as free. 316 - * So memblock_x86_reserve_range here, hope we don't run out of that array 317 - */ 318 - memblock_x86_reserve_range(node_kva_final, 319 - node_kva_final+(((u64)size)<<PAGE_SHIFT), 320 - "KVA RAM"); 321 - 322 - node_remap_start_pfn[nid] = node_kva_final>>PAGE_SHIFT; 314 + /* allocate node memory and the lowmem remap area */ 315 + node_pa = memblock_find_in_range(node_start_pfn[nid] << PAGE_SHIFT, 316 + (u64)node_end_pfn[nid] << PAGE_SHIFT, 317 + size, LARGE_PAGE_BYTES); 318 + if (node_pa == MEMBLOCK_ERROR) { 319 + pr_warning("remap_alloc: failed to allocate %lu bytes for node %d\n", 320 + size, nid); 321 + return; 323 322 } 324 - printk(KERN_INFO "Reserving total of %lx pages for numa KVA remap\n", 325 - reserve_pages); 326 - return reserve_pages; 327 - } 323 + memblock_x86_reserve_range(node_pa, node_pa + size, "KVA RAM"); 328 324 329 - static void init_remap_allocator(int nid) 330 - { 331 - node_remap_start_vaddr[nid] = pfn_to_kaddr( 332 - kva_start_pfn + node_remap_offset[nid]); 333 - node_remap_end_vaddr[nid] = node_remap_start_vaddr[nid] + 334 - (node_remap_size[nid] * PAGE_SIZE); 335 - node_remap_alloc_vaddr[nid] = node_remap_start_vaddr[nid] + 336 - ALIGN(sizeof(pg_data_t), PAGE_SIZE); 325 + remap_pa = memblock_find_in_range(min_low_pfn << PAGE_SHIFT, 326 + max_low_pfn << PAGE_SHIFT, 327 + size, LARGE_PAGE_BYTES); 328 + if (remap_pa == MEMBLOCK_ERROR) { 329 + pr_warning("remap_alloc: failed to allocate %lu bytes remap area for node %d\n", 330 + size, nid); 331 + memblock_x86_free_range(node_pa, node_pa + size); 332 + return; 333 + } 334 + memblock_x86_reserve_range(remap_pa, remap_pa + size, "KVA PG"); 335 + remap_va = phys_to_virt(remap_pa); 337 336 338 - printk(KERN_DEBUG "node %d will remap to vaddr %08lx - %08lx\n", nid, 339 - (ulong) node_remap_start_vaddr[nid], 340 - (ulong) node_remap_end_vaddr[nid]); 337 + /* perform actual remap */ 338 + for (pfn = 0; pfn < size >> PAGE_SHIFT; pfn += PTRS_PER_PTE) 339 + set_pmd_pfn((unsigned long)remap_va + (pfn << PAGE_SHIFT), 340 + (node_pa >> PAGE_SHIFT) + pfn, 341 + PAGE_KERNEL_LARGE); 342 + 343 + /* initialize remap allocator parameters */ 344 + node_remap_start_pfn[nid] = node_pa >> PAGE_SHIFT; 345 + node_remap_start_vaddr[nid] = remap_va; 346 + node_remap_end_vaddr[nid] = remap_va + size; 347 + node_remap_alloc_vaddr[nid] = remap_va; 348 + 349 + printk(KERN_DEBUG "remap_alloc: node %d [%08llx-%08llx) -> [%p-%p)\n", 350 + nid, node_pa, node_pa + size, remap_va, remap_va + size); 341 351 } 342 352 343 353 void __init initmem_init(void) 344 354 { 345 355 int nid; 346 - long kva_target_pfn; 347 - 348 - /* 349 - * When mapping a NUMA machine we allocate the node_mem_map arrays 350 - * from node local memory. They are then mapped directly into KVA 351 - * between zone normal and vmalloc space. Calculate the size of 352 - * this space and use it to adjust the boundary between ZONE_NORMAL 353 - * and ZONE_HIGHMEM. 354 - */ 355 356 356 357 get_memcfg_numa(); 357 358 numa_init_array(); 358 359 359 - kva_pages = roundup(calculate_numa_remap_pages(), PTRS_PER_PTE); 360 + for_each_online_node(nid) 361 + init_alloc_remap(nid); 360 362 361 - kva_target_pfn = round_down(max_low_pfn - kva_pages, PTRS_PER_PTE); 362 - do { 363 - kva_start_pfn = memblock_find_in_range(kva_target_pfn<<PAGE_SHIFT, 364 - max_low_pfn<<PAGE_SHIFT, 365 - kva_pages<<PAGE_SHIFT, 366 - PTRS_PER_PTE<<PAGE_SHIFT) >> PAGE_SHIFT; 367 - kva_target_pfn -= PTRS_PER_PTE; 368 - } while (kva_start_pfn == MEMBLOCK_ERROR && kva_target_pfn > min_low_pfn); 369 - 370 - if (kva_start_pfn == MEMBLOCK_ERROR) 371 - panic("Can not get kva space\n"); 372 - 373 - printk(KERN_INFO "kva_start_pfn ~ %lx max_low_pfn ~ %lx\n", 374 - kva_start_pfn, max_low_pfn); 375 - printk(KERN_INFO "max_pfn = %lx\n", max_pfn); 376 - 377 - /* avoid clash with initrd */ 378 - memblock_x86_reserve_range(kva_start_pfn<<PAGE_SHIFT, 379 - (kva_start_pfn + kva_pages)<<PAGE_SHIFT, 380 - "KVA PG"); 381 363 #ifdef CONFIG_HIGHMEM 382 364 highstart_pfn = highend_pfn = max_pfn; 383 365 if (max_pfn > max_low_pfn) ··· 367 409 368 410 printk(KERN_DEBUG "Low memory ends at vaddr %08lx\n", 369 411 (ulong) pfn_to_kaddr(max_low_pfn)); 370 - for_each_online_node(nid) { 371 - init_remap_allocator(nid); 372 - 412 + for_each_online_node(nid) 373 413 allocate_pgdat(nid); 374 - } 375 - remap_numa_kva(); 376 414 377 415 printk(KERN_DEBUG "High memory starts at vaddr %08lx\n", 378 416 (ulong) pfn_to_kaddr(highstart_pfn));
-1
arch/x86/mm/srat_32.c
··· 276 276 unsigned long end = min(node_end_pfn[nid], max_pfn); 277 277 278 278 memory_present(nid, start, end); 279 - node_remap_size[nid] = node_memmap_size_bytes(nid, start, end); 280 279 } 281 280 return 1; 282 281 out_fail:
+5
arch/x86/oprofile/nmi_int.c
··· 49 49 val |= counter_config->user ? ARCH_PERFMON_EVENTSEL_USR : 0; 50 50 val |= counter_config->kernel ? ARCH_PERFMON_EVENTSEL_OS : 0; 51 51 val |= (counter_config->unit_mask & 0xFF) << 8; 52 + counter_config->extra &= (ARCH_PERFMON_EVENTSEL_INV | 53 + ARCH_PERFMON_EVENTSEL_EDGE | 54 + ARCH_PERFMON_EVENTSEL_CMASK); 55 + val |= counter_config->extra; 52 56 event &= model->event_mask ? model->event_mask : 0xFF; 53 57 val |= event & 0xFF; 54 58 val |= (event & 0x0F00) << 24; ··· 444 440 oprofilefs_create_ulong(sb, dir, "unit_mask", &counter_config[i].unit_mask); 445 441 oprofilefs_create_ulong(sb, dir, "kernel", &counter_config[i].kernel); 446 442 oprofilefs_create_ulong(sb, dir, "user", &counter_config[i].user); 443 + oprofilefs_create_ulong(sb, dir, "extra", &counter_config[i].extra); 447 444 } 448 445 449 446 return 0;
+1
arch/x86/oprofile/op_counter.h
··· 22 22 unsigned long kernel; 23 23 unsigned long user; 24 24 unsigned long unit_mask; 25 + unsigned long extra; 25 26 }; 26 27 27 28 extern struct op_counter_config counter_config[];
+1
arch/x86/platform/uv/tlb_uv.c
··· 11 11 #include <linux/debugfs.h> 12 12 #include <linux/kernel.h> 13 13 #include <linux/slab.h> 14 + #include <linux/delay.h> 14 15 15 16 #include <asm/mmu_context.h> 16 17 #include <asm/uv/uv.h>
+2 -2
block/blk-core.c
··· 2163 2163 * size, something has gone terribly wrong. 2164 2164 */ 2165 2165 if (blk_rq_bytes(req) < blk_rq_cur_bytes(req)) { 2166 - printk(KERN_ERR "blk: request botched\n"); 2166 + blk_dump_rq_flags(req, "request botched"); 2167 2167 req->__data_len = blk_rq_cur_bytes(req); 2168 2168 } 2169 2169 ··· 2665 2665 struct request *rqa = container_of(a, struct request, queuelist); 2666 2666 struct request *rqb = container_of(b, struct request, queuelist); 2667 2667 2668 - return !(rqa->q == rqb->q); 2668 + return !(rqa->q <= rqb->q); 2669 2669 } 2670 2670 2671 2671 static void flush_plug_list(struct blk_plug *plug)
+3 -3
block/blk-flush.c
··· 261 261 q->flush_rq.end_io = flush_end_io; 262 262 263 263 q->flush_pending_idx ^= 1; 264 - elv_insert(q, &q->flush_rq, ELEVATOR_INSERT_REQUEUE); 264 + list_add_tail(&q->flush_rq.queuelist, &q->queue_head); 265 265 return true; 266 266 } 267 267 ··· 281 281 * blk_insert_flush - insert a new FLUSH/FUA request 282 282 * @rq: request to insert 283 283 * 284 - * To be called from elv_insert() for %ELEVATOR_INSERT_FLUSH insertions. 284 + * To be called from __elv_add_request() for %ELEVATOR_INSERT_FLUSH insertions. 285 285 * @rq is being submitted. Analyze what needs to be done and put it on the 286 286 * right queue. 287 287 * ··· 312 312 */ 313 313 if ((policy & REQ_FSEQ_DATA) && 314 314 !(policy & (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH))) { 315 - list_add(&rq->queuelist, &q->queue_head); 315 + list_add_tail(&rq->queuelist, &q->queue_head); 316 316 return; 317 317 } 318 318
+11 -1
block/blk-integrity.c
··· 30 30 31 31 static struct kmem_cache *integrity_cachep; 32 32 33 + static const char *bi_unsupported_name = "unsupported"; 34 + 33 35 /** 34 36 * blk_rq_count_integrity_sg - Count number of integrity scatterlist elements 35 37 * @q: request queue ··· 360 358 .release = blk_integrity_release, 361 359 }; 362 360 361 + bool blk_integrity_is_initialized(struct gendisk *disk) 362 + { 363 + struct blk_integrity *bi = blk_get_integrity(disk); 364 + 365 + return (bi && bi->name && strcmp(bi->name, bi_unsupported_name) != 0); 366 + } 367 + EXPORT_SYMBOL(blk_integrity_is_initialized); 368 + 363 369 /** 364 370 * blk_integrity_register - Register a gendisk as being integrity-capable 365 371 * @disk: struct gendisk pointer to make integrity-aware ··· 417 407 bi->get_tag_fn = template->get_tag_fn; 418 408 bi->tag_size = template->tag_size; 419 409 } else 420 - bi->name = "unsupported"; 410 + bi->name = bi_unsupported_name; 421 411 422 412 return 0; 423 413 }
+2 -2
block/blk-throttle.c
··· 77 77 unsigned long slice_end[2]; 78 78 79 79 /* Some throttle limits got updated for the group */ 80 - bool limits_changed; 80 + int limits_changed; 81 81 }; 82 82 83 83 struct throtl_data ··· 102 102 /* Work for dispatching throttled bios */ 103 103 struct delayed_work throtl_work; 104 104 105 - bool limits_changed; 105 + int limits_changed; 106 106 }; 107 107 108 108 enum tg_state_flags {
+15 -20
block/elevator.c
··· 610 610 611 611 rq->cmd_flags &= ~REQ_STARTED; 612 612 613 - elv_insert(q, rq, ELEVATOR_INSERT_REQUEUE); 613 + __elv_add_request(q, rq, ELEVATOR_INSERT_REQUEUE); 614 614 } 615 615 616 616 void elv_drain_elevator(struct request_queue *q) ··· 655 655 queue_flag_clear(QUEUE_FLAG_ELVSWITCH, q); 656 656 } 657 657 658 - void elv_insert(struct request_queue *q, struct request *rq, int where) 658 + void __elv_add_request(struct request_queue *q, struct request *rq, int where) 659 659 { 660 660 trace_block_rq_insert(q, rq); 661 661 662 662 rq->q = q; 663 + 664 + BUG_ON(rq->cmd_flags & REQ_ON_PLUG); 665 + 666 + if (rq->cmd_flags & REQ_SOFTBARRIER) { 667 + /* barriers are scheduling boundary, update end_sector */ 668 + if (rq->cmd_type == REQ_TYPE_FS || 669 + (rq->cmd_flags & REQ_DISCARD)) { 670 + q->end_sector = rq_end_sector(rq); 671 + q->boundary_rq = rq; 672 + } 673 + } else if (!(rq->cmd_flags & REQ_ELVPRIV) && 674 + where == ELEVATOR_INSERT_SORT) 675 + where = ELEVATOR_INSERT_BACK; 663 676 664 677 switch (where) { 665 678 case ELEVATOR_INSERT_REQUEUE: ··· 734 721 __func__, where); 735 722 BUG(); 736 723 } 737 - } 738 - 739 - void __elv_add_request(struct request_queue *q, struct request *rq, int where) 740 - { 741 - BUG_ON(rq->cmd_flags & REQ_ON_PLUG); 742 - 743 - if (rq->cmd_flags & REQ_SOFTBARRIER) { 744 - /* barriers are scheduling boundary, update end_sector */ 745 - if (rq->cmd_type == REQ_TYPE_FS || 746 - (rq->cmd_flags & REQ_DISCARD)) { 747 - q->end_sector = rq_end_sector(rq); 748 - q->boundary_rq = rq; 749 - } 750 - } else if (!(rq->cmd_flags & REQ_ELVPRIV) && 751 - where == ELEVATOR_INSERT_SORT) 752 - where = ELEVATOR_INSERT_BACK; 753 - 754 - elv_insert(q, rq, where); 755 724 } 756 725 EXPORT_SYMBOL(__elv_add_request); 757 726
+5 -1
drivers/bluetooth/btusb.c
··· 71 71 /* Apple MacBookAir3,1, MacBookAir3,2 */ 72 72 { USB_DEVICE(0x05ac, 0x821b) }, 73 73 74 + /* Apple MacBookPro8,2 */ 75 + { USB_DEVICE(0x05ac, 0x821a) }, 76 + 74 77 /* AVM BlueFRITZ! USB v2.0 */ 75 78 { USB_DEVICE(0x057c, 0x3800) }, 76 79 ··· 693 690 break; 694 691 695 692 case HCI_ACLDATA_PKT: 696 - if (!data->bulk_tx_ep || hdev->conn_hash.acl_num < 1) 693 + if (!data->bulk_tx_ep || (hdev->conn_hash.acl_num < 1 && 694 + hdev->conn_hash.le_num < 1)) 697 695 return -ENODEV; 698 696 699 697 urb = usb_alloc_urb(0, GFP_ATOMIC);
+19 -8
drivers/edac/mpc85xx_edac.c
··· 1147 1147 static void __init mpc85xx_mc_clear_rfxe(void *data) 1148 1148 { 1149 1149 orig_hid1[smp_processor_id()] = mfspr(SPRN_HID1); 1150 - mtspr(SPRN_HID1, (orig_hid1[smp_processor_id()] & ~0x20000)); 1150 + mtspr(SPRN_HID1, (orig_hid1[smp_processor_id()] & ~HID1_RFXE)); 1151 1151 } 1152 1152 #endif 1153 1153 1154 1154 static int __init mpc85xx_mc_init(void) 1155 1155 { 1156 1156 int res = 0; 1157 + u32 pvr = 0; 1157 1158 1158 1159 printk(KERN_INFO "Freescale(R) MPC85xx EDAC driver, " 1159 1160 "(C) 2006 Montavista Software\n"); ··· 1184 1183 #endif 1185 1184 1186 1185 #ifdef CONFIG_FSL_SOC_BOOKE 1187 - /* 1188 - * need to clear HID1[RFXE] to disable machine check int 1189 - * so we can catch it 1190 - */ 1191 - if (edac_op_state == EDAC_OPSTATE_INT) 1192 - on_each_cpu(mpc85xx_mc_clear_rfxe, NULL, 0); 1186 + pvr = mfspr(SPRN_PVR); 1187 + 1188 + if ((PVR_VER(pvr) == PVR_VER_E500V1) || 1189 + (PVR_VER(pvr) == PVR_VER_E500V2)) { 1190 + /* 1191 + * need to clear HID1[RFXE] to disable machine check int 1192 + * so we can catch it 1193 + */ 1194 + if (edac_op_state == EDAC_OPSTATE_INT) 1195 + on_each_cpu(mpc85xx_mc_clear_rfxe, NULL, 0); 1196 + } 1193 1197 #endif 1194 1198 1195 1199 return 0; ··· 1212 1206 static void __exit mpc85xx_mc_exit(void) 1213 1207 { 1214 1208 #ifdef CONFIG_FSL_SOC_BOOKE 1215 - on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0); 1209 + u32 pvr = mfspr(SPRN_PVR); 1210 + 1211 + if ((PVR_VER(pvr) == PVR_VER_E500V1) || 1212 + (PVR_VER(pvr) == PVR_VER_E500V2)) { 1213 + on_each_cpu(mpc85xx_mc_restore_hid1, NULL, 0); 1214 + } 1216 1215 #endif 1217 1216 #ifdef CONFIG_PCI 1218 1217 platform_driver_unregister(&mpc85xx_pci_err_driver);
+2 -1
drivers/gpu/drm/drm_edid.c
··· 1297 1297 /** 1298 1298 * Search EDID for CEA extension block. 1299 1299 */ 1300 - static u8 *drm_find_cea_extension(struct edid *edid) 1300 + u8 *drm_find_cea_extension(struct edid *edid) 1301 1301 { 1302 1302 u8 *edid_ext = NULL; 1303 1303 int i; ··· 1318 1318 1319 1319 return edid_ext; 1320 1320 } 1321 + EXPORT_SYMBOL(drm_find_cea_extension); 1321 1322 1322 1323 /** 1323 1324 * drm_detect_hdmi_monitor - detect whether monitor is hdmi.
-20
drivers/gpu/drm/i915/intel_crt.c
··· 269 269 return ret; 270 270 } 271 271 272 - static bool intel_crt_ddc_probe(struct drm_i915_private *dev_priv, int ddc_bus) 273 - { 274 - u8 buf; 275 - struct i2c_msg msgs[] = { 276 - { 277 - .addr = 0xA0, 278 - .flags = 0, 279 - .len = 1, 280 - .buf = &buf, 281 - }, 282 - }; 283 - /* DDC monitor detect: Does it ACK a write to 0xA0? */ 284 - return i2c_transfer(&dev_priv->gmbus[ddc_bus].adapter, msgs, 1) == 1; 285 - } 286 - 287 272 static bool intel_crt_detect_ddc(struct drm_connector *connector) 288 273 { 289 274 struct intel_crt *crt = intel_attached_crt(connector); ··· 277 292 /* CRT should always be at 0, but check anyway */ 278 293 if (crt->base.type != INTEL_OUTPUT_ANALOG) 279 294 return false; 280 - 281 - if (intel_crt_ddc_probe(dev_priv, dev_priv->crt_ddc_pin)) { 282 - DRM_DEBUG_KMS("CRT detected via DDC:0xa0\n"); 283 - return true; 284 - } 285 295 286 296 if (intel_ddc_probe(&crt->base, dev_priv->crt_ddc_pin)) { 287 297 struct edid *edid;
+1 -1
drivers/gpu/drm/i915/intel_drv.h
··· 39 39 ret__ = -ETIMEDOUT; \ 40 40 break; \ 41 41 } \ 42 - if (W && !in_dbg_master()) msleep(W); \ 42 + if (W && !(in_atomic() || in_dbg_master())) msleep(W); \ 43 43 } \ 44 44 ret__; \ 45 45 })
+21 -4
drivers/gpu/drm/i915/intel_i2c.c
··· 259 259 if (wait_for(I915_READ(GMBUS2 + reg_offset) & (GMBUS_SATOER | GMBUS_HW_RDY), 50)) 260 260 goto timeout; 261 261 if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER) 262 - return 0; 262 + goto clear_err; 263 263 264 264 val = I915_READ(GMBUS3 + reg_offset); 265 265 do { ··· 287 287 if (wait_for(I915_READ(GMBUS2 + reg_offset) & (GMBUS_SATOER | GMBUS_HW_RDY), 50)) 288 288 goto timeout; 289 289 if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER) 290 - return 0; 290 + goto clear_err; 291 291 292 292 val = loop = 0; 293 293 do { ··· 302 302 if (i + 1 < num && wait_for(I915_READ(GMBUS2 + reg_offset) & (GMBUS_SATOER | GMBUS_HW_WAIT_PHASE), 50)) 303 303 goto timeout; 304 304 if (I915_READ(GMBUS2 + reg_offset) & GMBUS_SATOER) 305 - return 0; 305 + goto clear_err; 306 306 } 307 307 308 - return num; 308 + goto done; 309 + 310 + clear_err: 311 + /* Toggle the Software Clear Interrupt bit. This has the effect 312 + * of resetting the GMBUS controller and so clearing the 313 + * BUS_ERROR raised by the slave's NAK. 314 + */ 315 + I915_WRITE(GMBUS1 + reg_offset, GMBUS_SW_CLR_INT); 316 + I915_WRITE(GMBUS1 + reg_offset, 0); 317 + 318 + done: 319 + /* Mark the GMBUS interface as disabled. We will re-enable it at the 320 + * start of the next xfer, till then let it sleep. 321 + */ 322 + I915_WRITE(GMBUS0 + reg_offset, 0); 323 + return i; 309 324 310 325 timeout: 311 326 DRM_INFO("GMBUS timed out, falling back to bit banging on pin %d [%s]\n", 312 327 bus->reg0 & 0xff, bus->adapter.name); 328 + I915_WRITE(GMBUS0 + reg_offset, 0); 329 + 313 330 /* Hardware may not support GMBUS over these pins? Try GPIO bitbanging instead. */ 314 331 bus->force_bit = intel_gpio_create(dev_priv, bus->reg0 & 0xff); 315 332 if (!bus->force_bit)
+2 -32
drivers/gpu/drm/i915/intel_lvds.c
··· 473 473 intel_lvds_detect(struct drm_connector *connector, bool force) 474 474 { 475 475 struct drm_device *dev = connector->dev; 476 - enum drm_connector_status status = connector_status_connected; 476 + enum drm_connector_status status; 477 477 478 478 status = intel_panel_detect(dev); 479 479 if (status != connector_status_unknown) 480 480 return status; 481 481 482 - /* ACPI lid methods were generally unreliable in this generation, so 483 - * don't even bother. 484 - */ 485 - if (IS_GEN2(dev) || IS_GEN3(dev)) 486 - return connector_status_connected; 487 - 488 - return status; 482 + return connector_status_connected; 489 483 } 490 484 491 485 /** ··· 829 835 return false; 830 836 } 831 837 832 - static bool intel_lvds_ddc_probe(struct drm_device *dev, u8 pin) 833 - { 834 - struct drm_i915_private *dev_priv = dev->dev_private; 835 - u8 buf = 0; 836 - struct i2c_msg msgs[] = { 837 - { 838 - .addr = 0xA0, 839 - .flags = 0, 840 - .len = 1, 841 - .buf = &buf, 842 - }, 843 - }; 844 - struct i2c_adapter *i2c = &dev_priv->gmbus[pin].adapter; 845 - /* XXX this only appears to work when using GMBUS */ 846 - if (intel_gmbus_is_forced_bit(i2c)) 847 - return true; 848 - return i2c_transfer(i2c, msgs, 1) == 1; 849 - } 850 - 851 838 /** 852 839 * intel_lvds_init - setup LVDS connectors on this device 853 840 * @dev: drm device ··· 867 892 DRM_DEBUG_KMS("disable LVDS for eDP support\n"); 868 893 return false; 869 894 } 870 - } 871 - 872 - if (!intel_lvds_ddc_probe(dev, pin)) { 873 - DRM_DEBUG_KMS("LVDS did not respond to DDC probe\n"); 874 - return false; 875 895 } 876 896 877 897 intel_lvds = kzalloc(sizeof(struct intel_lvds), GFP_KERNEL);
+1 -1
drivers/gpu/drm/nouveau/nouveau_gem.c
··· 97 97 return -ENOMEM; 98 98 } 99 99 100 - nvbo->bo.persistant_swap_storage = nvbo->gem->filp; 100 + nvbo->bo.persistent_swap_storage = nvbo->gem->filp; 101 101 nvbo->gem->driver_private = nvbo; 102 102 return 0; 103 103 }
+20
drivers/gpu/drm/radeon/atombios_crtc.c
··· 1009 1009 uint64_t fb_location; 1010 1010 uint32_t fb_format, fb_pitch_pixels, tiling_flags; 1011 1011 u32 fb_swap = EVERGREEN_GRPH_ENDIAN_SWAP(EVERGREEN_GRPH_ENDIAN_NONE); 1012 + u32 tmp; 1012 1013 int r; 1013 1014 1014 1015 /* no fb bound */ ··· 1138 1137 WREG32(EVERGREEN_VIEWPORT_SIZE + radeon_crtc->crtc_offset, 1139 1138 (crtc->mode.hdisplay << 16) | crtc->mode.vdisplay); 1140 1139 1140 + /* pageflip setup */ 1141 + /* make sure flip is at vb rather than hb */ 1142 + tmp = RREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset); 1143 + tmp &= ~EVERGREEN_GRPH_SURFACE_UPDATE_H_RETRACE_EN; 1144 + WREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp); 1145 + 1146 + /* set pageflip to happen anywhere in vblank interval */ 1147 + WREG32(EVERGREEN_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0); 1148 + 1141 1149 if (!atomic && fb && fb != crtc->fb) { 1142 1150 radeon_fb = to_radeon_framebuffer(fb); 1143 1151 rbo = gem_to_radeon_bo(radeon_fb->obj); ··· 1177 1167 uint64_t fb_location; 1178 1168 uint32_t fb_format, fb_pitch_pixels, tiling_flags; 1179 1169 u32 fb_swap = R600_D1GRPH_SWAP_ENDIAN_NONE; 1170 + u32 tmp; 1180 1171 int r; 1181 1172 1182 1173 /* no fb bound */ ··· 1304 1293 (x << 16) | y); 1305 1294 WREG32(AVIVO_D1MODE_VIEWPORT_SIZE + radeon_crtc->crtc_offset, 1306 1295 (crtc->mode.hdisplay << 16) | crtc->mode.vdisplay); 1296 + 1297 + /* pageflip setup */ 1298 + /* make sure flip is at vb rather than hb */ 1299 + tmp = RREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset); 1300 + tmp &= ~AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN; 1301 + WREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp); 1302 + 1303 + /* set pageflip to happen anywhere in vblank interval */ 1304 + WREG32(AVIVO_D1MODE_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0); 1307 1305 1308 1306 if (!atomic && fb && fb != crtc->fb) { 1309 1307 radeon_fb = to_radeon_framebuffer(fb);
-11
drivers/gpu/drm/radeon/evergreen.c
··· 43 43 44 44 void evergreen_pre_page_flip(struct radeon_device *rdev, int crtc) 45 45 { 46 - struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc]; 47 - u32 tmp; 48 - 49 - /* make sure flip is at vb rather than hb */ 50 - tmp = RREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset); 51 - tmp &= ~EVERGREEN_GRPH_SURFACE_UPDATE_H_RETRACE_EN; 52 - WREG32(EVERGREEN_GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp); 53 - 54 - /* set pageflip to happen anywhere in vblank interval */ 55 - WREG32(EVERGREEN_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0); 56 - 57 46 /* enable the pflip int */ 58 47 radeon_irq_kms_pflip_irq_get(rdev, crtc); 59 48 }
+7 -6
drivers/gpu/drm/radeon/radeon_atombios.c
··· 675 675 ATOM_ENCODER_CAP_RECORD *cap_record; 676 676 u16 caps = 0; 677 677 678 - while (record->ucRecordType > 0 && 678 + while (record->ucRecordSize > 0 && 679 + record->ucRecordType > 0 && 679 680 record->ucRecordType <= ATOM_MAX_OBJECT_RECORD_NUMBER) { 680 681 switch (record->ucRecordType) { 681 682 case ATOM_ENCODER_CAP_RECORD_TYPE: ··· 721 720 break; 722 721 } 723 722 724 - while (record->ucRecordType > 0 && 723 + while (record->ucRecordSize > 0 && 724 + record->ucRecordType > 0 && 725 725 record->ucRecordType <= ATOM_MAX_OBJECT_RECORD_NUMBER) { 726 726 switch (record->ucRecordType) { 727 727 case ATOM_I2C_RECORD_TYPE: ··· 784 782 ATOM_HPD_INT_RECORD *hpd_record; 785 783 ATOM_I2C_ID_CONFIG_ACCESS *i2c_config; 786 784 787 - while (record->ucRecordType > 0 788 - && record-> 789 - ucRecordType <= 790 - ATOM_MAX_OBJECT_RECORD_NUMBER) { 785 + while (record->ucRecordSize > 0 && 786 + record->ucRecordType > 0 && 787 + record->ucRecordType <= ATOM_MAX_OBJECT_RECORD_NUMBER) { 791 788 switch (record->ucRecordType) { 792 789 case ATOM_I2C_RECORD_TYPE: 793 790 i2c_record =
+13
drivers/gpu/drm/radeon/radeon_combios.c
··· 2079 2079 DRM_MODE_CONNECTOR_DVII, &ddc_i2c, 2080 2080 CONNECTOR_OBJECT_ID_SINGLE_LINK_DVI_I, 2081 2081 &hpd); 2082 + /* TV - TV DAC */ 2083 + ddc_i2c.valid = false; 2084 + hpd.hpd = RADEON_HPD_NONE; 2085 + radeon_add_legacy_encoder(dev, 2086 + radeon_get_encoder_enum(dev, 2087 + ATOM_DEVICE_TV1_SUPPORT, 2088 + 2), 2089 + ATOM_DEVICE_TV1_SUPPORT); 2090 + radeon_add_legacy_connector(dev, 2, ATOM_DEVICE_TV1_SUPPORT, 2091 + DRM_MODE_CONNECTOR_SVIDEO, 2092 + &ddc_i2c, 2093 + CONNECTOR_OBJECT_ID_SVIDEO, 2094 + &hpd); 2082 2095 break; 2083 2096 default: 2084 2097 DRM_INFO("Connector table: %d (invalid)\n",
-11
drivers/gpu/drm/radeon/rs600.c
··· 48 48 49 49 void rs600_pre_page_flip(struct radeon_device *rdev, int crtc) 50 50 { 51 - struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc]; 52 - u32 tmp; 53 - 54 - /* make sure flip is at vb rather than hb */ 55 - tmp = RREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset); 56 - tmp &= ~AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN; 57 - WREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, tmp); 58 - 59 - /* set pageflip to happen anywhere in vblank interval */ 60 - WREG32(AVIVO_D1MODE_MASTER_UPDATE_MODE + radeon_crtc->crtc_offset, 0); 61 - 62 51 /* enable the pflip int */ 63 52 radeon_irq_kms_pflip_irq_get(rdev, crtc); 64 53 }
+5 -5
drivers/gpu/drm/ttm/ttm_bo.c
··· 1168 1168 uint32_t page_alignment, 1169 1169 unsigned long buffer_start, 1170 1170 bool interruptible, 1171 - struct file *persistant_swap_storage, 1171 + struct file *persistent_swap_storage, 1172 1172 size_t acc_size, 1173 1173 void (*destroy) (struct ttm_buffer_object *)) 1174 1174 { ··· 1211 1211 bo->priv_flags = 0; 1212 1212 bo->mem.placement = (TTM_PL_FLAG_SYSTEM | TTM_PL_FLAG_CACHED); 1213 1213 bo->seq_valid = false; 1214 - bo->persistant_swap_storage = persistant_swap_storage; 1214 + bo->persistent_swap_storage = persistent_swap_storage; 1215 1215 bo->acc_size = acc_size; 1216 1216 atomic_inc(&bo->glob->bo_count); 1217 1217 ··· 1260 1260 uint32_t page_alignment, 1261 1261 unsigned long buffer_start, 1262 1262 bool interruptible, 1263 - struct file *persistant_swap_storage, 1263 + struct file *persistent_swap_storage, 1264 1264 struct ttm_buffer_object **p_bo) 1265 1265 { 1266 1266 struct ttm_buffer_object *bo; ··· 1282 1282 1283 1283 ret = ttm_bo_init(bdev, bo, size, type, placement, page_alignment, 1284 1284 buffer_start, interruptible, 1285 - persistant_swap_storage, acc_size, NULL); 1285 + persistent_swap_storage, acc_size, NULL); 1286 1286 if (likely(ret == 0)) 1287 1287 *p_bo = bo; 1288 1288 ··· 1863 1863 if (bo->bdev->driver->swap_notify) 1864 1864 bo->bdev->driver->swap_notify(bo); 1865 1865 1866 - ret = ttm_tt_swapout(bo->ttm, bo->persistant_swap_storage); 1866 + ret = ttm_tt_swapout(bo->ttm, bo->persistent_swap_storage); 1867 1867 out: 1868 1868 1869 1869 /**
+8 -8
drivers/gpu/drm/ttm/ttm_tt.c
··· 332 332 ttm_tt_free_page_directory(ttm); 333 333 } 334 334 335 - if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTANT_SWAP) && 335 + if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTENT_SWAP) && 336 336 ttm->swap_storage) 337 337 fput(ttm->swap_storage); 338 338 ··· 503 503 page_cache_release(from_page); 504 504 } 505 505 506 - if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTANT_SWAP)) 506 + if (!(ttm->page_flags & TTM_PAGE_FLAG_PERSISTENT_SWAP)) 507 507 fput(swap_storage); 508 508 ttm->swap_storage = NULL; 509 509 ttm->page_flags &= ~TTM_PAGE_FLAG_SWAPPED; ··· 514 514 return ret; 515 515 } 516 516 517 - int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistant_swap_storage) 517 + int ttm_tt_swapout(struct ttm_tt *ttm, struct file *persistent_swap_storage) 518 518 { 519 519 struct address_space *swap_space; 520 520 struct file *swap_storage; ··· 540 540 return 0; 541 541 } 542 542 543 - if (!persistant_swap_storage) { 543 + if (!persistent_swap_storage) { 544 544 swap_storage = shmem_file_setup("ttm swap", 545 545 ttm->num_pages << PAGE_SHIFT, 546 546 0); ··· 549 549 return PTR_ERR(swap_storage); 550 550 } 551 551 } else 552 - swap_storage = persistant_swap_storage; 552 + swap_storage = persistent_swap_storage; 553 553 554 554 swap_space = swap_storage->f_path.dentry->d_inode->i_mapping; 555 555 ··· 577 577 ttm_tt_free_alloced_pages(ttm); 578 578 ttm->swap_storage = swap_storage; 579 579 ttm->page_flags |= TTM_PAGE_FLAG_SWAPPED; 580 - if (persistant_swap_storage) 581 - ttm->page_flags |= TTM_PAGE_FLAG_PERSISTANT_SWAP; 580 + if (persistent_swap_storage) 581 + ttm->page_flags |= TTM_PAGE_FLAG_PERSISTENT_SWAP; 582 582 583 583 return 0; 584 584 out_err: 585 - if (!persistant_swap_storage) 585 + if (!persistent_swap_storage) 586 586 fput(swap_storage); 587 587 588 588 return ret;
+1 -1
drivers/hwmon/twl4030-madc-hwmon.c
··· 154 154 MODULE_DESCRIPTION("TWL4030 ADC Hwmon driver"); 155 155 MODULE_LICENSE("GPL"); 156 156 MODULE_AUTHOR("J Keerthy"); 157 - MODULE_ALIAS("twl4030_madc_hwmon"); 157 + MODULE_ALIAS("platform:twl4030_madc_hwmon");
+21 -22
drivers/ide/ide-io.c
··· 430 430 } 431 431 } 432 432 433 + static void __ide_requeue_and_plug(struct request_queue *q, struct request *rq) 434 + { 435 + if (rq) 436 + blk_requeue_request(q, rq); 437 + if (rq || blk_peek_request(q)) { 438 + /* Use 3ms as that was the old plug delay */ 439 + blk_delay_queue(q, 3); 440 + } 441 + } 442 + 443 + void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) 444 + { 445 + struct request_queue *q = drive->queue; 446 + unsigned long flags; 447 + 448 + spin_lock_irqsave(q->queue_lock, flags); 449 + __ide_requeue_and_plug(q, rq); 450 + spin_unlock_irqrestore(q->queue_lock, flags); 451 + } 452 + 433 453 /* 434 454 * Issue a new request to a device. 435 455 */ ··· 570 550 ide_unlock_host(host); 571 551 plug_device_2: 572 552 spin_lock_irq(q->queue_lock); 573 - 574 - if (rq) { 575 - blk_requeue_request(q, rq); 576 - blk_delay_queue(q, queue_run_ms); 577 - } 578 - } 579 - 580 - void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) 581 - { 582 - struct request_queue *q = drive->queue; 583 - unsigned long flags; 584 - 585 - spin_lock_irqsave(q->queue_lock, flags); 586 - 587 - if (rq) 588 - blk_requeue_request(q, rq); 589 - 590 - spin_unlock_irqrestore(q->queue_lock, flags); 591 - 592 - /* Use 3ms as that was the old plug delay */ 593 - if (rq) 594 - blk_delay_queue(q, 3); 553 + __ide_requeue_and_plug(q, rq); 595 554 } 596 555 597 556 static int drive_is_ready(ide_drive_t *drive)
+1 -1
drivers/input/keyboard/spear-keyboard.c
··· 69 69 u8 sts, val; 70 70 71 71 sts = readb(kbd->io_base + STATUS_REG); 72 - if (sts & DATA_AVAIL) 72 + if (!(sts & DATA_AVAIL)) 73 73 return IRQ_NONE; 74 74 75 75 if (kbd->last_key != KEY_RESERVED) {
+5 -1
drivers/input/misc/uinput.c
··· 302 302 int retval = 0; 303 303 304 304 for (cnt = 0; cnt < ABS_CNT; cnt++) { 305 + int min, max; 305 306 if (!test_bit(cnt, dev->absbit)) 306 307 continue; 307 308 308 - if (input_abs_get_max(dev, cnt) <= input_abs_get_min(dev, cnt)) { 309 + min = input_abs_get_min(dev, cnt); 310 + max = input_abs_get_max(dev, cnt); 311 + 312 + if ((min != 0 || max != 0) && max <= min) { 309 313 printk(KERN_DEBUG 310 314 "%s: invalid abs[%02x] min:%d max:%d\n", 311 315 UINPUT_NAME, cnt,
+2 -2
drivers/input/mouse/synaptics.c
··· 836 836 }, 837 837 838 838 }, 839 - { } 840 839 #endif 840 + { } 841 841 }; 842 842 843 843 static bool broken_olpc_ec; ··· 851 851 DMI_MATCH(DMI_PRODUCT_NAME, "XO"), 852 852 }, 853 853 }, 854 - { } 855 854 #endif 855 + { } 856 856 }; 857 857 858 858 void __init synaptics_module_init(void)
+4 -3
drivers/input/serio/i8042.c
··· 869 869 do { 870 870 871 871 if (i8042_command(&param, I8042_CMD_CTL_TEST)) { 872 - pr_err("i8042 controller self test timeout\n"); 872 + pr_err("i8042 controller selftest timeout\n"); 873 873 return -ENODEV; 874 874 } 875 875 876 876 if (param == I8042_RET_CTL_TEST) 877 877 return 0; 878 878 879 - pr_err("i8042 controller selftest failed. (%#x != %#x)\n", 880 - param, I8042_RET_CTL_TEST); 879 + dbg("i8042 controller selftest: %#x != %#x\n", 880 + param, I8042_RET_CTL_TEST); 881 881 msleep(50); 882 882 } while (i++ < 5); 883 883 ··· 891 891 pr_info("giving up on controller selftest, continuing anyway...\n"); 892 892 return 0; 893 893 #else 894 + pr_err("i8042 controller selftest failed\n"); 894 895 return -EIO; 895 896 #endif 896 897 }
+1 -1
drivers/input/serio/rpckbd.c
··· 90 90 91 91 if (request_irq(IRQ_KEYBOARDTX, rpckbd_tx, 0, "rpckbd", port) != 0) { 92 92 printk(KERN_ERR "rpckbd.c: Could not allocate keyboard transmit IRQ\n"); 93 - free_irq(IRQ_KEYBOARDRX, NULL); 93 + free_irq(IRQ_KEYBOARDRX, port); 94 94 return -EBUSY; 95 95 } 96 96
+14
drivers/input/sparse-keymap.c
··· 208 208 } 209 209 } 210 210 211 + if (test_bit(EV_KEY, dev->evbit)) { 212 + __set_bit(KEY_UNKNOWN, dev->keybit); 213 + __set_bit(EV_MSC, dev->evbit); 214 + __set_bit(MSC_SCAN, dev->mscbit); 215 + } 216 + 211 217 dev->keycode = map; 212 218 dev->keycodemax = map_size; 213 219 dev->getkeycode = sparse_keymap_getkeycode; ··· 274 268 { 275 269 switch (ke->type) { 276 270 case KE_KEY: 271 + input_event(dev, EV_MSC, MSC_SCAN, ke->code); 277 272 input_report_key(dev, ke->keycode, value); 278 273 input_sync(dev); 279 274 if (value && autorelease) { ··· 312 305 { 313 306 const struct key_entry *ke = 314 307 sparse_keymap_entry_from_scancode(dev, code); 308 + struct key_entry unknown_ke; 315 309 316 310 if (ke) { 317 311 sparse_keymap_report_entry(dev, ke, value, autorelease); 318 312 return true; 319 313 } 314 + 315 + /* Report an unknown key event as a debugging aid */ 316 + unknown_ke.type = KE_KEY; 317 + unknown_ke.code = code; 318 + unknown_ke.keycode = KEY_UNKNOWN; 319 + sparse_keymap_report_entry(dev, &unknown_ke, value, true); 320 320 321 321 return false; 322 322 }
+191 -100
drivers/input/tablet/wacom_wac.c
··· 16 16 #include "wacom.h" 17 17 #include <linux/input/mt.h> 18 18 19 + /* resolution for penabled devices */ 20 + #define WACOM_PL_RES 20 21 + #define WACOM_PENPRTN_RES 40 22 + #define WACOM_VOLITO_RES 50 23 + #define WACOM_GRAPHIRE_RES 80 24 + #define WACOM_INTUOS_RES 100 25 + #define WACOM_INTUOS3_RES 200 26 + 19 27 static int wacom_penpartner_irq(struct wacom_wac *wacom) 20 28 { 21 29 unsigned char *data = wacom->data; ··· 1063 1055 input_set_abs_params(input_dev, ABS_PRESSURE, 0, features->pressure_max, 1064 1056 features->pressure_fuzz, 0); 1065 1057 1058 + if (features->device_type == BTN_TOOL_PEN) { 1059 + /* penabled devices have fixed resolution for each model */ 1060 + input_abs_set_res(input_dev, ABS_X, features->x_resolution); 1061 + input_abs_set_res(input_dev, ABS_Y, features->y_resolution); 1062 + } else { 1063 + input_abs_set_res(input_dev, ABS_X, 1064 + wacom_calculate_touch_res(features->x_max, 1065 + features->x_phy)); 1066 + input_abs_set_res(input_dev, ABS_Y, 1067 + wacom_calculate_touch_res(features->y_max, 1068 + features->y_phy)); 1069 + } 1070 + 1066 1071 __set_bit(ABS_MISC, input_dev->absbit); 1067 1072 1068 1073 switch (wacom_wac->features.type) { ··· 1192 1171 case TABLETPC: 1193 1172 __clear_bit(ABS_MISC, input_dev->absbit); 1194 1173 1195 - if (features->device_type != BTN_TOOL_PEN) { 1196 - input_abs_set_res(input_dev, ABS_X, 1197 - wacom_calculate_touch_res(features->x_max, 1198 - features->x_phy)); 1199 - input_abs_set_res(input_dev, ABS_Y, 1200 - wacom_calculate_touch_res(features->y_max, 1201 - features->y_phy)); 1174 + if (features->device_type != BTN_TOOL_PEN) 1202 1175 break; /* no need to process stylus stuff */ 1203 - } 1176 + 1204 1177 /* fall through */ 1205 1178 1206 1179 case PL: ··· 1231 1216 input_set_abs_params(input_dev, ABS_MT_PRESSURE, 1232 1217 0, features->pressure_max, 1233 1218 features->pressure_fuzz, 0); 1234 - input_abs_set_res(input_dev, ABS_X, 1235 - wacom_calculate_touch_res(features->x_max, 1236 - features->x_phy)); 1237 - input_abs_set_res(input_dev, ABS_Y, 1238 - wacom_calculate_touch_res(features->y_max, 1239 - features->y_phy)); 1240 1219 } else if (features->device_type == BTN_TOOL_PEN) { 1241 1220 __set_bit(BTN_TOOL_RUBBER, input_dev->keybit); 1242 1221 __set_bit(BTN_TOOL_PEN, input_dev->keybit); ··· 1242 1233 } 1243 1234 1244 1235 static const struct wacom_features wacom_features_0x00 = 1245 - { "Wacom Penpartner", WACOM_PKGLEN_PENPRTN, 5040, 3780, 255, 0, PENPARTNER }; 1236 + { "Wacom Penpartner", WACOM_PKGLEN_PENPRTN, 5040, 3780, 255, 1237 + 0, PENPARTNER, WACOM_PENPRTN_RES, WACOM_PENPRTN_RES }; 1246 1238 static const struct wacom_features wacom_features_0x10 = 1247 - { "Wacom Graphire", WACOM_PKGLEN_GRAPHIRE, 10206, 7422, 511, 63, GRAPHIRE }; 1239 + { "Wacom Graphire", WACOM_PKGLEN_GRAPHIRE, 10206, 7422, 511, 1240 + 63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; 1248 1241 static const struct wacom_features wacom_features_0x11 = 1249 - { "Wacom Graphire2 4x5", WACOM_PKGLEN_GRAPHIRE, 10206, 7422, 511, 63, GRAPHIRE }; 1242 + { "Wacom Graphire2 4x5", WACOM_PKGLEN_GRAPHIRE, 10206, 7422, 511, 1243 + 63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; 1250 1244 static const struct wacom_features wacom_features_0x12 = 1251 - { "Wacom Graphire2 5x7", WACOM_PKGLEN_GRAPHIRE, 13918, 10206, 511, 63, GRAPHIRE }; 1245 + { "Wacom Graphire2 5x7", WACOM_PKGLEN_GRAPHIRE, 13918, 10206, 511, 1246 + 63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; 1252 1247 static const struct wacom_features wacom_features_0x13 = 1253 - { "Wacom Graphire3", WACOM_PKGLEN_GRAPHIRE, 10208, 7424, 511, 63, GRAPHIRE }; 1248 + { "Wacom Graphire3", WACOM_PKGLEN_GRAPHIRE, 10208, 7424, 511, 1249 + 63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; 1254 1250 static const struct wacom_features wacom_features_0x14 = 1255 - { "Wacom Graphire3 6x8", WACOM_PKGLEN_GRAPHIRE, 16704, 12064, 511, 63, GRAPHIRE }; 1251 + { "Wacom Graphire3 6x8", WACOM_PKGLEN_GRAPHIRE, 16704, 12064, 511, 1252 + 63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; 1256 1253 static const struct wacom_features wacom_features_0x15 = 1257 - { "Wacom Graphire4 4x5", WACOM_PKGLEN_GRAPHIRE, 10208, 7424, 511, 63, WACOM_G4 }; 1254 + { "Wacom Graphire4 4x5", WACOM_PKGLEN_GRAPHIRE, 10208, 7424, 511, 1255 + 63, WACOM_G4, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; 1258 1256 static const struct wacom_features wacom_features_0x16 = 1259 - { "Wacom Graphire4 6x8", WACOM_PKGLEN_GRAPHIRE, 16704, 12064, 511, 63, WACOM_G4 }; 1257 + { "Wacom Graphire4 6x8", WACOM_PKGLEN_GRAPHIRE, 16704, 12064, 511, 1258 + 63, WACOM_G4, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; 1260 1259 static const struct wacom_features wacom_features_0x17 = 1261 - { "Wacom BambooFun 4x5", WACOM_PKGLEN_BBFUN, 14760, 9225, 511, 63, WACOM_MO }; 1260 + { "Wacom BambooFun 4x5", WACOM_PKGLEN_BBFUN, 14760, 9225, 511, 1261 + 63, WACOM_MO, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1262 1262 static const struct wacom_features wacom_features_0x18 = 1263 - { "Wacom BambooFun 6x8", WACOM_PKGLEN_BBFUN, 21648, 13530, 511, 63, WACOM_MO }; 1263 + { "Wacom BambooFun 6x8", WACOM_PKGLEN_BBFUN, 21648, 13530, 511, 1264 + 63, WACOM_MO, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1264 1265 static const struct wacom_features wacom_features_0x19 = 1265 - { "Wacom Bamboo1 Medium", WACOM_PKGLEN_GRAPHIRE, 16704, 12064, 511, 63, GRAPHIRE }; 1266 + { "Wacom Bamboo1 Medium", WACOM_PKGLEN_GRAPHIRE, 16704, 12064, 511, 1267 + 63, GRAPHIRE, WACOM_GRAPHIRE_RES, WACOM_GRAPHIRE_RES }; 1266 1268 static const struct wacom_features wacom_features_0x60 = 1267 - { "Wacom Volito", WACOM_PKGLEN_GRAPHIRE, 5104, 3712, 511, 63, GRAPHIRE }; 1269 + { "Wacom Volito", WACOM_PKGLEN_GRAPHIRE, 5104, 3712, 511, 1270 + 63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES }; 1268 1271 static const struct wacom_features wacom_features_0x61 = 1269 - { "Wacom PenStation2", WACOM_PKGLEN_GRAPHIRE, 3250, 2320, 255, 63, GRAPHIRE }; 1272 + { "Wacom PenStation2", WACOM_PKGLEN_GRAPHIRE, 3250, 2320, 255, 1273 + 63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES }; 1270 1274 static const struct wacom_features wacom_features_0x62 = 1271 - { "Wacom Volito2 4x5", WACOM_PKGLEN_GRAPHIRE, 5104, 3712, 511, 63, GRAPHIRE }; 1275 + { "Wacom Volito2 4x5", WACOM_PKGLEN_GRAPHIRE, 5104, 3712, 511, 1276 + 63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES }; 1272 1277 static const struct wacom_features wacom_features_0x63 = 1273 - { "Wacom Volito2 2x3", WACOM_PKGLEN_GRAPHIRE, 3248, 2320, 511, 63, GRAPHIRE }; 1278 + { "Wacom Volito2 2x3", WACOM_PKGLEN_GRAPHIRE, 3248, 2320, 511, 1279 + 63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES }; 1274 1280 static const struct wacom_features wacom_features_0x64 = 1275 - { "Wacom PenPartner2", WACOM_PKGLEN_GRAPHIRE, 3250, 2320, 511, 63, GRAPHIRE }; 1281 + { "Wacom PenPartner2", WACOM_PKGLEN_GRAPHIRE, 3250, 2320, 511, 1282 + 63, GRAPHIRE, WACOM_VOLITO_RES, WACOM_VOLITO_RES }; 1276 1283 static const struct wacom_features wacom_features_0x65 = 1277 - { "Wacom Bamboo", WACOM_PKGLEN_BBFUN, 14760, 9225, 511, 63, WACOM_MO }; 1284 + { "Wacom Bamboo", WACOM_PKGLEN_BBFUN, 14760, 9225, 511, 1285 + 63, WACOM_MO, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1278 1286 static const struct wacom_features wacom_features_0x69 = 1279 - { "Wacom Bamboo1", WACOM_PKGLEN_GRAPHIRE, 5104, 3712, 511, 63, GRAPHIRE }; 1287 + { "Wacom Bamboo1", WACOM_PKGLEN_GRAPHIRE, 5104, 3712, 511, 1288 + 63, GRAPHIRE, WACOM_PENPRTN_RES, WACOM_PENPRTN_RES }; 1280 1289 static const struct wacom_features wacom_features_0x20 = 1281 - { "Wacom Intuos 4x5", WACOM_PKGLEN_INTUOS, 12700, 10600, 1023, 31, INTUOS }; 1290 + { "Wacom Intuos 4x5", WACOM_PKGLEN_INTUOS, 12700, 10600, 1023, 1291 + 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1282 1292 static const struct wacom_features wacom_features_0x21 = 1283 - { "Wacom Intuos 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, 31, INTUOS }; 1293 + { "Wacom Intuos 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, 1294 + 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1284 1295 static const struct wacom_features wacom_features_0x22 = 1285 - { "Wacom Intuos 9x12", WACOM_PKGLEN_INTUOS, 30480, 24060, 1023, 31, INTUOS }; 1296 + { "Wacom Intuos 9x12", WACOM_PKGLEN_INTUOS, 30480, 24060, 1023, 1297 + 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1286 1298 static const struct wacom_features wacom_features_0x23 = 1287 - { "Wacom Intuos 12x12", WACOM_PKGLEN_INTUOS, 30480, 31680, 1023, 31, INTUOS }; 1299 + { "Wacom Intuos 12x12", WACOM_PKGLEN_INTUOS, 30480, 31680, 1023, 1300 + 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1288 1301 static const struct wacom_features wacom_features_0x24 = 1289 - { "Wacom Intuos 12x18", WACOM_PKGLEN_INTUOS, 45720, 31680, 1023, 31, INTUOS }; 1302 + { "Wacom Intuos 12x18", WACOM_PKGLEN_INTUOS, 45720, 31680, 1023, 1303 + 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1290 1304 static const struct wacom_features wacom_features_0x30 = 1291 - { "Wacom PL400", WACOM_PKGLEN_GRAPHIRE, 5408, 4056, 255, 0, PL }; 1305 + { "Wacom PL400", WACOM_PKGLEN_GRAPHIRE, 5408, 4056, 255, 1306 + 0, PL, WACOM_PL_RES, WACOM_PL_RES }; 1292 1307 static const struct wacom_features wacom_features_0x31 = 1293 - { "Wacom PL500", WACOM_PKGLEN_GRAPHIRE, 6144, 4608, 255, 0, PL }; 1308 + { "Wacom PL500", WACOM_PKGLEN_GRAPHIRE, 6144, 4608, 255, 1309 + 0, PL, WACOM_PL_RES, WACOM_PL_RES }; 1294 1310 static const struct wacom_features wacom_features_0x32 = 1295 - { "Wacom PL600", WACOM_PKGLEN_GRAPHIRE, 6126, 4604, 255, 0, PL }; 1311 + { "Wacom PL600", WACOM_PKGLEN_GRAPHIRE, 6126, 4604, 255, 1312 + 0, PL, WACOM_PL_RES, WACOM_PL_RES }; 1296 1313 static const struct wacom_features wacom_features_0x33 = 1297 - { "Wacom PL600SX", WACOM_PKGLEN_GRAPHIRE, 6260, 5016, 255, 0, PL }; 1314 + { "Wacom PL600SX", WACOM_PKGLEN_GRAPHIRE, 6260, 5016, 255, 1315 + 0, PL, WACOM_PL_RES, WACOM_PL_RES }; 1298 1316 static const struct wacom_features wacom_features_0x34 = 1299 - { "Wacom PL550", WACOM_PKGLEN_GRAPHIRE, 6144, 4608, 511, 0, PL }; 1317 + { "Wacom PL550", WACOM_PKGLEN_GRAPHIRE, 6144, 4608, 511, 1318 + 0, PL, WACOM_PL_RES, WACOM_PL_RES }; 1300 1319 static const struct wacom_features wacom_features_0x35 = 1301 - { "Wacom PL800", WACOM_PKGLEN_GRAPHIRE, 7220, 5780, 511, 0, PL }; 1320 + { "Wacom PL800", WACOM_PKGLEN_GRAPHIRE, 7220, 5780, 511, 1321 + 0, PL, WACOM_PL_RES, WACOM_PL_RES }; 1302 1322 static const struct wacom_features wacom_features_0x37 = 1303 - { "Wacom PL700", WACOM_PKGLEN_GRAPHIRE, 6758, 5406, 511, 0, PL }; 1323 + { "Wacom PL700", WACOM_PKGLEN_GRAPHIRE, 6758, 5406, 511, 1324 + 0, PL, WACOM_PL_RES, WACOM_PL_RES }; 1304 1325 static const struct wacom_features wacom_features_0x38 = 1305 - { "Wacom PL510", WACOM_PKGLEN_GRAPHIRE, 6282, 4762, 511, 0, PL }; 1326 + { "Wacom PL510", WACOM_PKGLEN_GRAPHIRE, 6282, 4762, 511, 1327 + 0, PL, WACOM_PL_RES, WACOM_PL_RES }; 1306 1328 static const struct wacom_features wacom_features_0x39 = 1307 - { "Wacom DTU710", WACOM_PKGLEN_GRAPHIRE, 34080, 27660, 511, 0, PL }; 1329 + { "Wacom DTU710", WACOM_PKGLEN_GRAPHIRE, 34080, 27660, 511, 1330 + 0, PL, WACOM_PL_RES, WACOM_PL_RES }; 1308 1331 static const struct wacom_features wacom_features_0xC4 = 1309 - { "Wacom DTF521", WACOM_PKGLEN_GRAPHIRE, 6282, 4762, 511, 0, PL }; 1332 + { "Wacom DTF521", WACOM_PKGLEN_GRAPHIRE, 6282, 4762, 511, 1333 + 0, PL, WACOM_PL_RES, WACOM_PL_RES }; 1310 1334 static const struct wacom_features wacom_features_0xC0 = 1311 - { "Wacom DTF720", WACOM_PKGLEN_GRAPHIRE, 6858, 5506, 511, 0, PL }; 1335 + { "Wacom DTF720", WACOM_PKGLEN_GRAPHIRE, 6858, 5506, 511, 1336 + 0, PL, WACOM_PL_RES, WACOM_PL_RES }; 1312 1337 static const struct wacom_features wacom_features_0xC2 = 1313 - { "Wacom DTF720a", WACOM_PKGLEN_GRAPHIRE, 6858, 5506, 511, 0, PL }; 1338 + { "Wacom DTF720a", WACOM_PKGLEN_GRAPHIRE, 6858, 5506, 511, 1339 + 0, PL, WACOM_PL_RES, WACOM_PL_RES }; 1314 1340 static const struct wacom_features wacom_features_0x03 = 1315 - { "Wacom Cintiq Partner", WACOM_PKGLEN_GRAPHIRE, 20480, 15360, 511, 0, PTU }; 1341 + { "Wacom Cintiq Partner", WACOM_PKGLEN_GRAPHIRE, 20480, 15360, 511, 1342 + 0, PTU, WACOM_PL_RES, WACOM_PL_RES }; 1316 1343 static const struct wacom_features wacom_features_0x41 = 1317 - { "Wacom Intuos2 4x5", WACOM_PKGLEN_INTUOS, 12700, 10600, 1023, 31, INTUOS }; 1344 + { "Wacom Intuos2 4x5", WACOM_PKGLEN_INTUOS, 12700, 10600, 1023, 1345 + 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1318 1346 static const struct wacom_features wacom_features_0x42 = 1319 - { "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, 31, INTUOS }; 1347 + { "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, 1348 + 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1320 1349 static const struct wacom_features wacom_features_0x43 = 1321 - { "Wacom Intuos2 9x12", WACOM_PKGLEN_INTUOS, 30480, 24060, 1023, 31, INTUOS }; 1350 + { "Wacom Intuos2 9x12", WACOM_PKGLEN_INTUOS, 30480, 24060, 1023, 1351 + 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1322 1352 static const struct wacom_features wacom_features_0x44 = 1323 - { "Wacom Intuos2 12x12", WACOM_PKGLEN_INTUOS, 30480, 31680, 1023, 31, INTUOS }; 1353 + { "Wacom Intuos2 12x12", WACOM_PKGLEN_INTUOS, 30480, 31680, 1023, 1354 + 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1324 1355 static const struct wacom_features wacom_features_0x45 = 1325 - { "Wacom Intuos2 12x18", WACOM_PKGLEN_INTUOS, 45720, 31680, 1023, 31, INTUOS }; 1356 + { "Wacom Intuos2 12x18", WACOM_PKGLEN_INTUOS, 45720, 31680, 1023, 1357 + 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1326 1358 static const struct wacom_features wacom_features_0xB0 = 1327 - { "Wacom Intuos3 4x5", WACOM_PKGLEN_INTUOS, 25400, 20320, 1023, 63, INTUOS3S }; 1359 + { "Wacom Intuos3 4x5", WACOM_PKGLEN_INTUOS, 25400, 20320, 1023, 1360 + 63, INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1328 1361 static const struct wacom_features wacom_features_0xB1 = 1329 - { "Wacom Intuos3 6x8", WACOM_PKGLEN_INTUOS, 40640, 30480, 1023, 63, INTUOS3 }; 1362 + { "Wacom Intuos3 6x8", WACOM_PKGLEN_INTUOS, 40640, 30480, 1023, 1363 + 63, INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1330 1364 static const struct wacom_features wacom_features_0xB2 = 1331 - { "Wacom Intuos3 9x12", WACOM_PKGLEN_INTUOS, 60960, 45720, 1023, 63, INTUOS3 }; 1365 + { "Wacom Intuos3 9x12", WACOM_PKGLEN_INTUOS, 60960, 45720, 1023, 1366 + 63, INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1332 1367 static const struct wacom_features wacom_features_0xB3 = 1333 - { "Wacom Intuos3 12x12", WACOM_PKGLEN_INTUOS, 60960, 60960, 1023, 63, INTUOS3L }; 1368 + { "Wacom Intuos3 12x12", WACOM_PKGLEN_INTUOS, 60960, 60960, 1023, 1369 + 63, INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1334 1370 static const struct wacom_features wacom_features_0xB4 = 1335 - { "Wacom Intuos3 12x19", WACOM_PKGLEN_INTUOS, 97536, 60960, 1023, 63, INTUOS3L }; 1371 + { "Wacom Intuos3 12x19", WACOM_PKGLEN_INTUOS, 97536, 60960, 1023, 1372 + 63, INTUOS3L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1336 1373 static const struct wacom_features wacom_features_0xB5 = 1337 - { "Wacom Intuos3 6x11", WACOM_PKGLEN_INTUOS, 54204, 31750, 1023, 63, INTUOS3 }; 1374 + { "Wacom Intuos3 6x11", WACOM_PKGLEN_INTUOS, 54204, 31750, 1023, 1375 + 63, INTUOS3, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1338 1376 static const struct wacom_features wacom_features_0xB7 = 1339 - { "Wacom Intuos3 4x6", WACOM_PKGLEN_INTUOS, 31496, 19685, 1023, 63, INTUOS3S }; 1377 + { "Wacom Intuos3 4x6", WACOM_PKGLEN_INTUOS, 31496, 19685, 1023, 1378 + 63, INTUOS3S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1340 1379 static const struct wacom_features wacom_features_0xB8 = 1341 - { "Wacom Intuos4 4x6", WACOM_PKGLEN_INTUOS, 31496, 19685, 2047, 63, INTUOS4S }; 1380 + { "Wacom Intuos4 4x6", WACOM_PKGLEN_INTUOS, 31496, 19685, 2047, 1381 + 63, INTUOS4S, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1342 1382 static const struct wacom_features wacom_features_0xB9 = 1343 - { "Wacom Intuos4 6x9", WACOM_PKGLEN_INTUOS, 44704, 27940, 2047, 63, INTUOS4 }; 1383 + { "Wacom Intuos4 6x9", WACOM_PKGLEN_INTUOS, 44704, 27940, 2047, 1384 + 63, INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1344 1385 static const struct wacom_features wacom_features_0xBA = 1345 - { "Wacom Intuos4 8x13", WACOM_PKGLEN_INTUOS, 65024, 40640, 2047, 63, INTUOS4L }; 1386 + { "Wacom Intuos4 8x13", WACOM_PKGLEN_INTUOS, 65024, 40640, 2047, 1387 + 63, INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1346 1388 static const struct wacom_features wacom_features_0xBB = 1347 - { "Wacom Intuos4 12x19", WACOM_PKGLEN_INTUOS, 97536, 60960, 2047, 63, INTUOS4L }; 1389 + { "Wacom Intuos4 12x19", WACOM_PKGLEN_INTUOS, 97536, 60960, 2047, 1390 + 63, INTUOS4L, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1348 1391 static const struct wacom_features wacom_features_0xBC = 1349 - { "Wacom Intuos4 WL", WACOM_PKGLEN_INTUOS, 40840, 25400, 2047, 63, INTUOS4 }; 1392 + { "Wacom Intuos4 WL", WACOM_PKGLEN_INTUOS, 40840, 25400, 2047, 1393 + 63, INTUOS4, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1350 1394 static const struct wacom_features wacom_features_0x3F = 1351 - { "Wacom Cintiq 21UX", WACOM_PKGLEN_INTUOS, 87200, 65600, 1023, 63, CINTIQ }; 1395 + { "Wacom Cintiq 21UX", WACOM_PKGLEN_INTUOS, 87200, 65600, 1023, 1396 + 63, CINTIQ, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1352 1397 static const struct wacom_features wacom_features_0xC5 = 1353 - { "Wacom Cintiq 20WSX", WACOM_PKGLEN_INTUOS, 86680, 54180, 1023, 63, WACOM_BEE }; 1398 + { "Wacom Cintiq 20WSX", WACOM_PKGLEN_INTUOS, 86680, 54180, 1023, 1399 + 63, WACOM_BEE, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1354 1400 static const struct wacom_features wacom_features_0xC6 = 1355 - { "Wacom Cintiq 12WX", WACOM_PKGLEN_INTUOS, 53020, 33440, 1023, 63, WACOM_BEE }; 1401 + { "Wacom Cintiq 12WX", WACOM_PKGLEN_INTUOS, 53020, 33440, 1023, 1402 + 63, WACOM_BEE, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1356 1403 static const struct wacom_features wacom_features_0xC7 = 1357 - { "Wacom DTU1931", WACOM_PKGLEN_GRAPHIRE, 37832, 30305, 511, 0, PL }; 1404 + { "Wacom DTU1931", WACOM_PKGLEN_GRAPHIRE, 37832, 30305, 511, 1405 + 0, PL, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1358 1406 static const struct wacom_features wacom_features_0xCE = 1359 - { "Wacom DTU2231", WACOM_PKGLEN_GRAPHIRE, 47864, 27011, 511, 0, DTU }; 1407 + { "Wacom DTU2231", WACOM_PKGLEN_GRAPHIRE, 47864, 27011, 511, 1408 + 0, DTU, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1360 1409 static const struct wacom_features wacom_features_0xF0 = 1361 - { "Wacom DTU1631", WACOM_PKGLEN_GRAPHIRE, 34623, 19553, 511, 0, DTU }; 1410 + { "Wacom DTU1631", WACOM_PKGLEN_GRAPHIRE, 34623, 19553, 511, 1411 + 0, DTU, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1362 1412 static const struct wacom_features wacom_features_0xCC = 1363 - { "Wacom Cintiq 21UX2", WACOM_PKGLEN_INTUOS, 87200, 65600, 2047, 63, WACOM_21UX2 }; 1413 + { "Wacom Cintiq 21UX2", WACOM_PKGLEN_INTUOS, 87200, 65600, 2047, 1414 + 63, WACOM_21UX2, WACOM_INTUOS3_RES, WACOM_INTUOS3_RES }; 1364 1415 static const struct wacom_features wacom_features_0x90 = 1365 - { "Wacom ISDv4 90", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 0, TABLETPC }; 1416 + { "Wacom ISDv4 90", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 1417 + 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1366 1418 static const struct wacom_features wacom_features_0x93 = 1367 - { "Wacom ISDv4 93", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 0, TABLETPC }; 1419 + { "Wacom ISDv4 93", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 1420 + 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1368 1421 static const struct wacom_features wacom_features_0x9A = 1369 - { "Wacom ISDv4 9A", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 0, TABLETPC }; 1422 + { "Wacom ISDv4 9A", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 1423 + 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1370 1424 static const struct wacom_features wacom_features_0x9F = 1371 - { "Wacom ISDv4 9F", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 0, TABLETPC }; 1425 + { "Wacom ISDv4 9F", WACOM_PKGLEN_GRAPHIRE, 26202, 16325, 255, 1426 + 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1372 1427 static const struct wacom_features wacom_features_0xE2 = 1373 - { "Wacom ISDv4 E2", WACOM_PKGLEN_TPC2FG, 26202, 16325, 255, 0, TABLETPC2FG }; 1428 + { "Wacom ISDv4 E2", WACOM_PKGLEN_TPC2FG, 26202, 16325, 255, 1429 + 0, TABLETPC2FG, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1374 1430 static const struct wacom_features wacom_features_0xE3 = 1375 - { "Wacom ISDv4 E3", WACOM_PKGLEN_TPC2FG, 26202, 16325, 255, 0, TABLETPC2FG }; 1431 + { "Wacom ISDv4 E3", WACOM_PKGLEN_TPC2FG, 26202, 16325, 255, 1432 + 0, TABLETPC2FG, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1433 + static const struct wacom_features wacom_features_0xE6 = 1434 + { "Wacom ISDv4 E6", WACOM_PKGLEN_TPC2FG, 27760, 15694, 255, 1435 + 0, TABLETPC2FG, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1376 1436 static const struct wacom_features wacom_features_0x47 = 1377 - { "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, 31, INTUOS }; 1378 - static struct wacom_features wacom_features_0xD0 = 1379 - { "Wacom Bamboo 2FG", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT }; 1380 - static struct wacom_features wacom_features_0xD1 = 1381 - { "Wacom Bamboo 2FG 4x5", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT }; 1382 - static struct wacom_features wacom_features_0xD2 = 1383 - { "Wacom Bamboo Craft", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT }; 1384 - static struct wacom_features wacom_features_0xD3 = 1385 - { "Wacom Bamboo 2FG 6x8", WACOM_PKGLEN_BBFUN, 21648, 13530, 1023, 63, BAMBOO_PT }; 1437 + { "Wacom Intuos2 6x8", WACOM_PKGLEN_INTUOS, 20320, 16240, 1023, 1438 + 31, INTUOS, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1439 + static const struct wacom_features wacom_features_0xD0 = 1440 + { "Wacom Bamboo 2FG", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 1441 + 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1442 + static const struct wacom_features wacom_features_0xD1 = 1443 + { "Wacom Bamboo 2FG 4x5", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 1444 + 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1445 + static const struct wacom_features wacom_features_0xD2 = 1446 + { "Wacom Bamboo Craft", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 1447 + 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1448 + static const struct wacom_features wacom_features_0xD3 = 1449 + { "Wacom Bamboo 2FG 6x8", WACOM_PKGLEN_BBFUN, 21648, 13530, 1023, 1450 + 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1386 1451 static const struct wacom_features wacom_features_0xD4 = 1387 - { "Wacom Bamboo Pen", WACOM_PKGLEN_BBFUN, 14720, 9200, 255, 63, BAMBOO_PT }; 1388 - static struct wacom_features wacom_features_0xD6 = 1389 - { "Wacom BambooPT 2FG 4x5", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT }; 1390 - static struct wacom_features wacom_features_0xD7 = 1391 - { "Wacom BambooPT 2FG Small", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT }; 1392 - static struct wacom_features wacom_features_0xD8 = 1393 - { "Wacom Bamboo Comic 2FG", WACOM_PKGLEN_BBFUN, 21648, 13530, 1023, 63, BAMBOO_PT }; 1394 - static struct wacom_features wacom_features_0xDA = 1395 - { "Wacom Bamboo 2FG 4x5 SE", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 63, BAMBOO_PT }; 1452 + { "Wacom Bamboo Pen", WACOM_PKGLEN_BBFUN, 14720, 9200, 255, 1453 + 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1454 + static const struct wacom_features wacom_features_0xD6 = 1455 + { "Wacom BambooPT 2FG 4x5", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 1456 + 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1457 + static const struct wacom_features wacom_features_0xD7 = 1458 + { "Wacom BambooPT 2FG Small", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 1459 + 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1460 + static const struct wacom_features wacom_features_0xD8 = 1461 + { "Wacom Bamboo Comic 2FG", WACOM_PKGLEN_BBFUN, 21648, 13530, 1023, 1462 + 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1463 + static const struct wacom_features wacom_features_0xDA = 1464 + { "Wacom Bamboo 2FG 4x5 SE", WACOM_PKGLEN_BBFUN, 14720, 9200, 1023, 1465 + 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1396 1466 static struct wacom_features wacom_features_0xDB = 1397 - { "Wacom Bamboo 2FG 6x8 SE", WACOM_PKGLEN_BBFUN, 21648, 13530, 1023, 63, BAMBOO_PT }; 1467 + { "Wacom Bamboo 2FG 6x8 SE", WACOM_PKGLEN_BBFUN, 21648, 13530, 1023, 1468 + 63, BAMBOO_PT, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1398 1469 static const struct wacom_features wacom_features_0x6004 = 1399 - { "ISD-V4", WACOM_PKGLEN_GRAPHIRE, 12800, 8000, 255, 0, TABLETPC }; 1470 + { "ISD-V4", WACOM_PKGLEN_GRAPHIRE, 12800, 8000, 255, 1471 + 0, TABLETPC, WACOM_INTUOS_RES, WACOM_INTUOS_RES }; 1400 1472 1401 1473 #define USB_DEVICE_WACOM(prod) \ 1402 1474 USB_DEVICE(USB_VENDOR_ID_WACOM, prod), \ ··· 1564 1474 { USB_DEVICE_WACOM(0x9F) }, 1565 1475 { USB_DEVICE_WACOM(0xE2) }, 1566 1476 { USB_DEVICE_WACOM(0xE3) }, 1477 + { USB_DEVICE_WACOM(0xE6) }, 1567 1478 { USB_DEVICE_WACOM(0x47) }, 1568 1479 { USB_DEVICE_LENOVO(0x6004) }, 1569 1480 { }
+2
drivers/input/tablet/wacom_wac.h
··· 74 74 int pressure_max; 75 75 int distance_max; 76 76 int type; 77 + int x_resolution; 78 + int y_resolution; 77 79 int device_type; 78 80 int x_phy; 79 81 int y_phy;
+1 -1
drivers/input/touchscreen/h3600_ts_input.c
··· 62 62 Programmer has no control over these numbers. 63 63 TODO there are holes - specifically 1,7,0x0a 64 64 */ 65 - #define VERSION_ID 0 /* Get Version (request/respose) */ 65 + #define VERSION_ID 0 /* Get Version (request/response) */ 66 66 #define KEYBD_ID 2 /* Keyboard (event) */ 67 67 #define TOUCHS_ID 3 /* Touch Screen (event)*/ 68 68 #define EEPROM_READ_ID 4 /* (request/response) */
+80 -34
drivers/md/dm-table.c
··· 927 927 } 928 928 929 929 /* 930 + * Get a disk whose integrity profile reflects the table's profile. 931 + * If %match_all is true, all devices' profiles must match. 932 + * If %match_all is false, all devices must at least have an 933 + * allocated integrity profile; but uninitialized is ok. 934 + * Returns NULL if integrity support was inconsistent or unavailable. 935 + */ 936 + static struct gendisk * dm_table_get_integrity_disk(struct dm_table *t, 937 + bool match_all) 938 + { 939 + struct list_head *devices = dm_table_get_devices(t); 940 + struct dm_dev_internal *dd = NULL; 941 + struct gendisk *prev_disk = NULL, *template_disk = NULL; 942 + 943 + list_for_each_entry(dd, devices, list) { 944 + template_disk = dd->dm_dev.bdev->bd_disk; 945 + if (!blk_get_integrity(template_disk)) 946 + goto no_integrity; 947 + if (!match_all && !blk_integrity_is_initialized(template_disk)) 948 + continue; /* skip uninitialized profiles */ 949 + else if (prev_disk && 950 + blk_integrity_compare(prev_disk, template_disk) < 0) 951 + goto no_integrity; 952 + prev_disk = template_disk; 953 + } 954 + 955 + return template_disk; 956 + 957 + no_integrity: 958 + if (prev_disk) 959 + DMWARN("%s: integrity not set: %s and %s profile mismatch", 960 + dm_device_name(t->md), 961 + prev_disk->disk_name, 962 + template_disk->disk_name); 963 + return NULL; 964 + } 965 + 966 + /* 930 967 * Register the mapped device for blk_integrity support if 931 - * the underlying devices support it. 968 + * the underlying devices have an integrity profile. But all devices 969 + * may not have matching profiles (checking all devices isn't reliable 970 + * during table load because this table may use other DM device(s) which 971 + * must be resumed before they will have an initialized integity profile). 972 + * Stacked DM devices force a 2 stage integrity profile validation: 973 + * 1 - during load, validate all initialized integrity profiles match 974 + * 2 - during resume, validate all integrity profiles match 932 975 */ 933 976 static int dm_table_prealloc_integrity(struct dm_table *t, struct mapped_device *md) 934 977 { 935 - struct list_head *devices = dm_table_get_devices(t); 936 - struct dm_dev_internal *dd; 978 + struct gendisk *template_disk = NULL; 937 979 938 - list_for_each_entry(dd, devices, list) 939 - if (bdev_get_integrity(dd->dm_dev.bdev)) { 940 - t->integrity_supported = 1; 941 - return blk_integrity_register(dm_disk(md), NULL); 942 - } 980 + template_disk = dm_table_get_integrity_disk(t, false); 981 + if (!template_disk) 982 + return 0; 943 983 984 + if (!blk_integrity_is_initialized(dm_disk(md))) { 985 + t->integrity_supported = 1; 986 + return blk_integrity_register(dm_disk(md), NULL); 987 + } 988 + 989 + /* 990 + * If DM device already has an initalized integrity 991 + * profile the new profile should not conflict. 992 + */ 993 + if (blk_integrity_is_initialized(template_disk) && 994 + blk_integrity_compare(dm_disk(md), template_disk) < 0) { 995 + DMWARN("%s: conflict with existing integrity profile: " 996 + "%s profile mismatch", 997 + dm_device_name(t->md), 998 + template_disk->disk_name); 999 + return 1; 1000 + } 1001 + 1002 + /* Preserve existing initialized integrity profile */ 1003 + t->integrity_supported = 1; 944 1004 return 0; 945 1005 } 946 1006 ··· 1154 1094 1155 1095 /* 1156 1096 * Set the integrity profile for this device if all devices used have 1157 - * matching profiles. 1097 + * matching profiles. We're quite deep in the resume path but still 1098 + * don't know if all devices (particularly DM devices this device 1099 + * may be stacked on) have matching profiles. Even if the profiles 1100 + * don't match we have no way to fail (to resume) at this point. 1158 1101 */ 1159 1102 static void dm_table_set_integrity(struct dm_table *t) 1160 1103 { 1161 - struct list_head *devices = dm_table_get_devices(t); 1162 - struct dm_dev_internal *prev = NULL, *dd = NULL; 1104 + struct gendisk *template_disk = NULL; 1163 1105 1164 1106 if (!blk_get_integrity(dm_disk(t->md))) 1165 1107 return; 1166 1108 1167 - list_for_each_entry(dd, devices, list) { 1168 - if (prev && 1169 - blk_integrity_compare(prev->dm_dev.bdev->bd_disk, 1170 - dd->dm_dev.bdev->bd_disk) < 0) { 1171 - DMWARN("%s: integrity not set: %s and %s mismatch", 1172 - dm_device_name(t->md), 1173 - prev->dm_dev.bdev->bd_disk->disk_name, 1174 - dd->dm_dev.bdev->bd_disk->disk_name); 1175 - goto no_integrity; 1176 - } 1177 - prev = dd; 1109 + template_disk = dm_table_get_integrity_disk(t, true); 1110 + if (!template_disk && 1111 + blk_integrity_is_initialized(dm_disk(t->md))) { 1112 + DMWARN("%s: device no longer has a valid integrity profile", 1113 + dm_device_name(t->md)); 1114 + return; 1178 1115 } 1179 - 1180 - if (!prev || !bdev_get_integrity(prev->dm_dev.bdev)) 1181 - goto no_integrity; 1182 - 1183 1116 blk_integrity_register(dm_disk(t->md), 1184 - bdev_get_integrity(prev->dm_dev.bdev)); 1185 - 1186 - return; 1187 - 1188 - no_integrity: 1189 - blk_integrity_register(dm_disk(t->md), NULL); 1190 - 1191 - return; 1117 + blk_get_integrity(template_disk)); 1192 1118 } 1193 1119 1194 1120 void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,
+13 -3
drivers/media/radio/wl128x/fmdrv_common.c
··· 1494 1494 } 1495 1495 1496 1496 memset(&fm_st_proto, 0, sizeof(fm_st_proto)); 1497 - fm_st_proto.type = ST_FM; 1498 1497 fm_st_proto.recv = fm_st_receive; 1499 1498 fm_st_proto.match_packet = NULL; 1500 1499 fm_st_proto.reg_complete_cb = fm_st_reg_comp_cb; 1501 1500 fm_st_proto.write = NULL; /* TI ST driver will fill write pointer */ 1502 1501 fm_st_proto.priv_data = fmdev; 1502 + fm_st_proto.chnl_id = 0x08; 1503 + fm_st_proto.max_frame_size = 0xff; 1504 + fm_st_proto.hdr_len = 1; 1505 + fm_st_proto.offset_len_in_hdr = 0; 1506 + fm_st_proto.len_size = 1; 1507 + fm_st_proto.reserve = 1; 1503 1508 1504 1509 ret = st_register(&fm_st_proto); 1505 1510 if (ret == -EINPROGRESS) { ··· 1537 1532 g_st_write = fm_st_proto.write; 1538 1533 } else { 1539 1534 fmerr("Failed to get ST write func pointer\n"); 1540 - ret = st_unregister(ST_FM); 1535 + ret = st_unregister(&fm_st_proto); 1541 1536 if (ret < 0) 1542 1537 fmerr("st_unregister failed %d\n", ret); 1543 1538 return -EAGAIN; ··· 1591 1586 */ 1592 1587 u32 fmc_release(struct fmdev *fmdev) 1593 1588 { 1589 + static struct st_proto_s fm_st_proto; 1594 1590 u32 ret; 1595 1591 1596 1592 if (!test_bit(FM_CORE_READY, &fmdev->flag)) { ··· 1610 1604 fmdev->resp_comp = NULL; 1611 1605 fmdev->rx.freq = 0; 1612 1606 1613 - ret = st_unregister(ST_FM); 1607 + memset(&fm_st_proto, 0, sizeof(fm_st_proto)); 1608 + fm_st_proto.chnl_id = 0x08; 1609 + 1610 + ret = st_unregister(&fm_st_proto); 1611 + 1614 1612 if (ret < 0) 1615 1613 fmerr("Failed to de-register FM from ST %d\n", ret); 1616 1614 else
+1
drivers/media/rc/ite-cir.c
··· 41 41 #include <linux/bitops.h> 42 42 #include <media/rc-core.h> 43 43 #include <linux/pci_ids.h> 44 + #include <linux/delay.h> 44 45 45 46 #include "ite-cir.h" 46 47
+2 -2
drivers/net/mlx4/mcg.c
··· 111 111 u32 members_count; 112 112 struct mlx4_steer_index *new_entry; 113 113 struct mlx4_promisc_qp *pqp; 114 - struct mlx4_promisc_qp *dqp; 114 + struct mlx4_promisc_qp *dqp = NULL; 115 115 u32 prot; 116 116 int err; 117 117 u8 pf_num; ··· 184 184 out_alloc: 185 185 if (dqp) { 186 186 list_del(&dqp->list); 187 - kfree(&dqp); 187 + kfree(dqp); 188 188 } 189 189 list_del(&new_entry->list); 190 190 kfree(new_entry);
+1 -5
drivers/net/starfire.c
··· 144 144 /* Time in jiffies before concluding the transmitter is hung. */ 145 145 #define TX_TIMEOUT (2 * HZ) 146 146 147 - /* 148 - * This SUCKS. 149 - * We need a much better method to determine if dma_addr_t is 64-bit. 150 - */ 151 - #if (defined(__i386__) && defined(CONFIG_HIGHMEM64G)) || defined(__x86_64__) || defined (__ia64__) || defined(__alpha__) || (defined(CONFIG_MIPS) && ((defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) || defined(CONFIG_64BIT))) || (defined(__powerpc64__) || defined(CONFIG_PHYS_64BIT)) 147 + #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT 152 148 /* 64-bit dma_addr_t */ 153 149 #define ADDR_64BITS /* This chip uses 64 bit addresses. */ 154 150 #define netdrv_addr_t __le64
+1 -1
drivers/net/usb/cdc_eem.c
··· 340 340 341 341 static const struct driver_info eem_info = { 342 342 .description = "CDC EEM Device", 343 - .flags = FLAG_ETHER, 343 + .flags = FLAG_ETHER | FLAG_POINTTOPOINT, 344 344 .bind = eem_bind, 345 345 .rx_fixup = eem_rx_fixup, 346 346 .tx_fixup = eem_tx_fixup,
+1 -1
drivers/net/usb/cdc_ether.c
··· 452 452 453 453 static const struct driver_info cdc_info = { 454 454 .description = "CDC Ethernet Device", 455 - .flags = FLAG_ETHER, 455 + .flags = FLAG_ETHER | FLAG_POINTTOPOINT, 456 456 // .check_connect = cdc_check_connect, 457 457 .bind = usbnet_cdc_bind, 458 458 .unbind = usbnet_cdc_unbind,
+1 -1
drivers/net/usb/cdc_ncm.c
··· 1237 1237 1238 1238 static const struct driver_info cdc_ncm_info = { 1239 1239 .description = "CDC NCM", 1240 - .flags = FLAG_NO_SETINT | FLAG_MULTI_PACKET, 1240 + .flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT | FLAG_MULTI_PACKET, 1241 1241 .bind = cdc_ncm_bind, 1242 1242 .unbind = cdc_ncm_unbind, 1243 1243 .check_connect = cdc_ncm_check_connect,
+8
drivers/net/usb/cdc_subset.c
··· 89 89 90 90 static const struct driver_info ali_m5632_info = { 91 91 .description = "ALi M5632", 92 + .flags = FLAG_POINTTOPOINT, 92 93 }; 93 94 94 95 #endif ··· 111 110 112 111 static const struct driver_info an2720_info = { 113 112 .description = "AnchorChips/Cypress 2720", 113 + .flags = FLAG_POINTTOPOINT, 114 114 // no reset available! 115 115 // no check_connect available! 116 116 ··· 134 132 135 133 static const struct driver_info belkin_info = { 136 134 .description = "Belkin, eTEK, or compatible", 135 + .flags = FLAG_POINTTOPOINT, 137 136 }; 138 137 139 138 #endif /* CONFIG_USB_BELKIN */ ··· 160 157 static const struct driver_info epson2888_info = { 161 158 .description = "Epson USB Device", 162 159 .check_connect = always_connected, 160 + .flags = FLAG_POINTTOPOINT, 163 161 164 162 .in = 4, .out = 3, 165 163 }; ··· 177 173 #define HAVE_HARDWARE 178 174 static const struct driver_info kc2190_info = { 179 175 .description = "KC Technology KC-190", 176 + .flags = FLAG_POINTTOPOINT, 180 177 }; 181 178 #endif /* CONFIG_USB_KC2190 */ 182 179 ··· 205 200 static const struct driver_info linuxdev_info = { 206 201 .description = "Linux Device", 207 202 .check_connect = always_connected, 203 + .flags = FLAG_POINTTOPOINT, 208 204 }; 209 205 210 206 static const struct driver_info yopy_info = { 211 207 .description = "Yopy", 212 208 .check_connect = always_connected, 209 + .flags = FLAG_POINTTOPOINT, 213 210 }; 214 211 215 212 static const struct driver_info blob_info = { 216 213 .description = "Boot Loader OBject", 217 214 .check_connect = always_connected, 215 + .flags = FLAG_POINTTOPOINT, 218 216 }; 219 217 220 218 #endif /* CONFIG_USB_ARMLINUX */
+1 -1
drivers/net/usb/gl620a.c
··· 193 193 194 194 static const struct driver_info genelink_info = { 195 195 .description = "Genesys GeneLink", 196 - .flags = FLAG_FRAMING_GL | FLAG_NO_SETINT, 196 + .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_GL | FLAG_NO_SETINT, 197 197 .bind = genelink_bind, 198 198 .rx_fixup = genelink_rx_fixup, 199 199 .tx_fixup = genelink_tx_fixup,
+1 -1
drivers/net/usb/net1080.c
··· 560 560 561 561 static const struct driver_info net1080_info = { 562 562 .description = "NetChip TurboCONNECT", 563 - .flags = FLAG_FRAMING_NC, 563 + .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_NC, 564 564 .bind = net1080_bind, 565 565 .reset = net1080_reset, 566 566 .check_connect = net1080_check_connect,
+1 -1
drivers/net/usb/plusb.c
··· 96 96 97 97 static const struct driver_info prolific_info = { 98 98 .description = "Prolific PL-2301/PL-2302", 99 - .flags = FLAG_NO_SETINT, 99 + .flags = FLAG_POINTTOPOINT | FLAG_NO_SETINT, 100 100 /* some PL-2302 versions seem to fail usb_set_interface() */ 101 101 .reset = pl_reset, 102 102 };
+1 -1
drivers/net/usb/rndis_host.c
··· 573 573 574 574 static const struct driver_info rndis_info = { 575 575 .description = "RNDIS device", 576 - .flags = FLAG_ETHER | FLAG_FRAMING_RN | FLAG_NO_SETINT, 576 + .flags = FLAG_ETHER | FLAG_POINTTOPOINT | FLAG_FRAMING_RN | FLAG_NO_SETINT, 577 577 .bind = rndis_bind, 578 578 .unbind = rndis_unbind, 579 579 .status = rndis_status,
+2 -1
drivers/net/usb/usbnet.c
··· 1380 1380 // else "eth%d" when there's reasonable doubt. userspace 1381 1381 // can rename the link if it knows better. 1382 1382 if ((dev->driver_info->flags & FLAG_ETHER) != 0 && 1383 - (net->dev_addr [0] & 0x02) == 0) 1383 + ((dev->driver_info->flags & FLAG_POINTTOPOINT) == 0 || 1384 + (net->dev_addr [0] & 0x02) == 0)) 1384 1385 strcpy (net->name, "eth%d"); 1385 1386 /* WLAN devices should always be named "wlan%d" */ 1386 1387 if ((dev->driver_info->flags & FLAG_WLAN) != 0)
+4 -4
drivers/net/usb/zaurus.c
··· 102 102 103 103 static const struct driver_info zaurus_sl5x00_info = { 104 104 .description = "Sharp Zaurus SL-5x00", 105 - .flags = FLAG_FRAMING_Z, 105 + .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_Z, 106 106 .check_connect = always_connected, 107 107 .bind = zaurus_bind, 108 108 .unbind = usbnet_cdc_unbind, ··· 112 112 113 113 static const struct driver_info zaurus_pxa_info = { 114 114 .description = "Sharp Zaurus, PXA-2xx based", 115 - .flags = FLAG_FRAMING_Z, 115 + .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_Z, 116 116 .check_connect = always_connected, 117 117 .bind = zaurus_bind, 118 118 .unbind = usbnet_cdc_unbind, ··· 122 122 123 123 static const struct driver_info olympus_mxl_info = { 124 124 .description = "Olympus R1000", 125 - .flags = FLAG_FRAMING_Z, 125 + .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_Z, 126 126 .check_connect = always_connected, 127 127 .bind = zaurus_bind, 128 128 .unbind = usbnet_cdc_unbind, ··· 258 258 259 259 static const struct driver_info bogus_mdlm_info = { 260 260 .description = "pseudo-MDLM (BLAN) device", 261 - .flags = FLAG_FRAMING_Z, 261 + .flags = FLAG_POINTTOPOINT | FLAG_FRAMING_Z, 262 262 .check_connect = always_connected, 263 263 .tx_fixup = zaurus_tx_fixup, 264 264 .bind = blan_mdlm_bind,
+4
drivers/net/wireless/ath/ath9k/main.c
··· 1048 1048 "Starting driver with initial channel: %d MHz\n", 1049 1049 curchan->center_freq); 1050 1050 1051 + ath9k_ps_wakeup(sc); 1052 + 1051 1053 mutex_lock(&sc->mutex); 1052 1054 1053 1055 /* setup initial channel */ ··· 1144 1142 1145 1143 mutex_unlock: 1146 1144 mutex_unlock(&sc->mutex); 1145 + 1146 + ath9k_ps_restore(sc); 1147 1147 1148 1148 return r; 1149 1149 }
+1
drivers/net/wireless/ath/carl9170/carl9170.h
··· 443 443 u8 ampdu_len; 444 444 u8 ampdu_ack_len; 445 445 bool clear; 446 + bool req; 446 447 }; 447 448 448 449 struct carl9170_sta_info {
+1
drivers/net/wireless/ath/carl9170/main.c
··· 1355 1355 tid_info = rcu_dereference(sta_info->agg[tid]); 1356 1356 1357 1357 sta_info->stats[tid].clear = true; 1358 + sta_info->stats[tid].req = false; 1358 1359 1359 1360 if (tid_info) { 1360 1361 bitmap_zero(tid_info->bitmap, CARL9170_BAW_SIZE);
+7
drivers/net/wireless/ath/carl9170/tx.c
··· 383 383 384 384 if (sta_info->stats[tid].clear) { 385 385 sta_info->stats[tid].clear = false; 386 + sta_info->stats[tid].req = false; 386 387 sta_info->stats[tid].ampdu_len = 0; 387 388 sta_info->stats[tid].ampdu_ack_len = 0; 388 389 } ··· 392 391 if (txinfo->status.rates[0].count == 1) 393 392 sta_info->stats[tid].ampdu_ack_len++; 394 393 394 + if (!(txinfo->flags & IEEE80211_TX_STAT_ACK)) 395 + sta_info->stats[tid].req = true; 396 + 395 397 if (super->f.mac_control & cpu_to_le16(AR9170_TX_MAC_IMM_BA)) { 396 398 super->s.rix = sta_info->stats[tid].ampdu_len; 397 399 super->s.cnt = sta_info->stats[tid].ampdu_ack_len; 398 400 txinfo->flags |= IEEE80211_TX_STAT_AMPDU; 401 + if (sta_info->stats[tid].req) 402 + txinfo->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK; 403 + 399 404 sta_info->stats[tid].clear = true; 400 405 } 401 406 spin_unlock_bh(&tid_info->lock);
+10
drivers/net/wireless/iwlegacy/iwl-core.c
··· 1805 1805 1806 1806 mutex_lock(&priv->mutex); 1807 1807 1808 + if (!ctx->vif || !iwl_legacy_is_ready_rf(priv)) { 1809 + /* 1810 + * Huh? But wait ... this can maybe happen when 1811 + * we're in the middle of a firmware restart! 1812 + */ 1813 + err = -EBUSY; 1814 + goto out; 1815 + } 1816 + 1808 1817 interface_modes = ctx->interface_modes | ctx->exclusive_interface_modes; 1809 1818 1810 1819 if (!(interface_modes & BIT(newtype))) { ··· 1841 1832 /* success */ 1842 1833 iwl_legacy_teardown_interface(priv, vif, true); 1843 1834 vif->type = newtype; 1835 + vif->p2p = newp2p; 1844 1836 err = iwl_legacy_setup_interface(priv, ctx); 1845 1837 WARN_ON(err); 1846 1838 /*
+3 -4
drivers/net/wireless/iwlegacy/iwl3945-base.c
··· 93 93 struct iwl_mod_params iwl3945_mod_params = { 94 94 .sw_crypto = 1, 95 95 .restart_fw = 1, 96 + .disable_hw_scan = 1, 96 97 /* the rest are 0 by default */ 97 98 }; 98 99 ··· 3961 3960 * "the hard way", rather than using device's scan. 3962 3961 */ 3963 3962 if (iwl3945_mod_params.disable_hw_scan) { 3964 - dev_printk(KERN_DEBUG, &(pdev->dev), 3965 - "sw scan support is deprecated\n"); 3963 + IWL_DEBUG_INFO(priv, "Disabling hw_scan\n"); 3966 3964 iwl3945_hw_ops.hw_scan = NULL; 3967 3965 } 3968 3966 ··· 4280 4280 "using software crypto (default 1 [software])"); 4281 4281 module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan, 4282 4282 int, S_IRUGO); 4283 - MODULE_PARM_DESC(disable_hw_scan, 4284 - "disable hardware scanning (default 0) (deprecated)"); 4283 + MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 1)"); 4285 4284 #ifdef CONFIG_IWLWIFI_LEGACY_DEBUG 4286 4285 module_param_named(debug, iwlegacy_debug_level, uint, S_IRUGO | S_IWUSR); 4287 4286 MODULE_PARM_DESC(debug, "debug output mask");
+7 -3
drivers/net/wireless/rt2x00/rt2800usb.c
··· 730 730 { USB_DEVICE(0x050d, 0x8053), USB_DEVICE_DATA(&rt2800usb_ops) }, 731 731 { USB_DEVICE(0x050d, 0x805c), USB_DEVICE_DATA(&rt2800usb_ops) }, 732 732 { USB_DEVICE(0x050d, 0x815c), USB_DEVICE_DATA(&rt2800usb_ops) }, 733 + { USB_DEVICE(0x050d, 0x825b), USB_DEVICE_DATA(&rt2800usb_ops) }, 734 + { USB_DEVICE(0x050d, 0x935a), USB_DEVICE_DATA(&rt2800usb_ops) }, 735 + { USB_DEVICE(0x050d, 0x935b), USB_DEVICE_DATA(&rt2800usb_ops) }, 733 736 /* Buffalo */ 734 737 { USB_DEVICE(0x0411, 0x00e8), USB_DEVICE_DATA(&rt2800usb_ops) }, 738 + { USB_DEVICE(0x0411, 0x016f), USB_DEVICE_DATA(&rt2800usb_ops) }, 735 739 /* Conceptronic */ 736 740 { USB_DEVICE(0x14b2, 0x3c06), USB_DEVICE_DATA(&rt2800usb_ops) }, 737 741 { USB_DEVICE(0x14b2, 0x3c07), USB_DEVICE_DATA(&rt2800usb_ops) }, ··· 822 818 /* Pegatron */ 823 819 { USB_DEVICE(0x1d4d, 0x000c), USB_DEVICE_DATA(&rt2800usb_ops) }, 824 820 { USB_DEVICE(0x1d4d, 0x000e), USB_DEVICE_DATA(&rt2800usb_ops) }, 821 + { USB_DEVICE(0x1d4d, 0x0011), USB_DEVICE_DATA(&rt2800usb_ops) }, 825 822 /* Philips */ 826 823 { USB_DEVICE(0x0471, 0x200f), USB_DEVICE_DATA(&rt2800usb_ops) }, 827 824 /* Planex */ ··· 904 899 { USB_DEVICE(0x148f, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) }, 905 900 /* Sitecom */ 906 901 { USB_DEVICE(0x0df6, 0x0041), USB_DEVICE_DATA(&rt2800usb_ops) }, 902 + /* Toshiba */ 903 + { USB_DEVICE(0x0930, 0x0a07), USB_DEVICE_DATA(&rt2800usb_ops) }, 907 904 /* Zinwell */ 908 905 { USB_DEVICE(0x5a57, 0x0284), USB_DEVICE_DATA(&rt2800usb_ops) }, 909 906 #endif ··· 968 961 { USB_DEVICE(0x05a6, 0x0101), USB_DEVICE_DATA(&rt2800usb_ops) }, 969 962 { USB_DEVICE(0x1d4d, 0x0002), USB_DEVICE_DATA(&rt2800usb_ops) }, 970 963 { USB_DEVICE(0x1d4d, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, 971 - { USB_DEVICE(0x1d4d, 0x0011), USB_DEVICE_DATA(&rt2800usb_ops) }, 972 964 /* Planex */ 973 965 { USB_DEVICE(0x2019, 0x5201), USB_DEVICE_DATA(&rt2800usb_ops) }, 974 966 { USB_DEVICE(0x2019, 0xab24), USB_DEVICE_DATA(&rt2800usb_ops) }, ··· 981 975 /* Sweex */ 982 976 { USB_DEVICE(0x177f, 0x0153), USB_DEVICE_DATA(&rt2800usb_ops) }, 983 977 { USB_DEVICE(0x177f, 0x0313), USB_DEVICE_DATA(&rt2800usb_ops) }, 984 - /* Toshiba */ 985 - { USB_DEVICE(0x0930, 0x0a07), USB_DEVICE_DATA(&rt2800usb_ops) }, 986 978 /* Zyxel */ 987 979 { USB_DEVICE(0x0586, 0x341a), USB_DEVICE_DATA(&rt2800usb_ops) }, 988 980 #endif
+5 -5
drivers/rtc/rtc-mrst.c
··· 319 319 return IRQ_NONE; 320 320 } 321 321 322 - static int __init 322 + static int __devinit 323 323 vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq) 324 324 { 325 325 int retval = 0; ··· 391 391 spin_unlock_irq(&rtc_lock); 392 392 } 393 393 394 - static void __exit rtc_mrst_do_remove(struct device *dev) 394 + static void __devexit rtc_mrst_do_remove(struct device *dev) 395 395 { 396 396 struct mrst_rtc *mrst = dev_get_drvdata(dev); 397 397 struct resource *iomem; ··· 500 500 501 501 #endif 502 502 503 - static int __init vrtc_mrst_platform_probe(struct platform_device *pdev) 503 + static int __devinit vrtc_mrst_platform_probe(struct platform_device *pdev) 504 504 { 505 505 return vrtc_mrst_do_probe(&pdev->dev, 506 506 platform_get_resource(pdev, IORESOURCE_MEM, 0), 507 507 platform_get_irq(pdev, 0)); 508 508 } 509 509 510 - static int __exit vrtc_mrst_platform_remove(struct platform_device *pdev) 510 + static int __devexit vrtc_mrst_platform_remove(struct platform_device *pdev) 511 511 { 512 512 rtc_mrst_do_remove(&pdev->dev); 513 513 return 0; ··· 525 525 526 526 static struct platform_driver vrtc_mrst_platform_driver = { 527 527 .probe = vrtc_mrst_platform_probe, 528 - .remove = __exit_p(vrtc_mrst_platform_remove), 528 + .remove = __devexit_p(vrtc_mrst_platform_remove), 529 529 .shutdown = vrtc_mrst_platform_shutdown, 530 530 .driver = { 531 531 .name = (char *) driver_name,
+1
drivers/scsi/ultrastor.c
··· 138 138 #include <linux/spinlock.h> 139 139 #include <linux/stat.h> 140 140 #include <linux/bitops.h> 141 + #include <linux/delay.h> 141 142 142 143 #include <asm/io.h> 143 144 #include <asm/system.h>
+1
drivers/staging/altera-stapl/altera-jtag.c
··· 23 23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 24 24 */ 25 25 26 + #include <linux/delay.h> 26 27 #include <linux/firmware.h> 27 28 #include <linux/slab.h> 28 29 #include <staging/altera.h>
+6
drivers/tty/n_tty.c
··· 95 95 { 96 96 /* tty->read_cnt is not read locked ? */ 97 97 int left = N_TTY_BUF_SIZE - tty->read_cnt - 1; 98 + int old_left; 98 99 99 100 /* 100 101 * If we are doing input canonicalization, and there are no ··· 105 104 */ 106 105 if (left <= 0) 107 106 left = tty->icanon && !tty->canon_data; 107 + old_left = tty->receive_room; 108 108 tty->receive_room = left; 109 + 110 + /* Did this open up the receive buffer? We may need to flip */ 111 + if (left && !old_left) 112 + schedule_work(&tty->buf.work); 109 113 } 110 114 111 115 static void put_tty_queue_nolock(unsigned char c, struct tty_struct *tty)
+1 -3
drivers/tty/tty_buffer.c
··· 442 442 line discipline as we want to empty the queue */ 443 443 if (test_bit(TTY_FLUSHPENDING, &tty->flags)) 444 444 break; 445 - if (!tty->receive_room || seen_tail) { 446 - schedule_work(&tty->buf.work); 445 + if (!tty->receive_room || seen_tail) 447 446 break; 448 - } 449 447 if (count > tty->receive_room) 450 448 count = tty->receive_room; 451 449 char_buf = head->char_buf_ptr + head->read;
+2 -2
drivers/usb/serial/mct_u232.c
··· 106 106 static int mct_u232_tiocmget(struct tty_struct *tty); 107 107 static int mct_u232_tiocmset(struct tty_struct *tty, 108 108 unsigned int set, unsigned int clear); 109 - static int mct_u232_ioctl(struct tty_struct *tty, struct file *file, 109 + static int mct_u232_ioctl(struct tty_struct *tty, 110 110 unsigned int cmd, unsigned long arg); 111 111 static int mct_u232_get_icount(struct tty_struct *tty, 112 112 struct serial_icounter_struct *icount); ··· 874 874 } 875 875 } 876 876 877 - static int mct_u232_ioctl(struct tty_struct *tty, struct file *file, 877 + static int mct_u232_ioctl(struct tty_struct *tty, 878 878 unsigned int cmd, unsigned long arg) 879 879 { 880 880 DEFINE_WAIT(wait);
+1 -1
drivers/usb/serial/opticon.c
··· 413 413 return result; 414 414 } 415 415 416 - static int opticon_tiocmset(struct tty_struct *tty, struct file *file, 416 + static int opticon_tiocmset(struct tty_struct *tty, 417 417 unsigned int set, unsigned int clear) 418 418 { 419 419 struct usb_serial_port *port = tty->driver_data;
+17 -11
drivers/video/fb-puv3.c
··· 13 13 #include <linux/module.h> 14 14 #include <linux/kernel.h> 15 15 #include <linux/errno.h> 16 - #include <linux/vmalloc.h> 17 16 #include <linux/platform_device.h> 18 17 #include <linux/clk.h> 19 18 #include <linux/fb.h> ··· 530 531 return -EINVAL; 531 532 } 532 533 533 - writel(PKUNITY_UNIGFX_MMAP_BASE, UDE_FSA); 534 + writel(info->fix.smem_start, UDE_FSA); 534 535 writel(info->var.yres, UDE_LS); 535 536 writel(get_line_length(info->var.xres, 536 537 info->var.bits_per_pixel) >> 3, UDE_PS); ··· 679 680 struct fb_info *info; 680 681 u32 unifb_regs[UNIFB_REGS_NUM]; 681 682 int retval = -ENOMEM; 682 - struct resource *iomem, *mapmem; 683 + struct resource *iomem; 684 + void *videomemory; 685 + 686 + videomemory = (void *)__get_free_pages(GFP_KERNEL | __GFP_COMP, 687 + get_order(UNIFB_MEMSIZE)); 688 + if (!videomemory) 689 + goto err; 690 + 691 + memset(videomemory, 0, UNIFB_MEMSIZE); 692 + 693 + unifb_fix.smem_start = virt_to_phys(videomemory); 694 + unifb_fix.smem_len = UNIFB_MEMSIZE; 695 + 696 + iomem = platform_get_resource(dev, IORESOURCE_MEM, 0); 697 + unifb_fix.mmio_start = iomem->start; 683 698 684 699 info = framebuffer_alloc(sizeof(u32)*256, &dev->dev); 685 700 if (!info) 686 701 goto err; 687 702 688 - info->screen_base = (char __iomem *)KUSER_UNIGFX_BASE; 703 + info->screen_base = (char __iomem *)videomemory; 689 704 info->fbops = &unifb_ops; 690 705 691 706 retval = fb_find_mode(&info->var, info, NULL, ··· 707 694 708 695 if (!retval || (retval == 4)) 709 696 info->var = unifb_default; 710 - 711 - iomem = platform_get_resource(dev, IORESOURCE_MEM, 0); 712 - unifb_fix.mmio_start = iomem->start; 713 - 714 - mapmem = platform_get_resource(dev, IORESOURCE_MEM, 1); 715 - unifb_fix.smem_start = mapmem->start; 716 - unifb_fix.smem_len = UNIFB_MEMSIZE; 717 697 718 698 info->fix = unifb_fix; 719 699 info->pseudo_palette = info->par;
+4
fs/btrfs/ctree.h
··· 1284 1284 #define BTRFS_INODE_DIRSYNC (1 << 10) 1285 1285 #define BTRFS_INODE_COMPRESS (1 << 11) 1286 1286 1287 + #define BTRFS_INODE_ROOT_ITEM_INIT (1 << 31) 1288 + 1287 1289 /* some macros to generate set/get funcs for the struct fields. This 1288 1290 * assumes there is a lefoo_to_cpu for every type, so lets make a simple 1289 1291 * one for u8: ··· 2361 2359 int btrfs_find_orphan_roots(struct btrfs_root *tree_root); 2362 2360 int btrfs_set_root_node(struct btrfs_root_item *item, 2363 2361 struct extent_buffer *node); 2362 + void btrfs_check_and_init_root_item(struct btrfs_root_item *item); 2363 + 2364 2364 /* dir-item.c */ 2365 2365 int btrfs_insert_dir_item(struct btrfs_trans_handle *trans, 2366 2366 struct btrfs_root *root, const char *name,
+3 -1
fs/btrfs/disk-io.c
··· 1275 1275 root->commit_root = btrfs_root_node(root); 1276 1276 BUG_ON(!root->node); 1277 1277 out: 1278 - if (location->objectid != BTRFS_TREE_LOG_OBJECTID) 1278 + if (location->objectid != BTRFS_TREE_LOG_OBJECTID) { 1279 1279 root->ref_cows = 1; 1280 + btrfs_check_and_init_root_item(&root->root_item); 1281 + } 1280 1282 1281 1283 return root; 1282 1284 }
+1 -1
fs/btrfs/file.c
··· 906 906 unsigned long last_index; 907 907 size_t num_written = 0; 908 908 int nrptrs; 909 - int ret; 909 + int ret = 0; 910 910 911 911 nrptrs = min((iov_iter_count(i) + PAGE_CACHE_SIZE - 1) / 912 912 PAGE_CACHE_SIZE, PAGE_CACHE_SIZE /
+80 -4
fs/btrfs/free-space-cache.c
··· 24 24 #include "free-space-cache.h" 25 25 #include "transaction.h" 26 26 #include "disk-io.h" 27 + #include "extent_io.h" 27 28 28 29 #define BITS_PER_BITMAP (PAGE_CACHE_SIZE * 8) 29 30 #define MAX_CACHE_BYTES_PER_GIG (32 * 1024) ··· 81 80 iput(inode); 82 81 return ERR_PTR(-ENOENT); 83 82 } 83 + 84 + inode->i_mapping->flags &= ~__GFP_FS; 84 85 85 86 spin_lock(&block_group->lock); 86 87 if (!root->fs_info->closing) { ··· 225 222 u64 num_entries; 226 223 u64 num_bitmaps; 227 224 u64 generation; 225 + u64 used = btrfs_block_group_used(&block_group->item); 228 226 u32 cur_crc = ~(u32)0; 229 227 pgoff_t index = 0; 230 228 unsigned long first_page_offset; ··· 471 467 index++; 472 468 } 473 469 470 + spin_lock(&block_group->tree_lock); 471 + if (block_group->free_space != (block_group->key.offset - used - 472 + block_group->bytes_super)) { 473 + spin_unlock(&block_group->tree_lock); 474 + printk(KERN_ERR "block group %llu has an wrong amount of free " 475 + "space\n", block_group->key.objectid); 476 + ret = 0; 477 + goto free_cache; 478 + } 479 + spin_unlock(&block_group->tree_lock); 480 + 474 481 ret = 1; 475 482 out: 476 483 kfree(checksums); ··· 510 495 struct list_head *pos, *n; 511 496 struct page *page; 512 497 struct extent_state *cached_state = NULL; 498 + struct btrfs_free_cluster *cluster = NULL; 499 + struct extent_io_tree *unpin = NULL; 513 500 struct list_head bitmap_list; 514 501 struct btrfs_key key; 502 + u64 start, end, len; 515 503 u64 bytes = 0; 516 504 u32 *crc, *checksums; 517 505 pgoff_t index = 0, last_index = 0; ··· 523 505 int entries = 0; 524 506 int bitmaps = 0; 525 507 int ret = 0; 508 + bool next_page = false; 526 509 527 510 root = root->fs_info->tree_root; 528 511 ··· 570 551 */ 571 552 first_page_offset = (sizeof(u32) * num_checksums) + sizeof(u64); 572 553 554 + /* Get the cluster for this block_group if it exists */ 555 + if (!list_empty(&block_group->cluster_list)) 556 + cluster = list_entry(block_group->cluster_list.next, 557 + struct btrfs_free_cluster, 558 + block_group_list); 559 + 560 + /* 561 + * We shouldn't have switched the pinned extents yet so this is the 562 + * right one 563 + */ 564 + unpin = root->fs_info->pinned_extents; 565 + 573 566 /* 574 567 * Lock all pages first so we can lock the extent safely. 575 568 * ··· 611 580 lock_extent_bits(&BTRFS_I(inode)->io_tree, 0, i_size_read(inode) - 1, 612 581 0, &cached_state, GFP_NOFS); 613 582 583 + /* 584 + * When searching for pinned extents, we need to start at our start 585 + * offset. 586 + */ 587 + start = block_group->key.objectid; 588 + 614 589 /* Write out the extent entries */ 615 590 do { 616 591 struct btrfs_free_space_entry *entry; 617 592 void *addr; 618 593 unsigned long offset = 0; 619 594 unsigned long start_offset = 0; 595 + 596 + next_page = false; 620 597 621 598 if (index == 0) { 622 599 start_offset = first_page_offset; ··· 637 598 entry = addr + start_offset; 638 599 639 600 memset(addr, 0, PAGE_CACHE_SIZE); 640 - while (1) { 601 + while (node && !next_page) { 641 602 struct btrfs_free_space *e; 642 603 643 604 e = rb_entry(node, struct btrfs_free_space, offset_index); ··· 653 614 entry->type = BTRFS_FREE_SPACE_EXTENT; 654 615 } 655 616 node = rb_next(node); 656 - if (!node) 657 - break; 617 + if (!node && cluster) { 618 + node = rb_first(&cluster->root); 619 + cluster = NULL; 620 + } 658 621 offset += sizeof(struct btrfs_free_space_entry); 659 622 if (offset + sizeof(struct btrfs_free_space_entry) >= 660 623 PAGE_CACHE_SIZE) 624 + next_page = true; 625 + entry++; 626 + } 627 + 628 + /* 629 + * We want to add any pinned extents to our free space cache 630 + * so we don't leak the space 631 + */ 632 + while (!next_page && (start < block_group->key.objectid + 633 + block_group->key.offset)) { 634 + ret = find_first_extent_bit(unpin, start, &start, &end, 635 + EXTENT_DIRTY); 636 + if (ret) { 637 + ret = 0; 661 638 break; 639 + } 640 + 641 + /* This pinned extent is out of our range */ 642 + if (start >= block_group->key.objectid + 643 + block_group->key.offset) 644 + break; 645 + 646 + len = block_group->key.objectid + 647 + block_group->key.offset - start; 648 + len = min(len, end + 1 - start); 649 + 650 + entries++; 651 + entry->offset = cpu_to_le64(start); 652 + entry->bytes = cpu_to_le64(len); 653 + entry->type = BTRFS_FREE_SPACE_EXTENT; 654 + 655 + start = end + 1; 656 + offset += sizeof(struct btrfs_free_space_entry); 657 + if (offset + sizeof(struct btrfs_free_space_entry) >= 658 + PAGE_CACHE_SIZE) 659 + next_page = true; 662 660 entry++; 663 661 } 664 662 *crc = ~(u32)0; ··· 726 650 page_cache_release(page); 727 651 728 652 index++; 729 - } while (node); 653 + } while (node || next_page); 730 654 731 655 /* Write out the bitmaps */ 732 656 list_for_each_safe(pos, n, &bitmap_list) {
+13 -16
fs/btrfs/inode.c
··· 112 112 static noinline int insert_inline_extent(struct btrfs_trans_handle *trans, 113 113 struct btrfs_root *root, struct inode *inode, 114 114 u64 start, size_t size, size_t compressed_size, 115 + int compress_type, 115 116 struct page **compressed_pages) 116 117 { 117 118 struct btrfs_key key; ··· 127 126 size_t cur_size = size; 128 127 size_t datasize; 129 128 unsigned long offset; 130 - int compress_type = BTRFS_COMPRESS_NONE; 131 129 132 - if (compressed_size && compressed_pages) { 133 - compress_type = root->fs_info->compress_type; 130 + if (compressed_size && compressed_pages) 134 131 cur_size = compressed_size; 135 - } 136 132 137 133 path = btrfs_alloc_path(); 138 134 if (!path) ··· 219 221 static noinline int cow_file_range_inline(struct btrfs_trans_handle *trans, 220 222 struct btrfs_root *root, 221 223 struct inode *inode, u64 start, u64 end, 222 - size_t compressed_size, 224 + size_t compressed_size, int compress_type, 223 225 struct page **compressed_pages) 224 226 { 225 227 u64 isize = i_size_read(inode); ··· 252 254 inline_len = min_t(u64, isize, actual_end); 253 255 ret = insert_inline_extent(trans, root, inode, start, 254 256 inline_len, compressed_size, 255 - compressed_pages); 257 + compress_type, compressed_pages); 256 258 BUG_ON(ret); 257 259 btrfs_delalloc_release_metadata(inode, end + 1 - start); 258 260 btrfs_drop_extent_cache(inode, start, aligned_end - 1, 0); ··· 431 433 * to make an uncompressed inline extent. 432 434 */ 433 435 ret = cow_file_range_inline(trans, root, inode, 434 - start, end, 0, NULL); 436 + start, end, 0, 0, NULL); 435 437 } else { 436 438 /* try making a compressed inline extent */ 437 439 ret = cow_file_range_inline(trans, root, inode, 438 440 start, end, 439 - total_compressed, pages); 441 + total_compressed, 442 + compress_type, pages); 440 443 } 441 444 if (ret == 0) { 442 445 /* ··· 791 792 if (start == 0) { 792 793 /* lets try to make an inline extent */ 793 794 ret = cow_file_range_inline(trans, root, inode, 794 - start, end, 0, NULL); 795 + start, end, 0, 0, NULL); 795 796 if (ret == 0) { 796 797 extent_clear_unlock_delalloc(inode, 797 798 &BTRFS_I(inode)->io_tree, ··· 2221 2222 insert = 1; 2222 2223 #endif 2223 2224 insert = 1; 2224 - } else { 2225 - WARN_ON(!BTRFS_I(inode)->orphan_meta_reserved); 2226 2225 } 2227 2226 2228 2227 if (!BTRFS_I(inode)->orphan_meta_reserved) { ··· 2534 2537 BTRFS_I(inode)->flags = btrfs_inode_flags(leaf, inode_item); 2535 2538 2536 2539 alloc_group_block = btrfs_inode_block_group(leaf, inode_item); 2537 - if (location.objectid == BTRFS_FREE_SPACE_OBJECTID) 2538 - inode->i_mapping->flags &= ~__GFP_FS; 2539 2540 2540 2541 /* 2541 2542 * try to precache a NULL acl entry for files that don't have ··· 6955 6960 * should cover the worst case number of items we'll modify. 6956 6961 */ 6957 6962 trans = btrfs_start_transaction(root, 20); 6958 - if (IS_ERR(trans)) 6959 - return PTR_ERR(trans); 6963 + if (IS_ERR(trans)) { 6964 + ret = PTR_ERR(trans); 6965 + goto out_notrans; 6966 + } 6960 6967 6961 6968 btrfs_set_trans_block_group(trans, new_dir); 6962 6969 ··· 7058 7061 } 7059 7062 out_fail: 7060 7063 btrfs_end_transaction_throttle(trans, root); 7061 - 7064 + out_notrans: 7062 7065 if (old_inode->i_ino == BTRFS_FIRST_FREE_OBJECTID) 7063 7066 up_read(&root->fs_info->subvol_sem); 7064 7067
+7 -1
fs/btrfs/ioctl.c
··· 373 373 inode_item->nbytes = cpu_to_le64(root->leafsize); 374 374 inode_item->mode = cpu_to_le32(S_IFDIR | 0755); 375 375 376 + root_item.flags = 0; 377 + root_item.byte_limit = 0; 378 + inode_item->flags = cpu_to_le64(BTRFS_INODE_ROOT_ITEM_INIT); 379 + 376 380 btrfs_set_root_bytenr(&root_item, leaf->start); 377 381 btrfs_set_root_generation(&root_item, trans->transid); 378 382 btrfs_set_root_level(&root_item, 0); ··· 2440 2436 return PTR_ERR(trans); 2441 2437 transid = trans->transid; 2442 2438 ret = btrfs_commit_transaction_async(trans, root, 0); 2443 - if (ret) 2439 + if (ret) { 2440 + btrfs_end_transaction(trans, root); 2444 2441 return ret; 2442 + } 2445 2443 2446 2444 if (argp) 2447 2445 if (copy_to_user(argp, &transid, sizeof(transid)))
+18
fs/btrfs/root-tree.c
··· 473 473 btrfs_free_path(path); 474 474 return 0; 475 475 } 476 + 477 + /* 478 + * Old btrfs forgets to init root_item->flags and root_item->byte_limit 479 + * for subvolumes. To work around this problem, we steal a bit from 480 + * root_item->inode_item->flags, and use it to indicate if those fields 481 + * have been properly initialized. 482 + */ 483 + void btrfs_check_and_init_root_item(struct btrfs_root_item *root_item) 484 + { 485 + u64 inode_flags = le64_to_cpu(root_item->inode.flags); 486 + 487 + if (!(inode_flags & BTRFS_INODE_ROOT_ITEM_INIT)) { 488 + inode_flags |= BTRFS_INODE_ROOT_ITEM_INIT; 489 + root_item->inode.flags = cpu_to_le64(inode_flags); 490 + root_item->flags = 0; 491 + root_item->byte_limit = 0; 492 + } 493 + }
+17 -2
fs/btrfs/super.c
··· 644 644 { 645 645 struct btrfs_root *root = btrfs_sb(vfs->mnt_sb); 646 646 struct btrfs_fs_info *info = root->fs_info; 647 + char *compress_type; 647 648 648 649 if (btrfs_test_opt(root, DEGRADED)) 649 650 seq_puts(seq, ",degraded"); ··· 663 662 if (info->thread_pool_size != min_t(unsigned long, 664 663 num_online_cpus() + 2, 8)) 665 664 seq_printf(seq, ",thread_pool=%d", info->thread_pool_size); 666 - if (btrfs_test_opt(root, COMPRESS)) 667 - seq_puts(seq, ",compress"); 665 + if (btrfs_test_opt(root, COMPRESS)) { 666 + if (info->compress_type == BTRFS_COMPRESS_ZLIB) 667 + compress_type = "zlib"; 668 + else 669 + compress_type = "lzo"; 670 + if (btrfs_test_opt(root, FORCE_COMPRESS)) 671 + seq_printf(seq, ",compress-force=%s", compress_type); 672 + else 673 + seq_printf(seq, ",compress=%s", compress_type); 674 + } 668 675 if (btrfs_test_opt(root, NOSSD)) 669 676 seq_puts(seq, ",nossd"); 670 677 if (btrfs_test_opt(root, SSD_SPREAD)) ··· 687 678 seq_puts(seq, ",discard"); 688 679 if (!(root->fs_info->sb->s_flags & MS_POSIXACL)) 689 680 seq_puts(seq, ",noacl"); 681 + if (btrfs_test_opt(root, SPACE_CACHE)) 682 + seq_puts(seq, ",space_cache"); 683 + if (btrfs_test_opt(root, CLEAR_CACHE)) 684 + seq_puts(seq, ",clear_cache"); 685 + if (btrfs_test_opt(root, USER_SUBVOL_RM_ALLOWED)) 686 + seq_puts(seq, ",user_subvol_rm_allowed"); 690 687 return 0; 691 688 } 692 689
+2
fs/btrfs/transaction.c
··· 197 197 198 198 ret = join_transaction(root); 199 199 if (ret < 0) { 200 + kmem_cache_free(btrfs_trans_handle_cachep, h); 200 201 if (type != TRANS_JOIN_NOLOCK) 201 202 mutex_unlock(&root->fs_info->trans_mutex); 202 203 return ERR_PTR(ret); ··· 976 975 record_root_in_trans(trans, root); 977 976 btrfs_set_root_last_snapshot(&root->root_item, trans->transid); 978 977 memcpy(new_root_item, &root->root_item, sizeof(*new_root_item)); 978 + btrfs_check_and_init_root_item(new_root_item); 979 979 980 980 root_flags = btrfs_root_flags(new_root_item); 981 981 if (pending->readonly)
+8 -1
fs/inode.c
··· 125 125 static DECLARE_RWSEM(iprune_sem); 126 126 127 127 /* 128 + * Empty aops. Can be used for the cases where the user does not 129 + * define any of the address_space operations. 130 + */ 131 + const struct address_space_operations empty_aops = { 132 + }; 133 + EXPORT_SYMBOL(empty_aops); 134 + 135 + /* 128 136 * Statistics gathering.. 129 137 */ 130 138 struct inodes_stat_t inodes_stat; ··· 184 176 */ 185 177 int inode_init_always(struct super_block *sb, struct inode *inode) 186 178 { 187 - static const struct address_space_operations empty_aops; 188 179 static const struct inode_operations empty_iops; 189 180 static const struct file_operations empty_fops; 190 181 struct address_space *const mapping = &inode->i_data;
-2
fs/nilfs2/page.c
··· 495 495 void nilfs_mapping_init(struct address_space *mapping, 496 496 struct backing_dev_info *bdi) 497 497 { 498 - static const struct address_space_operations empty_aops; 499 - 500 498 mapping->host = NULL; 501 499 mapping->flags = 0; 502 500 mapping_set_gfp_mask(mapping, GFP_NOFS);
+1
fs/notify/inotify/inotify_fsnotify.c
··· 198 198 idr_for_each(&group->inotify_data.idr, idr_callback, group); 199 199 idr_remove_all(&group->inotify_data.idr); 200 200 idr_destroy(&group->inotify_data.idr); 201 + atomic_dec(&group->inotify_data.user->inotify_devs); 201 202 free_uid(group->inotify_data.user); 202 203 } 203 204
+13 -26
fs/notify/inotify/inotify_user.c
··· 290 290 static int inotify_release(struct inode *ignored, struct file *file) 291 291 { 292 292 struct fsnotify_group *group = file->private_data; 293 - struct user_struct *user = group->inotify_data.user; 294 293 295 294 pr_debug("%s: group=%p\n", __func__, group); 296 295 ··· 297 298 298 299 /* free this group, matching get was inotify_init->fsnotify_obtain_group */ 299 300 fsnotify_put_group(group); 300 - 301 - atomic_dec(&user->inotify_devs); 302 301 303 302 return 0; 304 303 } ··· 694 697 return ret; 695 698 } 696 699 697 - static struct fsnotify_group *inotify_new_group(struct user_struct *user, unsigned int max_events) 700 + static struct fsnotify_group *inotify_new_group(unsigned int max_events) 698 701 { 699 702 struct fsnotify_group *group; 700 703 ··· 707 710 spin_lock_init(&group->inotify_data.idr_lock); 708 711 idr_init(&group->inotify_data.idr); 709 712 group->inotify_data.last_wd = 0; 710 - group->inotify_data.user = user; 711 713 group->inotify_data.fa = NULL; 714 + group->inotify_data.user = get_current_user(); 715 + 716 + if (atomic_inc_return(&group->inotify_data.user->inotify_devs) > 717 + inotify_max_user_instances) { 718 + fsnotify_put_group(group); 719 + return ERR_PTR(-EMFILE); 720 + } 712 721 713 722 return group; 714 723 } ··· 724 721 SYSCALL_DEFINE1(inotify_init1, int, flags) 725 722 { 726 723 struct fsnotify_group *group; 727 - struct user_struct *user; 728 724 int ret; 729 725 730 726 /* Check the IN_* constants for consistency. */ ··· 733 731 if (flags & ~(IN_CLOEXEC | IN_NONBLOCK)) 734 732 return -EINVAL; 735 733 736 - user = get_current_user(); 737 - if (unlikely(atomic_read(&user->inotify_devs) >= 738 - inotify_max_user_instances)) { 739 - ret = -EMFILE; 740 - goto out_free_uid; 741 - } 742 - 743 734 /* fsnotify_obtain_group took a reference to group, we put this when we kill the file in the end */ 744 - group = inotify_new_group(user, inotify_max_queued_events); 745 - if (IS_ERR(group)) { 746 - ret = PTR_ERR(group); 747 - goto out_free_uid; 748 - } 749 - 750 - atomic_inc(&user->inotify_devs); 735 + group = inotify_new_group(inotify_max_queued_events); 736 + if (IS_ERR(group)) 737 + return PTR_ERR(group); 751 738 752 739 ret = anon_inode_getfd("inotify", &inotify_fops, group, 753 740 O_RDONLY | flags); 754 - if (ret >= 0) 755 - return ret; 741 + if (ret < 0) 742 + fsnotify_put_group(group); 756 743 757 - fsnotify_put_group(group); 758 - atomic_dec(&user->inotify_devs); 759 - out_free_uid: 760 - free_uid(user); 761 744 return ret; 762 745 } 763 746
+2 -2
fs/ubifs/xattr.c
··· 56 56 */ 57 57 58 58 #include "ubifs.h" 59 + #include <linux/fs.h> 59 60 #include <linux/slab.h> 60 61 #include <linux/xattr.h> 61 62 #include <linux/posix_acl_xattr.h> ··· 81 80 }; 82 81 83 82 static const struct inode_operations none_inode_operations; 84 - static const struct address_space_operations none_address_operations; 85 83 static const struct file_operations none_file_operations; 86 84 87 85 /** ··· 130 130 } 131 131 132 132 /* Re-define all operations to be "nothing" */ 133 - inode->i_mapping->a_ops = &none_address_operations; 133 + inode->i_mapping->a_ops = &empty_aops; 134 134 inode->i_op = &none_inode_operations; 135 135 inode->i_fop = &none_file_operations; 136 136
-1
fs/ufs/truncate.c
··· 479 479 break; 480 480 if (IS_SYNC(inode) && (inode->i_state & I_DIRTY)) 481 481 ufs_sync_inode (inode); 482 - blk_flush_plug(current); 483 482 yield(); 484 483 } 485 484
+7
include/asm-generic/bug.h
··· 194 194 #ifdef CONFIG_SMP 195 195 # define WARN_ON_SMP(x) WARN_ON(x) 196 196 #else 197 + /* 198 + * Use of ({0;}) because WARN_ON_SMP(x) may be used either as 199 + * a stand alone line statement or as a condition in an if () 200 + * statement. 201 + * A simple "0" would cause gcc to give a "statement has no effect" 202 + * warning. 203 + */ 197 204 # define WARN_ON_SMP(x) ({0;}) 198 205 #endif 199 206
+1
include/drm/drm_crtc.h
··· 778 778 void *data, struct drm_file *file_priv); 779 779 extern int drm_mode_gamma_set_ioctl(struct drm_device *dev, 780 780 void *data, struct drm_file *file_priv); 781 + extern u8 *drm_find_cea_extension(struct edid *edid); 781 782 extern bool drm_detect_hdmi_monitor(struct edid *edid); 782 783 extern bool drm_detect_monitor_audio(struct edid *edid); 783 784 extern int drm_mode_page_flip_ioctl(struct drm_device *dev,
+2
include/drm/drm_pciids.h
··· 472 472 {0x1002, 0x9803, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 473 473 {0x1002, 0x9804, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 474 474 {0x1002, 0x9805, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 475 + {0x1002, 0x9806, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 476 + {0x1002, 0x9807, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_PALM|RADEON_NEW_MEMMAP|RADEON_IS_IGP}, \ 475 477 {0, 0, 0} 476 478 477 479 #define r128_PCI_IDS \
+9 -9
include/drm/ttm/ttm_bo_api.h
··· 158 158 * the object is destroyed. 159 159 * @event_queue: Queue for processes waiting on buffer object status change. 160 160 * @mem: structure describing current placement. 161 - * @persistant_swap_storage: Usually the swap storage is deleted for buffers 161 + * @persistent_swap_storage: Usually the swap storage is deleted for buffers 162 162 * pinned in physical memory. If this behaviour is not desired, this member 163 - * holds a pointer to a persistant shmem object. 163 + * holds a pointer to a persistent shmem object. 164 164 * @ttm: TTM structure holding system pages. 165 165 * @evicted: Whether the object was evicted without user-space knowing. 166 166 * @cpu_writes: For synchronization. Number of cpu writers. ··· 221 221 */ 222 222 223 223 struct ttm_mem_reg mem; 224 - struct file *persistant_swap_storage; 224 + struct file *persistent_swap_storage; 225 225 struct ttm_tt *ttm; 226 226 bool evicted; 227 227 ··· 459 459 * user buffer object. 460 460 * @interruptible: If needing to sleep to wait for GPU resources, 461 461 * sleep interruptible. 462 - * @persistant_swap_storage: Usually the swap storage is deleted for buffers 462 + * @persistent_swap_storage: Usually the swap storage is deleted for buffers 463 463 * pinned in physical memory. If this behaviour is not desired, this member 464 - * holds a pointer to a persistant shmem object. Typically, this would 464 + * holds a pointer to a persistent shmem object. Typically, this would 465 465 * point to the shmem object backing a GEM object if TTM is used to back a 466 466 * GEM user interface. 467 467 * @acc_size: Accounted size for this object. ··· 490 490 uint32_t page_alignment, 491 491 unsigned long buffer_start, 492 492 bool interrubtible, 493 - struct file *persistant_swap_storage, 493 + struct file *persistent_swap_storage, 494 494 size_t acc_size, 495 495 void (*destroy) (struct ttm_buffer_object *)); 496 496 /** ··· 506 506 * user buffer object. 507 507 * @interruptible: If needing to sleep while waiting for GPU resources, 508 508 * sleep interruptible. 509 - * @persistant_swap_storage: Usually the swap storage is deleted for buffers 509 + * @persistent_swap_storage: Usually the swap storage is deleted for buffers 510 510 * pinned in physical memory. If this behaviour is not desired, this member 511 - * holds a pointer to a persistant shmem object. Typically, this would 511 + * holds a pointer to a persistent shmem object. Typically, this would 512 512 * point to the shmem object backing a GEM object if TTM is used to back a 513 513 * GEM user interface. 514 514 * @p_bo: On successful completion *p_bo points to the created object. ··· 528 528 uint32_t page_alignment, 529 529 unsigned long buffer_start, 530 530 bool interruptible, 531 - struct file *persistant_swap_storage, 531 + struct file *persistent_swap_storage, 532 532 struct ttm_buffer_object **p_bo); 533 533 534 534 /**
+2 -2
include/drm/ttm/ttm_bo_driver.h
··· 122 122 #define TTM_PAGE_FLAG_USER_DIRTY (1 << 2) 123 123 #define TTM_PAGE_FLAG_WRITE (1 << 3) 124 124 #define TTM_PAGE_FLAG_SWAPPED (1 << 4) 125 - #define TTM_PAGE_FLAG_PERSISTANT_SWAP (1 << 5) 125 + #define TTM_PAGE_FLAG_PERSISTENT_SWAP (1 << 5) 126 126 #define TTM_PAGE_FLAG_ZERO_ALLOC (1 << 6) 127 127 #define TTM_PAGE_FLAG_DMA32 (1 << 7) 128 128 ··· 714 714 */ 715 715 extern int ttm_tt_set_placement_caching(struct ttm_tt *ttm, uint32_t placement); 716 716 extern int ttm_tt_swapout(struct ttm_tt *ttm, 717 - struct file *persistant_swap_storage); 717 + struct file *persistent_swap_storage); 718 718 719 719 /* 720 720 * ttm_bo.c
+2
include/linux/blkdev.h
··· 1206 1206 struct kobject kobj; 1207 1207 }; 1208 1208 1209 + extern bool blk_integrity_is_initialized(struct gendisk *); 1209 1210 extern int blk_integrity_register(struct gendisk *, struct blk_integrity *); 1210 1211 extern void blk_integrity_unregister(struct gendisk *); 1211 1212 extern int blk_integrity_compare(struct gendisk *, struct gendisk *); ··· 1263 1262 #define queue_max_integrity_segments(a) (0) 1264 1263 #define blk_integrity_merge_rq(a, b, c) (0) 1265 1264 #define blk_integrity_merge_bio(a, b, c) (0) 1265 + #define blk_integrity_is_initialized(a) (0) 1266 1266 1267 1267 #endif /* CONFIG_BLK_DEV_INTEGRITY */ 1268 1268
-1
include/linux/elevator.h
··· 101 101 extern void elv_dispatch_add_tail(struct request_queue *, struct request *); 102 102 extern void elv_add_request(struct request_queue *, struct request *, int); 103 103 extern void __elv_add_request(struct request_queue *, struct request *, int); 104 - extern void elv_insert(struct request_queue *, struct request *, int); 105 104 extern int elv_merge(struct request_queue *, struct request **, struct bio *); 106 105 extern int elv_try_merge(struct request *, struct bio *); 107 106 extern void elv_merge_requests(struct request_queue *, struct request *,
+2
include/linux/fs.h
··· 613 613 int (*error_remove_page)(struct address_space *, struct page *); 614 614 }; 615 615 616 + extern const struct address_space_operations empty_aops; 617 + 616 618 /* 617 619 * pagecache_write_begin/pagecache_write_end must be used by general code 618 620 * to write into the pagecache.
+2 -2
include/linux/netdevice.h
··· 2598 2598 2599 2599 static inline u32 dev_ethtool_get_rx_csum(struct net_device *dev) 2600 2600 { 2601 - if (dev->hw_features & NETIF_F_RXCSUM) 2602 - return !!(dev->features & NETIF_F_RXCSUM); 2601 + if (dev->features & NETIF_F_RXCSUM) 2602 + return 1; 2603 2603 if (!dev->ethtool_ops || !dev->ethtool_ops->get_rx_csum) 2604 2604 return 0; 2605 2605 return dev->ethtool_ops->get_rx_csum(dev);
+1 -1
include/linux/pci_ids.h
··· 518 518 #define PCI_DEVICE_ID_AMD_11H_NB_MISC 0x1303 519 519 #define PCI_DEVICE_ID_AMD_11H_NB_LINK 0x1304 520 520 #define PCI_DEVICE_ID_AMD_15H_NB_F3 0x1603 521 - #define PCI_DEVICE_ID_AMD_15H_NB_LINK 0x1604 521 + #define PCI_DEVICE_ID_AMD_15H_NB_F4 0x1604 522 522 #define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 523 523 #define PCI_DEVICE_ID_AMD_LANCE 0x2000 524 524 #define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001
+1 -1
include/linux/perf_event.h
··· 1086 1086 { 1087 1087 perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, 1, NULL, 0); 1088 1088 1089 - COND_STMT(&perf_sched_events, __perf_event_task_sched_out(task, next)); 1089 + __perf_event_task_sched_out(task, next); 1090 1090 } 1091 1091 1092 1092 extern void perf_event_mmap(struct vm_area_struct *vma);
+20
include/linux/rcupdate.h
··· 339 339 ((typeof(*p) __force __kernel *)(p)); \ 340 340 }) 341 341 342 + #define __rcu_access_index(p, space) \ 343 + ({ \ 344 + typeof(p) _________p1 = ACCESS_ONCE(p); \ 345 + rcu_dereference_sparse(p, space); \ 346 + (_________p1); \ 347 + }) 342 348 #define __rcu_dereference_index_check(p, c) \ 343 349 ({ \ 344 350 typeof(p) _________p1 = ACCESS_ONCE(p); \ ··· 433 427 __rcu) 434 428 435 429 #define rcu_dereference_raw(p) rcu_dereference_check(p, 1) /*@@@ needed? @@@*/ 430 + 431 + /** 432 + * rcu_access_index() - fetch RCU index with no dereferencing 433 + * @p: The index to read 434 + * 435 + * Return the value of the specified RCU-protected index, but omit the 436 + * smp_read_barrier_depends() and keep the ACCESS_ONCE(). This is useful 437 + * when the value of this index is accessed, but the index is not 438 + * dereferenced, for example, when testing an RCU-protected index against 439 + * -1. Although rcu_access_index() may also be used in cases where 440 + * update-side locks prevent the value of the index from changing, you 441 + * should instead use rcu_dereference_index_protected() for this use case. 442 + */ 443 + #define rcu_access_index(p) __rcu_access_index((p), __rcu) 436 444 437 445 /** 438 446 * rcu_dereference_index_check() - rcu_dereference for indices with debug checking
+2
include/linux/usb/usbnet.h
··· 97 97 98 98 #define FLAG_LINK_INTR 0x0800 /* updates link (carrier) status */ 99 99 100 + #define FLAG_POINTTOPOINT 0x1000 /* possibly use "usb%d" names */ 101 + 100 102 /* 101 103 * Indicates to usbnet, that USB driver accumulates multiple IP packets. 102 104 * Affects statistic (counters) and short packet handling.
+2
include/net/bluetooth/hci.h
··· 84 84 HCI_SERVICE_CACHE, 85 85 HCI_LINK_KEYS, 86 86 HCI_DEBUG_KEYS, 87 + 88 + HCI_RESET, 87 89 }; 88 90 89 91 /* HCI ioctl defines */
+1 -1
include/net/sctp/structs.h
··· 422 422 __u32 adaptation_ind; 423 423 424 424 __u8 auth_random[sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH]; 425 - __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS + 2]; 425 + __u8 auth_hmacs[SCTP_AUTH_NUM_HMACS * sizeof(__u16) + 2]; 426 426 __u8 auth_chunks[sizeof(sctp_paramhdr_t) + SCTP_AUTH_MAX_CHUNKS]; 427 427 428 428 /* This is a shim for my peer's INIT packet, followed by
+7 -2
kernel/perf_event.c
··· 145 145 */ 146 146 int sysctl_perf_event_paranoid __read_mostly = 1; 147 147 148 - /* Minimum for 128 pages + 1 for the user control page */ 149 - int sysctl_perf_event_mlock __read_mostly = 516; /* 'free' kb per user */ 148 + /* Minimum for 512 kiB + 1 user control page */ 149 + int sysctl_perf_event_mlock __read_mostly = 512 + (PAGE_SIZE / 1024); /* 'free' kiB per user */ 150 150 151 151 /* 152 152 * max perf event sample rate ··· 6529 6529 if (IS_ERR(ctx)) { 6530 6530 err = PTR_ERR(ctx); 6531 6531 goto err_alloc; 6532 + } 6533 + 6534 + if (task) { 6535 + put_task_struct(task); 6536 + task = NULL; 6532 6537 } 6533 6538 6534 6539 /*
+11
kernel/sched.c
··· 5011 5011 return -EINVAL; 5012 5012 } 5013 5013 5014 + /* 5015 + * If not changing anything there's no need to proceed further: 5016 + */ 5017 + if (unlikely(policy == p->policy && (!rt_policy(policy) || 5018 + param->sched_priority == p->rt_priority))) { 5019 + 5020 + __task_rq_unlock(rq); 5021 + raw_spin_unlock_irqrestore(&p->pi_lock, flags); 5022 + return 0; 5023 + } 5024 + 5014 5025 #ifdef CONFIG_RT_GROUP_SCHED 5015 5026 if (user) { 5016 5027 /*
+3 -2
kernel/sched_fair.c
··· 22 22 23 23 #include <linux/latencytop.h> 24 24 #include <linux/sched.h> 25 + #include <linux/cpumask.h> 25 26 26 27 /* 27 28 * Targeted preemption latency for CPU-bound tasks: ··· 3851 3850 interval = msecs_to_jiffies(interval); 3852 3851 if (unlikely(!interval)) 3853 3852 interval = 1; 3854 - if (interval > HZ*NR_CPUS/10) 3855 - interval = HZ*NR_CPUS/10; 3853 + if (interval > HZ*num_online_cpus()/10) 3854 + interval = HZ*num_online_cpus()/10; 3856 3855 3857 3856 need_serialize = sd->flags & SD_SERIALIZE; 3858 3857
+110 -43
kernel/signal.c
··· 226 226 /* 227 227 * allocate a new signal queue record 228 228 * - this may be called without locks if and only if t == current, otherwise an 229 - * appopriate lock must be held to stop the target task from exiting 229 + * appropriate lock must be held to stop the target task from exiting 230 230 */ 231 231 static struct sigqueue * 232 232 __sigqueue_alloc(int sig, struct task_struct *t, gfp_t flags, int override_rlimit) ··· 375 375 return !tracehook_consider_fatal_signal(tsk, sig); 376 376 } 377 377 378 - 379 - /* Notify the system that a driver wants to block all signals for this 378 + /* 379 + * Notify the system that a driver wants to block all signals for this 380 380 * process, and wants to be notified if any signals at all were to be 381 381 * sent/acted upon. If the notifier routine returns non-zero, then the 382 382 * signal will be acted upon after all. If the notifier routine returns 0, 383 383 * then then signal will be blocked. Only one block per process is 384 384 * allowed. priv is a pointer to private data that the notifier routine 385 - * can use to determine if the signal should be blocked or not. */ 386 - 385 + * can use to determine if the signal should be blocked or not. 386 + */ 387 387 void 388 388 block_all_signals(int (*notifier)(void *priv), void *priv, sigset_t *mask) 389 389 { ··· 434 434 copy_siginfo(info, &first->info); 435 435 __sigqueue_free(first); 436 436 } else { 437 - /* Ok, it wasn't in the queue. This must be 438 - a fast-pathed signal or we must have been 439 - out of queue space. So zero out the info. 437 + /* 438 + * Ok, it wasn't in the queue. This must be 439 + * a fast-pathed signal or we must have been 440 + * out of queue space. So zero out the info. 440 441 */ 441 442 info->si_signo = sig; 442 443 info->si_errno = 0; ··· 469 468 } 470 469 471 470 /* 472 - * Dequeue a signal and return the element to the caller, which is 471 + * Dequeue a signal and return the element to the caller, which is 473 472 * expected to free it. 474 473 * 475 474 * All callers have to hold the siglock. ··· 491 490 * itimers are process shared and we restart periodic 492 491 * itimers in the signal delivery path to prevent DoS 493 492 * attacks in the high resolution timer case. This is 494 - * compliant with the old way of self restarting 493 + * compliant with the old way of self-restarting 495 494 * itimers, as the SIGALRM is a legacy signal and only 496 495 * queued once. Changing the restart behaviour to 497 496 * restart the timer in the signal dequeue path is ··· 924 923 if (info == SEND_SIG_FORCED) 925 924 goto out_set; 926 925 927 - /* Real-time signals must be queued if sent by sigqueue, or 928 - some other real-time mechanism. It is implementation 929 - defined whether kill() does so. We attempt to do so, on 930 - the principle of least surprise, but since kill is not 931 - allowed to fail with EAGAIN when low on memory we just 932 - make sure at least one signal gets delivered and don't 933 - pass on the info struct. */ 934 - 926 + /* 927 + * Real-time signals must be queued if sent by sigqueue, or 928 + * some other real-time mechanism. It is implementation 929 + * defined whether kill() does so. We attempt to do so, on 930 + * the principle of least surprise, but since kill is not 931 + * allowed to fail with EAGAIN when low on memory we just 932 + * make sure at least one signal gets delivered and don't 933 + * pass on the info struct. 934 + */ 935 935 if (sig < SIGRTMIN) 936 936 override_rlimit = (is_si_special(info) || info->si_code >= 0); 937 937 else ··· 1203 1201 return error; 1204 1202 } 1205 1203 1206 - int 1207 - kill_proc_info(int sig, struct siginfo *info, pid_t pid) 1204 + int kill_proc_info(int sig, struct siginfo *info, pid_t pid) 1208 1205 { 1209 1206 int error; 1210 1207 rcu_read_lock(); ··· 1300 1299 * These are for backward compatibility with the rest of the kernel source. 1301 1300 */ 1302 1301 1303 - int 1304 - send_sig_info(int sig, struct siginfo *info, struct task_struct *p) 1302 + int send_sig_info(int sig, struct siginfo *info, struct task_struct *p) 1305 1303 { 1306 1304 /* 1307 1305 * Make sure legacy kernel users don't send in bad values ··· 1368 1368 * These functions support sending signals using preallocated sigqueue 1369 1369 * structures. This is needed "because realtime applications cannot 1370 1370 * afford to lose notifications of asynchronous events, like timer 1371 - * expirations or I/O completions". In the case of Posix Timers 1371 + * expirations or I/O completions". In the case of POSIX Timers 1372 1372 * we allocate the sigqueue structure from the timer_create. If this 1373 1373 * allocation fails we are able to report the failure to the application 1374 1374 * with an EAGAIN error. ··· 1553 1553 info.si_signo = SIGCHLD; 1554 1554 info.si_errno = 0; 1555 1555 /* 1556 - * see comment in do_notify_parent() abot the following 3 lines 1556 + * see comment in do_notify_parent() about the following 4 lines 1557 1557 */ 1558 1558 rcu_read_lock(); 1559 1559 info.si_pid = task_pid_nr_ns(tsk, parent->nsproxy->pid_ns); ··· 1611 1611 } 1612 1612 1613 1613 /* 1614 - * Return nonzero if there is a SIGKILL that should be waking us up. 1614 + * Return non-zero if there is a SIGKILL that should be waking us up. 1615 1615 * Called with the siglock held. 1616 1616 */ 1617 1617 static int sigkill_pending(struct task_struct *tsk) ··· 1735 1735 /* 1736 1736 * This performs the stopping for SIGSTOP and other stop signals. 1737 1737 * We have to stop all threads in the thread group. 1738 - * Returns nonzero if we've actually stopped and released the siglock. 1738 + * Returns non-zero if we've actually stopped and released the siglock. 1739 1739 * Returns zero if we didn't stop and still hold the siglock. 1740 1740 */ 1741 1741 static int do_signal_stop(int signr) ··· 1823 1823 1824 1824 current->exit_code = 0; 1825 1825 1826 - /* Update the siginfo structure if the signal has 1827 - changed. If the debugger wanted something 1828 - specific in the siginfo structure then it should 1829 - have updated *info via PTRACE_SETSIGINFO. */ 1826 + /* 1827 + * Update the siginfo structure if the signal has 1828 + * changed. If the debugger wanted something 1829 + * specific in the siginfo structure then it should 1830 + * have updated *info via PTRACE_SETSIGINFO. 1831 + */ 1830 1832 if (signr != info->si_signo) { 1831 1833 info->si_signo = signr; 1832 1834 info->si_errno = 0; ··· 2036 2034 if (!signal_pending(tsk)) 2037 2035 goto out; 2038 2036 2039 - /* It could be that __group_complete_signal() choose us to 2037 + /* 2038 + * It could be that __group_complete_signal() choose us to 2040 2039 * notify about group-wide signal. Another thread should be 2041 2040 * woken now to take the signal since we will not. 2042 2041 */ ··· 2075 2072 * System call entry points. 2076 2073 */ 2077 2074 2075 + /** 2076 + * sys_restart_syscall - restart a system call 2077 + */ 2078 2078 SYSCALL_DEFINE0(restart_syscall) 2079 2079 { 2080 2080 struct restart_block *restart = &current_thread_info()->restart_block; ··· 2131 2125 return error; 2132 2126 } 2133 2127 2128 + /** 2129 + * sys_rt_sigprocmask - change the list of currently blocked signals 2130 + * @how: whether to add, remove, or set signals 2131 + * @set: stores pending signals 2132 + * @oset: previous value of signal mask if non-null 2133 + * @sigsetsize: size of sigset_t type 2134 + */ 2134 2135 SYSCALL_DEFINE4(rt_sigprocmask, int, how, sigset_t __user *, set, 2135 2136 sigset_t __user *, oset, size_t, sigsetsize) 2136 2137 { ··· 2196 2183 2197 2184 out: 2198 2185 return error; 2199 - } 2186 + } 2200 2187 2188 + /** 2189 + * sys_rt_sigpending - examine a pending signal that has been raised 2190 + * while blocked 2191 + * @set: stores pending signals 2192 + * @sigsetsize: size of sigset_t type or larger 2193 + */ 2201 2194 SYSCALL_DEFINE2(rt_sigpending, sigset_t __user *, set, size_t, sigsetsize) 2202 2195 { 2203 2196 return do_sigpending(set, sigsetsize); ··· 2252 2233 err |= __put_user(from->si_trapno, &to->si_trapno); 2253 2234 #endif 2254 2235 #ifdef BUS_MCEERR_AO 2255 - /* 2236 + /* 2256 2237 * Other callers might not initialize the si_lsb field, 2257 - * so check explicitely for the right codes here. 2238 + * so check explicitly for the right codes here. 2258 2239 */ 2259 2240 if (from->si_code == BUS_MCEERR_AR || from->si_code == BUS_MCEERR_AO) 2260 2241 err |= __put_user(from->si_addr_lsb, &to->si_addr_lsb); ··· 2283 2264 2284 2265 #endif 2285 2266 2267 + /** 2268 + * sys_rt_sigtimedwait - synchronously wait for queued signals specified 2269 + * in @uthese 2270 + * @uthese: queued signals to wait for 2271 + * @uinfo: if non-null, the signal's siginfo is returned here 2272 + * @uts: upper bound on process time suspension 2273 + * @sigsetsize: size of sigset_t type 2274 + */ 2286 2275 SYSCALL_DEFINE4(rt_sigtimedwait, const sigset_t __user *, uthese, 2287 2276 siginfo_t __user *, uinfo, const struct timespec __user *, uts, 2288 2277 size_t, sigsetsize) ··· 2307 2280 2308 2281 if (copy_from_user(&these, uthese, sizeof(these))) 2309 2282 return -EFAULT; 2310 - 2283 + 2311 2284 /* 2312 2285 * Invert the set of allowed signals to get those we 2313 2286 * want to block. ··· 2332 2305 + (ts.tv_sec || ts.tv_nsec)); 2333 2306 2334 2307 if (timeout) { 2335 - /* None ready -- temporarily unblock those we're 2308 + /* 2309 + * None ready -- temporarily unblock those we're 2336 2310 * interested while we are sleeping in so that we'll 2337 - * be awakened when they arrive. */ 2311 + * be awakened when they arrive. 2312 + */ 2338 2313 current->real_blocked = current->blocked; 2339 2314 sigandsets(&current->blocked, &current->blocked, &these); 2340 2315 recalc_sigpending(); ··· 2368 2339 return ret; 2369 2340 } 2370 2341 2342 + /** 2343 + * sys_kill - send a signal to a process 2344 + * @pid: the PID of the process 2345 + * @sig: signal to be sent 2346 + */ 2371 2347 SYSCALL_DEFINE2(kill, pid_t, pid, int, sig) 2372 2348 { 2373 2349 struct siginfo info; ··· 2448 2414 return do_tkill(tgid, pid, sig); 2449 2415 } 2450 2416 2451 - /* 2417 + /** 2418 + * sys_tkill - send signal to one specific task 2419 + * @pid: the PID of the task 2420 + * @sig: signal to be sent 2421 + * 2452 2422 * Send a signal to only one task, even if it's a CLONE_THREAD task. 2453 2423 */ 2454 2424 SYSCALL_DEFINE2(tkill, pid_t, pid, int, sig) ··· 2464 2426 return do_tkill(0, pid, sig); 2465 2427 } 2466 2428 2429 + /** 2430 + * sys_rt_sigqueueinfo - send signal information to a signal 2431 + * @pid: the PID of the thread 2432 + * @sig: signal to be sent 2433 + * @uinfo: signal info to be sent 2434 + */ 2467 2435 SYSCALL_DEFINE3(rt_sigqueueinfo, pid_t, pid, int, sig, 2468 2436 siginfo_t __user *, uinfo) 2469 2437 { ··· 2597 2553 2598 2554 error = -EINVAL; 2599 2555 /* 2600 - * 2601 - * Note - this code used to test ss_flags incorrectly 2556 + * Note - this code used to test ss_flags incorrectly: 2602 2557 * old code may have been written using ss_flags==0 2603 2558 * to mean ss_flags==SS_ONSTACK (as this was the only 2604 2559 * way that worked) - this fix preserves that older 2605 - * mechanism 2560 + * mechanism. 2606 2561 */ 2607 2562 if (ss_flags != SS_DISABLE && ss_flags != SS_ONSTACK && ss_flags != 0) 2608 2563 goto out; ··· 2635 2592 2636 2593 #ifdef __ARCH_WANT_SYS_SIGPENDING 2637 2594 2595 + /** 2596 + * sys_sigpending - examine pending signals 2597 + * @set: where mask of pending signal is returned 2598 + */ 2638 2599 SYSCALL_DEFINE1(sigpending, old_sigset_t __user *, set) 2639 2600 { 2640 2601 return do_sigpending(set, sizeof(*set)); ··· 2647 2600 #endif 2648 2601 2649 2602 #ifdef __ARCH_WANT_SYS_SIGPROCMASK 2650 - /* Some platforms have their own version with special arguments others 2651 - support only sys_rt_sigprocmask. */ 2603 + /** 2604 + * sys_sigprocmask - examine and change blocked signals 2605 + * @how: whether to add, remove, or set signals 2606 + * @set: signals to add or remove (if non-null) 2607 + * @oset: previous value of signal mask if non-null 2608 + * 2609 + * Some platforms have their own version with special arguments; 2610 + * others support only sys_rt_sigprocmask. 2611 + */ 2652 2612 2653 2613 SYSCALL_DEFINE3(sigprocmask, int, how, old_sigset_t __user *, set, 2654 2614 old_sigset_t __user *, oset) ··· 2708 2654 #endif /* __ARCH_WANT_SYS_SIGPROCMASK */ 2709 2655 2710 2656 #ifdef __ARCH_WANT_SYS_RT_SIGACTION 2657 + /** 2658 + * sys_rt_sigaction - alter an action taken by a process 2659 + * @sig: signal to be sent 2660 + * @act: the thread group ID of the thread 2661 + * @oact: the PID of the thread 2662 + * @sigsetsize: size of sigset_t type 2663 + */ 2711 2664 SYSCALL_DEFINE4(rt_sigaction, int, sig, 2712 2665 const struct sigaction __user *, act, 2713 2666 struct sigaction __user *, oact, ··· 2801 2740 #endif 2802 2741 2803 2742 #ifdef __ARCH_WANT_SYS_RT_SIGSUSPEND 2743 + /** 2744 + * sys_rt_sigsuspend - replace the signal mask for a value with the 2745 + * @unewset value until a signal is received 2746 + * @unewset: new signal mask value 2747 + * @sigsetsize: size of sigset_t type 2748 + */ 2804 2749 SYSCALL_DEFINE2(rt_sigsuspend, sigset_t __user *, unewset, size_t, sigsetsize) 2805 2750 { 2806 2751 sigset_t newset;
+2
kernel/time/ntp.c
··· 652 652 struct timespec delta; 653 653 delta.tv_sec = txc->time.tv_sec; 654 654 delta.tv_nsec = txc->time.tv_usec; 655 + if (!capable(CAP_SYS_TIME)) 656 + return -EPERM; 655 657 if (!(txc->modes & ADJ_NANO)) 656 658 delta.tv_nsec *= 1000; 657 659 result = timekeeping_inject_offset(&delta);
+2 -4
lib/Kconfig.debug
··· 434 434 435 435 config DEBUG_KMEMLEAK_TEST 436 436 tristate "Simple test for the kernel memory leak detector" 437 - depends on DEBUG_KMEMLEAK 437 + depends on DEBUG_KMEMLEAK && m 438 438 help 439 - Say Y or M here to build a test for the kernel memory leak 440 - detector. This option enables a module that explicitly leaks 441 - memory. 439 + This option enables a module that explicitly leaks memory. 442 440 443 441 If unsure, say N. 444 442
+8 -2
net/bluetooth/hci_core.c
··· 186 186 BT_DBG("%s %ld", hdev->name, opt); 187 187 188 188 /* Reset device */ 189 + set_bit(HCI_RESET, &hdev->flags); 189 190 hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); 190 191 } 191 192 ··· 214 213 /* Mandatory initialization */ 215 214 216 215 /* Reset */ 217 - if (!test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks)) 216 + if (!test_bit(HCI_QUIRK_NO_RESET, &hdev->quirks)) { 217 + set_bit(HCI_RESET, &hdev->flags); 218 218 hci_send_cmd(hdev, HCI_OP_RESET, 0, NULL); 219 + } 219 220 220 221 /* Read Local Supported Features */ 221 222 hci_send_cmd(hdev, HCI_OP_READ_LOCAL_FEATURES, 0, NULL); ··· 587 584 hci_req_cancel(hdev, ENODEV); 588 585 hci_req_lock(hdev); 589 586 587 + /* Stop timer, it might be running */ 588 + del_timer_sync(&hdev->cmd_timer); 589 + 590 590 if (!test_and_clear_bit(HCI_UP, &hdev->flags)) { 591 591 hci_req_unlock(hdev); 592 592 return 0; ··· 629 623 630 624 /* Drop last sent command */ 631 625 if (hdev->sent_cmd) { 632 - del_timer_sync(&hdev->cmd_timer); 633 626 kfree_skb(hdev->sent_cmd); 634 627 hdev->sent_cmd = NULL; 635 628 } ··· 1079 1074 1080 1075 BT_ERR("%s command tx timeout", hdev->name); 1081 1076 atomic_set(&hdev->cmd_cnt, 1); 1077 + clear_bit(HCI_RESET, &hdev->flags); 1082 1078 tasklet_schedule(&hdev->cmd_task); 1083 1079 } 1084 1080
+3 -1
net/bluetooth/hci_event.c
··· 183 183 184 184 BT_DBG("%s status 0x%x", hdev->name, status); 185 185 186 + clear_bit(HCI_RESET, &hdev->flags); 187 + 186 188 hci_req_complete(hdev, HCI_OP_RESET, status); 187 189 } 188 190 ··· 1849 1847 if (ev->opcode != HCI_OP_NOP) 1850 1848 del_timer(&hdev->cmd_timer); 1851 1849 1852 - if (ev->ncmd) { 1850 + if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) { 1853 1851 atomic_set(&hdev->cmd_cnt, 1); 1854 1852 if (!skb_queue_empty(&hdev->cmd_q)) 1855 1853 tasklet_schedule(&hdev->cmd_task);
+3 -1
net/bluetooth/l2cap_core.c
··· 1116 1116 bt_cb(skb)->tx_seq = pi->next_tx_seq; 1117 1117 pi->next_tx_seq = (pi->next_tx_seq + 1) % 64; 1118 1118 1119 - pi->unacked_frames++; 1119 + if (bt_cb(skb)->retries == 1) 1120 + pi->unacked_frames++; 1121 + 1120 1122 pi->frames_sent++; 1121 1123 1122 1124 if (skb_queue_is_last(TX_QUEUE(sk), skb))
+3 -2
net/bluetooth/l2cap_sock.c
··· 923 923 rsp.status = cpu_to_le16(L2CAP_CS_NO_INFO); 924 924 l2cap_send_cmd(conn, l2cap_pi(sk)->ident, 925 925 L2CAP_CONN_RSP, sizeof(rsp), &rsp); 926 - } else 927 - l2cap_chan_del(sk, reason); 926 + } 927 + 928 + l2cap_chan_del(sk, reason); 928 929 break; 929 930 930 931 case BT_CONNECT:
+2
net/bluetooth/mgmt.c
··· 1230 1230 if (!hdev) 1231 1231 return cmd_status(sk, index, mgmt_op, ENODEV); 1232 1232 1233 + hci_dev_lock_bh(hdev); 1234 + 1233 1235 if (!test_bit(HCI_UP, &hdev->flags)) { 1234 1236 err = cmd_status(sk, index, mgmt_op, ENETDOWN); 1235 1237 goto failed;
+2 -1
net/ipv4/tcp_output.c
··· 1003 1003 int nlen; 1004 1004 u8 flags; 1005 1005 1006 - BUG_ON(len > skb->len); 1006 + if (WARN_ON(len > skb->len)) 1007 + return -EINVAL; 1007 1008 1008 1009 nsize = skb_headlen(skb) - len; 1009 1010 if (nsize < 0)
+1
net/ipv6/tcp_ipv6.c
··· 503 503 dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false); 504 504 if (IS_ERR(dst)) { 505 505 err = PTR_ERR(dst); 506 + dst = NULL; 506 507 goto done; 507 508 } 508 509 skb = tcp_make_synack(sk, dst, req, rvp);
+4 -3
net/mac80211/key.c
··· 342 342 if (IS_ERR(key->u.ccmp.tfm)) { 343 343 err = PTR_ERR(key->u.ccmp.tfm); 344 344 kfree(key); 345 - key = ERR_PTR(err); 345 + return ERR_PTR(err); 346 346 } 347 347 break; 348 348 case WLAN_CIPHER_SUITE_AES_CMAC: ··· 360 360 if (IS_ERR(key->u.aes_cmac.tfm)) { 361 361 err = PTR_ERR(key->u.aes_cmac.tfm); 362 362 kfree(key); 363 - key = ERR_PTR(err); 363 + return ERR_PTR(err); 364 364 } 365 365 break; 366 366 } ··· 400 400 { 401 401 struct ieee80211_key *old_key; 402 402 int idx, ret; 403 - bool pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; 403 + bool pairwise; 404 404 405 405 BUG_ON(!sdata); 406 406 BUG_ON(!key); 407 407 408 + pairwise = key->conf.flags & IEEE80211_KEY_FLAG_PAIRWISE; 408 409 idx = key->conf.keyidx; 409 410 key->local = sdata->local; 410 411 key->sdata = sdata;
+18 -7
net/mac80211/rc80211_minstrel_ht.c
··· 659 659 struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs; 660 660 struct ieee80211_local *local = hw_to_local(mp->hw); 661 661 u16 sta_cap = sta->ht_cap.cap; 662 + int n_supported = 0; 662 663 int ack_dur; 663 664 int stbc; 664 665 int i; 665 666 666 667 /* fall back to the old minstrel for legacy stations */ 667 - if (!sta->ht_cap.ht_supported) { 668 - msp->is_ht = false; 669 - memset(&msp->legacy, 0, sizeof(msp->legacy)); 670 - msp->legacy.r = msp->ratelist; 671 - msp->legacy.sample_table = msp->sample_table; 672 - return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy); 673 - } 668 + if (!sta->ht_cap.ht_supported) 669 + goto use_legacy; 674 670 675 671 BUILD_BUG_ON(ARRAY_SIZE(minstrel_mcs_groups) != 676 672 MINSTREL_MAX_STREAMS * MINSTREL_STREAM_GROUPS); ··· 721 725 722 726 mi->groups[i].supported = 723 727 mcs->rx_mask[minstrel_mcs_groups[i].streams - 1]; 728 + 729 + if (mi->groups[i].supported) 730 + n_supported++; 724 731 } 732 + 733 + if (!n_supported) 734 + goto use_legacy; 735 + 736 + return; 737 + 738 + use_legacy: 739 + msp->is_ht = false; 740 + memset(&msp->legacy, 0, sizeof(msp->legacy)); 741 + msp->legacy.r = msp->ratelist; 742 + msp->legacy.sample_table = msp->sample_table; 743 + return mac80211_minstrel.rate_init(priv, sband, sta, &msp->legacy); 725 744 } 726 745 727 746 static void
+2 -1
net/mac80211/rx.c
··· 612 612 skipped++; 613 613 continue; 614 614 } 615 - if (!time_after(jiffies, tid_agg_rx->reorder_time[j] + 615 + if (skipped && 616 + !time_after(jiffies, tid_agg_rx->reorder_time[j] + 616 617 HT_RX_REORDER_BUF_TIMEOUT)) 617 618 goto set_release_timer; 618 619
+2 -2
net/sctp/sm_make_chunk.c
··· 3106 3106 3107 3107 /* create an ASCONF_ACK chunk. 3108 3108 * Based on the definitions of parameters, we know that the size of 3109 - * ASCONF_ACK parameters are less than or equal to the twice of ASCONF 3109 + * ASCONF_ACK parameters are less than or equal to the fourfold of ASCONF 3110 3110 * parameters. 3111 3111 */ 3112 - asconf_ack = sctp_make_asconf_ack(asoc, serial, chunk_len * 2); 3112 + asconf_ack = sctp_make_asconf_ack(asoc, serial, chunk_len * 4); 3113 3113 if (!asconf_ack) 3114 3114 goto done; 3115 3115
+21 -10
net/wireless/scan.c
··· 124 124 } 125 125 126 126 /* must hold dev->bss_lock! */ 127 + static void __cfg80211_unlink_bss(struct cfg80211_registered_device *dev, 128 + struct cfg80211_internal_bss *bss) 129 + { 130 + list_del_init(&bss->list); 131 + rb_erase(&bss->rbn, &dev->bss_tree); 132 + kref_put(&bss->ref, bss_release); 133 + } 134 + 135 + /* must hold dev->bss_lock! */ 127 136 void cfg80211_bss_expire(struct cfg80211_registered_device *dev) 128 137 { 129 138 struct cfg80211_internal_bss *bss, *tmp; ··· 143 134 continue; 144 135 if (!time_after(jiffies, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE)) 145 136 continue; 146 - list_del(&bss->list); 147 - rb_erase(&bss->rbn, &dev->bss_tree); 148 - kref_put(&bss->ref, bss_release); 137 + __cfg80211_unlink_bss(dev, bss); 149 138 expired = true; 150 139 } 151 140 ··· 592 585 struct cfg80211_internal_bss *res; 593 586 size_t ielen = len - offsetof(struct ieee80211_mgmt, 594 587 u.probe_resp.variable); 595 - size_t privsz = wiphy->bss_priv_size; 588 + size_t privsz; 589 + 590 + if (WARN_ON(!mgmt)) 591 + return NULL; 592 + 593 + if (WARN_ON(!wiphy)) 594 + return NULL; 596 595 597 596 if (WARN_ON(wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC && 598 597 (signal < 0 || signal > 100))) 599 598 return NULL; 600 599 601 - if (WARN_ON(!mgmt || !wiphy || 602 - len < offsetof(struct ieee80211_mgmt, u.probe_resp.variable))) 600 + if (WARN_ON(len < offsetof(struct ieee80211_mgmt, u.probe_resp.variable))) 603 601 return NULL; 602 + 603 + privsz = wiphy->bss_priv_size; 604 604 605 605 res = kzalloc(sizeof(*res) + privsz + ielen, gfp); 606 606 if (!res) ··· 676 662 677 663 spin_lock_bh(&dev->bss_lock); 678 664 if (!list_empty(&bss->list)) { 679 - list_del_init(&bss->list); 665 + __cfg80211_unlink_bss(dev, bss); 680 666 dev->bss_generation++; 681 - rb_erase(&bss->rbn, &dev->bss_tree); 682 - 683 - kref_put(&bss->ref, bss_release); 684 667 } 685 668 spin_unlock_bh(&dev->bss_lock); 686 669 }
+2
sound/soc/codecs/sn95031.c
··· 26 26 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 27 27 28 28 #include <linux/platform_device.h> 29 + #include <linux/delay.h> 29 30 #include <linux/slab.h> 31 + 30 32 #include <asm/intel_scu_ipc.h> 31 33 #include <sound/pcm.h> 32 34 #include <sound/pcm_params.h>
+6 -2
tools/perf/Makefile
··· 165 165 strip-libs = $(filter-out -l%,$(1)) 166 166 167 167 $(OUTPUT)python/perf.so: $(PYRF_OBJS) 168 - $(QUIET_GEN)python util/setup.py --quiet build_ext --build-lib='$(OUTPUT)python' \ 169 - --build-temp='$(OUTPUT)python/temp' 168 + $(QUIET_GEN)( \ 169 + export CFLAGS="$(BASIC_CFLAGS)"; \ 170 + python util/setup.py --quiet build_ext --build-lib='$(OUTPUT)python' \ 171 + --build-temp='$(OUTPUT)python/temp' \ 172 + ) 173 + 170 174 # 171 175 # No Perl scripts right now: 172 176 #
+18 -7
tools/perf/builtin-record.c
··· 41 41 static u64 default_interval = 0; 42 42 43 43 static unsigned int page_size; 44 - static unsigned int mmap_pages = 128; 44 + static unsigned int mmap_pages = UINT_MAX; 45 45 static unsigned int user_freq = UINT_MAX; 46 46 static int freq = 1000; 47 47 static int output; ··· 275 275 !no_inherit) < 0) { 276 276 int err = errno; 277 277 278 - if (err == EPERM || err == EACCES) 279 - die("Permission error - are you root?\n" 280 - "\t Consider tweaking" 281 - " /proc/sys/kernel/perf_event_paranoid.\n"); 282 - else if (err == ENODEV && cpu_list) { 278 + if (err == EPERM || err == EACCES) { 279 + ui__warning_paranoid(); 280 + exit(EXIT_FAILURE); 281 + } else if (err == ENODEV && cpu_list) { 283 282 die("No such device - did you specify" 284 283 " an out-of-range profile CPU?\n"); 285 284 } else if (err == EINVAL && sample_id_all_avail) { ··· 301 302 && attr->config == PERF_COUNT_HW_CPU_CYCLES) { 302 303 303 304 if (verbose) 304 - warning(" ... trying to fall back to cpu-clock-ticks\n"); 305 + ui__warning("The cycles event is not supported, " 306 + "trying to fall back to cpu-clock-ticks\n"); 305 307 attr->type = PERF_TYPE_SOFTWARE; 306 308 attr->config = PERF_COUNT_SW_CPU_CLOCK; 307 309 goto try_again; 308 310 } 311 + 312 + if (err == ENOENT) { 313 + ui__warning("The %s event is not supported.\n", 314 + event_name(pos)); 315 + exit(EXIT_FAILURE); 316 + } 317 + 309 318 printf("\n"); 310 319 error("sys_perf_event_open() syscall returned with %d (%s). /bin/dmesg may provide additional information.\n", 311 320 err, strerror(err)); ··· 512 505 513 506 if (have_tracepoints(&evsel_list->entries)) 514 507 perf_header__set_feat(&session->header, HEADER_TRACE_INFO); 508 + 509 + /* 512 kiB: default amount of unprivileged mlocked memory */ 510 + if (mmap_pages == UINT_MAX) 511 + mmap_pages = (512 * 1024) / page_size; 515 512 516 513 if (forks) { 517 514 child_pid = fork();
+30 -14
tools/perf/builtin-top.c
··· 850 850 top.evlist->threads, group, inherit) < 0) { 851 851 int err = errno; 852 852 853 - if (err == EPERM || err == EACCES) 854 - die("Permission error - are you root?\n" 855 - "\t Consider tweaking" 856 - " /proc/sys/kernel/perf_event_paranoid.\n"); 853 + if (err == EPERM || err == EACCES) { 854 + ui__warning_paranoid(); 855 + goto out_err; 856 + } 857 857 /* 858 858 * If it's cycles then fall back to hrtimer 859 859 * based cpu-clock-tick sw counter, which ··· 861 861 */ 862 862 if (attr->type == PERF_TYPE_HARDWARE && 863 863 attr->config == PERF_COUNT_HW_CPU_CYCLES) { 864 - 865 864 if (verbose) 866 - warning(" ... trying to fall back to cpu-clock-ticks\n"); 865 + ui__warning("Cycles event not supported,\n" 866 + "trying to fall back to cpu-clock-ticks\n"); 867 867 868 868 attr->type = PERF_TYPE_SOFTWARE; 869 869 attr->config = PERF_COUNT_SW_CPU_CLOCK; 870 870 goto try_again; 871 871 } 872 - printf("\n"); 873 - error("sys_perf_event_open() syscall returned with %d " 874 - "(%s). /bin/dmesg may provide additional information.\n", 875 - err, strerror(err)); 876 - die("No CONFIG_PERF_EVENTS=y kernel support configured?\n"); 877 - exit(-1); 872 + 873 + if (err == ENOENT) { 874 + ui__warning("The %s event is not supported.\n", 875 + event_name(counter)); 876 + goto out_err; 877 + } 878 + 879 + ui__warning("The sys_perf_event_open() syscall " 880 + "returned with %d (%s). /bin/dmesg " 881 + "may provide additional information.\n" 882 + "No CONFIG_PERF_EVENTS=y kernel support " 883 + "configured?\n", err, strerror(err)); 884 + goto out_err; 878 885 } 879 886 } 880 887 881 - if (perf_evlist__mmap(evlist, mmap_pages, false) < 0) 882 - die("failed to mmap with %d (%s)\n", errno, strerror(errno)); 888 + if (perf_evlist__mmap(evlist, mmap_pages, false) < 0) { 889 + ui__warning("Failed to mmap with %d (%s)\n", 890 + errno, strerror(errno)); 891 + goto out_err; 892 + } 893 + 894 + return; 895 + 896 + out_err: 897 + exit_browser(0); 898 + exit(0); 883 899 } 884 900 885 901 static int __cmd_top(void)
+10
tools/perf/util/debug.c
··· 57 57 } 58 58 #endif 59 59 60 + void ui__warning_paranoid(void) 61 + { 62 + ui__warning("Permission error - are you root?\n" 63 + "Consider tweaking /proc/sys/kernel/perf_event_paranoid:\n" 64 + " -1 - Not paranoid at all\n" 65 + " 0 - Disallow raw tracepoint access for unpriv\n" 66 + " 1 - Disallow cpu events for unpriv\n" 67 + " 2 - Disallow kernel profiling for unpriv\n"); 68 + } 69 + 60 70 void trace_event(union perf_event *event) 61 71 { 62 72 unsigned char *raw_event = (void *)event;
+1
tools/perf/util/debug.h
··· 36 36 #endif 37 37 38 38 void ui__warning(const char *format, ...) __attribute__((format(printf, 1, 2))); 39 + void ui__warning_paranoid(void); 39 40 40 41 #endif /* __PERF_DEBUG_H */
+1 -1
tools/perf/util/event.c
··· 710 710 * in the whole kernel symbol list. 711 711 */ 712 712 if ((long long)al->addr < 0 && 713 - cpumode == PERF_RECORD_MISC_KERNEL && 713 + cpumode == PERF_RECORD_MISC_USER && 714 714 machine && mg != &machine->kmaps) { 715 715 mg = &machine->kmaps; 716 716 goto try_again;
+6 -1
tools/perf/util/setup.py
··· 1 1 #!/usr/bin/python2 2 2 3 3 from distutils.core import setup, Extension 4 + from os import getenv 5 + 6 + cflags = ['-fno-strict-aliasing', '-Wno-write-strings'] 7 + cflags += getenv('CFLAGS', '').split() 4 8 5 9 perf = Extension('perf', 6 10 sources = ['util/python.c', 'util/ctype.c', 'util/evlist.c', 7 11 'util/evsel.c', 'util/cpumap.c', 'util/thread_map.c', 8 12 'util/util.c', 'util/xyarray.c', 'util/cgroup.c'], 9 13 include_dirs = ['util/include'], 10 - extra_compile_args = ['-fno-strict-aliasing', '-Wno-write-strings']) 14 + extra_compile_args = cflags, 15 + ) 11 16 12 17 setup(name='perf', 13 18 version='0.1',
+5
tools/perf/util/symbol.c
··· 1196 1196 if (curr_dso == NULL) 1197 1197 goto out_elf_end; 1198 1198 curr_dso->kernel = self->kernel; 1199 + curr_dso->long_name = self->long_name; 1200 + curr_dso->long_name_len = self->long_name_len; 1199 1201 curr_map = map__new2(start, curr_dso, 1200 1202 map->type); 1201 1203 if (curr_map == NULL) { ··· 1844 1842 if (fd < 0) 1845 1843 return -1; 1846 1844 1845 + dso__set_long_name(self, (char *)vmlinux); 1847 1846 dso__set_loaded(self, map->type); 1848 1847 err = dso__load_sym(self, map, symfs_vmlinux, fd, filter, 0, 0); 1849 1848 close(fd); ··· 2405 2402 2406 2403 if (symbol_conf.initialized) 2407 2404 return 0; 2405 + 2406 + symbol_conf.priv_size = ALIGN(symbol_conf.priv_size, sizeof(u64)); 2408 2407 2409 2408 elf_version(EV_CURRENT); 2410 2409 if (symbol_conf.sort_by_name)