summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'for-4.13' of ↵Linus Torvalds2017-07-068-201/+548
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup changes from Tejun Heo: - Waiman made the debug controller work and a lot more useful on cgroup2 - There were a couple issues with cgroup subtree delegation. The documentation on delegating to a non-root user was missing some part and cgroup namespace support wasn't factoring in delegation at all. The documentation is updated and the now there is a mount option to make cgroup namespace fit for delegation * 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: implement "nsdelegate" mount option cgroup: restructure cgroup_procs_write_permission() cgroup: "cgroup.subtree_control" should be writeable by delegatee cgroup: fix lockdep warning in debug controller cgroup: refactor cgroup_masks_read() in the debug controller cgroup: make debug an implicit controller on cgroup2 cgroup: Make debug cgroup support v2 and thread mode cgroup: Make Kconfig prompt of debug cgroup more accurate cgroup: Move debug cgroup to its own file cgroup: Keep accurate count of tasks in each css_set
| * cgroup: implement "nsdelegate" mount optionTejun Heo2017-06-283-23/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, cgroup only supports delegation to !root users and cgroup namespaces don't get any special treatments. This limits the usefulness of cgroup namespaces as they by themselves can't be safe delegation boundaries. A process inside a cgroup can change the resource control knobs of the parent in the namespace root and may move processes in and out of the namespace if cgroups outside its namespace are visible somehow. This patch adds a new mount option "nsdelegate" which makes cgroup namespaces delegation boundaries. If set, cgroup behaves as if write permission based delegation took place at namespace boundaries - writes to the resource control knobs from the namespace root are denied and migration crossing the namespace boundary aren't allowed from inside the namespace. This allows cgroup namespace to function as a delegation boundary by itself. v2: Silently ignore nsdelegate specified on !init mounts. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Aravind Anbudurai <aru7@fb.com> Cc: Serge Hallyn <serge@hallyn.com> Cc: Eric Biederman <ebiederm@xmission.com>
| * cgroup: restructure cgroup_procs_write_permission()Tejun Heo2017-06-281-24/+33
| | | | | | | | | | | | | | | | | | Restructure cgroup_procs_write_permission() to make extending permission logic easier. This patch doesn't cause any functional changes. Signed-off-by: Tejun Heo <tj@kernel.org>
| * cgroup: "cgroup.subtree_control" should be writeable by delegateeTejun Heo2017-06-251-4/+5
| | | | | | | | | | | | | | | | | | | | | | "cgroup.subtree_control" determines which resource types a cgroup wants to control. Unlike actual resource knobs, this is an attribute which belongs to the cgroup itself instead of its parent and thus should be writeable by the delegatee in a delegated cgroup. Update delegation documentation accordingly. Signed-off-by: Tejun Heo <tj@kernel.org>
| * cgroup: fix lockdep warning in debug controllerTejun Heo2017-06-141-8/+21
| | | | | | | | | | | | | | | | | | The debug controller grabs cgroup_mutex from interface file show functions which can deadlock and triggers lockdep warnings. Fix it by using cgroup_kn_lock_live()/cgroup_kn_unlock() instead. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Waiman Long <longman@redhat.com>
| * cgroup: refactor cgroup_masks_read() in the debug controllerTejun Heo2017-06-141-25/+21
| | | | | | | | | | | | | | | | Factor out cgroup_masks_read_one() out of cgroup_masks_read() for simplicity. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Waiman Long <longman@redhat.com>
| * cgroup: make debug an implicit controller on cgroup2Tejun Heo2017-06-141-3/+56
| | | | | | | | | | | | | | | | Make debug an implicit controller on cgroup2 which is enabled by "cgroup_debug" boot param. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Waiman Long <longman@redhat.com>
| * cgroup: Make debug cgroup support v2 and thread modeWaiman Long2017-06-141-17/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Besides supporting cgroup v2 and thread mode, the following changes are also made: 1) current_* cgroup files now resides only at the root as we don't need duplicated files of the same function all over the cgroup hierarchy. 2) The cgroup_css_links_read() function is modified to report the number of tasks that are skipped because of overflow. 3) The number of extra unaccounted references are displayed. 4) The current_css_set_read() function now prints out the addresses of the css'es associated with the current css_set. 5) A new cgroup_subsys_states file is added to display the css objects associated with a cgroup. 6) A new cgroup_masks file is added to display the various controller bit masks in the cgroup. tj: Dropped thread mode related information for now so that debug controller changes aren't blocked on the thread mode. Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * cgroup: Make Kconfig prompt of debug cgroup more accurateWaiman Long2017-06-142-2/+11
| | | | | | | | | | | | | | | | | | The Kconfig prompt and description of the debug cgroup controller more accurate by saying that it is for debug purpose only and its interfaces are unstable. Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * cgroup: Move debug cgroup to its own fileWaiman Long2017-06-144-148/+157
| | | | | | | | | | | | | | | | | | | | The debug cgroup currently resides within cgroup-v1.c and is enabled only for v1 cgroup. To enable the debug cgroup also for v2, it makes sense to put the code into its own file as it will no longer be v1 specific. There is no change to the debug cgroup specific code. Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * cgroup: Keep accurate count of tasks in each css_setWaiman Long2017-06-143-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reference count in the css_set data structure was used as a proxy of the number of tasks attached to that css_set. However, that count is actually not an accurate measure especially with thread mode support. So a new variable nr_tasks is added to the css_set to keep track of the actual task count. This new variable is protected by the css_set_lock. Functions that require the actual task count are updated to use the new variable. tj: s/task_count/nr_tasks/ for consistency with cgroup_root->nr_cgrps. Refreshed on top of cgroup/for-v4.13 which dropped on css_set_populated() -> nr_tasks conversion. Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* | Merge branch 'for-4.13' of ↵Linus Torvalds2017-07-0636-236/+1589
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata updates from Tejun Heo: - Christoph added support for TCG OPAL self encrypting disks - Minwoo added support for ATA PASS-THROUGH(32) - Linus Walleij removed spurious drvdata assignments in some drivers - Support for a few new device and other fixes * 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (33 commits) sd: add support for TCG OPAL self encrypting disks libata: fix build warning from unused goto label libata: Support for an ATA PASS-THROUGH(32) command. ahci: Add Device ID for ASMedia 1061R and 1062R sata_via: Enable optional hotplug on VT6420 ata: ahci_brcm: Avoid writing to read-only registers libata: Add the AHCI_HFLAG_NO_WRITE_TO_RO flag libata: Add the AHCI_HFLAG_YES_ALPM flag ata: ftide010: fix resource printing libata: make the function name in comment match the actual function ata: sata_rcar: make of_device_ids const. ata: pata_octeon_cf: make of_device_ids const. libata: Convert bare printks to pr_cont libahci: wrong comments in ahci_do_softreset() ata: declare ata_port_info structures as const ata: Add driver for Faraday Technology FTIDE010 ata: Add DT bindings for the Gemini SATA bridge ata: Add DT bindings for Faraday Technology FTIDE010 libata: implement SECURITY PROTOCOL IN/OUT libata: factor out a ata_identify_page_supported helper ...
| * | sd: add support for TCG OPAL self encrypting disksChristoph Hellwig2017-06-294-1/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just wire up the generic TCG OPAL infrastructure to the SCSI disk driver and the Security In/Out commands. Note that I don't know of any actual SCSI disks that do support TCG OPAL, but this is required to support ATA disks through libata. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: fix build warning from unused goto labelTejun Heo2017-06-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | b1ffbf854e08 ("libata: Support for an ATA PASS-THROUGH(32) command.") introduced an unused goto label. Remove it. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: Support for an ATA PASS-THROUGH(32) command.Minwoo Im2017-06-273-6/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SAT-4(SCSI/ATA Translation) supports for an ata pass-thru(32). This patch will allow to translate an ata pass-thru(32) SCSI cmd to an ATA cmd. Signed-off-by: Minwoo Im <dn3108@gmail.com> Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ahci: Add Device ID for ASMedia 1061R and 1062RShawn Lin2017-06-271-0/+2
| | | | | | | | | | | | | | | | | | | | | Adding ASMedia 1061R and 1062R platform device IDs for SATA. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | sata_via: Enable optional hotplug on VT6420Ondrej Zary2017-06-261-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | VT6420 seems to have the same hotplug capability as VT6421. However, enabling hotplug needs to expose SCR registers which can cause problems. It works for me but might break elsewhere. So add a module parameter vt6420_hotplug to enable this feature. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: ahci_brcm: Avoid writing to read-only registersDoug Berger2017-06-221-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes use of the AHCI_HFLAG_YES_ALPM flag to prevent the driver from writing to the read-only Host Capability register. It also sets the AHCI_HFLAG_NO_WRITE_TO_RO flag to prevent the AHCI library from writing to read-only registers. Signed-off-by: Doug Berger <opendmb@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: Add the AHCI_HFLAG_NO_WRITE_TO_RO flagDoug Berger2017-06-222-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While most hardware will simply ignore a write to a read-only register, some hardware will signal an abort if this occurs. This commit introduces the flag AHCI_HFLAG_NO_WRITE_TO_RO to prevent the AHCI library from attempting to write to the HOST_CAP, HOST_CAP2, and HOST_PORTS_IMPL registers which may be read-only. Signed-off-by: Doug Berger <opendmb@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: Add the AHCI_HFLAG_YES_ALPM flagDoug Berger2017-06-222-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some hardware is capable of supporting Aggresive Link Power Management even though it is not indicated by the Host Capability register. This commit adds the AHCI_HFLAG_YES_ALPM flag to the AHCI library to allow indication of this quirk when the Host Capability register is Read Only and therefore cannot be changed. Signed-off-by: Doug Berger <opendmb@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: ftide010: fix resource printingArnd Bergmann2017-06-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new driver uses an incorrect format string for resource_size_t: drivers/ata/pata_ftide010.c: In function 'pata_ftide010_probe': drivers/ata/pata_ftide010.c:520:17: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'resource_size_t {aka long long unsigned int}' [-Wformat=] The nicest way to print the address is to pretty-print the resource using %pR. Fixes: be4e456ed3a5 ("ata: Add driver for Faraday Technology FTIDE010") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: make the function name in comment match the actual functionMinwoo Im2017-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function name used to be ata_scsiop_mode_select() but renamed to ata_scsi_mode_select_xlat(). Update the comment accordingly. tj: Minor commit desc update. Signed-off-by: Minwoo Im <dn3108@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: sata_rcar: make of_device_ids const.Arvind Yadav2017-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by <linux/of.h> work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 3946 2296 0 6242 1862 drivers/ata/sata_rcar.o File size after constify sata_rcar_match. text data bss dec hex filename 5554 696 0 6250 186a drivers/ata/sata_rcar.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: pata_octeon_cf: make of_device_ids const.Arvind Yadav2017-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of_device_ids are not supposed to change at runtime. All functions working with of_device_ids provided by <linux/of.h> work with const of_device_ids. So mark the non-const structs as const. File size before: text data bss dec hex filename 465 696 4 1165 48d drivers/ata/pata_octeon_cf.o File size after constify octeon_cf_match. text data bss dec hex filename 865 280 4 1149 47d drivers/ata/pata_octeon_cf.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: Convert bare printks to pr_contJoe Perches2017-06-121-21/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Linus Torvalds changed the behavior of printks without KERN_<LEVEL>. Convert the continuation prints to use pr_cont. At the same time, convert the existing printks with KERN_<LEVEL> to pr_<level> Miscellanea: o Coalesce a multiline format Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libahci: wrong comments in ahci_do_softreset()Minwoo Im2017-06-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | AHCI 1.3.1 Spec says that software shall build two H2D register FISes in the command list to send a software reset. The comments in ahci_do_softreset() is currently D2H instead of H2D. Signed-off-by: Minwoo Im <dn3108@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: declare ata_port_info structures as constBhumika Goyal2017-06-124-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | ata_port_info structures are either copied to other objects or their references are stored in objects of type const. So, ata_port_info structures having similar usage pattern can be made const. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: Add driver for Faraday Technology FTIDE010Linus Walleij2017-06-126-0/+1058
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a driver for the Faraday Technology FTIDE010 PATA IP block. When used with the Storlink/Storm/Cortina Systems Gemini SoC, the PATA interface is accompanied by a PATA<->SATA bridge, so while the device appear as a PATA controller, it attaches physically to SATA disks, and also has a designated memory area with registers to set up the bridge. The Gemini SATA bridge is separated into its own driver file to make things modular and make it possible to reuse the PATA driver as stand-alone on other systems than the Gemini. dmesg excerpt from the D-Link DIR-685 storage router: gemini-sata-bridge 46000000.sata: SATA ID 00000e00, PHY ID: 01000100 gemini-sata-bridge 46000000.sata: set up the Gemini IDE/SATA nexus ftide010 63000000.ata: set up Gemini PATA0 ftide010 63000000.ata: device ID 00000500, irq 26, io base 0x63000000 ftide010 63000000.ata: SATA0 (master) start gemini-sata-bridge 46000000.sata: SATA0 PHY ready scsi host0: pata-ftide010 ata1: PATA max UDMA/133 irq 26 ata1.00: ATA-8: INTEL SSDSA2CW120G3, 4PC10302, max UDMA/133 ata1.00: 234441648 sectors, multi 1: LBA48 NCQ (depth 0/32) ata1.00: configured for UDMA/133 scsi 0:0:0:0: Direct-Access ATA INTEL SSDSA2CW12 0302 PQ: 0 ANSI: 5 ata1.00: Enabling discard_zeroes_data sd 0:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/112 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA ata1.00: Enabling discard_zeroes_data ata1.00: Enabling discard_zeroes_data sd 0:0:0:0: [sda] Attached SCSI disk After this I can flawlessly mount and read/write copy etc files from /dev/sda[n]. Cc: John Feng-Hsin Chiang <john453@faraday-tech.com> Cc: Greentime Hu <green.hu@gmail.com> Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: Add DT bindings for the Gemini SATA bridgeLinus Walleij2017-06-121-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds device tree bindings for the Cortina Systems Gemini PATA to SATA bridge. Cc: devicetree@vger.kernel.org Cc: John Feng-Hsin Chiang <john453@faraday-tech.com> Cc: Greentime Hu <green.hu@gmail.com> Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: Add DT bindings for Faraday Technology FTIDE010Linus Walleij2017-06-121-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds device tree bindings for the Faraday Technology FTIDE010 found in the Storlink/Storm/Cortina Systems Gemini SoC. I am not 100% sure that this part is from Faraday Technology but a lot points in that direction: - A later IDE interface called FTIDE020 exist and share some properties. - The SATA bridge has the same Built In Self Test (BIST) that the Faraday FTSATA100 seems to have, and it has version number 0100 in the device ID register, so this is very likely a FTSATA100 bundled with the FTIDE010. Cc: devicetree@vger.kernel.org Cc: John Feng-Hsin Chiang <john453@faraday-tech.com> Cc: Greentime Hu <green.hu@gmail.com> Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: implement SECURITY PROTOCOL IN/OUTChristoph Hellwig2017-06-054-0/+110
| | | | | | | | | | | | | | | | | | | | | This allows us to use the generic OPAL code with ATA devices. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: factor out a ata_identify_page_supported helperChristoph Hellwig2017-06-051-27/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | tj: Updated line continuation style for consistency as pointed out by Sergei. Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: clarify log page naming / groupingChristoph Hellwig2017-06-052-8/+12
| | | | | | | | | | | | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: factor out a ata_log_supported helperChristoph Hellwig2017-06-051-43/+16
| | | | | | | | | | | | | | | Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: move ata_read_log_page to libata-core.cChristoph Hellwig2017-06-053-66/+66
| | | | | | | | | | | | | | | | | | | | | It is core functionality, and only one of the users is in the EH code. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ahci: qoriq: add ls1088a platforms supportYuantian Tang2017-06-021-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ls1088a is new introduced arm-based soc with sata support with following features: * Complies with the serial ATA 3.0 specification and the AHCI 1.3.1 specification * Contains a high-speed descriptor-based DMA controller * Supports the following: * Speeds of 1.5 Gb/s (first-generation SATA), 3 Gb/s (second-generation SATA), and 6 Gb/s (third-generation SATA) * FIS-based switching * Native command queuing (NCQ) commands * Port multiplier operation * Asynchronous notification * SATA Vendor BIST mode Signed-off-by: Tang Yuantian <andy.tang@nxp.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: sata_fsl: cut drvdata assignmentLinus Walleij2017-05-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | ata_host_alloc_pinfo() assigns the host pointer to the struct device * drvdata, do not assign it a second time. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: samsung_cf: cut drvdata assignmentLinus Walleij2017-05-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | ata_host_alloc_pinfo() assigns the host pointer to the struct device * drvdata, do not assign it a second time. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: rb532_cf: cut drvdata assignmentLinus Walleij2017-05-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | ata_host_alloc_pinfo() assigns the host pointer to the struct device * drvdata, do not assign it a second time. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: dwc_460ex: cut drvdata assignmentLinus Walleij2017-05-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | ata_host_alloc_pinfo() assigns the host pointer to the struct device * drvdata, do not assign it a second time. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: ep93xx: cut drvdata assignmentLinus Walleij2017-05-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ata_host_alloc_pinfo() assigns the host pointer to the struct device * drvdata, do not assign drv_data like this. Since ata_host_alloc_pinfo() is called after this site, the correct value is set eventually, but this assignment is just plain pointless. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: bf54x: cut drvdata assignmentLinus Walleij2017-05-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | ata_host_alloc_pinfo() assigns the host pointer to the struct device * drvdata, do not assign it a second time. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata: update references for libata documentationMauro Carvalho Chehab2017-05-1625-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | The libata documentation is now using ReST. Update references to it to point to the new place. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | libata: fix identation on a kernel-doc markupMauro Carvalho Chehab2017-05-161-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sphinx got confused with the markup identation: ./drivers/ata/libata-scsi.c:3402: ERROR: Unexpected indentation. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | ata-sff: always map page before data transferTycho Andersen2017-05-161-36/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XPFO [1] patchset may unmap pages from physmap if they happened to be destined for userspace. If such a page is unmapped, it needs to be remapped. Rather than test if a page is in the highmem/xpfo unmapped state, Christoph suggested [2] that we simply always map the page. v2: * drop comment about bounce buffer * don't save IRQs before kmap/unmap * formatting [1]: https://lkml.org/lkml/2016/11/4/245 [2]: https://lkml.org/lkml/2016/11/4/253 Suggested-and-reviewed-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Tycho Andersen <tycho@docker.com> CC: Juerg Haefliger <juerg.haefliger@hpe.com> Signed-off-by: Tejun Heo <tj@kernel.org>
* | | Merge branch 'for-4.13' of ↵Linus Torvalds2017-07-0619-70/+621
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu Pull percpu updates from Tejun Heo: "These are the percpu changes for the v4.13-rc1 merge window. There are a couple visibility related changes - tracepoints and allocator stats through debugfs, along with __ro_after_init markings and a cosmetic rename in percpu_counter. Please note that the simple O(#elements_in_the_chunk) area allocator used by percpu allocator is again showing scalability issues, primarily with bpf allocating and freeing large number of counters. Dennis is working on the replacement allocator and the percpu allocator will be seeing increased churns in the coming cycles" * 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: fix static checker warnings in pcpu_destroy_chunk percpu: fix early calls for spinlock in pcpu_stats percpu: resolve err may not be initialized in pcpu_alloc percpu_counter: Rename __percpu_counter_add to percpu_counter_add_batch percpu: add tracepoint support for percpu memory percpu: expose statistics about percpu memory via debugfs percpu: migrate percpu data structures to internal header percpu: add missing lockdep_assert_held to func pcpu_free_area mark most percpu globals as __ro_after_init
| * | | percpu: fix static checker warnings in pcpu_destroy_chunkDennis Zhou2017-06-292-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From 5021b97f4026334d2c8dfad80797dd1028cddd73 Mon Sep 17 00:00:00 2001 From: Dennis Zhou <dennisz@fb.com> Date: Thu, 29 Jun 2017 07:11:41 -0700 Add NULL check in pcpu_destroy_chunk to correct static checker warnings. Signed-off-by: Dennis Zhou <dennisz@fb.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | | percpu: fix early calls for spinlock in pcpu_statsDennis Zhou2017-06-211-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From 2c06e795162cb306c9707ec51d3e1deadb37f573 Mon Sep 17 00:00:00 2001 From: Dennis Zhou <dennisz@fb.com> Date: Wed, 21 Jun 2017 10:17:09 -0700 Commit 30a5b5367ef9 ("percpu: expose statistics about percpu memory via debugfs") introduces percpu memory statistics. pcpu_stats_chunk_alloc takes the spin lock and disables/enables irqs on creation of a chunk. Irqs are not enabled when the first chunk is initialized and thus kernels are failing to boot with kernel debugging enabled. Fixed by changing _irq to _irqsave and _irqrestore. Fixes: 30a5b5367ef9 ("percpu: expose statistics about percpu memory via debugfs") Signed-off-by: Dennis Zhou <dennisz@fb.com> Reported-by: Alexander Levin <alexander.levin@verizon.com> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | | percpu: resolve err may not be initialized in pcpu_allocDennis Zhou2017-06-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From 4a42ecc735cff0015cc73c3d87edede631f4b885 Mon Sep 17 00:00:00 2001 From: Dennis Zhou <dennisz@fb.com> Date: Wed, 21 Jun 2017 08:07:15 -0700 Add error message to out of space failure for atomic allocations in percpu allocation path to fix -Wmaybe-uninitialized. Signed-off-by: Dennis Zhou <dennisz@fb.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Tejun Heo <tj@kernel.org>
| * | | percpu_counter: Rename __percpu_counter_add to percpu_counter_add_batchNikolay Borisov2017-06-2011-30/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, percpu_counter_add is a wrapper around __percpu_counter_add which is preempt safe due to explicit calls to preempt_disable. Given how __ prefix is used in percpu related interfaces, the naming unfortunately creates the false sense that __percpu_counter_add is less safe than percpu_counter_add. In terms of context-safety, they're equivalent. The only difference is that the __ version takes a batch parameter. Make this a bit more explicit by just renaming __percpu_counter_add to percpu_counter_add_batch. This patch doesn't cause any functional changes. tj: Minor updates to patch description for clarity. Cosmetic indentation updates. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Chris Mason <clm@fb.com> Cc: Josef Bacik <jbacik@fb.com> Cc: David Sterba <dsterba@suse.com> Cc: Darrick J. Wong <darrick.wong@oracle.com> Cc: Jan Kara <jack@suse.com> Cc: Jens Axboe <axboe@fb.com> Cc: linux-mm@kvack.org Cc: "David S. Miller" <davem@davemloft.net>