···11+What: /sys/class/backlight/<backlight>/<ambient light zone>_max22+What: /sys/class/backlight/<backlight>/l1_daylight_max33+What: /sys/class/backlight/<backlight>/l2_bright_max44+What: /sys/class/backlight/<backlight>/l3_office_max55+What: /sys/class/backlight/<backlight>/l4_indoor_max66+What: /sys/class/backlight/<backlight>/l5_dark_max77+Date: Mai 201188+KernelVersion: 2.6.4099+Contact: device-drivers-devel@blackfin.uclinux.org1010+Description:1111+ Control the maximum brightness for <ambient light zone>1212+ on this <backlight>. Values are between 0 and 127. This file1313+ will also show the brightness level stored for this1414+ <ambient light zone>.1515+1616+What: /sys/class/backlight/<backlight>/<ambient light zone>_dim1717+What: /sys/class/backlight/<backlight>/l2_bright_dim1818+What: /sys/class/backlight/<backlight>/l3_office_dim1919+What: /sys/class/backlight/<backlight>/l4_indoor_dim2020+What: /sys/class/backlight/<backlight>/l5_dark_dim2121+Date: Mai 20112222+KernelVersion: 2.6.402323+Contact: device-drivers-devel@blackfin.uclinux.org2424+Description:2525+ Control the dim brightness for <ambient light zone>2626+ on this <backlight>. Values are between 0 and 127, typically2727+ set to 0. Full off when the backlight is disabled.2828+ This file will also show the dim brightness level stored for2929+ this <ambient light zone>.3030+3131+What: /sys/class/backlight/<backlight>/ambient_light_level3232+Date: Mai 20113333+KernelVersion: 2.6.403434+Contact: device-drivers-devel@blackfin.uclinux.org3535+Description:3636+ Get conversion value of the light sensor.3737+ This value is updated every 80 ms (when the light sensor3838+ is enabled). Returns integer between 0 (dark) and3939+ 8000 (max ambient brightness)4040+4141+What: /sys/class/backlight/<backlight>/ambient_light_zone4242+Date: Mai 20114343+KernelVersion: 2.6.404444+Contact: device-drivers-devel@blackfin.uclinux.org4545+Description:4646+ Get/Set current ambient light zone. Reading returns4747+ integer between 1..5 (1 = daylight, 2 = bright, ..., 5 = dark).4848+ Writing a value between 1..5 forces the backlight controller4949+ to enter the corresponding ambient light zone.5050+ Writing 0 returns to normal/automatic ambient light level5151+ operation. The ambient light sensing feature on these devices5252+ is an extension to the API documented in5353+ Documentation/ABI/stable/sysfs-class-backlight.5454+ It can be enabled by writing the value stored in5555+ /sys/class/backlight/<backlight>/max_brightness to5656+ /sys/class/backlight/<backlight>/brightness.
+2-2
Documentation/accounting/cgroupstats.txt
···2121To extract cgroup statistics a utility very similar to getdelays.c2222has been developed, the sample output of the utility is shown below23232424-~/balbir/cgroupstats # ./getdelays -C "/cgroup/a"2424+~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup/a"2525sleeping 1, blocked 0, running 1, stopped 0, uninterruptible 02626-~/balbir/cgroupstats # ./getdelays -C "/cgroup"2626+~/balbir/cgroupstats # ./getdelays -C "/sys/fs/cgroup"2727sleeping 155, blocked 0, running 1, stopped 0, uninterruptible 2
+17-14
Documentation/cgroups/blkio-controller.txt
···2828- Enable group scheduling in CFQ2929 CONFIG_CFQ_GROUP_IOSCHED=y30303131-- Compile and boot into kernel and mount IO controller (blkio).3131+- Compile and boot into kernel and mount IO controller (blkio); see3232+ cgroups.txt, Why are cgroups needed?.32333333- mount -t cgroup -o blkio none /cgroup3434+ mount -t tmpfs cgroup_root /sys/fs/cgroup3535+ mkdir /sys/fs/cgroup/blkio3636+ mount -t cgroup -o blkio none /sys/fs/cgroup/blkio34373538- Create two cgroups3636- mkdir -p /cgroup/test1/ /cgroup/test23939+ mkdir -p /sys/fs/cgroup/blkio/test1/ /sys/fs/cgroup/blkio/test237403841- Set weights of group test1 and test23939- echo 1000 > /cgroup/test1/blkio.weight4040- echo 500 > /cgroup/test2/blkio.weight4242+ echo 1000 > /sys/fs/cgroup/blkio/test1/blkio.weight4343+ echo 500 > /sys/fs/cgroup/blkio/test2/blkio.weight41444245- Create two same size files (say 512MB each) on same disk (file1, file2) and4346 launch two dd threads in different cgroup to read those files.···4946 echo 3 > /proc/sys/vm/drop_caches50475148 dd if=/mnt/sdb/zerofile1 of=/dev/null &5252- echo $! > /cgroup/test1/tasks5353- cat /cgroup/test1/tasks4949+ echo $! > /sys/fs/cgroup/blkio/test1/tasks5050+ cat /sys/fs/cgroup/blkio/test1/tasks54515552 dd if=/mnt/sdb/zerofile2 of=/dev/null &5656- echo $! > /cgroup/test2/tasks5757- cat /cgroup/test2/tasks5353+ echo $! > /sys/fs/cgroup/blkio/test2/tasks5454+ cat /sys/fs/cgroup/blkio/test2/tasks58555956- At macro level, first dd should finish first. To get more precise data, keep6057 on looking at (with the help of script), at blkio.disk_time and···7168- Enable throttling in block layer7269 CONFIG_BLK_DEV_THROTTLING=y73707474-- Mount blkio controller7575- mount -t cgroup -o blkio none /cgroup/blkio7171+- Mount blkio controller (see cgroups.txt, Why are cgroups needed?)7272+ mount -t cgroup -o blkio none /sys/fs/cgroup/blkio76737774- Specify a bandwidth rate on particular device for root group. The format7875 for policy is "<major>:<minor> <byes_per_second>".79768080- echo "8:16 1048576" > /cgroup/blkio/blkio.read_bps_device7777+ echo "8:16 1048576" > /sys/fs/cgroup/blkio/blkio.read_bps_device81788279 Above will put a limit of 1MB/second on reads happening for root group8380 on device having major/minor number 8:16.···111108 CFQ and throttling will practically treat all groups at same level.112109113110 pivot114114- / | \ \111111+ / / \ \115112 root test1 test2 test3116113117114 Down the line we can implement hierarchical accounting/control support···152149153150 Following is the format.154151155155- #echo dev_maj:dev_minor weight > /path/to/cgroup/blkio.weight_device152152+ # echo dev_maj:dev_minor weight > blkio.weight_device156153 Configure weight=300 on /dev/sdb (8:16) in this cgroup157154 # echo 8:16 300 > blkio.weight_device158155 # cat blkio.weight_device
+36-24
Documentation/cgroups/cgroups.txt
···138138the admin can easily set up a script which receives exec notifications139139and depending on who is launching the browser he can140140141141- # echo browser_pid > /mnt/<restype>/<userclass>/tasks141141+ # echo browser_pid > /sys/fs/cgroup/<restype>/<userclass>/tasks142142143143With only a single hierarchy, he now would potentially have to create144144a separate cgroup for every browser launched and associate it with145145-approp network and other resource class. This may lead to145145+appropriate network and other resource class. This may lead to146146proliferation of such cgroups.147147148148Also lets say that the administrator would like to give enhanced network···153153With ability to write pids directly to resource classes, it's just a154154matter of :155155156156- # echo pid > /mnt/network/<new_class>/tasks156156+ # echo pid > /sys/fs/cgroup/network/<new_class>/tasks157157 (after some time)158158- # echo pid > /mnt/network/<orig_class>/tasks158158+ # echo pid > /sys/fs/cgroup/network/<orig_class>/tasks159159160160Without this ability, he would have to split the cgroup into161161multiple separate ones and then associate the new cgroups with the···310310To start a new job that is to be contained within a cgroup, using311311the "cpuset" cgroup subsystem, the steps are something like:312312313313- 1) mkdir /dev/cgroup314314- 2) mount -t cgroup -ocpuset cpuset /dev/cgroup315315- 3) Create the new cgroup by doing mkdir's and write's (or echo's) in316316- the /dev/cgroup virtual file system.317317- 4) Start a task that will be the "founding father" of the new job.318318- 5) Attach that task to the new cgroup by writing its pid to the319319- /dev/cgroup tasks file for that cgroup.320320- 6) fork, exec or clone the job tasks from this founding father task.313313+ 1) mount -t tmpfs cgroup_root /sys/fs/cgroup314314+ 2) mkdir /sys/fs/cgroup/cpuset315315+ 3) mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset316316+ 4) Create the new cgroup by doing mkdir's and write's (or echo's) in317317+ the /sys/fs/cgroup virtual file system.318318+ 5) Start a task that will be the "founding father" of the new job.319319+ 6) Attach that task to the new cgroup by writing its pid to the320320+ /sys/fs/cgroup/cpuset/tasks file for that cgroup.321321+ 7) fork, exec or clone the job tasks from this founding father task.321322322323For example, the following sequence of commands will setup a cgroup323324named "Charlie", containing just CPUs 2 and 3, and Memory Node 1,324325and then start a subshell 'sh' in that cgroup:325326326326- mount -t cgroup cpuset -ocpuset /dev/cgroup327327- cd /dev/cgroup327327+ mount -t tmpfs cgroup_root /sys/fs/cgroup328328+ mkdir /sys/fs/cgroup/cpuset329329+ mount -t cgroup cpuset -ocpuset /sys/fs/cgroup/cpuset330330+ cd /sys/fs/cgroup/cpuset328331 mkdir Charlie329332 cd Charlie330333 /bin/echo 2-3 > cpuset.cpus···348345virtual filesystem.349346350347To mount a cgroup hierarchy with all available subsystems, type:351351-# mount -t cgroup xxx /dev/cgroup348348+# mount -t cgroup xxx /sys/fs/cgroup352349353350The "xxx" is not interpreted by the cgroup code, but will appear in354351/proc/mounts so may be any useful identifying string that you like.···357354if cpusets are enabled the user will have to populate the cpus and mems files358355for each new cgroup created before that group can be used.359356357357+As explained in section `1.2 Why are cgroups needed?' you should create358358+different hierarchies of cgroups for each single resource or group of359359+resources you want to control. Therefore, you should mount a tmpfs on360360+/sys/fs/cgroup and create directories for each cgroup resource or resource361361+group.362362+363363+# mount -t tmpfs cgroup_root /sys/fs/cgroup364364+# mkdir /sys/fs/cgroup/rg1365365+360366To mount a cgroup hierarchy with just the cpuset and memory361367subsystems, type:362362-# mount -t cgroup -o cpuset,memory hier1 /dev/cgroup368368+# mount -t cgroup -o cpuset,memory hier1 /sys/fs/cgroup/rg1363369364370To change the set of subsystems bound to a mounted hierarchy, just365371remount with different options:366366-# mount -o remount,cpuset,blkio hier1 /dev/cgroup372372+# mount -o remount,cpuset,blkio hier1 /sys/fs/cgroup/rg1367373368374Now memory is removed from the hierarchy and blkio is added.369375370376Note this will add blkio to the hierarchy but won't remove memory or371377cpuset, because the new options are appended to the old ones:372372-# mount -o remount,blkio /dev/cgroup378378+# mount -o remount,blkio /sys/fs/cgroup/rg1373379374380To Specify a hierarchy's release_agent:375381# mount -t cgroup -o cpuset,release_agent="/sbin/cpuset_release_agent" \376376- xxx /dev/cgroup382382+ xxx /sys/fs/cgroup/rg1377383378384Note that specifying 'release_agent' more than once will return failure.379385···391379the ability to arbitrarily bind/unbind subsystems from an existing392380cgroup hierarchy is intended to be implemented in the future.393381394394-Then under /dev/cgroup you can find a tree that corresponds to the395395-tree of the cgroups in the system. For instance, /dev/cgroup382382+Then under /sys/fs/cgroup/rg1 you can find a tree that corresponds to the383383+tree of the cgroups in the system. For instance, /sys/fs/cgroup/rg1396384is the cgroup that holds the whole system.397385398386If you want to change the value of release_agent:399399-# echo "/sbin/new_release_agent" > /dev/cgroup/release_agent387387+# echo "/sbin/new_release_agent" > /sys/fs/cgroup/rg1/release_agent400388401389It can also be changed via remount.402390403403-If you want to create a new cgroup under /dev/cgroup:404404-# cd /dev/cgroup391391+If you want to create a new cgroup under /sys/fs/cgroup/rg1:392392+# cd /sys/fs/cgroup/rg1405393# mkdir my_cgroup406394407395Now you want to do something with this cgroup.
+9-10
Documentation/cgroups/cpuacct.txt
···10101111Accounting groups can be created by first mounting the cgroup filesystem.12121313-# mkdir /cgroups1414-# mount -t cgroup -ocpuacct none /cgroups1313+# mount -t cgroup -ocpuacct none /sys/fs/cgroup15141616-With the above step, the initial or the parent accounting group1717-becomes visible at /cgroups. At bootup, this group includes all the1818-tasks in the system. /cgroups/tasks lists the tasks in this cgroup.1919-/cgroups/cpuacct.usage gives the CPU time (in nanoseconds) obtained by2020-this group which is essentially the CPU time obtained by all the tasks1515+With the above step, the initial or the parent accounting group becomes1616+visible at /sys/fs/cgroup. At bootup, this group includes all the tasks in1717+the system. /sys/fs/cgroup/tasks lists the tasks in this cgroup.1818+/sys/fs/cgroup/cpuacct.usage gives the CPU time (in nanoseconds) obtained1919+by this group which is essentially the CPU time obtained by all the tasks2120in the system.22212323-New accounting groups can be created under the parent group /cgroups.2222+New accounting groups can be created under the parent group /sys/fs/cgroup.24232525-# cd /cgroups2424+# cd /sys/fs/cgroup2625# mkdir g12726# echo $$ > g128272928The above steps create a new group g1 and move the current shell3029process (bash) into it. CPU time consumed by this bash and its children3130can be obtained from g1/cpuacct.usage and the same is accumulated in3232-/cgroups/cpuacct.usage also.3131+/sys/fs/cgroup/cpuacct.usage also.33323433cpuacct.stat file lists a few statistics which further divide the3534CPU time obtained by the cgroup into user and system times. Currently
+14-14
Documentation/cgroups/cpusets.txt
···661661662662To start a new job that is to be contained within a cpuset, the steps are:663663664664- 1) mkdir /dev/cpuset665665- 2) mount -t cgroup -ocpuset cpuset /dev/cpuset664664+ 1) mkdir /sys/fs/cgroup/cpuset665665+ 2) mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset666666 3) Create the new cpuset by doing mkdir's and write's (or echo's) in667667- the /dev/cpuset virtual file system.667667+ the /sys/fs/cgroup/cpuset virtual file system.668668 4) Start a task that will be the "founding father" of the new job.669669 5) Attach that task to the new cpuset by writing its pid to the670670- /dev/cpuset tasks file for that cpuset.670670+ /sys/fs/cgroup/cpuset tasks file for that cpuset.671671 6) fork, exec or clone the job tasks from this founding father task.672672673673For example, the following sequence of commands will setup a cpuset674674named "Charlie", containing just CPUs 2 and 3, and Memory Node 1,675675and then start a subshell 'sh' in that cpuset:676676677677- mount -t cgroup -ocpuset cpuset /dev/cpuset678678- cd /dev/cpuset677677+ mount -t cgroup -ocpuset cpuset /sys/fs/cgroup/cpuset678678+ cd /sys/fs/cgroup/cpuset679679 mkdir Charlie680680 cd Charlie681681 /bin/echo 2-3 > cpuset.cpus···710710virtual filesystem.711711712712To mount it, type:713713-# mount -t cgroup -o cpuset cpuset /dev/cpuset713713+# mount -t cgroup -o cpuset cpuset /sys/fs/cgroup/cpuset714714715715-Then under /dev/cpuset you can find a tree that corresponds to the716716-tree of the cpusets in the system. For instance, /dev/cpuset715715+Then under /sys/fs/cgroup/cpuset you can find a tree that corresponds to the716716+tree of the cpusets in the system. For instance, /sys/fs/cgroup/cpuset717717is the cpuset that holds the whole system.718718719719-If you want to create a new cpuset under /dev/cpuset:720720-# cd /dev/cpuset719719+If you want to create a new cpuset under /sys/fs/cgroup/cpuset:720720+# cd /sys/fs/cgroup/cpuset721721# mkdir my_cpuset722722723723Now you want to do something with this cpuset.···765765766766The command767767768768-mount -t cpuset X /dev/cpuset768768+mount -t cpuset X /sys/fs/cgroup/cpuset769769770770is equivalent to771771772772-mount -t cgroup -ocpuset,noprefix X /dev/cpuset773773-echo "/sbin/cpuset_release_agent" > /dev/cpuset/release_agent772772+mount -t cgroup -ocpuset,noprefix X /sys/fs/cgroup/cpuset773773+echo "/sbin/cpuset_release_agent" > /sys/fs/cgroup/cpuset/release_agent7747747757752.2 Adding/removing cpus776776------------------------
+3-3
Documentation/cgroups/devices.txt
···2222An entry is added using devices.allow, and removed using2323devices.deny. For instance24242525- echo 'c 1:3 mr' > /cgroups/1/devices.allow2525+ echo 'c 1:3 mr' > /sys/fs/cgroup/1/devices.allow26262727allows cgroup 1 to read and mknod the device usually known as2828/dev/null. Doing29293030- echo a > /cgroups/1/devices.deny3030+ echo a > /sys/fs/cgroup/1/devices.deny31313232will remove the default 'a *:* rwm' entry. Doing33333434- echo a > /cgroups/1/devices.allow3434+ echo a > /sys/fs/cgroup/1/devices.allow35353636will add the 'a *:* rwm' entry to the whitelist.3737
+10-10
Documentation/cgroups/freezer-subsystem.txt
···59596060* Examples of usage :61616262- # mkdir /containers6363- # mount -t cgroup -ofreezer freezer /containers6464- # mkdir /containers/06565- # echo $some_pid > /containers/0/tasks6262+ # mkdir /sys/fs/cgroup/freezer6363+ # mount -t cgroup -ofreezer freezer /sys/fs/cgroup/freezer6464+ # mkdir /sys/fs/cgroup/freezer/06565+ # echo $some_pid > /sys/fs/cgroup/freezer/0/tasks66666767to get status of the freezer subsystem :68686969- # cat /containers/0/freezer.state6969+ # cat /sys/fs/cgroup/freezer/0/freezer.state7070 THAWED71717272to freeze all tasks in the container :73737474- # echo FROZEN > /containers/0/freezer.state7575- # cat /containers/0/freezer.state7474+ # echo FROZEN > /sys/fs/cgroup/freezer/0/freezer.state7575+ # cat /sys/fs/cgroup/freezer/0/freezer.state7676 FREEZING7777- # cat /containers/0/freezer.state7777+ # cat /sys/fs/cgroup/freezer/0/freezer.state7878 FROZEN79798080to unfreeze all tasks in the container :81818282- # echo THAWED > /containers/0/freezer.state8383- # cat /containers/0/freezer.state8282+ # echo THAWED > /sys/fs/cgroup/freezer/0/freezer.state8383+ # cat /sys/fs/cgroup/freezer/0/freezer.state8484 THAWED85858686This is the basic mechanism which should do the right thing for user space task
+39-19
Documentation/cgroups/memory.txt
···11Memory Resource Controller2233-NOTE: The Memory Resource Controller has been generically been referred44- to as the memory controller in this document. Do not confuse memory55- controller used here with the memory controller that is used in hardware.33+NOTE: The Memory Resource Controller has generically been referred to as the44+ memory controller in this document. Do not confuse memory controller55+ used here with the memory controller that is used in hardware.6677(For editors)88In this document:···7070 (See sysctl's vm.swappiness)7171 memory.move_charge_at_immigrate # set/show controls of moving charges7272 memory.oom_control # set/show oom controls.7373+ memory.numa_stat # show the number of memory usage per numa node737474751. History7576···182181page will eventually get charged for it (once it is uncharged from183182the cgroup that brought it in -- this will happen on memory pressure).184183185185-Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used..184184+Exception: If CONFIG_CGROUP_CGROUP_MEM_RES_CTLR_SWAP is not used.186185When you do swapoff and make swapped-out pages of shmem(tmpfs) to187186be backed into memory in force, charges for pages are accounted against the188187caller of swapoff rather than the users of shmem.···214213OS point of view.215214216215* What happens when a cgroup hits memory.memsw.limit_in_bytes217217-When a cgroup his memory.memsw.limit_in_bytes, it's useless to do swap-out216216+When a cgroup hits memory.memsw.limit_in_bytes, it's useless to do swap-out218217in this cgroup. Then, swap-out will not be done by cgroup routine and file219218caches are dropped. But as mentioned above, global LRU can do swapout memory220219from it for sanity of the system's memory management state. You can't forbid···264263c. Enable CONFIG_CGROUP_MEM_RES_CTLR265264d. Enable CONFIG_CGROUP_MEM_RES_CTLR_SWAP (to use swap extension)266265267267-1. Prepare the cgroups268268-# mkdir -p /cgroups269269-# mount -t cgroup none /cgroups -o memory266266+1. Prepare the cgroups (see cgroups.txt, Why are cgroups needed?)267267+# mount -t tmpfs none /sys/fs/cgroup268268+# mkdir /sys/fs/cgroup/memory269269+# mount -t cgroup none /sys/fs/cgroup/memory -o memory2702702712712. Make the new group and move bash into it272272-# mkdir /cgroups/0273273-# echo $$ > /cgroups/0/tasks272272+# mkdir /sys/fs/cgroup/memory/0273273+# echo $$ > /sys/fs/cgroup/memory/0/tasks274274275275Since now we're in the 0 cgroup, we can alter the memory limit:276276-# echo 4M > /cgroups/0/memory.limit_in_bytes276276+# echo 4M > /sys/fs/cgroup/memory/0/memory.limit_in_bytes277277278278NOTE: We can use a suffix (k, K, m, M, g or G) to indicate values in kilo,279279mega or gigabytes. (Here, Kilo, Mega, Giga are Kibibytes, Mebibytes, Gibibytes.)···282280NOTE: We can write "-1" to reset the *.limit_in_bytes(unlimited).283281NOTE: We cannot set limits on the root cgroup any more.284282285285-# cat /cgroups/0/memory.limit_in_bytes283283+# cat /sys/fs/cgroup/memory/0/memory.limit_in_bytes2862844194304287285288286We can check the usage:289289-# cat /cgroups/0/memory.usage_in_bytes287287+# cat /sys/fs/cgroup/memory/0/memory.usage_in_bytes2902881216512291289292290A successful write to this file does not guarantee a successful set of···466464If you want to know more exact memory usage, you should use RSS+CACHE(+SWAP)467465value in memory.stat(see 5.2).468466467467+5.6 numa_stat468468+469469+This is similar to numa_maps but operates on a per-memcg basis. This is470470+useful for providing visibility into the numa locality information within471471+an memcg since the pages are allowed to be allocated from any physical472472+node. One of the usecases is evaluating application performance by473473+combining this information with the application's cpu allocation.474474+475475+We export "total", "file", "anon" and "unevictable" pages per-node for476476+each memcg. The ouput format of memory.numa_stat is:477477+478478+total=<total pages> N0=<node 0 pages> N1=<node 1 pages> ...479479+file=<total file pages> N0=<node 0 pages> N1=<node 1 pages> ...480480+anon=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...481481+unevictable=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...482482+483483+And we have total = file + anon + unevictable.484484+4694856. Hierarchy support470486471487The memory controller supports a deep hierarchy and hierarchical accounting.···491471cgroup filesystem. Consider for example, the following cgroup filesystem492472hierarchy493473494494- root474474+ root495475 / | \496496- / | \497497- a b c498498- | \499499- | \500500- d e476476+ / | \477477+ a b c478478+ | \479479+ | \480480+ d e501481502482In the diagram above, with hierarchical accounting enabled, all memory503483usage of e, is accounted to its ancestors up until the root (i.e, c and root),
-17
Documentation/feature-removal-schedule.txt
···481481482482----------------------------483483484484-What: namespace cgroup (ns_cgroup)485485-When: 2.6.38486486-Why: The ns_cgroup leads to some problems:487487- * cgroup creation is out-of-control488488- * cgroup name can conflict when pids are looping489489- * it is not possible to have a single process handling490490- a lot of namespaces without falling in a exponential creation time491491- * we may want to create a namespace without creating a cgroup492492-493493- The ns_cgroup is replaced by a compatibility flag 'clone_children',494494- where a newly created cgroup will copy the parent cgroup values.495495- The userspace has to manually create a cgroup and add a task to496496- the 'tasks' file.497497-Who: Daniel Lezcano <daniel.lezcano@free.fr>498498-499499-----------------------------500500-501484What: iwlwifi disable_hw_scan module parameters502485When: 2.6.40503486Why: Hareware scan is the prefer method for iwlwifi devices for
+3-1
Documentation/kmemleak.txt
···1111reported via /sys/kernel/debug/kmemleak. A similar method is used by the1212Valgrind tool (memcheck --leak-check) to detect the memory leaks in1313user-space applications.1414-Kmemleak is supported on x86, arm, powerpc, sparc, sh, microblaze and tile.1414+1515+Please check DEBUG_KMEMLEAK dependencies in lib/Kconfig.debug for supported1616+architectures.15171618Usage1719-----
+1-1
Documentation/md.txt
···555555 sync_min556556 sync_max557557 The two values, given as numbers of sectors, indicate a range558558- withing the array where 'check'/'repair' will operate. Must be558558+ within the array where 'check'/'repair' will operate. Must be559559 a multiple of chunk_size. When it reaches "sync_max" it will560560 pause, rather than complete.561561 You can use 'select' or 'poll' on "sync_completed" to wait for
+117-2
Documentation/printk-formats.txt
···99 size_t %zu or %zx1010 ssize_t %zd or %zx11111212-Raw pointer value SHOULD be printed with %p.1212+Raw pointer value SHOULD be printed with %p. The kernel supports1313+the following extended format specifiers for pointer types:1414+1515+Symbols/Function Pointers:1616+1717+ %pF versatile_init+0x0/0x1101818+ %pf versatile_init1919+ %pS versatile_init+0x0/0x1102020+ %ps versatile_init2121+ %pB prev_fn_of_versatile_init+0x88/0x882222+2323+ For printing symbols and function pointers. The 'S' and 's' specifiers2424+ result in the symbol name with ('S') or without ('s') offsets. Where2525+ this is used on a kernel without KALLSYMS - the symbol address is2626+ printed instead.2727+2828+ The 'B' specifier results in the symbol name with offsets and should be2929+ used when printing stack backtraces. The specifier takes into3030+ consideration the effect of compiler optimisations which may occur3131+ when tail-call's are used and marked with the noreturn GCC attribute.3232+3333+ On ia64, ppc64 and parisc64 architectures function pointers are3434+ actually function descriptors which must first be resolved. The 'F' and3535+ 'f' specifiers perform this resolution and then provide the same3636+ functionality as the 'S' and 's' specifiers.3737+3838+Kernel Pointers:3939+4040+ %pK 0x01234567 or 0x0123456789abcdef4141+4242+ For printing kernel pointers which should be hidden from unprivileged4343+ users. The behaviour of %pK depends on the kptr_restrict sysctl - see4444+ Documentation/sysctl/kernel.txt for more details.4545+4646+Struct Resources:4747+4848+ %pr [mem 0x60000000-0x6fffffff flags 0x2200] or4949+ [mem 0x0000000060000000-0x000000006fffffff flags 0x2200]5050+ %pR [mem 0x60000000-0x6fffffff pref] or5151+ [mem 0x0000000060000000-0x000000006fffffff pref]5252+5353+ For printing struct resources. The 'R' and 'r' specifiers result in a5454+ printed resource with ('R') or without ('r') a decoded flags member.5555+5656+MAC/FDDI addresses:5757+5858+ %pM 00:01:02:03:04:055959+ %pMF 00-01-02-03-04-056060+ %pm 0001020304056161+6262+ For printing 6-byte MAC/FDDI addresses in hex notation. The 'M' and 'm'6363+ specifiers result in a printed address with ('M') or without ('m') byte6464+ separators. The default byte separator is the colon (':').6565+6666+ Where FDDI addresses are concerned the 'F' specifier can be used after6767+ the 'M' specifier to use dash ('-') separators instead of the default6868+ separator.6969+7070+IPv4 addresses:7171+7272+ %pI4 1.2.3.47373+ %pi4 001.002.003.0047474+ %p[Ii][hnbl]7575+7676+ For printing IPv4 dot-separated decimal addresses. The 'I4' and 'i4'7777+ specifiers result in a printed address with ('i4') or without ('I4')7878+ leading zeros.7979+8080+ The additional 'h', 'n', 'b', and 'l' specifiers are used to specify8181+ host, network, big or little endian order addresses respectively. Where8282+ no specifier is provided the default network/big endian order is used.8383+8484+IPv6 addresses:8585+8686+ %pI6 0001:0002:0003:0004:0005:0006:0007:00088787+ %pi6 000100020003000400050006000700088888+ %pI6c 1:2:3:4:5:6:7:88989+9090+ For printing IPv6 network-order 16-bit hex addresses. The 'I6' and 'i6'9191+ specifiers result in a printed address with ('I6') or without ('i6')9292+ colon-separators. Leading zeros are always used.9393+9494+ The additional 'c' specifier can be used with the 'I' specifier to9595+ print a compressed IPv6 address as described by9696+ http://tools.ietf.org/html/rfc59529797+9898+UUID/GUID addresses:9999+100100+ %pUb 00010203-0405-0607-0809-0a0b0c0d0e0f101101+ %pUB 00010203-0405-0607-0809-0A0B0C0D0E0F102102+ %pUl 03020100-0504-0706-0809-0a0b0c0e0e0f103103+ %pUL 03020100-0504-0706-0809-0A0B0C0E0E0F104104+105105+ For printing 16-byte UUID/GUIDs addresses. The additional 'l', 'L',106106+ 'b' and 'B' specifiers are used to specify a little endian order in107107+ lower ('l') or upper case ('L') hex characters - and big endian order108108+ in lower ('b') or upper case ('B') hex characters.109109+110110+ Where no additional specifiers are used the default little endian111111+ order with lower case hex characters will be printed.112112+113113+struct va_format:114114+115115+ %pV116116+117117+ For printing struct va_format structures. These contain a format string118118+ and va_list as follows:119119+120120+ struct va_format {121121+ const char *fmt;122122+ va_list *va;123123+ };124124+125125+ Do not use this feature without some mechanism to verify the126126+ correctness of the format string and va_list arguments.1312714128u64 SHOULD be printed with %llu/%llx, (unsigned long long):15129···14632Thank you for your cooperation and attention.1473314834149149-By Randy Dunlap <rdunlap@xenotime.net>3535+By Randy Dunlap <rdunlap@xenotime.net> and3636+Andrew Murray <amurray@mpc-data.co.uk>
+4-3
Documentation/scheduler/sched-design-CFS.txt
···223223group created using the pseudo filesystem. See example steps below to create224224task groups and modify their CPU share using the "cgroups" pseudo filesystem.225225226226- # mkdir /dev/cpuctl227227- # mount -t cgroup -ocpu none /dev/cpuctl228228- # cd /dev/cpuctl226226+ # mount -t tmpfs cgroup_root /sys/fs/cgroup227227+ # mkdir /sys/fs/cgroup/cpu228228+ # mount -t cgroup -ocpu none /sys/fs/cgroup/cpu229229+ # cd /sys/fs/cgroup/cpu229230230231 # mkdir multimedia # create "multimedia" group of tasks231232 # mkdir browser # create "browser" group of tasks
+3-4
Documentation/scheduler/sched-rt-group.txt
···129129Enabling CONFIG_RT_GROUP_SCHED lets you explicitly allocate real130130CPU bandwidth to task groups.131131132132-This uses the /cgroup virtual file system and133133-"/cgroup/<cgroup>/cpu.rt_runtime_us" to control the CPU time reserved for each134134-control group.132132+This uses the cgroup virtual file system and "<cgroup>/cpu.rt_runtime_us"133133+to control the CPU time reserved for each control group.135134136135For more information on working with control groups, you should read137136Documentation/cgroups/cgroups.txt as well.···149150===============150151151152There is work in progress to make the scheduling period for each group152152-("/cgroup/<cgroup>/cpu.rt_period_us") configurable as well.153153+("<cgroup>/cpu.rt_period_us") configurable as well.153154154155The constraint on the period is that a subgroup must have a smaller or155156equal period to its parent. But realistically its not very useful _yet_
···6060# CONFIG_VGA_CONSOLE is not set6161CONFIG_FRAMEBUFFER_CONSOLE=y6262CONFIG_LOGO=y6363-CONFIG_RTC_CLASS=m6363+CONFIG_RTC_CLASS=y6464CONFIG_INOTIFY=y6565CONFIG_TMPFS=y6666CONFIG_JFFS2_FS=y
···7373# CONFIG_VGA_CONSOLE is not set7474# CONFIG_HID_SUPPORT is not set7575# CONFIG_USB_SUPPORT is not set7676-CONFIG_RTC_CLASS=m7676+CONFIG_RTC_CLASS=y7777CONFIG_RTC_DRV_SA1100=m7878CONFIG_DMADEVICES=y7979# CONFIG_DNOTIFY is not set
···252252static void253253gpio_irq_handler(unsigned irq, struct irq_desc *desc)254254{255255- struct davinci_gpio_regs __iomem *g = irq2regs(irq);255255+ struct davinci_gpio_regs __iomem *g;256256 u32 mask = 0xffff;257257+258258+ g = (__force struct davinci_gpio_regs __iomem *) irq_desc_get_handler_data(desc);257259258260 /* we only care about one bank */259261 if (irq & 1)···424422425423 /* set up all irqs in this bank */426424 irq_set_chained_handler(bank_irq, gpio_irq_handler);427427- irq_set_chip_data(bank_irq, (__force void *)g);428428- irq_set_handler_data(bank_irq, (void *)irq);425425+ irq_set_handler_data(bank_irq, (__force void *)g);429426430427 for (i = 0; i < 16 && gpio < ngpio; i++, irq++, gpio++) {431428 irq_set_chip(irq, &gpio_irqchip);
···1818 * the defines are used for setting up the I/O memory mapping.1919 */20202121+#ifdef __ASSEMBLER__2222+#define IOMEM(a) (a)2323+#else2424+#define IOMEM(a) (void __iomem *) a2525+#endif2626+2127/* NAND Flash CS0 */2228#define U300_NAND_CS0_PHYS_BASE 0x800000002329···5448#endif55495650/*5757- * All the following peripherals are specified at their PHYSICAL address,5858- * so if you need to access them (in the kernel), you MUST use the macros5959- * defined in <asm/io.h> to map to the IO_ADDRESS_AHB() IO_ADDRESS_FAST()6060- * etc.6161- */6262-6363-/*6451 * AHB peripherals6552 */6653···62636364/* Vectored Interrupt Controller 0, servicing 32 interrupts */6465#define U300_INTCON0_BASE (U300_AHB_PER_PHYS_BASE+0x1000)6565-#define U300_INTCON0_VBASE (U300_AHB_PER_VIRT_BASE+0x1000)6666+#define U300_INTCON0_VBASE IOMEM(U300_AHB_PER_VIRT_BASE+0x1000)66676768/* Vectored Interrupt Controller 1, servicing 32 interrupts */6869#define U300_INTCON1_BASE (U300_AHB_PER_PHYS_BASE+0x2000)6969-#define U300_INTCON1_VBASE (U300_AHB_PER_VIRT_BASE+0x2000)7070+#define U300_INTCON1_VBASE IOMEM(U300_AHB_PER_VIRT_BASE+0x2000)70717172/* Memory Stick Pro (MSPRO) controller */7273#define U300_MSPRO_BASE (U300_AHB_PER_PHYS_BASE+0x3000)···114115115116/* SYSCON */116117#define U300_SYSCON_BASE (U300_SLOW_PER_PHYS_BASE+0x1000)117117-#define U300_SYSCON_VBASE (U300_SLOW_PER_VIRT_BASE+0x1000)118118+#define U300_SYSCON_VBASE IOMEM(U300_SLOW_PER_VIRT_BASE+0x1000)118119119120/* Watchdog */120121#define U300_WDOG_BASE (U300_SLOW_PER_PHYS_BASE+0x2000)···124125125126/* APP side special timer */126127#define U300_TIMER_APP_BASE (U300_SLOW_PER_PHYS_BASE+0x4000)127127-#define U300_TIMER_APP_VBASE (U300_SLOW_PER_VIRT_BASE+0x4000)128128+#define U300_TIMER_APP_VBASE IOMEM(U300_SLOW_PER_VIRT_BASE+0x4000)128129129130/* Keypad */130131#define U300_KEYPAD_BASE (U300_SLOW_PER_PHYS_BASE+0x5000)···179180/*180181 * Virtual accessor macros for static devices181182 */182182-183183184184#endif
+1-2
arch/arm/mach-u300/timer.c
···411411 /* Use general purpose timer 2 as clock source */412412 if (clocksource_mmio_init(U300_TIMER_APP_VBASE + U300_TIMER_APP_GPT2CC,413413 "GPT2", rate, 300, 32, clocksource_mmio_readl_up))414414- printk(KERN_ERR "timer: failed to initialize clock "415415- "source %s\n", clocksource_u300_1mhz.name);414414+ pr_err("timer: failed to initialize U300 clock source\n");416415417416 clockevents_calc_mult_shift(&clockevent_u300_1mhz,418417 rate, APPTIMER_MIN_RANGE);
···24242525/*2626 * We fork()ed a process, and we need a new context for the child2727- * to run in.2727+ * to run in. We reserve version 0 for initial tasks so we will2828+ * always allocate an ASID. The ASID 0 is reserved for the TTBR2929+ * register changing sequence.2830 */2931void __init_new_context(struct task_struct *tsk, struct mm_struct *mm)3032{···36343735static void flush_context(void)3836{3939- u32 ttb;4040- /* Copy TTBR1 into TTBR0 */4141- asm volatile("mrc p15, 0, %0, c2, c0, 1\n"4242- "mcr p15, 0, %0, c2, c0, 0"4343- : "=r" (ttb));3737+ /* set the reserved ASID before flushing the TLB */3838+ asm("mcr p15, 0, %0, c13, c0, 1\n" : : "r" (0));4439 isb();4540 local_flush_tlb_all();4641 if (icache_is_vivt_asid_tagged()) {···9394 return;94959596 smp_rmb();9696- asid = cpu_last_asid + cpu;9797+ asid = cpu_last_asid + cpu + 1;97989899 flush_context();99100 set_mm_context(mm, asid);···143144 * to start a new version and flush the TLB.144145 */145146 if (unlikely((asid & ~ASID_MASK) == 0)) {146146- asid = cpu_last_asid + smp_processor_id();147147+ asid = cpu_last_asid + smp_processor_id() + 1;147148 flush_context();148149#ifdef CONFIG_SMP149150 smp_wmb();150151 smp_call_function(reset_context, NULL, 1);151152#endif152152- cpu_last_asid += NR_CPUS - 1;153153+ cpu_last_asid += NR_CPUS;153154 }154155155156 set_mm_context(mm, asid);
···55CONFIG_LOG_BUF_SHIFT=1466CONFIG_RELAY=y77CONFIG_BLK_DEV_INITRD=y88+CONFIG_CC_OPTIMIZE_FOR_SIZE=y89# CONFIG_SYSCTL_SYSCALL is not set910# CONFIG_BASE_FULL is not set1011# CONFIG_COMPAT_BRK is not set
+1
arch/avr32/configs/atngw100_evklcd100_defconfig
···55CONFIG_LOG_BUF_SHIFT=1466CONFIG_RELAY=y77CONFIG_BLK_DEV_INITRD=y88+CONFIG_CC_OPTIMIZE_FOR_SIZE=y89# CONFIG_SYSCTL_SYSCALL is not set910# CONFIG_BASE_FULL is not set1011# CONFIG_COMPAT_BRK is not set
+1
arch/avr32/configs/atngw100_evklcd101_defconfig
···55CONFIG_LOG_BUF_SHIFT=1466CONFIG_RELAY=y77CONFIG_BLK_DEV_INITRD=y88+CONFIG_CC_OPTIMIZE_FOR_SIZE=y89# CONFIG_SYSCTL_SYSCALL is not set910# CONFIG_BASE_FULL is not set1011# CONFIG_COMPAT_BRK is not set
+2-1
arch/avr32/configs/atngw100_mrmt_defconfig
···77CONFIG_LOG_BUF_SHIFT=1488CONFIG_SYSFS_DEPRECATED_V2=y99CONFIG_BLK_DEV_INITRD=y1010+CONFIG_CC_OPTIMIZE_FOR_SIZE=y1011# CONFIG_SYSCTL_SYSCALL is not set1112# CONFIG_BASE_FULL is not set1213# CONFIG_SLUB_DEBUG is not set···110109CONFIG_LEDS_TRIGGERS=y111110CONFIG_LEDS_TRIGGER_TIMER=y112111CONFIG_LEDS_TRIGGER_HEARTBEAT=y113113-CONFIG_RTC_CLASS=m112112+CONFIG_RTC_CLASS=y114113CONFIG_RTC_DRV_S35390A=m115114CONFIG_RTC_DRV_AT32AP700X=m116115CONFIG_DMADEVICES=y
+1
arch/avr32/configs/atngw100mkii_defconfig
···55CONFIG_LOG_BUF_SHIFT=1466CONFIG_RELAY=y77CONFIG_BLK_DEV_INITRD=y88+CONFIG_CC_OPTIMIZE_FOR_SIZE=y89# CONFIG_SYSCTL_SYSCALL is not set910# CONFIG_BASE_FULL is not set1011# CONFIG_COMPAT_BRK is not set
···55CONFIG_LOG_BUF_SHIFT=1466CONFIG_RELAY=y77CONFIG_BLK_DEV_INITRD=y88+CONFIG_CC_OPTIMIZE_FOR_SIZE=y89# CONFIG_SYSCTL_SYSCALL is not set910# CONFIG_BASE_FULL is not set1011# CONFIG_COMPAT_BRK is not set
···55CONFIG_LOG_BUF_SHIFT=1466CONFIG_RELAY=y77CONFIG_BLK_DEV_INITRD=y88+CONFIG_CC_OPTIMIZE_FOR_SIZE=y89# CONFIG_SYSCTL_SYSCALL is not set910# CONFIG_BASE_FULL is not set1011# CONFIG_COMPAT_BRK is not set
+1
arch/avr32/configs/atstk1002_defconfig
···55CONFIG_LOG_BUF_SHIFT=1466CONFIG_RELAY=y77CONFIG_BLK_DEV_INITRD=y88+CONFIG_CC_OPTIMIZE_FOR_SIZE=y89# CONFIG_SYSCTL_SYSCALL is not set910# CONFIG_BASE_FULL is not set1011# CONFIG_COMPAT_BRK is not set
+1
arch/avr32/configs/atstk1003_defconfig
···55CONFIG_LOG_BUF_SHIFT=1466CONFIG_RELAY=y77CONFIG_BLK_DEV_INITRD=y88+CONFIG_CC_OPTIMIZE_FOR_SIZE=y89# CONFIG_SYSCTL_SYSCALL is not set910# CONFIG_BASE_FULL is not set1011# CONFIG_COMPAT_BRK is not set
+1
arch/avr32/configs/atstk1004_defconfig
···55CONFIG_LOG_BUF_SHIFT=1466CONFIG_RELAY=y77CONFIG_BLK_DEV_INITRD=y88+CONFIG_CC_OPTIMIZE_FOR_SIZE=y89# CONFIG_SYSCTL_SYSCALL is not set910# CONFIG_BASE_FULL is not set1011# CONFIG_COMPAT_BRK is not set
+1
arch/avr32/configs/atstk1006_defconfig
···55CONFIG_LOG_BUF_SHIFT=1466CONFIG_RELAY=y77CONFIG_BLK_DEV_INITRD=y88+CONFIG_CC_OPTIMIZE_FOR_SIZE=y89# CONFIG_SYSCTL_SYSCALL is not set910# CONFIG_BASE_FULL is not set1011# CONFIG_COMPAT_BRK is not set
+1
arch/avr32/configs/favr-32_defconfig
···66CONFIG_SYSFS_DEPRECATED_V2=y77CONFIG_RELAY=y88CONFIG_BLK_DEV_INITRD=y99+CONFIG_CC_OPTIMIZE_FOR_SIZE=y910# CONFIG_SYSCTL_SYSCALL is not set1011# CONFIG_BASE_FULL is not set1112# CONFIG_COMPAT_BRK is not set
+1
arch/avr32/configs/hammerhead_defconfig
···77CONFIG_LOG_BUF_SHIFT=1488CONFIG_SYSFS_DEPRECATED_V2=y99CONFIG_BLK_DEV_INITRD=y1010+CONFIG_CC_OPTIMIZE_FOR_SIZE=y1011# CONFIG_SYSCTL_SYSCALL is not set1112# CONFIG_BASE_FULL is not set1213# CONFIG_COMPAT_BRK is not set
+1
arch/avr32/configs/merisc_defconfig
···77CONFIG_LOG_BUF_SHIFT=1488CONFIG_SYSFS_DEPRECATED_V2=y99CONFIG_BLK_DEV_INITRD=y1010+CONFIG_CC_OPTIMIZE_FOR_SIZE=y1011# CONFIG_SYSCTL_SYSCALL is not set1112# CONFIG_BASE_FULL is not set1213CONFIG_MODULES=y
+1
arch/avr32/configs/mimc200_defconfig
···77CONFIG_LOG_BUF_SHIFT=1488CONFIG_SYSFS_DEPRECATED_V2=y99CONFIG_BLK_DEV_INITRD=y1010+CONFIG_CC_OPTIMIZE_FOR_SIZE=y1011# CONFIG_SYSCTL_SYSCALL is not set1112# CONFIG_BASE_FULL is not set1213# CONFIG_COMPAT_BRK is not set
···112112CONFIG_USB_G_PRINTER=m113113CONFIG_MMC=m114114CONFIG_SDH_BFIN=m115115-CONFIG_RTC_CLASS=m115115+CONFIG_RTC_CLASS=y116116CONFIG_RTC_DRV_BFIN=m117117CONFIG_EXT2_FS=m118118# CONFIG_DNOTIFY is not set
+45-7
arch/m68k/Kconfig.nommu
···1414 bool1515 default n16161717+config M680001818+ bool1919+ help2020+ The Freescale (was Motorola) 68000 CPU is the first generation of2121+ the well known M68K family of processors. The CPU core as well as2222+ being available as a stand alone CPU was also used in many2323+ System-On-Chip devices (eg 68328, 68302, etc). It does not contain2424+ a paging MMU.2525+2626+config MCPU322727+ bool2828+ help2929+ The Freescale (was then Motorola) CPU32 is a CPU core that is3030+ based on the 68020 processor. For the most part it is used in3131+ System-On-Chip parts, and does not contain a paging MMU.3232+3333+config COLDFIRE3434+ bool3535+ select GENERIC_GPIO3636+ select ARCH_REQUIRE_GPIOLIB3737+ help3838+ The Freescale ColdFire family of processors is a modern derivitive3939+ of the 68000 processor family. They are mainly targeted at embedded4040+ applications, and are all System-On-Chip (SOC) devices, as opposed4141+ to stand alone CPUs. They implement a subset of the original 680004242+ processor instruction set.4343+1744config COLDFIRE_SW_A71845 bool1946 default n···63366437config M683286538 bool "MC68328"3939+ select M680006640 help6741 Motorola 68328 processor support.68426943config M68EZ3287044 bool "MC68EZ328"4545+ select M680007146 help7247 Motorola 68EX328 processor support.73487449config M68VZ3287550 bool "MC68VZ328"5151+ select M680007652 help7753 Motorola 68VZ328 processor support.78547955config M683608056 bool "MC68360"5757+ select MCPU328158 help8259 Motorola 68360 processor support.83608461config M52068562 bool "MCF5206"6363+ select COLDFIRE8664 select COLDFIRE_SW_A78765 select HAVE_MBAR8866 help···95639664config M5206e9765 bool "MCF5206e"6666+ select COLDFIRE9867 select COLDFIRE_SW_A79968 select HAVE_MBAR10069 help···1037010471config M520x10572 bool "MCF520x"7373+ select COLDFIRE10674 select GENERIC_CLOCKEVENTS10775 select HAVE_CACHE_SPLIT10876 help···1117711278config M523x11379 bool "MCF523x"8080+ select COLDFIRE11481 select GENERIC_CLOCKEVENTS11582 select HAVE_CACHE_SPLIT11683 select HAVE_IPSBAR···1208512186config M524912287 bool "MCF5249"8888+ select COLDFIRE12389 select COLDFIRE_SW_A712490 select HAVE_MBAR12591 help···1289212993config M527113094 bool "MCF5271"9595+ select COLDFIRE13196 select HAVE_CACHE_SPLIT13297 select HAVE_IPSBAR13398 help···13699137100config M5272138101 bool "MCF5272"102102+ select COLDFIRE139103 select COLDFIRE_SW_A7140104 select HAVE_MBAR141105 help···144106145107config M5275146108 bool "MCF5275"109109+ select COLDFIRE147110 select HAVE_CACHE_SPLIT148111 select HAVE_IPSBAR149112 help···152113153114config M528x154115 bool "MCF528x"116116+ select COLDFIRE155117 select GENERIC_CLOCKEVENTS156118 select HAVE_CACHE_SPLIT157119 select HAVE_IPSBAR···161121162122config M5307163123 bool "MCF5307"124124+ select COLDFIRE164125 select COLDFIRE_SW_A7165126 select HAVE_CACHE_CB166127 select HAVE_MBAR···170129171130config M532x172131 bool "MCF532x"132132+ select COLDFIRE173133 select HAVE_CACHE_CB174134 help175135 Freescale (Motorola) ColdFire 532x processor support.176136177137config M5407178138 bool "MCF5407"139139+ select COLDFIRE179140 select COLDFIRE_SW_A7180141 select HAVE_CACHE_CB181142 select HAVE_MBAR···186143187144config M547x188145 bool "MCF547x"146146+ select COLDFIRE189147 select HAVE_CACHE_CB190148 select HAVE_MBAR191149 help···194150195151config M548x196152 bool "MCF548x"153153+ select COLDFIRE197154 select HAVE_CACHE_CB198155 select HAVE_MBAR199156 help···211166config M54xx212167 bool213168 depends on (M548x || M547x)214214- default y215215-216216-config COLDFIRE217217- bool218218- depends on (M5206 || M5206e || M520x || M523x || M5249 || M527x || M5272 || M528x || M5307 || M532x || M5407 || M54xx)219219- select GENERIC_GPIO220220- select ARCH_REQUIRE_GPIOLIB221169 default y222170223171config CLOCK_SET
+1-2
arch/m68k/kernel/m68k_ksyms.c
···1414EXPORT_SYMBOL(__lshrdi3);1515EXPORT_SYMBOL(__muldi3);16161717-#if !defined(__mc68020__) && !defined(__mc68030__) && \1818- !defined(__mc68040__) && !defined(__mc68060__) && !defined(__mcpu32__)1717+#if defined(CONFIG_M68000) || defined(CONFIG_COLDFIRE)1918/*2019 * Simpler 68k and ColdFire parts also need a few other gcc functions.2120 */
···8585CONFIG_USB_OHCI_HCD_PPC_OF_BE=y8686# CONFIG_USB_OHCI_HCD_PCI is not set8787CONFIG_USB_STORAGE=m8888-CONFIG_RTC_CLASS=m8888+CONFIG_RTC_CLASS=y8989CONFIG_RTC_DRV_PCF8563=m9090CONFIG_EXT2_FS=m9191CONFIG_EXT3_FS=m
+1-1
arch/powerpc/configs/ps3_defconfig
···141141# CONFIG_USB_EHCI_HCD_PPC_OF is not set142142CONFIG_USB_OHCI_HCD=m143143CONFIG_USB_STORAGE=m144144-CONFIG_RTC_CLASS=m144144+CONFIG_RTC_CLASS=y145145CONFIG_RTC_DRV_PS3=m146146CONFIG_EXT2_FS=m147147CONFIG_EXT3_FS=m
···163163 * This has the effect of treating non-periodic like periodic.164164 */165165 if ((devp->hd_flags & (HPET_IE | HPET_PERIODIC)) == HPET_IE) {166166- unsigned long m, t;166166+ unsigned long m, t, mc, base, k;167167+ struct hpet __iomem *hpet = devp->hd_hpet;168168+ struct hpets *hpetp = devp->hd_hpets;167169168170 t = devp->hd_ireqfreq;169171 m = read_counter(&devp->hd_timer->hpet_compare);170170- write_counter(t + m, &devp->hd_timer->hpet_compare);172172+ mc = read_counter(&hpet->hpet_mc);173173+ /* The time for the next interrupt would logically be t + m,174174+ * however, if we are very unlucky and the interrupt is delayed175175+ * for longer than t then we will completely miss the next176176+ * interrupt if we set t + m and an application will hang.177177+ * Therefore we need to make a more complex computation assuming178178+ * that there exists a k for which the following is true:179179+ * k * t + base < mc + delta180180+ * (k + 1) * t + base > mc + delta181181+ * where t is the interval in hpet ticks for the given freq,182182+ * base is the theoretical start value 0 < base < t,183183+ * mc is the main counter value at the time of the interrupt,184184+ * delta is the time it takes to write the a value to the185185+ * comparator.186186+ * k may then be computed as (mc - base + delta) / t .187187+ */188188+ base = mc % t;189189+ k = (mc - base + hpetp->hp_delta) / t;190190+ write_counter(t * (k + 1) + base,191191+ &devp->hd_timer->hpet_compare);171192 }172193173194 if (devp->hd_flags & HPET_SHARED_IRQ)
···4646 list_for_each_entry(entry, &dev->maplist, head) {4747 /*4848 * Because the kernel-userspace ABI is fixed at a 32-bit offset4949- * while PCI resources may live above that, we ignore the map5050- * offset for maps of type _DRM_FRAMEBUFFER or _DRM_REGISTERS.5151- * It is assumed that each driver will have only one resource of5252- * each type.4949+ * while PCI resources may live above that, we only compare the5050+ * lower 32 bits of the map offset for maps of type5151+ * _DRM_FRAMEBUFFER or _DRM_REGISTERS.5252+ * It is assumed that if a driver have more than one resource5353+ * of each type, the lower 32 bits are different.5354 */5455 if (!entry->map ||5556 map->type != entry->map->type ||···6059 case _DRM_SHM:6160 if (map->flags != _DRM_CONTAINS_LOCK)6261 break;6262+ return entry;6363 case _DRM_REGISTERS:6464 case _DRM_FRAME_BUFFER:6565- return entry;6565+ if ((entry->map->offset & 0xffffffff) ==6666+ (map->offset & 0xffffffff))6767+ return entry;6668 default: /* Make gcc happy */6769 ;6870 }···186182 kfree(map);187183 return -EINVAL;188184 }189189-#endif190190-#ifdef __alpha__191191- map->offset += dev->hose->mem_space->start;192185#endif193186 /* Some drivers preinitialize some maps, without the X Server194187 * needing to be aware of it. Therefore, we just return success
···626626static int radeon_vga_mode_valid(struct drm_connector *connector,627627 struct drm_display_mode *mode)628628{629629+ struct drm_device *dev = connector->dev;630630+ struct radeon_device *rdev = dev->dev_private;631631+629632 /* XXX check mode bandwidth */630630- /* XXX verify against max DAC output frequency */633633+634634+ if ((mode->clock / 10) > rdev->clock.max_pixel_clock)635635+ return MODE_CLOCK_HIGH;636636+631637 return MODE_OK;632638}633639···10211015 } else10221016 return MODE_CLOCK_HIGH;10231017 }10181018+10191019+ /* check against the max pixel clock */10201020+ if ((mode->clock / 10) > rdev->clock.max_pixel_clock)10211021+ return MODE_CLOCK_HIGH;10221022+10241023 return MODE_OK;10251024}10261025
-3
drivers/gpu/drm/savage/savage_bci.c
···647647 ret = drm_addmap(dev, aperture_base, SAVAGE_APERTURE_SIZE,648648 _DRM_FRAME_BUFFER, _DRM_WRITE_COMBINING,649649 &dev_priv->aperture);650650- if (ret)651651- return ret;652652-653650 return ret;654651}655652
+10-10
drivers/leds/Kconfig
···11+config LEDS_GPIO_REGISTER22+ bool33+ help44+ This option provides the function gpio_led_register_device.55+ As this function is used by arch code it must not be compiled as a66+ module.77+18menuconfig NEW_LEDS29 bool "LED Support"310 help···147 This is not related to standard keyboard LEDs which are controlled158 via the input system.1691010+if NEW_LEDS1111+1712config LEDS_CLASS1813 bool "LED Class Support"1919- depends on NEW_LEDS2014 help2115 This option enables the led sysfs class in /sys/class/leds. You'll2216 need this to do anything useful with LEDs. If unsure, say N.2323-2424-config LEDS_GPIO_REGISTER2525- bool2626- help2727- This option provides the function gpio_led_register_device.2828- As this function is used by arch code it must not be compiled as a2929- module.3030-3131-if NEW_LEDS32173318comment "LED drivers"3419···390391391392config LEDS_ASIC3392393 bool "LED support for the HTC ASIC3"394394+ depends on LEDS_CLASS393395 depends on MFD_ASIC3394396 default y395397 help
+92-12
drivers/md/bitmap.c
···534534 kunmap_atomic(sb, KM_USER0);535535}536536537537+/*538538+ * bitmap_new_disk_sb539539+ * @bitmap540540+ *541541+ * This function is somewhat the reverse of bitmap_read_sb. bitmap_read_sb542542+ * reads and verifies the on-disk bitmap superblock and populates bitmap_info.543543+ * This function verifies 'bitmap_info' and populates the on-disk bitmap544544+ * structure, which is to be written to disk.545545+ *546546+ * Returns: 0 on success, -Exxx on error547547+ */548548+static int bitmap_new_disk_sb(struct bitmap *bitmap)549549+{550550+ bitmap_super_t *sb;551551+ unsigned long chunksize, daemon_sleep, write_behind;552552+ int err = -EINVAL;553553+554554+ bitmap->sb_page = alloc_page(GFP_KERNEL);555555+ if (IS_ERR(bitmap->sb_page)) {556556+ err = PTR_ERR(bitmap->sb_page);557557+ bitmap->sb_page = NULL;558558+ return err;559559+ }560560+ bitmap->sb_page->index = 0;561561+562562+ sb = kmap_atomic(bitmap->sb_page, KM_USER0);563563+564564+ sb->magic = cpu_to_le32(BITMAP_MAGIC);565565+ sb->version = cpu_to_le32(BITMAP_MAJOR_HI);566566+567567+ chunksize = bitmap->mddev->bitmap_info.chunksize;568568+ BUG_ON(!chunksize);569569+ if (!is_power_of_2(chunksize)) {570570+ kunmap_atomic(sb, KM_USER0);571571+ printk(KERN_ERR "bitmap chunksize not a power of 2\n");572572+ return -EINVAL;573573+ }574574+ sb->chunksize = cpu_to_le32(chunksize);575575+576576+ daemon_sleep = bitmap->mddev->bitmap_info.daemon_sleep;577577+ if (!daemon_sleep ||578578+ (daemon_sleep < 1) || (daemon_sleep > MAX_SCHEDULE_TIMEOUT)) {579579+ printk(KERN_INFO "Choosing daemon_sleep default (5 sec)\n");580580+ daemon_sleep = 5 * HZ;581581+ }582582+ sb->daemon_sleep = cpu_to_le32(daemon_sleep);583583+ bitmap->mddev->bitmap_info.daemon_sleep = daemon_sleep;584584+585585+ /*586586+ * FIXME: write_behind for RAID1. If not specified, what587587+ * is a good choice? We choose COUNTER_MAX / 2 arbitrarily.588588+ */589589+ write_behind = bitmap->mddev->bitmap_info.max_write_behind;590590+ if (write_behind > COUNTER_MAX)591591+ write_behind = COUNTER_MAX / 2;592592+ sb->write_behind = cpu_to_le32(write_behind);593593+ bitmap->mddev->bitmap_info.max_write_behind = write_behind;594594+595595+ /* keep the array size field of the bitmap superblock up to date */596596+ sb->sync_size = cpu_to_le64(bitmap->mddev->resync_max_sectors);597597+598598+ memcpy(sb->uuid, bitmap->mddev->uuid, 16);599599+600600+ bitmap->flags |= BITMAP_STALE;601601+ sb->state |= cpu_to_le32(BITMAP_STALE);602602+ bitmap->events_cleared = bitmap->mddev->events;603603+ sb->events_cleared = cpu_to_le64(bitmap->mddev->events);604604+605605+ bitmap->flags |= BITMAP_HOSTENDIAN;606606+ sb->version = cpu_to_le32(BITMAP_MAJOR_HOSTENDIAN);607607+608608+ kunmap_atomic(sb, KM_USER0);609609+610610+ return 0;611611+}612612+537613/* read the superblock from the bitmap file and initialize some bitmap fields */538614static int bitmap_read_sb(struct bitmap *bitmap)539615{···651575 reason = "unrecognized superblock version";652576 else if (chunksize < 512)653577 reason = "bitmap chunksize too small";654654- else if ((1 << ffz(~chunksize)) != chunksize)578578+ else if (!is_power_of_2(chunksize))655579 reason = "bitmap chunksize not a power of 2";656580 else if (daemon_sleep < 1 || daemon_sleep > MAX_SCHEDULE_TIMEOUT)657581 reason = "daemon sleep period out of range";···11521076 }1153107711541078 printk(KERN_INFO "%s: bitmap initialized from disk: "11551155- "read %lu/%lu pages, set %lu bits\n",11561156- bmname(bitmap), bitmap->file_pages, num_pages, bit_cnt);10791079+ "read %lu/%lu pages, set %lu of %lu bits\n",10801080+ bmname(bitmap), bitmap->file_pages, num_pages, bit_cnt, chunks);1157108111581082 return 0;11591083···14081332 return 0;14091333 }1410133414111411- if (unlikely((*bmc & COUNTER_MAX) == COUNTER_MAX)) {13351335+ if (unlikely(COUNTER(*bmc) == COUNTER_MAX)) {14121336 DEFINE_WAIT(__wait);14131337 /* note that it is safe to do the prepare_to_wait14141338 * after the test as long as we do it before dropping···14801404 sysfs_notify_dirent_safe(bitmap->sysfs_can_clear);14811405 }1482140614831483- if (!success && ! (*bmc & NEEDED_MASK))14071407+ if (!success && !NEEDED(*bmc))14841408 *bmc |= NEEDED_MASK;1485140914861486- if ((*bmc & COUNTER_MAX) == COUNTER_MAX)14101410+ if (COUNTER(*bmc) == COUNTER_MAX)14871411 wake_up(&bitmap->overflow_wait);1488141214891413 (*bmc)--;···18041728 vfs_fsync(file, 1);18051729 }18061730 /* read superblock from bitmap file (this sets mddev->bitmap_info.chunksize) */18071807- if (!mddev->bitmap_info.external)18081808- err = bitmap_read_sb(bitmap);18091809- else {17311731+ if (!mddev->bitmap_info.external) {17321732+ /*17331733+ * If 'MD_ARRAY_FIRST_USE' is set, then device-mapper is17341734+ * instructing us to create a new on-disk bitmap instance.17351735+ */17361736+ if (test_and_clear_bit(MD_ARRAY_FIRST_USE, &mddev->flags))17371737+ err = bitmap_new_disk_sb(bitmap);17381738+ else17391739+ err = bitmap_read_sb(bitmap);17401740+ } else {18101741 err = 0;18111742 if (mddev->bitmap_info.chunksize == 0 ||18121743 mddev->bitmap_info.daemon_sleep == 0)···18371754 bitmap->chunks = chunks;18381755 bitmap->pages = pages;18391756 bitmap->missing_pages = pages;18401840- bitmap->counter_bits = COUNTER_BITS;18411841-18421842- bitmap->syncchunk = ~0UL;1843175718441758#ifdef INJECT_FATAL_FAULT_118451759 bitmap->bp = NULL;
-10
drivers/md/bitmap.h
···8585typedef __u16 bitmap_counter_t;8686#define COUNTER_BITS 168787#define COUNTER_BIT_SHIFT 48888-#define COUNTER_BYTE_RATIO (COUNTER_BITS / 8)8988#define COUNTER_BYTE_SHIFT (COUNTER_BIT_SHIFT - 3)90899190#define NEEDED_MASK ((bitmap_counter_t) (1 << (COUNTER_BITS - 1)))···195196196197 mddev_t *mddev; /* the md device that the bitmap is for */197198198198- int counter_bits; /* how many bits per block counter */199199-200199 /* bitmap chunksize -- how much data does each bit represent? */201200 unsigned long chunkshift; /* chunksize = 2^chunkshift (for bitops) */202201 unsigned long chunks; /* total number of data chunks for the array */203203-204204- /* We hold a count on the chunk currently being synced, and drop205205- * it when the last block is started. If the resync is aborted206206- * midway, we need to be able to drop that count, so we remember207207- * the counted chunk..208208- */209209- unsigned long syncchunk;210202211203 __u64 events_cleared;212204 int need_sync;
+30-11
drivers/md/md.c
···351351 mddev->suspended = 0;352352 wake_up(&mddev->sb_wait);353353 mddev->pers->quiesce(mddev, 0);354354+355355+ md_wakeup_thread(mddev->thread);356356+ md_wakeup_thread(mddev->sync_thread); /* possibly kick off a reshape */354357}355358EXPORT_SYMBOL_GPL(mddev_resume);356359···17531750 },17541751};1755175217531753+static void sync_super(mddev_t *mddev, mdk_rdev_t *rdev)17541754+{17551755+ if (mddev->sync_super) {17561756+ mddev->sync_super(mddev, rdev);17571757+ return;17581758+ }17591759+17601760+ BUG_ON(mddev->major_version >= ARRAY_SIZE(super_types));17611761+17621762+ super_types[mddev->major_version].sync_super(mddev, rdev);17631763+}17641764+17561765static int match_mddev_units(mddev_t *mddev1, mddev_t *mddev2)17571766{17581767 mdk_rdev_t *rdev, *rdev2;···1796178117971782 if (list_empty(&mddev->disks))17981783 return 0; /* nothing to do */17991799- if (blk_get_integrity(mddev->gendisk))18001800- return 0; /* already registered */17841784+ if (!mddev->gendisk || blk_get_integrity(mddev->gendisk))17851785+ return 0; /* shouldn't register, or already is */18011786 list_for_each_entry(rdev, &mddev->disks, same_set) {18021787 /* skip spares and non-functional disks */18031788 if (test_bit(Faulty, &rdev->flags))···21832168 /* Don't update this superblock */21842169 rdev->sb_loaded = 2;21852170 } else {21862186- super_types[mddev->major_version].21872187- sync_super(mddev, rdev);21712171+ sync_super(mddev, rdev);21882172 rdev->sb_loaded = 1;21892173 }21902174 }···24762462 if (rdev->raid_disk == -1)24772463 return -EEXIST;24782464 /* personality does all needed checks */24792479- if (rdev->mddev->pers->hot_add_disk == NULL)24652465+ if (rdev->mddev->pers->hot_remove_disk == NULL)24802466 return -EINVAL;24812467 err = rdev->mddev->pers->24822468 hot_remove_disk(rdev->mddev, rdev->raid_disk);···46334619 if (mddev->flags)46344620 md_update_sb(mddev, 0);4635462146364636- md_wakeup_thread(mddev->thread);46374637- md_wakeup_thread(mddev->sync_thread); /* possibly kick off a reshape */46384638-46394622 md_new_event(mddev);46404623 sysfs_notify_dirent_safe(mddev->sysfs_state);46414624 sysfs_notify_dirent_safe(mddev->sysfs_action);···46534642 bitmap_destroy(mddev);46544643 goto out;46554644 }46454645+46464646+ md_wakeup_thread(mddev->thread);46474647+ md_wakeup_thread(mddev->sync_thread); /* possibly kick off a reshape */46484648+46564649 set_capacity(mddev->gendisk, mddev->array_sectors);46574650 revalidate_disk(mddev->gendisk);46584651 mddev->changed = 1;···52745259 if (mddev->degraded)52755260 set_bit(MD_RECOVERY_RECOVER, &mddev->recovery);52765261 set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);52625262+ if (!err)52635263+ md_new_event(mddev);52775264 md_wakeup_thread(mddev->thread);52785265 return err;52795266 }···68836866 * Tune reconstruction:68846867 */68856868 window = 32*(PAGE_SIZE/512);68866886- printk(KERN_INFO "md: using %dk window, over a total of %llu blocks.\n",68876887- window/2,(unsigned long long) max_sectors/2);68696869+ printk(KERN_INFO "md: using %dk window, over a total of %lluk.\n",68706870+ window/2, (unsigned long long)max_sectors/2);6888687168896872 atomic_set(&mddev->recovery_active, 0);68906873 last_check = 0;···70627045}70637046EXPORT_SYMBOL_GPL(md_do_sync);7064704770657065-70667048static int remove_and_add_spares(mddev_t *mddev)70677049{70687050 mdk_rdev_t *rdev;···71737157 */71747158void md_check_recovery(mddev_t *mddev)71757159{71607160+ if (mddev->suspended)71617161+ return;71627162+71767163 if (mddev->bitmap)71777164 bitmap_daemon_work(mddev);71787165
+2
drivers/md/md.h
···124124#define MD_CHANGE_DEVS 0 /* Some device status has changed */125125#define MD_CHANGE_CLEAN 1 /* transition to or from 'clean' */126126#define MD_CHANGE_PENDING 2 /* switch from 'clean' to 'active' in progress */127127+#define MD_ARRAY_FIRST_USE 3 /* First use of array, needs initialization */127128128129 int suspended;129130 atomic_t active_io;···331330 atomic_t flush_pending;332331 struct work_struct flush_work;333332 struct work_struct event_work; /* used by dm to report failure event */333333+ void (*sync_super)(mddev_t *mddev, mdk_rdev_t *rdev);334334};335335336336
+17-7
drivers/md/raid1.c
···497497 return best_disk;498498}499499500500-static int raid1_congested(void *data, int bits)500500+int md_raid1_congested(mddev_t *mddev, int bits)501501{502502- mddev_t *mddev = data;503502 conf_t *conf = mddev->private;504503 int i, ret = 0;505505-506506- if (mddev_congested(mddev, bits))507507- return 1;508504509505 rcu_read_lock();510506 for (i = 0; i < mddev->raid_disks; i++) {511507 mdk_rdev_t *rdev = rcu_dereference(conf->mirrors[i].rdev);512508 if (rdev && !test_bit(Faulty, &rdev->flags)) {513509 struct request_queue *q = bdev_get_queue(rdev->bdev);510510+511511+ BUG_ON(!q);514512515513 /* Note the '|| 1' - when read_balance prefers516514 * non-congested targets, it can be removed···522524 rcu_read_unlock();523525 return ret;524526}527527+EXPORT_SYMBOL_GPL(md_raid1_congested);525528529529+static int raid1_congested(void *data, int bits)530530+{531531+ mddev_t *mddev = data;532532+533533+ return mddev_congested(mddev, bits) ||534534+ md_raid1_congested(mddev, bits);535535+}526536527537static void flush_pending_writes(conf_t *conf)528538{···19781972 return PTR_ERR(conf);1979197319801974 list_for_each_entry(rdev, &mddev->disks, same_set) {19751975+ if (!mddev->gendisk)19761976+ continue;19811977 disk_stack_limits(mddev->gendisk, rdev->bdev,19821978 rdev->data_offset << 9);19831979 /* as we don't honour merge_bvec_fn, we must never risk···2021201320222014 md_set_array_sectors(mddev, raid1_size(mddev, 0, 0));2023201520242024- mddev->queue->backing_dev_info.congested_fn = raid1_congested;20252025- mddev->queue->backing_dev_info.congested_data = mddev;20162016+ if (mddev->queue) {20172017+ mddev->queue->backing_dev_info.congested_fn = raid1_congested;20182018+ mddev->queue->backing_dev_info.congested_data = mddev;20192019+ }20262020 return md_integrity_register(mddev);20272021}20282022
+2
drivers/md/raid1.h
···126126 */127127#define R1BIO_Returned 6128128129129+extern int md_raid1_congested(mddev_t *mddev, int bits);130130+129131#endif
+8-8
drivers/md/raid5.c
···129129130130static inline void raid5_set_bi_hw_segments(struct bio *bio, unsigned int cnt)131131{132132- bio->bi_phys_segments = raid5_bi_phys_segments(bio) || (cnt << 16);132132+ bio->bi_phys_segments = raid5_bi_phys_segments(bio) | (cnt << 16);133133}134134135135/* Find first data disk in a raid6 stripe */···514514 bi = &sh->dev[i].req;515515516516 bi->bi_rw = rw;517517- if (rw == WRITE)517517+ if (rw & WRITE)518518 bi->bi_end_io = raid5_end_write_request;519519 else520520 bi->bi_end_io = raid5_end_read_request;···548548 bi->bi_io_vec[0].bv_offset = 0;549549 bi->bi_size = STRIPE_SIZE;550550 bi->bi_next = NULL;551551- if (rw == WRITE &&551551+ if ((rw & WRITE) &&552552 test_bit(R5_ReWrite, &sh->dev[i].flags))553553 atomic_add(STRIPE_SECTORS,554554 &rdev->corrected_errors);555555 generic_make_request(bi);556556 } else {557557- if (rw == WRITE)557557+ if (rw & WRITE)558558 set_bit(STRIPE_DEGRADED, &sh->state);559559 pr_debug("skip op %ld on disc %d for sector %llu\n",560560 bi->bi_rw, i, (unsigned long long)sh->sector);···585585 init_async_submit(&submit, flags, tx, NULL, NULL, NULL);586586587587 bio_for_each_segment(bvl, bio, i) {588588- int len = bio_iovec_idx(bio, i)->bv_len;588588+ int len = bvl->bv_len;589589 int clen;590590 int b_offset = 0;591591···601601 clen = len;602602603603 if (clen > 0) {604604- b_offset += bio_iovec_idx(bio, i)->bv_offset;605605- bio_page = bio_iovec_idx(bio, i)->bv_page;604604+ b_offset += bvl->bv_offset;605605+ bio_page = bvl->bv_page;606606 if (frombio)607607 tx = async_memcpy(page, bio_page, page_offset,608608 b_offset, clen, &submit);···48584858 printk(KERN_INFO "md/raid:%s: device %s operational as raid"48594859 " disk %d\n",48604860 mdname(mddev), bdevname(rdev->bdev, b), raid_disk);48614861- } else48614861+ } else if (rdev->saved_raid_disk != raid_disk)48624862 /* Cannot rely on bitmap to complete recovery */48634863 conf->fullsync = 1;48644864 }
+2
drivers/misc/apds990x.c
···609609 return ret;610610}611611612612+#if defined(CONFIG_PM) || defined(CONFIG_PM_RUNTIME)612613static int apds990x_chip_on(struct apds990x_chip *chip)613614{614615 int err = regulator_bulk_enable(ARRAY_SIZE(chip->regs),···625624 apds990x_mode_on(chip);626625 return 0;627626}627627+#endif628628629629static int apds990x_chip_off(struct apds990x_chip *chip)630630{
+1-1
drivers/misc/cs5535-mfgpt.c
···174174 timer_nr = t < max ? (int) t : -1;175175 } else {176176 /* check if the requested timer's available */177177- if (test_bit(timer_nr, mfgpt->avail))177177+ if (!test_bit(timer_nr, mfgpt->avail))178178 timer_nr = -1;179179 }180180
···11441144 else if (ret != -ENOSYS)11451145 goto err_gpio_cd;1146114611471147+ /*11481148+ * A gpio pin that will detect cards when inserted and removed11491149+ * will most likely want to trigger on the edges if it is11501150+ * 0 when ejected and 1 when inserted (or mutatis mutandis11511151+ * for the inverted case) so we request triggers on both11521152+ * edges.11531153+ */11471154 ret = request_any_context_irq(gpio_to_irq(plat->gpio_cd),11481148- mmci_cd_irq, 0,11491149- DRIVER_NAME " (cd)", host);11551155+ mmci_cd_irq,11561156+ IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,11571157+ DRIVER_NAME " (cd)", host);11501158 if (ret >= 0)11511159 host->gpio_cd_irq = gpio_to_irq(plat->gpio_cd);11521160 }
+2-2
drivers/pci/pci.c
···32713271}3272327232733273static int pci_set_vga_state_arch(struct pci_dev *dev, bool decode,32743274- unsigned int command_bits, bool change_bridge)32743274+ unsigned int command_bits, u32 flags)32753275{32763276 if (arch_set_vga_state)32773277 return arch_set_vga_state(dev, decode, command_bits,32783278- change_bridge);32783278+ flags);32793279 return 0;32803280}32813281
+3-1
drivers/tty/serial/pch_uart.c
···13971397 int fifosize, base_baud;13981398 int port_type;13991399 struct pch_uart_driver_data *board;14001400+ const char *board_name;1400140114011402 board = &drv_dat[id->driver_data];14021403 port_type = board->port_type;···14131412 base_baud = 1843200; /* 1.8432MHz */1414141314151414 /* quirk for CM-iTC board */14161416- if (strstr(dmi_get_system_info(DMI_BOARD_NAME), "CM-iTC"))14151415+ board_name = dmi_get_system_info(DMI_BOARD_NAME);14161416+ if (board_name && strstr(board_name, "CM-iTC"))14171417 base_baud = 192000000; /* 192.0MHz */1418141814191419 switch (port_type) {
+12
drivers/video/backlight/Kconfig
···302302 To compile this driver as a module, choose M here: the module will303303 be called adp8860_bl.304304305305+config BACKLIGHT_ADP8870306306+ tristate "Backlight Driver for ADP8870 using WLED"307307+ depends on BACKLIGHT_CLASS_DEVICE && I2C308308+ select NEW_LEDS309309+ select LEDS_CLASS310310+ help311311+ If you have a LCD backlight connected to the ADP8870,312312+ say Y here to enable this driver.313313+314314+ To compile this driver as a module, choose M here: the module will315315+ be called adp8870_bl.316316+305317config BACKLIGHT_88PM860X306318 tristate "Backlight Driver for 88PM8606 using WLED"307319 depends on MFD_88PM860X
···11+/*22+ * Backlight driver for Analog Devices ADP8870 Backlight Devices33+ *44+ * Copyright 2009-2011 Analog Devices Inc.55+ *66+ * Licensed under the GPL-2 or later.77+ */88+99+#include <linux/module.h>1010+#include <linux/version.h>1111+#include <linux/init.h>1212+#include <linux/errno.h>1313+#include <linux/pm.h>1414+#include <linux/platform_device.h>1515+#include <linux/i2c.h>1616+#include <linux/fb.h>1717+#include <linux/backlight.h>1818+#include <linux/leds.h>1919+#include <linux/workqueue.h>2020+#include <linux/slab.h>2121+2222+#include <linux/i2c/adp8870.h>2323+#define ADP8870_EXT_FEATURES2424+#define ADP8870_USE_LEDS2525+2626+2727+#define ADP8870_MFDVID 0x00 /* Manufacturer and device ID */2828+#define ADP8870_MDCR 0x01 /* Device mode and status */2929+#define ADP8870_INT_STAT 0x02 /* Interrupts status */3030+#define ADP8870_INT_EN 0x03 /* Interrupts enable */3131+#define ADP8870_CFGR 0x04 /* Configuration register */3232+#define ADP8870_BLSEL 0x05 /* Sink enable backlight or independent */3333+#define ADP8870_PWMLED 0x06 /* PWM Enable Selection Register */3434+#define ADP8870_BLOFF 0x07 /* Backlight off timeout */3535+#define ADP8870_BLDIM 0x08 /* Backlight dim timeout */3636+#define ADP8870_BLFR 0x09 /* Backlight fade in and out rates */3737+#define ADP8870_BLMX1 0x0A /* Backlight (Brightness Level 1-daylight) maximum current */3838+#define ADP8870_BLDM1 0x0B /* Backlight (Brightness Level 1-daylight) dim current */3939+#define ADP8870_BLMX2 0x0C /* Backlight (Brightness Level 2-bright) maximum current */4040+#define ADP8870_BLDM2 0x0D /* Backlight (Brightness Level 2-bright) dim current */4141+#define ADP8870_BLMX3 0x0E /* Backlight (Brightness Level 3-office) maximum current */4242+#define ADP8870_BLDM3 0x0F /* Backlight (Brightness Level 3-office) dim current */4343+#define ADP8870_BLMX4 0x10 /* Backlight (Brightness Level 4-indoor) maximum current */4444+#define ADP8870_BLDM4 0x11 /* Backlight (Brightness Level 4-indoor) dim current */4545+#define ADP8870_BLMX5 0x12 /* Backlight (Brightness Level 5-dark) maximum current */4646+#define ADP8870_BLDM5 0x13 /* Backlight (Brightness Level 5-dark) dim current */4747+#define ADP8870_ISCLAW 0x1A /* Independent sink current fade law register */4848+#define ADP8870_ISCC 0x1B /* Independent sink current control register */4949+#define ADP8870_ISCT1 0x1C /* Independent Sink Current Timer Register LED[7:5] */5050+#define ADP8870_ISCT2 0x1D /* Independent Sink Current Timer Register LED[4:1] */5151+#define ADP8870_ISCF 0x1E /* Independent sink current fade register */5252+#define ADP8870_ISC1 0x1F /* Independent Sink Current LED1 */5353+#define ADP8870_ISC2 0x20 /* Independent Sink Current LED2 */5454+#define ADP8870_ISC3 0x21 /* Independent Sink Current LED3 */5555+#define ADP8870_ISC4 0x22 /* Independent Sink Current LED4 */5656+#define ADP8870_ISC5 0x23 /* Independent Sink Current LED5 */5757+#define ADP8870_ISC6 0x24 /* Independent Sink Current LED6 */5858+#define ADP8870_ISC7 0x25 /* Independent Sink Current LED7 (Brightness Level 1-daylight) */5959+#define ADP8870_ISC7_L2 0x26 /* Independent Sink Current LED7 (Brightness Level 2-bright) */6060+#define ADP8870_ISC7_L3 0x27 /* Independent Sink Current LED7 (Brightness Level 3-office) */6161+#define ADP8870_ISC7_L4 0x28 /* Independent Sink Current LED7 (Brightness Level 4-indoor) */6262+#define ADP8870_ISC7_L5 0x29 /* Independent Sink Current LED7 (Brightness Level 5-dark) */6363+#define ADP8870_CMP_CTL 0x2D /* ALS Comparator Control Register */6464+#define ADP8870_ALS1_EN 0x2E /* Main ALS comparator level enable */6565+#define ADP8870_ALS2_EN 0x2F /* Second ALS comparator level enable */6666+#define ADP8870_ALS1_STAT 0x30 /* Main ALS Comparator Status Register */6767+#define ADP8870_ALS2_STAT 0x31 /* Second ALS Comparator Status Register */6868+#define ADP8870_L2TRP 0x32 /* L2 comparator reference */6969+#define ADP8870_L2HYS 0x33 /* L2 hysteresis */7070+#define ADP8870_L3TRP 0x34 /* L3 comparator reference */7171+#define ADP8870_L3HYS 0x35 /* L3 hysteresis */7272+#define ADP8870_L4TRP 0x36 /* L4 comparator reference */7373+#define ADP8870_L4HYS 0x37 /* L4 hysteresis */7474+#define ADP8870_L5TRP 0x38 /* L5 comparator reference */7575+#define ADP8870_L5HYS 0x39 /* L5 hysteresis */7676+#define ADP8870_PH1LEVL 0x40 /* First phototransistor ambient light level-low byte register */7777+#define ADP8870_PH1LEVH 0x41 /* First phototransistor ambient light level-high byte register */7878+#define ADP8870_PH2LEVL 0x42 /* Second phototransistor ambient light level-low byte register */7979+#define ADP8870_PH2LEVH 0x43 /* Second phototransistor ambient light level-high byte register */8080+8181+#define ADP8870_MANUFID 0x3 /* Analog Devices AD8870 Manufacturer and device ID */8282+#define ADP8870_DEVID(x) ((x) & 0xF)8383+#define ADP8870_MANID(x) ((x) >> 4)8484+8585+/* MDCR Device mode and status */8686+#define D7ALSEN (1 << 7)8787+#define INT_CFG (1 << 6)8888+#define NSTBY (1 << 5)8989+#define DIM_EN (1 << 4)9090+#define GDWN_DIS (1 << 3)9191+#define SIS_EN (1 << 2)9292+#define CMP_AUTOEN (1 << 1)9393+#define BLEN (1 << 0)9494+9595+/* ADP8870_ALS1_EN Main ALS comparator level enable */9696+#define L5_EN (1 << 3)9797+#define L4_EN (1 << 2)9898+#define L3_EN (1 << 1)9999+#define L2_EN (1 << 0)100100+101101+#define CFGR_BLV_SHIFT 3102102+#define CFGR_BLV_MASK 0x7103103+#define ADP8870_FLAG_LED_MASK 0xFF104104+105105+#define FADE_VAL(in, out) ((0xF & (in)) | ((0xF & (out)) << 4))106106+#define BL_CFGR_VAL(law, blv) ((((blv) & CFGR_BLV_MASK) << CFGR_BLV_SHIFT) | ((0x3 & (law)) << 1))107107+#define ALS_CMPR_CFG_VAL(filt) ((0x7 & (filt)) << 1)108108+109109+struct adp8870_bl {110110+ struct i2c_client *client;111111+ struct backlight_device *bl;112112+ struct adp8870_led *led;113113+ struct adp8870_backlight_platform_data *pdata;114114+ struct mutex lock;115115+ unsigned long cached_daylight_max;116116+ int id;117117+ int revid;118118+ int current_brightness;119119+};120120+121121+struct adp8870_led {122122+ struct led_classdev cdev;123123+ struct work_struct work;124124+ struct i2c_client *client;125125+ enum led_brightness new_brightness;126126+ int id;127127+ int flags;128128+};129129+130130+static int adp8870_read(struct i2c_client *client, int reg, uint8_t *val)131131+{132132+ int ret;133133+134134+ ret = i2c_smbus_read_byte_data(client, reg);135135+ if (ret < 0) {136136+ dev_err(&client->dev, "failed reading at 0x%02x\n", reg);137137+ return ret;138138+ }139139+140140+ *val = ret;141141+ return 0;142142+}143143+144144+145145+static int adp8870_write(struct i2c_client *client, u8 reg, u8 val)146146+{147147+ int ret = i2c_smbus_write_byte_data(client, reg, val);148148+ if (ret)149149+ dev_err(&client->dev, "failed to write\n");150150+151151+ return ret;152152+}153153+154154+static int adp8870_set_bits(struct i2c_client *client, int reg, uint8_t bit_mask)155155+{156156+ struct adp8870_bl *data = i2c_get_clientdata(client);157157+ uint8_t reg_val;158158+ int ret;159159+160160+ mutex_lock(&data->lock);161161+162162+ ret = adp8870_read(client, reg, ®_val);163163+164164+ if (!ret && ((reg_val & bit_mask) == 0)) {165165+ reg_val |= bit_mask;166166+ ret = adp8870_write(client, reg, reg_val);167167+ }168168+169169+ mutex_unlock(&data->lock);170170+ return ret;171171+}172172+173173+static int adp8870_clr_bits(struct i2c_client *client, int reg, uint8_t bit_mask)174174+{175175+ struct adp8870_bl *data = i2c_get_clientdata(client);176176+ uint8_t reg_val;177177+ int ret;178178+179179+ mutex_lock(&data->lock);180180+181181+ ret = adp8870_read(client, reg, ®_val);182182+183183+ if (!ret && (reg_val & bit_mask)) {184184+ reg_val &= ~bit_mask;185185+ ret = adp8870_write(client, reg, reg_val);186186+ }187187+188188+ mutex_unlock(&data->lock);189189+ return ret;190190+}191191+192192+/*193193+ * Independent sink / LED194194+ */195195+#if defined(ADP8870_USE_LEDS)196196+static void adp8870_led_work(struct work_struct *work)197197+{198198+ struct adp8870_led *led = container_of(work, struct adp8870_led, work);199199+ adp8870_write(led->client, ADP8870_ISC1 + led->id - 1,200200+ led->new_brightness >> 1);201201+}202202+203203+static void adp8870_led_set(struct led_classdev *led_cdev,204204+ enum led_brightness value)205205+{206206+ struct adp8870_led *led;207207+208208+ led = container_of(led_cdev, struct adp8870_led, cdev);209209+ led->new_brightness = value;210210+ /*211211+ * Use workqueue for IO since I2C operations can sleep.212212+ */213213+ schedule_work(&led->work);214214+}215215+216216+static int adp8870_led_setup(struct adp8870_led *led)217217+{218218+ struct i2c_client *client = led->client;219219+ int ret = 0;220220+221221+ ret = adp8870_write(client, ADP8870_ISC1 + led->id - 1, 0);222222+ if (ret)223223+ return ret;224224+225225+ ret = adp8870_set_bits(client, ADP8870_ISCC, 1 << (led->id - 1));226226+ if (ret)227227+ return ret;228228+229229+ if (led->id > 4)230230+ ret = adp8870_set_bits(client, ADP8870_ISCT1,231231+ (led->flags & 0x3) << ((led->id - 5) * 2));232232+ else233233+ ret = adp8870_set_bits(client, ADP8870_ISCT2,234234+ (led->flags & 0x3) << ((led->id - 1) * 2));235235+236236+ return ret;237237+}238238+239239+static int __devinit adp8870_led_probe(struct i2c_client *client)240240+{241241+ struct adp8870_backlight_platform_data *pdata =242242+ client->dev.platform_data;243243+ struct adp8870_bl *data = i2c_get_clientdata(client);244244+ struct adp8870_led *led, *led_dat;245245+ struct led_info *cur_led;246246+ int ret, i;247247+248248+249249+ led = kcalloc(pdata->num_leds, sizeof(*led), GFP_KERNEL);250250+ if (led == NULL) {251251+ dev_err(&client->dev, "failed to alloc memory\n");252252+ return -ENOMEM;253253+ }254254+255255+ ret = adp8870_write(client, ADP8870_ISCLAW, pdata->led_fade_law);256256+ if (ret)257257+ goto err_free;258258+259259+ ret = adp8870_write(client, ADP8870_ISCT1,260260+ (pdata->led_on_time & 0x3) << 6);261261+ if (ret)262262+ goto err_free;263263+264264+ ret = adp8870_write(client, ADP8870_ISCF,265265+ FADE_VAL(pdata->led_fade_in, pdata->led_fade_out));266266+ if (ret)267267+ goto err_free;268268+269269+ for (i = 0; i < pdata->num_leds; ++i) {270270+ cur_led = &pdata->leds[i];271271+ led_dat = &led[i];272272+273273+ led_dat->id = cur_led->flags & ADP8870_FLAG_LED_MASK;274274+275275+ if (led_dat->id > 7 || led_dat->id < 1) {276276+ dev_err(&client->dev, "Invalid LED ID %d\n",277277+ led_dat->id);278278+ goto err;279279+ }280280+281281+ if (pdata->bl_led_assign & (1 << (led_dat->id - 1))) {282282+ dev_err(&client->dev, "LED %d used by Backlight\n",283283+ led_dat->id);284284+ goto err;285285+ }286286+287287+ led_dat->cdev.name = cur_led->name;288288+ led_dat->cdev.default_trigger = cur_led->default_trigger;289289+ led_dat->cdev.brightness_set = adp8870_led_set;290290+ led_dat->cdev.brightness = LED_OFF;291291+ led_dat->flags = cur_led->flags >> FLAG_OFFT_SHIFT;292292+ led_dat->client = client;293293+ led_dat->new_brightness = LED_OFF;294294+ INIT_WORK(&led_dat->work, adp8870_led_work);295295+296296+ ret = led_classdev_register(&client->dev, &led_dat->cdev);297297+ if (ret) {298298+ dev_err(&client->dev, "failed to register LED %d\n",299299+ led_dat->id);300300+ goto err;301301+ }302302+303303+ ret = adp8870_led_setup(led_dat);304304+ if (ret) {305305+ dev_err(&client->dev, "failed to write\n");306306+ i++;307307+ goto err;308308+ }309309+ }310310+311311+ data->led = led;312312+313313+ return 0;314314+315315+ err:316316+ for (i = i - 1; i >= 0; --i) {317317+ led_classdev_unregister(&led[i].cdev);318318+ cancel_work_sync(&led[i].work);319319+ }320320+321321+ err_free:322322+ kfree(led);323323+324324+ return ret;325325+}326326+327327+static int __devexit adp8870_led_remove(struct i2c_client *client)328328+{329329+ struct adp8870_backlight_platform_data *pdata =330330+ client->dev.platform_data;331331+ struct adp8870_bl *data = i2c_get_clientdata(client);332332+ int i;333333+334334+ for (i = 0; i < pdata->num_leds; i++) {335335+ led_classdev_unregister(&data->led[i].cdev);336336+ cancel_work_sync(&data->led[i].work);337337+ }338338+339339+ kfree(data->led);340340+ return 0;341341+}342342+#else343343+static int __devinit adp8870_led_probe(struct i2c_client *client)344344+{345345+ return 0;346346+}347347+348348+static int __devexit adp8870_led_remove(struct i2c_client *client)349349+{350350+ return 0;351351+}352352+#endif353353+354354+static int adp8870_bl_set(struct backlight_device *bl, int brightness)355355+{356356+ struct adp8870_bl *data = bl_get_data(bl);357357+ struct i2c_client *client = data->client;358358+ int ret = 0;359359+360360+ if (data->pdata->en_ambl_sens) {361361+ if ((brightness > 0) && (brightness < ADP8870_MAX_BRIGHTNESS)) {362362+ /* Disable Ambient Light auto adjust */363363+ ret = adp8870_clr_bits(client, ADP8870_MDCR,364364+ CMP_AUTOEN);365365+ if (ret)366366+ return ret;367367+ ret = adp8870_write(client, ADP8870_BLMX1, brightness);368368+ if (ret)369369+ return ret;370370+ } else {371371+ /*372372+ * MAX_BRIGHTNESS -> Enable Ambient Light auto adjust373373+ * restore daylight l1 sysfs brightness374374+ */375375+ ret = adp8870_write(client, ADP8870_BLMX1,376376+ data->cached_daylight_max);377377+ if (ret)378378+ return ret;379379+380380+ ret = adp8870_set_bits(client, ADP8870_MDCR,381381+ CMP_AUTOEN);382382+ if (ret)383383+ return ret;384384+ }385385+ } else {386386+ ret = adp8870_write(client, ADP8870_BLMX1, brightness);387387+ if (ret)388388+ return ret;389389+ }390390+391391+ if (data->current_brightness && brightness == 0)392392+ ret = adp8870_set_bits(client,393393+ ADP8870_MDCR, DIM_EN);394394+ else if (data->current_brightness == 0 && brightness)395395+ ret = adp8870_clr_bits(client,396396+ ADP8870_MDCR, DIM_EN);397397+398398+ if (!ret)399399+ data->current_brightness = brightness;400400+401401+ return ret;402402+}403403+404404+static int adp8870_bl_update_status(struct backlight_device *bl)405405+{406406+ int brightness = bl->props.brightness;407407+ if (bl->props.power != FB_BLANK_UNBLANK)408408+ brightness = 0;409409+410410+ if (bl->props.fb_blank != FB_BLANK_UNBLANK)411411+ brightness = 0;412412+413413+ return adp8870_bl_set(bl, brightness);414414+}415415+416416+static int adp8870_bl_get_brightness(struct backlight_device *bl)417417+{418418+ struct adp8870_bl *data = bl_get_data(bl);419419+420420+ return data->current_brightness;421421+}422422+423423+static const struct backlight_ops adp8870_bl_ops = {424424+ .update_status = adp8870_bl_update_status,425425+ .get_brightness = adp8870_bl_get_brightness,426426+};427427+428428+static int adp8870_bl_setup(struct backlight_device *bl)429429+{430430+ struct adp8870_bl *data = bl_get_data(bl);431431+ struct i2c_client *client = data->client;432432+ struct adp8870_backlight_platform_data *pdata = data->pdata;433433+ int ret = 0;434434+435435+ ret = adp8870_write(client, ADP8870_BLSEL, ~pdata->bl_led_assign);436436+ if (ret)437437+ return ret;438438+439439+ ret = adp8870_write(client, ADP8870_PWMLED, pdata->pwm_assign);440440+ if (ret)441441+ return ret;442442+443443+ ret = adp8870_write(client, ADP8870_BLMX1, pdata->l1_daylight_max);444444+ if (ret)445445+ return ret;446446+447447+ ret = adp8870_write(client, ADP8870_BLDM1, pdata->l1_daylight_dim);448448+ if (ret)449449+ return ret;450450+451451+ if (pdata->en_ambl_sens) {452452+ data->cached_daylight_max = pdata->l1_daylight_max;453453+ ret = adp8870_write(client, ADP8870_BLMX2,454454+ pdata->l2_bright_max);455455+ if (ret)456456+ return ret;457457+ ret = adp8870_write(client, ADP8870_BLDM2,458458+ pdata->l2_bright_dim);459459+ if (ret)460460+ return ret;461461+462462+ ret = adp8870_write(client, ADP8870_BLMX3,463463+ pdata->l3_office_max);464464+ if (ret)465465+ return ret;466466+ ret = adp8870_write(client, ADP8870_BLDM3,467467+ pdata->l3_office_dim);468468+ if (ret)469469+ return ret;470470+471471+ ret = adp8870_write(client, ADP8870_BLMX4,472472+ pdata->l4_indoor_max);473473+ if (ret)474474+ return ret;475475+476476+ ret = adp8870_write(client, ADP8870_BLDM4,477477+ pdata->l4_indor_dim);478478+ if (ret)479479+ return ret;480480+481481+ ret = adp8870_write(client, ADP8870_BLMX5,482482+ pdata->l5_dark_max);483483+ if (ret)484484+ return ret;485485+486486+ ret = adp8870_write(client, ADP8870_BLDM5,487487+ pdata->l5_dark_dim);488488+ if (ret)489489+ return ret;490490+491491+ ret = adp8870_write(client, ADP8870_L2TRP, pdata->l2_trip);492492+ if (ret)493493+ return ret;494494+495495+ ret = adp8870_write(client, ADP8870_L2HYS, pdata->l2_hyst);496496+ if (ret)497497+ return ret;498498+499499+ ret = adp8870_write(client, ADP8870_L3TRP, pdata->l3_trip);500500+ if (ret)501501+ return ret;502502+503503+ ret = adp8870_write(client, ADP8870_L3HYS, pdata->l3_hyst);504504+ if (ret)505505+ return ret;506506+507507+ ret = adp8870_write(client, ADP8870_L4TRP, pdata->l4_trip);508508+ if (ret)509509+ return ret;510510+511511+ ret = adp8870_write(client, ADP8870_L4HYS, pdata->l4_hyst);512512+ if (ret)513513+ return ret;514514+515515+ ret = adp8870_write(client, ADP8870_L5TRP, pdata->l5_trip);516516+ if (ret)517517+ return ret;518518+519519+ ret = adp8870_write(client, ADP8870_L5HYS, pdata->l5_hyst);520520+ if (ret)521521+ return ret;522522+523523+ ret = adp8870_write(client, ADP8870_ALS1_EN, L5_EN | L4_EN |524524+ L3_EN | L2_EN);525525+ if (ret)526526+ return ret;527527+528528+ ret = adp8870_write(client, ADP8870_CMP_CTL,529529+ ALS_CMPR_CFG_VAL(pdata->abml_filt));530530+ if (ret)531531+ return ret;532532+ }533533+534534+ ret = adp8870_write(client, ADP8870_CFGR,535535+ BL_CFGR_VAL(pdata->bl_fade_law, 0));536536+ if (ret)537537+ return ret;538538+539539+ ret = adp8870_write(client, ADP8870_BLFR, FADE_VAL(pdata->bl_fade_in,540540+ pdata->bl_fade_out));541541+ if (ret)542542+ return ret;543543+ /*544544+ * ADP8870 Rev0 requires GDWN_DIS bit set545545+ */546546+547547+ ret = adp8870_set_bits(client, ADP8870_MDCR, BLEN | DIM_EN | NSTBY |548548+ (data->revid == 0 ? GDWN_DIS : 0));549549+550550+ return ret;551551+}552552+553553+static ssize_t adp8870_show(struct device *dev, char *buf, int reg)554554+{555555+ struct adp8870_bl *data = dev_get_drvdata(dev);556556+ int error;557557+ uint8_t reg_val;558558+559559+ mutex_lock(&data->lock);560560+ error = adp8870_read(data->client, reg, ®_val);561561+ mutex_unlock(&data->lock);562562+563563+ if (error < 0)564564+ return error;565565+566566+ return sprintf(buf, "%u\n", reg_val);567567+}568568+569569+static ssize_t adp8870_store(struct device *dev, const char *buf,570570+ size_t count, int reg)571571+{572572+ struct adp8870_bl *data = dev_get_drvdata(dev);573573+ unsigned long val;574574+ int ret;575575+576576+ ret = strict_strtoul(buf, 10, &val);577577+ if (ret)578578+ return ret;579579+580580+ mutex_lock(&data->lock);581581+ adp8870_write(data->client, reg, val);582582+ mutex_unlock(&data->lock);583583+584584+ return count;585585+}586586+587587+static ssize_t adp8870_bl_l5_dark_max_show(struct device *dev,588588+ struct device_attribute *attr, char *buf)589589+{590590+ return adp8870_show(dev, buf, ADP8870_BLMX5);591591+}592592+593593+static ssize_t adp8870_bl_l5_dark_max_store(struct device *dev,594594+ struct device_attribute *attr, const char *buf, size_t count)595595+{596596+ return adp8870_store(dev, buf, count, ADP8870_BLMX5);597597+}598598+static DEVICE_ATTR(l5_dark_max, 0664, adp8870_bl_l5_dark_max_show,599599+ adp8870_bl_l5_dark_max_store);600600+601601+602602+static ssize_t adp8870_bl_l4_indoor_max_show(struct device *dev,603603+ struct device_attribute *attr, char *buf)604604+{605605+ return adp8870_show(dev, buf, ADP8870_BLMX4);606606+}607607+608608+static ssize_t adp8870_bl_l4_indoor_max_store(struct device *dev,609609+ struct device_attribute *attr, const char *buf, size_t count)610610+{611611+ return adp8870_store(dev, buf, count, ADP8870_BLMX4);612612+}613613+static DEVICE_ATTR(l4_indoor_max, 0664, adp8870_bl_l4_indoor_max_show,614614+ adp8870_bl_l4_indoor_max_store);615615+616616+617617+static ssize_t adp8870_bl_l3_office_max_show(struct device *dev,618618+ struct device_attribute *attr, char *buf)619619+{620620+ return adp8870_show(dev, buf, ADP8870_BLMX3);621621+}622622+623623+static ssize_t adp8870_bl_l3_office_max_store(struct device *dev,624624+ struct device_attribute *attr, const char *buf, size_t count)625625+{626626+ return adp8870_store(dev, buf, count, ADP8870_BLMX3);627627+}628628+629629+static DEVICE_ATTR(l3_office_max, 0664, adp8870_bl_l3_office_max_show,630630+ adp8870_bl_l3_office_max_store);631631+632632+static ssize_t adp8870_bl_l2_bright_max_show(struct device *dev,633633+ struct device_attribute *attr, char *buf)634634+{635635+ return adp8870_show(dev, buf, ADP8870_BLMX2);636636+}637637+638638+static ssize_t adp8870_bl_l2_bright_max_store(struct device *dev,639639+ struct device_attribute *attr, const char *buf, size_t count)640640+{641641+ return adp8870_store(dev, buf, count, ADP8870_BLMX2);642642+}643643+static DEVICE_ATTR(l2_bright_max, 0664, adp8870_bl_l2_bright_max_show,644644+ adp8870_bl_l2_bright_max_store);645645+646646+static ssize_t adp8870_bl_l1_daylight_max_show(struct device *dev,647647+ struct device_attribute *attr, char *buf)648648+{649649+ return adp8870_show(dev, buf, ADP8870_BLMX1);650650+}651651+652652+static ssize_t adp8870_bl_l1_daylight_max_store(struct device *dev,653653+ struct device_attribute *attr, const char *buf, size_t count)654654+{655655+ struct adp8870_bl *data = dev_get_drvdata(dev);656656+ int ret = strict_strtoul(buf, 10, &data->cached_daylight_max);657657+ if (ret)658658+ return ret;659659+660660+ return adp8870_store(dev, buf, count, ADP8870_BLMX1);661661+}662662+static DEVICE_ATTR(l1_daylight_max, 0664, adp8870_bl_l1_daylight_max_show,663663+ adp8870_bl_l1_daylight_max_store);664664+665665+static ssize_t adp8870_bl_l5_dark_dim_show(struct device *dev,666666+ struct device_attribute *attr, char *buf)667667+{668668+ return adp8870_show(dev, buf, ADP8870_BLDM5);669669+}670670+671671+static ssize_t adp8870_bl_l5_dark_dim_store(struct device *dev,672672+ struct device_attribute *attr,673673+ const char *buf, size_t count)674674+{675675+ return adp8870_store(dev, buf, count, ADP8870_BLDM5);676676+}677677+static DEVICE_ATTR(l5_dark_dim, 0664, adp8870_bl_l5_dark_dim_show,678678+ adp8870_bl_l5_dark_dim_store);679679+680680+static ssize_t adp8870_bl_l4_indoor_dim_show(struct device *dev,681681+ struct device_attribute *attr, char *buf)682682+{683683+ return adp8870_show(dev, buf, ADP8870_BLDM4);684684+}685685+686686+static ssize_t adp8870_bl_l4_indoor_dim_store(struct device *dev,687687+ struct device_attribute *attr,688688+ const char *buf, size_t count)689689+{690690+ return adp8870_store(dev, buf, count, ADP8870_BLDM4);691691+}692692+static DEVICE_ATTR(l4_indoor_dim, 0664, adp8870_bl_l4_indoor_dim_show,693693+ adp8870_bl_l4_indoor_dim_store);694694+695695+696696+static ssize_t adp8870_bl_l3_office_dim_show(struct device *dev,697697+ struct device_attribute *attr, char *buf)698698+{699699+ return adp8870_show(dev, buf, ADP8870_BLDM3);700700+}701701+702702+static ssize_t adp8870_bl_l3_office_dim_store(struct device *dev,703703+ struct device_attribute *attr,704704+ const char *buf, size_t count)705705+{706706+ return adp8870_store(dev, buf, count, ADP8870_BLDM3);707707+}708708+static DEVICE_ATTR(l3_office_dim, 0664, adp8870_bl_l3_office_dim_show,709709+ adp8870_bl_l3_office_dim_store);710710+711711+static ssize_t adp8870_bl_l2_bright_dim_show(struct device *dev,712712+ struct device_attribute *attr, char *buf)713713+{714714+ return adp8870_show(dev, buf, ADP8870_BLDM2);715715+}716716+717717+static ssize_t adp8870_bl_l2_bright_dim_store(struct device *dev,718718+ struct device_attribute *attr,719719+ const char *buf, size_t count)720720+{721721+ return adp8870_store(dev, buf, count, ADP8870_BLDM2);722722+}723723+static DEVICE_ATTR(l2_bright_dim, 0664, adp8870_bl_l2_bright_dim_show,724724+ adp8870_bl_l2_bright_dim_store);725725+726726+static ssize_t adp8870_bl_l1_daylight_dim_show(struct device *dev,727727+ struct device_attribute *attr, char *buf)728728+{729729+ return adp8870_show(dev, buf, ADP8870_BLDM1);730730+}731731+732732+static ssize_t adp8870_bl_l1_daylight_dim_store(struct device *dev,733733+ struct device_attribute *attr,734734+ const char *buf, size_t count)735735+{736736+ return adp8870_store(dev, buf, count, ADP8870_BLDM1);737737+}738738+static DEVICE_ATTR(l1_daylight_dim, 0664, adp8870_bl_l1_daylight_dim_show,739739+ adp8870_bl_l1_daylight_dim_store);740740+741741+#ifdef ADP8870_EXT_FEATURES742742+static ssize_t adp8870_bl_ambient_light_level_show(struct device *dev,743743+ struct device_attribute *attr, char *buf)744744+{745745+ struct adp8870_bl *data = dev_get_drvdata(dev);746746+ int error;747747+ uint8_t reg_val;748748+ uint16_t ret_val;749749+750750+ mutex_lock(&data->lock);751751+ error = adp8870_read(data->client, ADP8870_PH1LEVL, ®_val);752752+ if (error < 0) {753753+ mutex_unlock(&data->lock);754754+ return error;755755+ }756756+ ret_val = reg_val;757757+ error = adp8870_read(data->client, ADP8870_PH1LEVH, ®_val);758758+ mutex_unlock(&data->lock);759759+760760+ if (error < 0)761761+ return error;762762+763763+ /* Return 13-bit conversion value for the first light sensor */764764+ ret_val += (reg_val & 0x1F) << 8;765765+766766+ return sprintf(buf, "%u\n", ret_val);767767+}768768+static DEVICE_ATTR(ambient_light_level, 0444,769769+ adp8870_bl_ambient_light_level_show, NULL);770770+771771+static ssize_t adp8870_bl_ambient_light_zone_show(struct device *dev,772772+ struct device_attribute *attr, char *buf)773773+{774774+ struct adp8870_bl *data = dev_get_drvdata(dev);775775+ int error;776776+ uint8_t reg_val;777777+778778+ mutex_lock(&data->lock);779779+ error = adp8870_read(data->client, ADP8870_CFGR, ®_val);780780+ mutex_unlock(&data->lock);781781+782782+ if (error < 0)783783+ return error;784784+785785+ return sprintf(buf, "%u\n",786786+ ((reg_val >> CFGR_BLV_SHIFT) & CFGR_BLV_MASK) + 1);787787+}788788+789789+static ssize_t adp8870_bl_ambient_light_zone_store(struct device *dev,790790+ struct device_attribute *attr,791791+ const char *buf, size_t count)792792+{793793+ struct adp8870_bl *data = dev_get_drvdata(dev);794794+ unsigned long val;795795+ uint8_t reg_val;796796+ int ret;797797+798798+ ret = strict_strtoul(buf, 10, &val);799799+ if (ret)800800+ return ret;801801+802802+ if (val == 0) {803803+ /* Enable automatic ambient light sensing */804804+ adp8870_set_bits(data->client, ADP8870_MDCR, CMP_AUTOEN);805805+ } else if ((val > 0) && (val < 6)) {806806+ /* Disable automatic ambient light sensing */807807+ adp8870_clr_bits(data->client, ADP8870_MDCR, CMP_AUTOEN);808808+809809+ /* Set user supplied ambient light zone */810810+ mutex_lock(&data->lock);811811+ adp8870_read(data->client, ADP8870_CFGR, ®_val);812812+ reg_val &= ~(CFGR_BLV_MASK << CFGR_BLV_SHIFT);813813+ reg_val |= (val - 1) << CFGR_BLV_SHIFT;814814+ adp8870_write(data->client, ADP8870_CFGR, reg_val);815815+ mutex_unlock(&data->lock);816816+ }817817+818818+ return count;819819+}820820+static DEVICE_ATTR(ambient_light_zone, 0664,821821+ adp8870_bl_ambient_light_zone_show,822822+ adp8870_bl_ambient_light_zone_store);823823+#endif824824+825825+static struct attribute *adp8870_bl_attributes[] = {826826+ &dev_attr_l5_dark_max.attr,827827+ &dev_attr_l5_dark_dim.attr,828828+ &dev_attr_l4_indoor_max.attr,829829+ &dev_attr_l4_indoor_dim.attr,830830+ &dev_attr_l3_office_max.attr,831831+ &dev_attr_l3_office_dim.attr,832832+ &dev_attr_l2_bright_max.attr,833833+ &dev_attr_l2_bright_dim.attr,834834+ &dev_attr_l1_daylight_max.attr,835835+ &dev_attr_l1_daylight_dim.attr,836836+#ifdef ADP8870_EXT_FEATURES837837+ &dev_attr_ambient_light_level.attr,838838+ &dev_attr_ambient_light_zone.attr,839839+#endif840840+ NULL841841+};842842+843843+static const struct attribute_group adp8870_bl_attr_group = {844844+ .attrs = adp8870_bl_attributes,845845+};846846+847847+static int __devinit adp8870_probe(struct i2c_client *client,848848+ const struct i2c_device_id *id)849849+{850850+ struct backlight_properties props;851851+ struct backlight_device *bl;852852+ struct adp8870_bl *data;853853+ struct adp8870_backlight_platform_data *pdata =854854+ client->dev.platform_data;855855+ uint8_t reg_val;856856+ int ret;857857+858858+ if (!i2c_check_functionality(client->adapter,859859+ I2C_FUNC_SMBUS_BYTE_DATA)) {860860+ dev_err(&client->dev, "SMBUS Byte Data not Supported\n");861861+ return -EIO;862862+ }863863+864864+ if (!pdata) {865865+ dev_err(&client->dev, "no platform data?\n");866866+ return -EINVAL;867867+ }868868+869869+ ret = adp8870_read(client, ADP8870_MFDVID, ®_val);870870+ if (ret < 0)871871+ return -EIO;872872+873873+ if (ADP8870_MANID(reg_val) != ADP8870_MANUFID) {874874+ dev_err(&client->dev, "failed to probe\n");875875+ return -ENODEV;876876+ }877877+878878+ data = kzalloc(sizeof(*data), GFP_KERNEL);879879+ if (data == NULL)880880+ return -ENOMEM;881881+882882+ data->revid = ADP8870_DEVID(reg_val);883883+ data->client = client;884884+ data->pdata = pdata;885885+ data->id = id->driver_data;886886+ data->current_brightness = 0;887887+ i2c_set_clientdata(client, data);888888+889889+ mutex_init(&data->lock);890890+891891+ memset(&props, 0, sizeof(props));892892+ props.type = BACKLIGHT_RAW;893893+ props.max_brightness = props.brightness = ADP8870_MAX_BRIGHTNESS;894894+ bl = backlight_device_register(dev_driver_string(&client->dev),895895+ &client->dev, data, &adp8870_bl_ops, &props);896896+ if (IS_ERR(bl)) {897897+ dev_err(&client->dev, "failed to register backlight\n");898898+ ret = PTR_ERR(bl);899899+ goto out2;900900+ }901901+902902+ data->bl = bl;903903+904904+ if (pdata->en_ambl_sens)905905+ ret = sysfs_create_group(&bl->dev.kobj,906906+ &adp8870_bl_attr_group);907907+908908+ if (ret) {909909+ dev_err(&client->dev, "failed to register sysfs\n");910910+ goto out1;911911+ }912912+913913+ ret = adp8870_bl_setup(bl);914914+ if (ret) {915915+ ret = -EIO;916916+ goto out;917917+ }918918+919919+ backlight_update_status(bl);920920+921921+ dev_info(&client->dev, "Rev.%d Backlight\n", data->revid);922922+923923+ if (pdata->num_leds)924924+ adp8870_led_probe(client);925925+926926+ return 0;927927+928928+out:929929+ if (data->pdata->en_ambl_sens)930930+ sysfs_remove_group(&data->bl->dev.kobj,931931+ &adp8870_bl_attr_group);932932+out1:933933+ backlight_device_unregister(bl);934934+out2:935935+ i2c_set_clientdata(client, NULL);936936+ kfree(data);937937+938938+ return ret;939939+}940940+941941+static int __devexit adp8870_remove(struct i2c_client *client)942942+{943943+ struct adp8870_bl *data = i2c_get_clientdata(client);944944+945945+ adp8870_clr_bits(client, ADP8870_MDCR, NSTBY);946946+947947+ if (data->led)948948+ adp8870_led_remove(client);949949+950950+ if (data->pdata->en_ambl_sens)951951+ sysfs_remove_group(&data->bl->dev.kobj,952952+ &adp8870_bl_attr_group);953953+954954+ backlight_device_unregister(data->bl);955955+ i2c_set_clientdata(client, NULL);956956+ kfree(data);957957+958958+ return 0;959959+}960960+961961+#ifdef CONFIG_PM962962+static int adp8870_i2c_suspend(struct i2c_client *client, pm_message_t message)963963+{964964+ adp8870_clr_bits(client, ADP8870_MDCR, NSTBY);965965+966966+ return 0;967967+}968968+969969+static int adp8870_i2c_resume(struct i2c_client *client)970970+{971971+ adp8870_set_bits(client, ADP8870_MDCR, NSTBY);972972+973973+ return 0;974974+}975975+#else976976+#define adp8870_i2c_suspend NULL977977+#define adp8870_i2c_resume NULL978978+#endif979979+980980+static const struct i2c_device_id adp8870_id[] = {981981+ { "adp8870", 0 },982982+ { }983983+};984984+MODULE_DEVICE_TABLE(i2c, adp8870_id);985985+986986+static struct i2c_driver adp8870_driver = {987987+ .driver = {988988+ .name = KBUILD_MODNAME,989989+ },990990+ .probe = adp8870_probe,991991+ .remove = __devexit_p(adp8870_remove),992992+ .suspend = adp8870_i2c_suspend,993993+ .resume = adp8870_i2c_resume,994994+ .id_table = adp8870_id,995995+};996996+997997+static int __init adp8870_init(void)998998+{999999+ return i2c_add_driver(&adp8870_driver);10001000+}10011001+module_init(adp8870_init);10021002+10031003+static void __exit adp8870_exit(void)10041004+{10051005+ i2c_del_driver(&adp8870_driver);10061006+}10071007+module_exit(adp8870_exit);10081008+10091009+MODULE_LICENSE("GPL v2");10101010+MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");10111011+MODULE_DESCRIPTION("ADP8870 Backlight driver");10121012+MODULE_ALIAS("platform:adp8870-backlight");
+1-1
drivers/w1/masters/Kconfig
···42424343config W1_MASTER_DS1WM4444 tristate "Maxim DS1WM 1-wire busmaster"4545- depends on W14545+ depends on W1 && GENERIC_HARDIRQS4646 help4747 Say Y here to enable the DS1WM 1-wire driver, such as that4848 in HP iPAQ devices like h5xxx, h2200, and ASIC3-based like
···6060 * (in whatever arch specific measurement units returned by node_distance())6161 * then switch on zone reclaim on boot.6262 */6363-#define RECLAIM_DISTANCE 206363+#define RECLAIM_DISTANCE 306464#endif6565#ifndef PENALTY_FOR_NODE_WITH_CPUS6666#define PENALTY_FOR_NODE_WITH_CPUS (1)
+1-1
include/linux/uts.h
···99#endif10101111#ifndef UTS_NODENAME1212-#define UTS_NODENAME "(none)" /* set by sethostname() */1212+#define UTS_NODENAME CONFIG_DEFAULT_HOSTNAME /* set by sethostname() */1313#endif14141515#ifndef UTS_DOMAINNAME
···1919config CONSTRUCTORS2020 bool2121 depends on !UML2222- default y23222423config HAVE_IRQ_WORK2524 bool···202203 (both compression and decompression) is the fastest.203204204205endchoice206206+207207+config DEFAULT_HOSTNAME208208+ string "Default hostname"209209+ default "(none)"210210+ help211211+ This option determines the default system hostname before userspace212212+ calls sethostname(2). The kernel traditionally uses "(none)" here,213213+ but you may wish to use a different default here to make a minimal214214+ system more usable with less configuration.205215206216config SWAP207217 bool "Support for paging of anonymous memory (swap)"
-3
init/calibrate.c
···9393 * If the upper limit and lower limit of the timer_rate is9494 * >= 12.5% apart, redo calibration.9595 */9696- printk(KERN_DEBUG "calibrate_delay_direct() timer_rate_max=%lu "9797- "timer_rate_min=%lu pre_start=%lu pre_end=%lu\n",9898- timer_rate_max, timer_rate_min, pre_start, pre_end);9996 if (start >= post_end)10097 printk(KERN_NOTICE "calibrate_delay_direct() ignoring "10198 "timer_rate as we had a TSC wrap around"
+15-16
kernel/exit.c
···561561562562#ifdef CONFIG_MM_OWNER563563/*564564- * Task p is exiting and it owned mm, lets find a new owner for it564564+ * A task is exiting. If it owned this mm, find a new owner for the mm.565565 */566566-static inline int567567-mm_need_new_owner(struct mm_struct *mm, struct task_struct *p)568568-{569569- /*570570- * If there are other users of the mm and the owner (us) is exiting571571- * we need to find a new owner to take on the responsibility.572572- */573573- if (atomic_read(&mm->mm_users) <= 1)574574- return 0;575575- if (mm->owner != p)576576- return 0;577577- return 1;578578-}579579-580566void mm_update_next_owner(struct mm_struct *mm)581567{582568 struct task_struct *c, *g, *p = current;583569584570retry:585585- if (!mm_need_new_owner(mm, p))571571+ /*572572+ * If the exiting or execing task is not the owner, it's573573+ * someone else's problem.574574+ */575575+ if (mm->owner != p)586576 return;577577+ /*578578+ * The current owner is exiting/execing and there are no other579579+ * candidates. Do not leave the mm pointing to a possibly580580+ * freed task structure.581581+ */582582+ if (atomic_read(&mm->mm_users) <= 1) {583583+ mm->owner = NULL;584584+ return;585585+ }587586588587 read_lock(&tasklist_lock);589588 /*
+2-1
kernel/gcov/Kconfig
···2233config GCOV_KERNEL44 bool "Enable gcov-based kernel profiling"55- depends on DEBUG_FS && CONSTRUCTORS55+ depends on DEBUG_FS66+ select CONSTRUCTORS67 default n78 ---help---89 This option enables gcov-based code profiling (e.g. for code coverage
+5-1
kernel/sched_rt.c
···10961096 * to move current somewhere else, making room for our non-migratable10971097 * task.10981098 */10991099- if (p->prio == rq->curr->prio && !need_resched())10991099+ if (p->prio == rq->curr->prio && !test_tsk_need_resched(rq->curr))11001100 check_preempt_equal_prio(rq, p);11011101#endif11021102}···12381238 struct cpumask *lowest_mask = __get_cpu_var(local_cpu_mask);12391239 int this_cpu = smp_processor_id();12401240 int cpu = task_cpu(task);12411241+12421242+ /* Make sure the mask is initialized first */12431243+ if (unlikely(!lowest_mask))12441244+ return -1;1241124512421246 if (task->rt.nr_cpus_allowed == 1)12431247 return -1; /* No other targets possible */
+1-1
kernel/signal.c
···23652365/**23662366 * sys_rt_sigprocmask - change the list of currently blocked signals23672367 * @how: whether to add, remove, or set signals23682368- * @set: stores pending signals23682368+ * @nset: stores pending signals23692369 * @oset: previous value of signal mask if non-null23702370 * @sigsetsize: size of sigset_t type23712371 */
+1-1
lib/bitmap.c
···572572573573/**574574 * __bitmap_parselist - convert list format ASCII string to bitmap575575- * @bp: read nul-terminated user string from this buffer575575+ * @buf: read nul-terminated user string from this buffer576576 * @buflen: buffer size in bytes. If string is smaller than this577577 * then it must be terminated with a \0.578578 * @is_user: location of buffer, 0 indicates kernel space
+54-22
mm/compaction.c
···144144 int nr_freepages = cc->nr_freepages;145145 struct list_head *freelist = &cc->freepages;146146147147+ /*148148+ * Initialise the free scanner. The starting point is where we last149149+ * scanned from (or the end of the zone if starting). The low point150150+ * is the end of the pageblock the migration scanner is using.151151+ */147152 pfn = cc->free_pfn;148153 low_pfn = cc->migrate_pfn + pageblock_nr_pages;149149- high_pfn = low_pfn;154154+155155+ /*156156+ * Take care that if the migration scanner is at the end of the zone157157+ * that the free scanner does not accidentally move to the next zone158158+ * in the next isolation cycle.159159+ */160160+ high_pfn = min(low_pfn, pfn);150161151162 /*152163 * Isolate free pages until enough are available to migrate the···251240 return isolated > (inactive + active) / 2;252241}253242243243+/* possible outcome of isolate_migratepages */244244+typedef enum {245245+ ISOLATE_ABORT, /* Abort compaction now */246246+ ISOLATE_NONE, /* No pages isolated, continue scanning */247247+ ISOLATE_SUCCESS, /* Pages isolated, migrate */248248+} isolate_migrate_t;249249+254250/*255251 * Isolate all pages that can be migrated from the block pointed to by256252 * the migrate scanner within compact_control.257253 */258258-static unsigned long isolate_migratepages(struct zone *zone,254254+static isolate_migrate_t isolate_migratepages(struct zone *zone,259255 struct compact_control *cc)260256{261257 unsigned long low_pfn, end_pfn;···279261 /* Do not cross the free scanner or scan within a memory hole */280262 if (end_pfn > cc->free_pfn || !pfn_valid(low_pfn)) {281263 cc->migrate_pfn = end_pfn;282282- return 0;264264+ return ISOLATE_NONE;283265 }284266285267 /*···288270 * delay for some time until fewer pages are isolated289271 */290272 while (unlikely(too_many_isolated(zone))) {273273+ /* async migration should just abort */274274+ if (!cc->sync)275275+ return ISOLATE_ABORT;276276+291277 congestion_wait(BLK_RW_ASYNC, HZ/10);292278293279 if (fatal_signal_pending(current))294294- return 0;280280+ return ISOLATE_ABORT;295281 }296282297283 /* Time to isolate some pages for migration */···380358381359 trace_mm_compaction_isolate_migratepages(nr_scanned, nr_isolated);382360383383- return cc->nr_migratepages;361361+ return ISOLATE_SUCCESS;384362}385363386364/*···442420 if (cc->free_pfn <= cc->migrate_pfn)443421 return COMPACT_COMPLETE;444422445445- /* Compaction run is not finished if the watermark is not met */446446- watermark = low_wmark_pages(zone);447447- watermark += (1 << cc->order);448448-449449- if (!zone_watermark_ok(zone, cc->order, watermark, 0, 0))450450- return COMPACT_CONTINUE;451451-452423 /*453424 * order == -1 is expected when compacting via454425 * /proc/sys/vm/compact_memory455426 */456427 if (cc->order == -1)428428+ return COMPACT_CONTINUE;429429+430430+ /* Compaction run is not finished if the watermark is not met */431431+ watermark = low_wmark_pages(zone);432432+ watermark += (1 << cc->order);433433+434434+ if (!zone_watermark_ok(zone, cc->order, watermark, 0, 0))457435 return COMPACT_CONTINUE;458436459437 /* Direct compactor: Is a suitable page free? */···483461 unsigned long watermark;484462485463 /*464464+ * order == -1 is expected when compacting via465465+ * /proc/sys/vm/compact_memory466466+ */467467+ if (order == -1)468468+ return COMPACT_CONTINUE;469469+470470+ /*486471 * Watermarks for order-0 must be met for compaction. Note the 2UL.487472 * This is because during migration, copies of pages need to be488473 * allocated and for a short time, the footprint is higher···499470 return COMPACT_SKIPPED;500471501472 /*502502- * order == -1 is expected when compacting via503503- * /proc/sys/vm/compact_memory504504- */505505- if (order == -1)506506- return COMPACT_CONTINUE;507507-508508- /*509473 * fragmentation index determines if allocation failures are due to510474 * low memory or external fragmentation511475 *512512- * index of -1 implies allocations might succeed dependingon watermarks476476+ * index of -1000 implies allocations might succeed depending on477477+ * watermarks513478 * index towards 0 implies failure is due to lack of memory514479 * index towards 1000 implies failure is due to fragmentation515480 *···513490 if (fragindex >= 0 && fragindex <= sysctl_extfrag_threshold)514491 return COMPACT_SKIPPED;515492516516- if (fragindex == -1 && zone_watermark_ok(zone, order, watermark, 0, 0))493493+ if (fragindex == -1000 && zone_watermark_ok(zone, order, watermark,494494+ 0, 0))517495 return COMPACT_PARTIAL;518496519497 return COMPACT_CONTINUE;···546522 unsigned long nr_migrate, nr_remaining;547523 int err;548524549549- if (!isolate_migratepages(zone, cc))525525+ switch (isolate_migratepages(zone, cc)) {526526+ case ISOLATE_ABORT:527527+ ret = COMPACT_PARTIAL;528528+ goto out;529529+ case ISOLATE_NONE:550530 continue;531531+ case ISOLATE_SUCCESS:532532+ ;533533+ }551534552535 nr_migrate = cc->nr_migratepages;553536 err = migrate_pages(&cc->migratepages, compaction_alloc,···578547579548 }580549550550+out:581551 /* Release free pages and check accounting */582552 cc->nr_freepages -= release_freepages(&cc->freepages);583553 VM_BUG_ON(cc->nr_freepages != 0);
+1-4
mm/huge_memory.c
···22342234 while (likely(khugepaged_enabled())) {22352235#ifndef CONFIG_NUMA22362236 hpage = khugepaged_alloc_hugepage();22372237- if (unlikely(!hpage)) {22382238- count_vm_event(THP_COLLAPSE_ALLOC_FAILED);22372237+ if (unlikely(!hpage))22392238 break;22402240- }22412241- count_vm_event(THP_COLLAPSE_ALLOC);22422239#else22432240 if (IS_ERR(hpage)) {22442241 khugepaged_alloc_sleep();
+8
mm/hugetlb.c
···11111111 WARN_ON(page_count(page) != 1);11121112 prep_compound_huge_page(page, h->order);11131113 prep_new_huge_page(h, page, page_to_nid(page));11141114+ /*11151115+ * If we had gigantic hugepages allocated at boot time, we need11161116+ * to restore the 'stolen' pages to totalram_pages in order to11171117+ * fix confusing memory reports from free(1) and another11181118+ * side-effects, like CommitLimit going negative.11191119+ */11201120+ if (h->order > (MAX_ORDER - 1))11211121+ totalram_pages += 1 << h->order;11141122 }11151123}11161124
+6
mm/ksm.c
···13021302 slot = list_entry(slot->mm_list.next, struct mm_slot, mm_list);13031303 ksm_scan.mm_slot = slot;13041304 spin_unlock(&ksm_mmlist_lock);13051305+ /*13061306+ * Although we tested list_empty() above, a racing __ksm_exit13071307+ * of the last mm on the list may have removed it since then.13081308+ */13091309+ if (slot == &ksm_mm_head)13101310+ return NULL;13051311next_mm:13061312 ksm_scan.address = 0;13071313 ksm_scan.rmap_list = &slot->rmap_list;
+54-27
mm/memcontrol.c
···359359static void mem_cgroup_get(struct mem_cgroup *mem);360360static void mem_cgroup_put(struct mem_cgroup *mem);361361static struct mem_cgroup *parent_mem_cgroup(struct mem_cgroup *mem);362362-static void drain_all_stock_async(void);362362+static void drain_all_stock_async(struct mem_cgroup *mem);363363364364static struct mem_cgroup_per_zone *365365mem_cgroup_zoneinfo(struct mem_cgroup *mem, int nid, int zid)···735735 struct mem_cgroup, css);736736}737737738738-static struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm)738738+struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm)739739{740740 struct mem_cgroup *mem = NULL;741741···16631663 excess = res_counter_soft_limit_excess(&root_mem->res) >> PAGE_SHIFT;1664166416651665 /* If memsw_is_minimum==1, swap-out is of-no-use. */16661666- if (root_mem->memsw_is_minimum)16661666+ if (!check_soft && root_mem->memsw_is_minimum)16671667 noswap = true;1668166816691669 while (1) {16701670 victim = mem_cgroup_select_victim(root_mem);16711671 if (victim == root_mem) {16721672 loop++;16731673- if (loop >= 1)16741674- drain_all_stock_async();16731673+ /*16741674+ * We are not draining per cpu cached charges during16751675+ * soft limit reclaim because global reclaim doesn't16761676+ * care about charges. It tries to free some memory and16771677+ * charges will not give any.16781678+ */16791679+ if (!check_soft && loop >= 1)16801680+ drain_all_stock_async(root_mem);16751681 if (loop >= 2) {16761682 /*16771683 * If we have not been able to reclaim···19401934 struct mem_cgroup *cached; /* this never be root cgroup */19411935 unsigned int nr_pages;19421936 struct work_struct work;19371937+ unsigned long flags;19381938+#define FLUSHING_CACHED_CHARGE (0)19431939};19441940static DEFINE_PER_CPU(struct memcg_stock_pcp, memcg_stock);19451945-static atomic_t memcg_drain_count;19411941+static DEFINE_MUTEX(percpu_charge_mutex);1946194219471943/*19481944 * Try to consume stocked charge on this cpu. If success, one page is consumed···19921984{19931985 struct memcg_stock_pcp *stock = &__get_cpu_var(memcg_stock);19941986 drain_stock(stock);19871987+ clear_bit(FLUSHING_CACHED_CHARGE, &stock->flags);19951988}1996198919971990/*···20172008 * expects some charges will be back to res_counter later but cannot wait for20182009 * it.20192010 */20202020-static void drain_all_stock_async(void)20112011+static void drain_all_stock_async(struct mem_cgroup *root_mem)20212012{20222022- int cpu;20232023- /* This function is for scheduling "drain" in asynchronous way.20242024- * The result of "drain" is not directly handled by callers. Then,20252025- * if someone is calling drain, we don't have to call drain more.20262026- * Anyway, WORK_STRUCT_PENDING check in queue_work_on() will catch if20272027- * there is a race. We just do loose check here.20132013+ int cpu, curcpu;20142014+ /*20152015+ * If someone calls draining, avoid adding more kworker runs.20282016 */20292029- if (atomic_read(&memcg_drain_count))20172017+ if (!mutex_trylock(&percpu_charge_mutex))20302018 return;20312019 /* Notify other cpus that system-wide "drain" is running */20322032- atomic_inc(&memcg_drain_count);20332020 get_online_cpus();20212021+ /*20222022+ * Get a hint for avoiding draining charges on the current cpu,20232023+ * which must be exhausted by our charging. It is not required that20242024+ * this be a precise check, so we use raw_smp_processor_id() instead of20252025+ * getcpu()/putcpu().20262026+ */20272027+ curcpu = raw_smp_processor_id();20342028 for_each_online_cpu(cpu) {20352029 struct memcg_stock_pcp *stock = &per_cpu(memcg_stock, cpu);20362036- schedule_work_on(cpu, &stock->work);20302030+ struct mem_cgroup *mem;20312031+20322032+ if (cpu == curcpu)20332033+ continue;20342034+20352035+ mem = stock->cached;20362036+ if (!mem)20372037+ continue;20382038+ if (mem != root_mem) {20392039+ if (!root_mem->use_hierarchy)20402040+ continue;20412041+ /* check whether "mem" is under tree of "root_mem" */20422042+ if (!css_is_ancestor(&mem->css, &root_mem->css))20432043+ continue;20442044+ }20452045+ if (!test_and_set_bit(FLUSHING_CACHED_CHARGE, &stock->flags))20462046+ schedule_work_on(cpu, &stock->work);20372047 }20382048 put_online_cpus();20392039- atomic_dec(&memcg_drain_count);20492049+ mutex_unlock(&percpu_charge_mutex);20402050 /* We don't wait for flush_work */20412051}20422052···20632035static void drain_all_stock_sync(void)20642036{20652037 /* called when force_empty is called */20662066- atomic_inc(&memcg_drain_count);20382038+ mutex_lock(&percpu_charge_mutex);20672039 schedule_on_each_cpu(drain_local_stock);20682068- atomic_dec(&memcg_drain_count);20402040+ mutex_unlock(&percpu_charge_mutex);20692041}2070204220712043/*···46684640 {46694641 .name = "numa_stat",46704642 .open = mem_control_numa_stat_open,46434643+ .mode = S_IRUGO,46714644 },46724645#endif46734646};···54435414 struct cgroup *old_cont,54445415 struct task_struct *p)54455416{54465446- struct mm_struct *mm;54175417+ struct mm_struct *mm = get_task_mm(p);5447541854485448- if (!mc.to)54495449- /* no need to move charge */54505450- return;54515451-54525452- mm = get_task_mm(p);54535419 if (mm) {54545454- mem_cgroup_move_charge(mm);54205420+ if (mc.to)54215421+ mem_cgroup_move_charge(mm);54225422+ put_swap_token(mm);54555423 mmput(mm);54565424 }54575457- mem_cgroup_clear_mc();54255425+ if (mc.to)54265426+ mem_cgroup_clear_mc();54585427}54595428#else /* !CONFIG_MMU */54605429static int mem_cgroup_can_attach(struct cgroup_subsys *ss,
···11121112 int force_flush = 0;11131113 int rss[NR_MM_COUNTERS];11141114 spinlock_t *ptl;11151115+ pte_t *start_pte;11151116 pte_t *pte;1116111711171118again:11181119 init_rss_vec(rss);11191119- pte = pte_offset_map_lock(mm, pmd, addr, &ptl);11201120+ start_pte = pte_offset_map_lock(mm, pmd, addr, &ptl);11211121+ pte = start_pte;11201122 arch_enter_lazy_mmu_mode();11211123 do {11221124 pte_t ptent = *pte;···1198119611991197 add_mm_rss_vec(mm, rss);12001198 arch_leave_lazy_mmu_mode();12011201- pte_unmap_unlock(pte - 1, ptl);11991199+ pte_unmap_unlock(start_pte, ptl);1202120012031201 /*12041202 * mmu_gather ran out of room to batch pages, we break out of···1298129612991297/**13001298 * unmap_vmas - unmap a range of memory covered by a list of vma's13011301- * @tlbp: address of the caller's struct mmu_gather12991299+ * @tlb: address of the caller's struct mmu_gather13021300 * @vma: the starting vma13031301 * @start_addr: virtual address at which to start unmapping13041302 * @end_addr: virtual address at which to end unmapping
+6
mm/memory_hotplug.c
···494494 /* init node's zones as empty zones, we don't have any present pages.*/495495 free_area_init_node(nid, zones_size, start_pfn, zholes_size);496496497497+ /*498498+ * The node we allocated has no zone fallback lists. For avoiding499499+ * to access not-initialized zonelist, build here.500500+ */501501+ build_all_zonelists(NULL);502502+497503 return pgdat;498504}499505
+53-18
mm/page_cgroup.c
···162162}163163#endif164164165165-static int __meminit init_section_page_cgroup(unsigned long pfn)165165+static int __meminit init_section_page_cgroup(unsigned long pfn, int nid)166166{167167 struct page_cgroup *base, *pc;168168 struct mem_section *section;169169 unsigned long table_size;170170 unsigned long nr;171171- int nid, index;171171+ int index;172172173173 nr = pfn_to_section_nr(pfn);174174 section = __nr_to_section(nr);···176176 if (section->page_cgroup)177177 return 0;178178179179- nid = page_to_nid(pfn_to_page(pfn));180179 table_size = sizeof(struct page_cgroup) * PAGES_PER_SECTION;181180 base = alloc_page_cgroup(table_size, nid);182181···195196 pc = base + index;196197 init_page_cgroup(pc, nr);197198 }198198-199199+ /*200200+ * The passed "pfn" may not be aligned to SECTION. For the calculation201201+ * we need to apply a mask.202202+ */203203+ pfn &= PAGE_SECTION_MASK;199204 section->page_cgroup = base - pfn;200205 total_usage += table_size;201206 return 0;···228225 start = start_pfn & ~(PAGES_PER_SECTION - 1);229226 end = ALIGN(start_pfn + nr_pages, PAGES_PER_SECTION);230227228228+ if (nid == -1) {229229+ /*230230+ * In this case, "nid" already exists and contains valid memory.231231+ * "start_pfn" passed to us is a pfn which is an arg for232232+ * online__pages(), and start_pfn should exist.233233+ */234234+ nid = pfn_to_nid(start_pfn);235235+ VM_BUG_ON(!node_state(nid, N_ONLINE));236236+ }237237+231238 for (pfn = start; !fail && pfn < end; pfn += PAGES_PER_SECTION) {232239 if (!pfn_present(pfn))233240 continue;234234- fail = init_section_page_cgroup(pfn);241241+ fail = init_section_page_cgroup(pfn, nid);235242 }236243 if (!fail)237244 return 0;···297284void __init page_cgroup_init(void)298285{299286 unsigned long pfn;300300- int fail = 0;287287+ int nid;301288302289 if (mem_cgroup_disabled())303290 return;304291305305- for (pfn = 0; !fail && pfn < max_pfn; pfn += PAGES_PER_SECTION) {306306- if (!pfn_present(pfn))307307- continue;308308- fail = init_section_page_cgroup(pfn);292292+ for_each_node_state(nid, N_HIGH_MEMORY) {293293+ unsigned long start_pfn, end_pfn;294294+295295+ start_pfn = node_start_pfn(nid);296296+ end_pfn = node_end_pfn(nid);297297+ /*298298+ * start_pfn and end_pfn may not be aligned to SECTION and the299299+ * page->flags of out of node pages are not initialized. So we300300+ * scan [start_pfn, the biggest section's pfn < end_pfn) here.301301+ */302302+ for (pfn = start_pfn;303303+ pfn < end_pfn;304304+ pfn = ALIGN(pfn + 1, PAGES_PER_SECTION)) {305305+306306+ if (!pfn_valid(pfn))307307+ continue;308308+ /*309309+ * Nodes's pfns can be overlapping.310310+ * We know some arch can have a nodes layout such as311311+ * -------------pfn-------------->312312+ * N0 | N1 | N2 | N0 | N1 | N2|....313313+ */314314+ if (pfn_to_nid(pfn) != nid)315315+ continue;316316+ if (init_section_page_cgroup(pfn, nid))317317+ goto oom;318318+ }309319 }310310- if (fail) {311311- printk(KERN_CRIT "try 'cgroup_disable=memory' boot option\n");312312- panic("Out of memory");313313- } else {314314- hotplug_memory_notifier(page_cgroup_callback, 0);315315- }320320+ hotplug_memory_notifier(page_cgroup_callback, 0);316321 printk(KERN_INFO "allocated %ld bytes of page_cgroup\n", total_usage);317317- printk(KERN_INFO "please try 'cgroup_disable=memory' option if you don't"318318- " want memory cgroups\n");322322+ printk(KERN_INFO "please try 'cgroup_disable=memory' option if you "323323+ "don't want memory cgroups\n");324324+ return;325325+oom:326326+ printk(KERN_CRIT "try 'cgroup_disable=memory' boot option\n");327327+ panic("Out of memory");319328}320329321330void __meminit pgdat_page_cgroup_init(struct pglist_data *pgdat)
+86-19
mm/thrash.c
···2121#include <linux/mm.h>2222#include <linux/sched.h>2323#include <linux/swap.h>2424+#include <linux/memcontrol.h>2525+2626+#include <trace/events/vmscan.h>2727+2828+#define TOKEN_AGING_INTERVAL (0xFF)24292530static DEFINE_SPINLOCK(swap_token_lock);2631struct mm_struct *swap_token_mm;3232+struct mem_cgroup *swap_token_memcg;2733static unsigned int global_faults;3434+static unsigned int last_aging;3535+3636+#ifdef CONFIG_CGROUP_MEM_RES_CTLR3737+static struct mem_cgroup *swap_token_memcg_from_mm(struct mm_struct *mm)3838+{3939+ struct mem_cgroup *memcg;4040+4141+ memcg = try_get_mem_cgroup_from_mm(mm);4242+ if (memcg)4343+ css_put(mem_cgroup_css(memcg));4444+4545+ return memcg;4646+}4747+#else4848+static struct mem_cgroup *swap_token_memcg_from_mm(struct mm_struct *mm)4949+{5050+ return NULL;5151+}5252+#endif28532954void grab_swap_token(struct mm_struct *mm)3055{3156 int current_interval;5757+ unsigned int old_prio = mm->token_priority;32583359 global_faults++;3460···6438 return;65396640 /* First come first served */6767- if (swap_token_mm == NULL) {6868- mm->token_priority = mm->token_priority + 2;6969- swap_token_mm = mm;7070- goto out;4141+ if (!swap_token_mm)4242+ goto replace_token;4343+4444+ if ((global_faults - last_aging) > TOKEN_AGING_INTERVAL) {4545+ swap_token_mm->token_priority /= 2;4646+ last_aging = global_faults;7147 }72487373- if (mm != swap_token_mm) {7474- if (current_interval < mm->last_interval)7575- mm->token_priority++;7676- else {7777- if (likely(mm->token_priority > 0))7878- mm->token_priority--;7979- }8080- /* Check if we deserve the token */8181- if (mm->token_priority > swap_token_mm->token_priority) {8282- mm->token_priority += 2;8383- swap_token_mm = mm;8484- }8585- } else {8686- /* Token holder came in again! */4949+ if (mm == swap_token_mm) {8750 mm->token_priority += 2;5151+ goto update_priority;8852 }5353+5454+ if (current_interval < mm->last_interval)5555+ mm->token_priority++;5656+ else {5757+ if (likely(mm->token_priority > 0))5858+ mm->token_priority--;5959+ }6060+6161+ /* Check if we deserve the token */6262+ if (mm->token_priority > swap_token_mm->token_priority)6363+ goto replace_token;6464+6565+update_priority:6666+ trace_update_swap_token_priority(mm, old_prio, swap_token_mm);89679068out:9169 mm->faultstamp = global_faults;9270 mm->last_interval = current_interval;9371 spin_unlock(&swap_token_lock);7272+ return;7373+7474+replace_token:7575+ mm->token_priority += 2;7676+ trace_replace_swap_token(swap_token_mm, mm);7777+ swap_token_mm = mm;7878+ swap_token_memcg = swap_token_memcg_from_mm(mm);7979+ last_aging = global_faults;8080+ goto out;9481}95829683/* Called on process exit. */9784void __put_swap_token(struct mm_struct *mm)9885{9986 spin_lock(&swap_token_lock);100100- if (likely(mm == swap_token_mm))8787+ if (likely(mm == swap_token_mm)) {8888+ trace_put_swap_token(swap_token_mm);10189 swap_token_mm = NULL;9090+ swap_token_memcg = NULL;9191+ }10292 spin_unlock(&swap_token_lock);9393+}9494+9595+static bool match_memcg(struct mem_cgroup *a, struct mem_cgroup *b)9696+{9797+ if (!a)9898+ return true;9999+ if (!b)100100+ return true;101101+ if (a == b)102102+ return true;103103+ return false;104104+}105105+106106+void disable_swap_token(struct mem_cgroup *memcg)107107+{108108+ /* memcg reclaim don't disable unrelated mm token. */109109+ if (match_memcg(memcg, swap_token_memcg)) {110110+ spin_lock(&swap_token_lock);111111+ if (match_memcg(memcg, swap_token_memcg)) {112112+ trace_disable_swap_token(swap_token_mm);113113+ swap_token_mm = NULL;114114+ swap_token_memcg = NULL;115115+ }116116+ spin_unlock(&swap_token_lock);117117+ }103118}
+16-4
mm/vmscan.c
···11241124 nr_lumpy_dirty++;11251125 scan++;11261126 } else {11271127- /* the page is freed already. */11281128- if (!page_count(cursor_page))11271127+ /*11281128+ * Check if the page is freed already.11291129+ *11301130+ * We can't use page_count() as that11311131+ * requires compound_head and we don't11321132+ * have a pin on the page here. If a11331133+ * page is tail, we may or may not11341134+ * have isolated the head, so assume11351135+ * it's not free, it'd be tricky to11361136+ * track the head status without a11371137+ * page pin.11381138+ */11391139+ if (!PageTail(cursor_page) &&11401140+ !atomic_read(&cursor_page->_count))11291141 continue;11301142 break;11311143 }···20932081 for (priority = DEF_PRIORITY; priority >= 0; priority--) {20942082 sc->nr_scanned = 0;20952083 if (!priority)20962096- disable_swap_token();20842084+ disable_swap_token(sc->mem_cgroup);20972085 total_scanned += shrink_zones(priority, zonelist, sc);20982086 /*20992087 * Don't shrink slabs when reclaiming memory from···2419240724202408 /* The swap token gets in the way of swapout... */24212409 if (!priority)24222422- disable_swap_token();24102410+ disable_swap_token(NULL);2423241124242412 all_zones_ok = 1;24252413 balanced = 0;
+5
scripts/checkpatch.pl
···19431943 WARN("LINUX_VERSION_CODE should be avoided, code should be for the version to which it is merged\n" . $herecurr);19441944 }1945194519461946+# check for uses of printk_ratelimit19471947+ if ($line =~ /\bprintk_ratelimit\s*\(/) {19481948+ WARN("Prefer printk_ratelimited or pr_<level>_ratelimited to printk_ratelimit\n" . $herecurr);19491949+ }19501950+19461951# printk should use KERN_* levels. Note that follow on printk's on the19471952# same line do not need a level, so we use the current block context19481953# to try and find and validate the current printk. In summary the current
+1-1
security/tomoyo/mount.c
···138138 }139139 if (need_dev) {140140 /* Get mount point or device file. */141141- if (kern_path(dev_name, LOOKUP_FOLLOW, &path)) {141141+ if (!dev_name || kern_path(dev_name, LOOKUP_FOLLOW, &path)) {142142 error = -ENOENT;143143 goto out;144144 }